:root{
  --bg: #0b0d11;
  --bg-2: #0e1116;
  --surface: #14171c;
  --surface-2: #1b1f25;
  --line: #262b32;
  --text: #f1efea;
  --muted: #8a8f98;
  --accent: #c6952b;
  --accent-dim: #8a6a24;
  --accent-soft: rgba(198,149,43,0.12);
  --header-bg: rgba(11,13,17,0.86);
  --header-bg-solid: rgba(11,13,17,0.96);
  --hero-fade: rgba(11,13,17,0.96);
  --hero-fade-mid: rgba(11,13,17,0.25);
  --hero-sub: #c9cbd0;
  --body-copy: #c4c7cd;
  --soft-line: rgba(255,255,255,0.12);
  --play-bg: rgba(11,13,17,0.55);
  --play-border: rgba(255,255,255,0.3);
  --modal-bg: rgba(6,7,9,0.92);
  --map-filter: grayscale(1) invert(0.92) contrast(0.9);
  --selection-fg: #0b0d11;
  --ctrl-bg: rgba(255,255,255,0.06);
}
html[data-theme="light"]{
  --bg: #f4f5f7;
  --bg-2: #ebedf1;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #d5d8de;
  --text: #14171c;
  --muted: #5c616b;
  --accent: #9a7420;
  --accent-dim: #7d5e1c;
  --accent-soft: rgba(154,116,32,0.12);
  --header-bg: rgba(244,245,247,0.92);
  --header-bg-solid: rgba(244,245,247,0.98);
  --hero-fade: rgba(11,13,17,0.96);
  --hero-fade-mid: rgba(11,13,17,0.25);
  --hero-sub: #c9cbd0;
  --body-copy: #3f444c;
  --soft-line: rgba(255,255,255,0.18);
  --play-bg: rgba(11,13,17,0.55);
  --play-border: rgba(255,255,255,0.3);
  --modal-bg: rgba(20,23,28,0.72);
  --map-filter: grayscale(0.35) contrast(0.95);
  --selection-fg: #fff;
  --ctrl-bg: rgba(20,23,28,0.06);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  transition:background .35s ease, color .35s ease;
}
img,video{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
::selection{background:var(--accent); color:var(--selection-fg);}

h1,h2,h3{
  font-family:'Fraunces',serif;
  font-weight:500;
  letter-spacing:-0.01em;
  line-height:1.08;
}

.wrap{max-width:1180px; margin:0 auto; padding:0 32px;}

/* ---------- Header ---------- */
header{
  position:fixed; top:0; left:0; right:0; z-index:100;
  padding:22px 0;
  transition:background .4s ease, padding .4s ease, border-color .4s ease;
  border-bottom:1px solid transparent;
}
header.scrolled{
  background:var(--header-bg);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  padding:16px 0;
  border-bottom:1px solid var(--line);
}
header .wrap{display:flex; align-items:center; justify-content:space-between;}
.logo{
  font-family:'Fraunces',serif;
  font-size:1.3rem;
  font-weight:500;
  display:flex; align-items:center; gap:10px;
  position:relative;
  z-index:102;
}
.logo-img{
  height:38px; width:auto; display:block;
  transition:filter .3s ease;
}
html[data-theme="light"] header.scrolled .logo-img,
html[data-theme="light"] body.nav-open .logo-img{
  filter:invert(1);
}
.header-actions{
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  z-index:102;
}
.ctrl-btn{
  min-width:38px;
  height:38px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--soft-line);
  background:var(--ctrl-bg);
  color:var(--text);
  font-family:'JetBrains Mono',monospace;
  font-size:0.72rem;
  letter-spacing:0.04em;
  cursor:pointer;
  transition:border-color .25s ease, color .25s ease, background .25s ease;
}
.ctrl-btn:hover{border-color:var(--accent); color:var(--accent);}
html[data-theme="light"] header:not(.scrolled) .ctrl-btn{
  color:#f1efea;
  border-color:rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.08);
}
.theme-toggle svg{
  width:16px; height:16px;
  fill:none; stroke:currentColor; stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
}
.theme-toggle .icon-moon{display:none;}
html[data-theme="light"] .theme-toggle .icon-sun{display:none;}
html[data-theme="light"] .theme-toggle .icon-moon{display:block;}
nav.primary-nav{
  position:fixed;
  top:0; left:0; right:0;
  z-index:101;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:36px;
  max-width:1180px;
  margin:0 auto;
  padding:28px 168px 28px 32px;
  pointer-events:none;
  transition:padding .4s ease;
  box-sizing:border-box;
}
@media (min-width:861px){
  header.scrolled ~ nav.primary-nav{padding:22px 168px 22px 32px;}
}
nav.primary-nav a{
  font-size:0.92rem; color:var(--muted);
  transition:color .25s ease;
  position:relative;
  pointer-events:auto;
}
nav.primary-nav a:hover{color:var(--text);}
html[data-theme="light"] header:not(.scrolled) ~ nav.primary-nav a{color:rgba(241,239,234,0.72);}
html[data-theme="light"] header:not(.scrolled) ~ nav.primary-nav a:hover{color:#f1efea;}
.nav-toggle{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
  position:relative;
  z-index:102;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:1.5px;
  background:var(--text);
  transition:transform .25s ease, opacity .25s ease, background .25s ease;
}
html[data-theme="light"] header:not(.scrolled) .nav-toggle span{background:#f1efea;}
body.nav-open .nav-toggle span:nth-child(1){transform:translateY(6.5px) rotate(45deg);}
body.nav-open .nav-toggle span:nth-child(2){opacity:0;}
body.nav-open .nav-toggle span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg);}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  height:100vh; min-height:640px;
  display:flex; align-items:flex-end;
  overflow:hidden;
  background:#000;
  color:#f1efea;
}
.hero video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  opacity:0.55;
}
.hero::before{
  content:'';
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(11,13,17,0.35) 0%, var(--hero-fade-mid) 40%, var(--hero-fade) 96%),
    radial-gradient(ellipse at 50% 0%, transparent 30%, rgba(11,13,17,0.5) 100%);
  z-index:1;
}
.hero-content{
  position:relative; z-index:2;
  padding-bottom:8.5vh;
  width:100%;
}
.hero-content h1{
  font-size:clamp(2.6rem, 6.4vw, 5.2rem);
  max-width:14ch;
  color:#f1efea;
}
.hero-content .sub{
  margin-top:26px;
  max-width:46ch;
  font-size:1.08rem;
  color:var(--hero-sub);
  font-weight:400;
}
.hero-foot{
  display:flex; align-items:center; justify-content:flex-end;
  margin-top:56px;
  padding-top:20px;
  border-top:1px solid var(--soft-line);
}
.rec-tag{
  display:flex; align-items:center; gap:9px;
  font-family:'JetBrains Mono',monospace;
  font-size:0.74rem;
  letter-spacing:0.04em;
  color:var(--muted);
}
.rec-dot{
  width:7px; height:7px; border-radius:50%;
  background:var(--accent);
  animation:pulse 2.2s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{opacity:1; box-shadow:0 0 0 0 var(--accent-soft);}
  50%{opacity:0.55; box-shadow:0 0 0 6px transparent;}
}
.scroll-cue{font-size:0.74rem; color:#8a8f98; font-family:'JetBrains Mono',monospace;}

/* ---------- Section shell ---------- */
section{padding:130px 0;}
.section-head{max-width:640px; margin-bottom:64px;}
.section-head .kicker{
  font-family:'Fraunces',serif;
  font-style:italic;
  font-weight:400;
  color:var(--accent);
  font-size:1.15rem;
  margin-bottom:14px;
}
.section-head h2{font-size:clamp(1.9rem, 3.4vw, 2.7rem); color:var(--text);}

/* ---------- About ---------- */
#hakkimizda{background:var(--bg-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:80px;
  align-items:start;
}
.about-grid p{
  color:var(--body-copy);
  font-size:1.02rem;
  margin-bottom:20px;
  max-width:56ch;
}
.about-kicker{
  font-family:'Inter',sans-serif;
  font-style:normal;
  font-weight:600;
  color:var(--text);
  font-size:clamp(1.55rem, 2.8vw, 2.15rem);
  line-height:1.25;
  letter-spacing:-0.02em;
  margin-bottom:28px;
  max-width:20ch;
}
.about-stats{
  display:flex; flex-direction:column; gap:0;
  border-top:1px solid var(--line);
}
.stat-row{
  display:flex; justify-content:space-between; align-items:baseline;
  padding:22px 0;
  border-bottom:1px solid var(--line);
}
.stat-row .label{color:var(--muted); font-size:0.92rem;}
.stat-row .value{
  font-family:'Fraunces',serif; font-size:1.4rem; color:var(--accent);
  text-align:right;
}

