/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root{
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --line: #2b2b30;
  --line-soft: rgba(255,255,255,.08);
  --text: #f3f0e8;
  --text-dim: #a9a6a0;
  --text-faint: #6f6c68;
  --accent: #ff5a2b;
  --accent-2: #ffb238;
  --teal: #33c7b0;
  --focus: #ff5a2b;

  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font-body: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1240px;
  --radius: 2px;
  --ease: cubic-bezier(.22,.8,.24,1);
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video{ max-width: 100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font: inherit; }
h1,h2,h3,h4,p,figure{ margin:0; }

::selection{ background: var(--accent); color:#0a0a0b; }

/* thin custom scrollbar */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--line); border-radius:0; }
::-webkit-scrollbar-thumb:hover{ background: var(--accent); }

/* film-grain overlay */
body::before{
  content:"";
  position: fixed; inset:0;
  pointer-events:none;
  z-index: 9999;
  opacity:.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow{
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display:flex; align-items:center; gap:.6em;
  margin-bottom: 15px;
}
.eyebrow::before{
  content:"";
  width: 22px; height:1px; background: var(--accent);
}
h1,h2,h3,.disp{
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
  line-height: .96;
}
h2{ font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3{ font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.lede{
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-dim);
  max-width: 62ch;
}
.section-head{
  display:flex; flex-direction:column; gap: 1rem;
  margin-bottom: 3rem;
}
.section-head .top{ display:flex; align-items:baseline; justify-content:space-between; gap:2rem; flex-wrap:wrap; }

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.wrap{
  max-width: var(--container);
  margin-inline:auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
section{ padding: clamp(4rem, 9vw, 7.5rem) 0; position:relative; }
.section-alt{ background: var(--bg-soft); border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }

.btn{
  display:inline-flex; align-items:center; gap:.6em;
  padding: .85em 1.6em;
  border:1px solid var(--text);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing:.08em;
  text-transform: uppercase;
  background: transparent;
  cursor:pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover{ background: var(--text); color: var(--bg); }
.btn.primary{ border-color: var(--accent); color: var(--accent); }
.btn.primary:hover{ background: var(--accent); color:#0a0a0b; }
.btn.ghost{ border-color: var(--line); color: var(--text-dim); }
.btn.ghost:hover{ border-color: var(--text); color: var(--text); background:transparent; }
.btn svg{ width:14px; height:14px; transition: transform .25s var(--ease); }
.btn:hover svg{ transform: translateX(4px); }

/* =========================================================
   FRAME / STORYBOARD CARD MOTIF
   ========================================================= */
.frame{
  position:relative;
  border:1px solid var(--line);
  background: var(--surface);
}
.frame::before, .frame::after,
.frame .corner-tl, .frame .corner-br{ }
.frame-corners{
  position:absolute; inset:0; pointer-events:none; z-index:2;
}
.frame-corners span{
  position:absolute; width:14px; height:14px;
  border-color: var(--accent);
  opacity:0; transition: opacity .3s var(--ease);
}
.frame:hover .frame-corners span{ opacity:1; }
.frame-corners span:nth-child(1){ top:-1px; left:-1px; border-top:2px solid; border-left:2px solid; }
.frame-corners span:nth-child(2){ top:-1px; right:-1px; border-top:2px solid; border-right:2px solid; }
.frame-corners span:nth-child(3){ bottom:-1px; left:-1px; border-bottom:2px solid; border-left:2px solid; }
.frame-corners span:nth-child(4){ bottom:-1px; right:-1px; border-bottom:2px solid; border-right:2px solid; }

.frame-tag{
  position:absolute; top:0; left:0;
  font-family: var(--font-mono);
  font-size:.7rem;
  letter-spacing:.1em;
  color: var(--bg);
  background: var(--accent);
  padding:.3em .6em;
  z-index:3;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.site-header{
  position: fixed; top:0; left:0; right:0; z-index: 1000;
  padding: 1.1rem 0;
  transition: background .3s var(--ease), border-color .3s var(--ease), padding .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled{
  background: rgba(10,10,11,.88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line-soft);
  padding: .75rem 0;
}
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:1.5rem; }

.logo{
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing:.03em;
  text-transform:uppercase;
  display:flex; flex-direction:column; line-height:.92;
}
.logo span{ font-family: var(--font-mono); font-size:.62rem; letter-spacing:.18em; color: var(--accent); text-transform:uppercase; margin-top:.35em; }

.nav-main{ display:flex; align-items:center; gap: 2.1rem; }
.nav-main a{
  font-family: var(--font-mono);
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  position:relative;
  padding-bottom:4px;
  transition: color .2s;
}
.nav-main a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px; background: var(--accent);
  transition: right .25s var(--ease);
}
.nav-main a:hover, .nav-main a.active{ color: var(--text); }
.nav-main a:hover::after, .nav-main a.active::after{ right:0; }

.nav-right{ display:flex; align-items:center; gap:1.2rem; }

.lang-switch{
  display:flex; border:1px solid var(--line); font-family: var(--font-mono); font-size:.72rem; letter-spacing:.06em;
}
.lang-switch button{
  background:none; border:none; color: var(--text-faint); padding:.5em .8em; cursor:pointer; transition: color .2s, background .2s;
}
.lang-switch button.active{ color: var(--bg); background: var(--text); }
.lang-switch button:not(.active):hover{ color: var(--text); }

.burger{
  display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:6px;
}
.burger span{ width:22px; height:2px; background: var(--text); transition: all .25s var(--ease); }

@media (max-width: 860px){
  .nav-main{ display:none; }
  .burger{ display:flex; }
  .logo{ font-size:1.2rem; }
}

.mobile-nav{
  position: fixed; inset:0; background: var(--bg); z-index: 1001;
  display:flex; flex-direction:column; justify-content:center; align-items:flex-start;
  gap: 1.6rem; padding: 2rem clamp(1.25rem,4vw,3rem);
  transform: translateY(-100%);
  transition: transform .4s var(--ease);
}
.mobile-nav.open{ transform: translateY(0); }
.mobile-nav a{ font-family: var(--font-display); font-size: 2.4rem; text-transform:uppercase; color: var(--text-dim); }
.mobile-nav a.active{ color: var(--accent); }
.mobile-nav .close-btn{ position:absolute; top:1.3rem; right: clamp(1.25rem,4vw,3rem); background:none; border:none; color:var(--text); font-size:2rem; cursor:pointer; }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  min-height: 100svh;
  display:flex; flex-direction:column; justify-content:flex-end;
  position:relative;
  padding-top: 6rem;
  overflow:hidden;
}
.hero-media{ position:absolute; inset:0; z-index:0; }
.hero-media video, .hero-media img{ width:100%; height:100%; object-fit:cover; }
.hero-media::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(10,10,11,.35) 0%, rgba(10,10,11,.55) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,10,11,.55) 0%, transparent 40%);
}
.hero-content{ position:relative; z-index:1; padding-bottom: 4.5rem; }
.hero-roles{
  display:flex; flex-wrap:wrap; gap:.5rem 0; margin-bottom:1.4rem;
}
.hero-roles span{
  font-family: var(--font-mono); font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; color: var(--text-dim);
}
.hero-roles span:not(:last-child)::after{ content:"/"; margin:0 .7em; color: var(--accent); }
.hero h1{
  font-size: clamp(3rem, 9.5vw, 7.5rem);
  color: var(--text);
}
.hero h1 em{ font-style:normal; color: var(--accent); }
.hero .lede{ margin-top:1.4rem; }
.hero-scroll{
  position:absolute; bottom: 1.6rem; right: clamp(1.25rem,4vw,3rem); z-index:1;
  display:flex; flex-direction:column; align-items:center; gap:.7rem;
  font-family: var(--font-mono); font-size:.68rem; letter-spacing:.2em; color: var(--text-faint);
  text-transform:uppercase;
}
.hero-scroll .line{ width:1px; height:38px; background: linear-gradient(var(--accent), transparent); animation: scrollLine 1.8s infinite; }
@keyframes scrollLine{ 0%{ transform: scaleY(0); transform-origin: top; } 50%{ transform: scaleY(1); transform-origin: top; } 51%{ transform-origin: bottom; } 100%{ transform: scaleY(0); transform-origin: bottom; } }

/* =========================================================
   PAGE HERO (inner pages)
   ========================================================= */
.page-hero{ padding: 10rem 0 3rem; }
.page-hero h1{ font-size: clamp(2.6rem, 7vw, 5rem); }
.crumb{ font-family: var(--font-mono); font-size:.75rem; letter-spacing:.1em; text-transform:uppercase; color: var(--text-faint); margin-bottom:1.2rem; display:flex; gap:.6em; align-items:center; }
.crumb a{ color: var(--text-dim); }
.crumb a:hover{ color: var(--accent); }

/* =========================================================
   PROJECT GRID / CARDS
   ========================================================= */
.grid{ display:grid; gap: 1.6rem; }
.grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px){ .grid.cols-3{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 680px){ .grid.cols-3, .grid.cols-2{ grid-template-columns: 1fr; } }

.card-project{
  display:flex; flex-direction:column;
  text-decoration:none;
  transition: transform .35s var(--ease);
}
.card-project:hover{ transform: translateY(-6px); }
.card-media{
  position:relative; aspect-ratio: 16/10; overflow:hidden; background: var(--surface-2);
  border:1px solid var(--line);
}
.card-media img{ width:100%; height:100%; object-fit:cover; object-position: center 15%; transition: transform .6s var(--ease); }
.card-project:hover .card-media img{ transform: scale(1.06); }
.card-media .num{
  position:absolute; top:0; left:0; z-index:3;
  font-family: var(--font-mono); font-size:.72rem; color: var(--bg); background: var(--accent);
  padding:.3em .6em;
}
.card-media .status{
  position:absolute; bottom:0; right:0; z-index:3;
  font-family: var(--font-mono); font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; color: var(--text);
  background: rgba(10,10,11,.75); padding:.35em .7em; border-top:1px solid var(--line-soft); border-left:1px solid var(--line-soft);
}
.card-body{ padding: 1.3rem .1rem .3rem; }
.card-body h3{ margin-bottom:.5rem; }
.card-body p{ color: var(--text-dim); font-size:.94rem; }
.card-meta{ display:flex; gap:.8em; margin-top:.9rem; font-family: var(--font-mono); font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-faint); flex-wrap:wrap; }
.card-meta span{ border:1px solid var(--line); padding:.3em .6em; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{ padding: 3.5rem 0 2.2rem; border-top:1px solid var(--line-soft); }
.footer-top{ display:flex; justify-content:space-between; gap:2rem; flex-wrap:wrap; margin-bottom: 2.5rem; }
.footer-links{ display:flex; gap:2.2rem; flex-wrap:wrap; }
.footer-links a{ font-family: var(--font-mono); font-size:.76rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-dim); }
.footer-links a:hover{ color: var(--accent); }
.footer-bottom{ display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; font-family: var(--font-mono); font-size:.7rem; color: var(--text-faint); letter-spacing:.04em; }