/* ---------- Projects ---------- */
.tabs{
  display:flex; gap:8px; margin-bottom:48px;
  border-bottom:1px solid var(--line);
}
.tab-btn{
  background:none; border:none; cursor:pointer;
  color:var(--muted);
  font-family:'Inter',sans-serif;
  font-size:0.95rem;
  padding:14px 4px;
  margin-right:32px;
  position:relative;
  transition:color .25s ease;
}
.tab-btn::after{
  content:''; position:absolute; left:0; right:0; bottom:-1px; height:2px;
  background:var(--accent);
  transform:scaleX(0); transform-origin:left;
  transition:transform .3s ease;
}
.tab-btn.active{color:var(--text);}
.tab-btn.active::after{transform:scaleX(1);}

.tab-panel{display:none;}
.tab-panel.active{display:block; animation:fadein .4s ease;}
@keyframes fadein{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}}

.featured-project{
  display:grid;
  grid-template-columns:1.1fr 0.9fr;
  gap:0;
  background:var(--surface);
  border:1px solid var(--line);
  margin-bottom:28px;
  overflow:hidden;
}
.featured-media{
  position:relative;
  background:#000;
  aspect-ratio:16/10;
  cursor:pointer;
  overflow:hidden;
}
.featured-media video{width:100%; height:100%; object-fit:cover; opacity:0.75;}
.play-btn{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:64px; height:64px; border-radius:50%;
  background:var(--play-bg);
  border:1px solid var(--play-border);
  backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  transition:transform .25s ease, background .25s ease;
}
.featured-media:hover .play-btn{transform:translate(-50%,-50%) scale(1.08); background:var(--accent); border-color:var(--accent);}
.play-btn svg{width:20px; height:20px; margin-left:3px; fill:#fff;}
.featured-text{padding:44px 46px; display:flex; flex-direction:column; justify-content:center;}
.status-badge{
  display:inline-flex; align-items:center; gap:7px;
  font-family:'JetBrains Mono',monospace;
  font-size:0.7rem; letter-spacing:0.03em;
  color:var(--accent);
  border:1px solid var(--accent-dim);
  background:var(--accent-soft);
  padding:6px 11px;
  width:fit-content;
  margin-bottom:18px;
}
.featured-text h3{font-size:1.9rem; margin-bottom:14px;}
.featured-text p{color:var(--muted); font-size:0.98rem; max-width:44ch;}
.project-logo{
  display:block;
  width:100%;
  max-width:260px;
  height:auto;
  object-fit:contain;
  margin:4px 0 14px;
  background:transparent;
  border:none;
}
.featured-text .project-logo{max-width:300px;}

.project-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
}
.project-card{
  background:var(--surface);
  padding:34px;
  min-height:190px;
  display:flex; flex-direction:column; justify-content:flex-start; gap:18px;
  transition:background .25s ease;
}
.project-card:hover{background:var(--surface-2);}
.project-card h4{
  font-family:'Fraunces',serif; font-weight:500;
  font-size:1.28rem; margin-bottom:10px;
}
.project-card p{color:var(--muted); font-size:0.92rem;}
.status-badge.soon{color:var(--muted); border-color:var(--line); background:transparent;}
.status-badge.soon .rec-dot{background:var(--muted); animation:none;}

/* ---------- Carousel ---------- */
.carousel{--slides:2; --gap:1px;}
.carousel-track{
  display:flex;
  gap:var(--gap);
  background:var(--line);
  border:1px solid var(--line);
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  -ms-overflow-style:none;
  overscroll-behavior-x:contain;
}
.carousel-track::-webkit-scrollbar{display:none;}
.carousel-track .project-card{
  flex:0 0 calc((100% - (var(--slides) - 1) * var(--gap)) / var(--slides));
  scroll-snap-align:start;
}
.carousel-nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; margin-top:22px;
}
.carousel-dots{display:flex; gap:8px;}
.carousel-dot{
  width:26px; height:2px; padding:0;
  border:none; background:var(--line);
  cursor:pointer;
  transition:background .25s ease;
}
.carousel-dot:hover{background:var(--accent-dim);}
.carousel-dot.active{background:var(--accent);}
.carousel-arrows{display:flex; gap:8px;}
.carousel-arrow{
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  background:transparent;
  border:1px solid var(--line);
  color:var(--text);
  cursor:pointer;
  transition:border-color .25s ease, background .25s ease, color .25s ease, opacity .25s ease;
}
.carousel-arrow svg{
  width:18px; height:18px;
  fill:none; stroke:currentColor; stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
}
.carousel-arrow:hover:not(:disabled){border-color:var(--accent); color:var(--accent); background:var(--accent-soft);}
.carousel-arrow:disabled{opacity:0.3; cursor:default; color:var(--muted);}
.carousel.single-page .carousel-nav{display:none;}