/* =========================================================
   GALLERY / LIGHTBOX (animatics, vfx, project detail)
   ========================================================= */
.media-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:1rem; }
@media (max-width:900px){ .media-grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width:600px){ .media-grid{ grid-template-columns: 1fr;} }

.media-item{
  position:relative; border:1px solid var(--line); background: var(--surface); overflow:hidden; cursor:pointer;
  aspect-ratio: 4/3;
}
.media-item img, .media-item video{ width:100%; height:100%; object-fit:cover; transition: transform .5s var(--ease); }
.media-item:hover img, .media-item:hover video{ transform: scale(1.05); }
.media-item .play{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background: rgba(10,10,11,.25);
}
.media-item .play svg{ width:46px; height:46px; opacity:.9; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.media-item figcaption{
  position:absolute; left:0; right:0; bottom:0; padding:.6em .8em;
  font-family: var(--font-mono); font-size:.68rem; letter-spacing:.04em; color: var(--text);
  background: linear-gradient(0deg, rgba(10,10,11,.85), transparent);
}

.lightbox{
  position:fixed; inset:0; z-index:2000; background: rgba(6,6,7,.94);
  display:flex; align-items:center; justify-content:center; padding: 3rem clamp(1rem,4vw,3rem);
  opacity:0; pointer-events:none; transition: opacity .3s var(--ease);
}
.lightbox.open{ opacity:1; pointer-events:auto; }
.lightbox-inner{ max-width: 1100px; width:100%; }
.lightbox-inner img, .lightbox-inner video{ width:100%; max-height:78vh; object-fit:contain; border:1px solid var(--line); background:#000; }
.lightbox-cap{ margin-top:1rem; font-family: var(--font-mono); font-size:.78rem; color: var(--text-dim); display:flex; justify-content:space-between; gap:1rem; }
.lightbox-close{ position:absolute; top:1.5rem; right: clamp(1rem,4vw,3rem); background:none; border:none; color:var(--text); font-size:2.2rem; cursor:pointer; line-height:1; }
.lightbox-nav{ position:absolute; top:50%; transform:translateY(-50%); background:none; border:1px solid var(--line); color:var(--text); width:46px; height:46px; cursor:pointer; font-size:1.3rem; }
.lightbox-nav.prev{ left: clamp(.5rem,3vw,2rem); }
.lightbox-nav.next{ right: clamp(.5rem,3vw,2rem); }
.lightbox-nav:hover{ border-color: var(--accent); color: var(--accent); }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-layout{ display:grid; grid-template-columns: 340px 1fr; gap: 4rem; }
@media (max-width: 860px){ .about-layout{ grid-template-columns: 1fr; } }
.about-portrait{ border:1px solid var(--line); aspect-ratio: 3/4; overflow:hidden; background: var(--surface); }
.about-portrait img{ width:100%; height:100%; object-fit:cover; filter: grayscale(30%); }
.roles-list{ margin-top:1.6rem; display:flex; flex-direction:column; gap:.5rem; }
.roles-list li{ font-family: var(--font-mono); font-size:.78rem; letter-spacing:.05em; text-transform:uppercase; color: var(--text-dim); display:flex; gap:.7em; align-items:center; }
.roles-list li::before{ content:"—"; color: var(--accent); }
.about-body p{ color: var(--text-dim); margin-bottom:1.3rem; font-size:1.02rem; }
.about-body p:first-of-type{ color: var(--text); font-size: 1.18rem; }
.skills-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap: 2rem 3rem; margin-top: 3rem; }
@media(max-width:600px){ .skills-grid{ grid-template-columns:1fr; } }
.skills-grid h4{ font-family: var(--font-mono); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color: var(--accent); margin-bottom:.9rem; }
.skills-grid ul li{ color: var(--text-dim); padding: .5em 0; border-bottom:1px solid var(--line-soft); font-size:.95rem; }

.contact-strip{ display:flex; flex-wrap:wrap; gap:1rem 2rem; margin-top:2.5rem; }
.contact-strip a{ font-family: var(--font-mono); font-size:.82rem; border-bottom:1px solid var(--line); padding-bottom:.2em; }
.contact-strip a:hover{ border-color: var(--accent); color: var(--accent); }

/* =========================================================
   PROJECT DETAIL PAGE
   ========================================================= */
.project-hero{ padding: 9.5rem 0 0; }
.project-hero-media{ aspect-ratio: 21/9; overflow:hidden; border:1px solid var(--line); margin-top: 2rem; background: var(--surface); }
.project-hero-media img{ width:100%; height:100%; object-fit:cover; object-position: center 15%; }
.project-meta-row{ display:flex; flex-wrap:wrap; gap: 2.2rem; margin: 2.4rem 0 3rem; padding: 1.6rem 0; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }
.project-meta-row .m{ display:flex; flex-direction:column; gap:.4rem; }
.project-meta-row .m .k{ font-family: var(--font-mono); font-size:.66rem; letter-spacing:.12em; text-transform:uppercase; color: var(--text-faint); }
.project-meta-row .m .v{ font-size:.98rem; color: var(--text); }
.project-body{ display:grid; grid-template-columns: 1fr 300px; gap: 4rem; }
@media(max-width:900px){ .project-body{ grid-template-columns:1fr; } }
.project-body .lede{ max-width:none; font-size:1.15rem; color: var(--text); margin-bottom:1.5rem;}
.project-body .desc p{ color: var(--text-dim); margin-bottom:1.2rem; }
.project-side{ display:flex; flex-direction:column; gap:1.6rem; }
.side-box{ border:1px solid var(--line); padding:1.4rem; }
.side-box .k{ font-family: var(--font-mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; color: var(--accent); margin-bottom:.6rem; display:block; }
.side-box .v{ font-size:.92rem; color: var(--text-dim); line-height:1.5; }
.side-box a.v{ display:inline-block; color: var(--accent); border-bottom:1px solid transparent; transition: border-color .2s, color .2s; }
.side-box a.v:hover{ border-color: var(--accent); color: var(--accent-2); }

.project-gallery{ margin-top: 4rem; }
.project-nav-links{ display:flex; justify-content:space-between; margin-top:5rem; padding-top:2rem; border-top:1px solid var(--line-soft); }
.project-nav-links a{ font-family: var(--font-mono); font-size:.8rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-dim); display:flex; align-items:center; gap:.6em; }
.project-nav-links a:hover{ color: var(--accent); }

/* =========================================================
   MISC UTILITIES
   ========================================================= */
.reveal{ opacity:0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity:1; transform:none; }
.text-center{ text-align:center; }
.mt-lg{ margin-top: 4rem; }
.empty-note{ font-family: var(--font-mono); font-size:.85rem; color: var(--text-faint); border:1px dashed var(--line); padding:2rem; text-align:center; }