/* ---------- TV Market ---------- */
#tv-market{background:var(--bg-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.board{
  border-top:1px solid var(--line);
}
.board-head{
  display:grid;
  grid-template-columns:220px 1fr 200px;
  padding:14px 0;
  font-family:'JetBrains Mono',monospace;
  font-size:0.72rem;
  color:var(--muted);
  letter-spacing:0.03em;
  border-bottom:1px solid var(--line);
}
.board-row{
  display:grid;
  grid-template-columns:220px 1fr 200px;
  align-items:center;
  padding:20px 0;
  border-bottom:1px solid var(--line);
  transition:padding-left .25s ease, background .25s ease;
}
.board-row:hover{padding-left:10px; background:var(--accent-soft);}
.board-date{
  font-family:'JetBrains Mono',monospace;
  font-size:0.86rem;
  color:var(--accent);
}
.board-name{font-family:'Fraunces',serif; font-size:1.15rem; color:var(--text);}
.board-loc{
  font-size:0.88rem; color:var(--muted);
  text-align:right;
  font-family:'JetBrains Mono',monospace;
}

/* ---------- Contact ---------- */
#iletisim{padding-top:130px; padding-bottom:0;}
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:80px;
  padding-bottom:90px;
}
.contact-grid h2{font-size:clamp(2rem, 3.6vw, 3rem); margin-bottom:20px; max-width:11ch;}
.contact-grid > div:first-child > p{color:var(--muted); max-width:40ch; margin-bottom:40px;}
.contact-line{
  display:flex; justify-content:space-between; align-items:baseline; gap:32px;
  padding:18px 0; border-top:1px solid var(--line);
  font-size:1rem;
}
.contact-line:last-child{border-bottom:1px solid var(--line);}
.contact-line .k{color:var(--muted); font-size:0.85rem; font-family:'JetBrains Mono',monospace; flex:0 0 auto; letter-spacing:0.03em;}
.contact-line a, .contact-line span.v{color:var(--text); transition:color .2s ease; text-align:right; max-width:60%;}
.contact-line a:hover{color:var(--accent);}
.map-frame{
  border:1px solid var(--line);
  height:100%; min-height:280px;
  background:var(--surface);
  display:flex; align-items:center; justify-content:center;
}
.map-frame iframe{width:100%; height:100%; border:0; filter:var(--map-filter);}

footer{
  border-top:1px solid var(--line);
  padding:26px 0;
}
footer .wrap{
  display:flex; justify-content:space-between; align-items:center;
  font-size:0.8rem; color:var(--muted);
}

/* ---------- Modal ---------- */
.modal{
  position:fixed; inset:0; z-index:200;
  background:var(--modal-bg);
  display:none; align-items:center; justify-content:center;
  padding:32px;
  backdrop-filter:blur(6px);
}
.modal.open{display:flex;}
.modal-inner{width:100%; max-width:960px;}
.modal video{width:100%; background:#000;}
.modal-close{
  display:flex; justify-content:flex-end; margin-bottom:14px;
}
.modal-close button{
  background:none; border:1px solid var(--line); color:var(--text);
  width:36px; height:36px; cursor:pointer; font-size:1.1rem;
}
.modal-close button:hover{border-color:var(--accent); color:var(--accent);}

/* ---------- Responsive ---------- */
@media (max-width:860px){
  .wrap{padding:0 22px;}
  header{
    z-index:200;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  header.scrolled{
    background:var(--header-bg-solid);
  }
  nav.primary-nav{
    position:fixed;
    top:72px; left:0; right:0; bottom:0;
    z-index:190;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:stretch;
    gap:0;
    max-width:none;
    margin:0;
    padding:8px 28px 48px;
    background:var(--bg);
    transform:translateX(100%);
    transition:transform .35s ease, visibility .35s ease;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    visibility:hidden;
    pointer-events:none;
  }
  header.scrolled ~ nav.primary-nav{
    top:64px;
    padding:8px 28px 48px;
  }
  nav.primary-nav.open{
    transform:translateX(0);
    visibility:visible;
    pointer-events:auto;
  }
  nav.primary-nav a{
    display:block;
    width:100%;
    padding:22px 0;
    border-bottom:1px solid var(--line);
    font-size:1.25rem;
    line-height:1.4;
    color:var(--text);
    white-space:normal;
    pointer-events:auto;
  }
  html[data-theme="light"] header:not(.scrolled) ~ nav.primary-nav a{color:var(--text);}
  nav.primary-nav a:last-child{border-bottom:none;}
  .nav-toggle{display:flex; z-index:210;}
  body.nav-open{overflow:hidden;}
  body.nav-open header{
    background:var(--bg);
    border-bottom-color:var(--line);
  }
  .about-grid, .contact-grid{grid-template-columns:1fr; gap:44px;}
  .featured-project{grid-template-columns:1fr;}
  .project-grid{grid-template-columns:1fr;}
  .carousel{--slides:1;}
  .project-logo{max-width:220px;}
  .board-head{display:none;}
  .board-row{grid-template-columns:1fr; gap:6px; padding:18px 0;}
  .board-loc{text-align:left; opacity:0.8;}
  section{padding:88px 0;}
}
