/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root{
  --bg:#221E1A;
  --bg-panel:#2A2521;
  --bg-panel-2:#322C27;
  --text:#F2EADC;
  --text-muted:#9C9284;
  --accent:#E8572D;
  --accent-soft:rgba(232,87,45,.14);
  --accent2:#8FA37E;
  --line:#3A332C;
  --radius:2px;
  --font-display:'Fraunces', serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;
  --maxw:1100px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
}

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;
}

a{color:inherit;}
img{max-width:100%; display:block;}

h1,h2,h3{
  font-family:var(--font-display);
  font-weight:700;
  line-height:1.15;
  margin:0;
}

.wrap{
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 28px;
}

:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */
header.topbar{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(34,30,26,.88);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:16px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.topbar-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1rem;
  text-decoration:none;
  letter-spacing:.01em;
}
.topbar-name span{color:var(--accent);}
nav.topnav{
  display:flex;
  gap:28px;
}
nav.topnav a{
  text-decoration:none;
  font-size:.92rem;
  color:var(--text-muted);
  padding:4px 0;
  border-bottom:1px solid transparent;
  transition:color .2s ease, border-color .2s ease;
}
nav.topnav a:hover, nav.topnav a.active{
  color:var(--text);
  border-color:var(--accent);
}
.nav-toggle{display:none;}

@media (max-width:720px){
  nav.topnav{
    position:fixed;
    inset:57px 0 auto 0;
    background:var(--bg-panel);
    flex-direction:column;
    padding:8px 28px 20px;
    gap:14px;
    border-bottom:1px solid var(--line);
    transform:translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease;
  }
  nav.topnav.open{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }
  .nav-toggle{
    display:inline-flex;
    background:none;
    border:1px solid var(--line);
    color:var(--text);
    border-radius:var(--radius);
    padding:7px 10px;
    font-size:1rem;
    cursor:pointer;
  }
}

/* =========================================================
   EASING CURVE MOTIF — a single animation-graph curve (like a
   Maya / MotionBuilder graph editor) runs through the hero, and
   a smaller version of it links every section to the next,
   standing in for a plain divider line.
   ========================================================= */
.section-link{
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 28px;
}
.section-link svg{
  width:100%;
  height:40px;
  display:block;
}
.section-link path{
  fill:none;
  stroke:var(--accent);
  stroke-width:1.4;
  stroke-linecap:round;
  opacity:.75;
}
.section-link circle{
  fill:var(--accent);
}
.section-link--rev path{ stroke:var(--accent2); opacity:.6; }
.section-link--rev circle{ fill:var(--accent2); }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position:relative;
  padding:130px 0 224px;
  overflow:hidden;
}
.hero .wrap{
  position:relative;
  z-index:2;
  pointer-events:none;
}
.hero .wrap .btn,
.hero .wrap a{
  pointer-events:auto;
}
.hero-curve{
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:var(--maxw);
  height:100%;
  z-index:0;
  pointer-events:none;
  overflow:visible;
}
.hero-curve-hit{
  pointer-events:auto;
  cursor:grab;
  touch-action:none;
}
.hero-curve-hit:active{ cursor:grabbing; }
.hero-curve-hit-area{ fill:transparent; pointer-events:all; }
.hero-curve-hit:hover .hero-curve-dot,
.hero-curve-hit:focus-visible .hero-curve-dot{
  fill:var(--accent);
}
.hero-curve-hit:focus-visible{ outline:none; }
.hero-curve-hit:focus-visible .hero-curve-hit-area{
  stroke:var(--accent);
  stroke-width:1.5;
  vector-effect:non-scaling-stroke;
}
.hero-curve-hint{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  font-family:var(--font-mono);
  font-size:.72rem;
  color:var(--text-muted);
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
  z-index:1;
}
.hero:hover .hero-curve-hint{ opacity:.6; }
@media (max-width:900px){
  .hero-curve-hint{ display:none; }
}
.hero-curve-guide{
  stroke:rgba(242,234,220,.08);
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}
.hero-curve-handle{
  stroke:rgba(232,87,45,.3);
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}
.hero-curve-path{
  fill:none;
  stroke:var(--accent);
  stroke-width:1.3;
  stroke-linecap:round;
  stroke-dasharray:1400;
  stroke-dashoffset:1400;
  vector-effect:non-scaling-stroke;
  animation:draw-curve 1.4s cubic-bezier(.2,.7,.2,1) .2s forwards;
}
@keyframes draw-curve{ to{ stroke-dashoffset:0; } }
.hero-curve-dot{ fill:var(--text); }
.hero-curve-dot--out{ fill:var(--accent); }
.hero-curve-dot--handle{ fill:var(--accent); }
.hero-curve-label{
  font-family:var(--font-mono);
  font-size:11px;
  fill:var(--text-muted);
}
@media (max-width:900px){
  /* the curve's coordinates are hand-placed for the desktop text layout;
     below this width the headline reflows too much for it to track
     safely, so it's hidden rather than left to cross the text */
  .hero-curve{ display:none; }
}
.eyebrow-name{
  font-family:var(--font-mono);
  font-size:.85rem;
  letter-spacing:.06em;
  color:var(--accent);
  display:block;
  margin-bottom:22px;
}
.eyebrow-tc{
  font-family:var(--font-mono);
  font-size:.78rem;
  color:var(--accent);
  letter-spacing:.03em;
  margin-bottom:18px;
  display:block;
}
.hero h1{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.headline-main{
  font-family:var(--font-display);
  font-weight:600;
  font-optical-sizing:auto;
  font-size:clamp(2.8rem, 6.2vw, 4.8rem);
  line-height:1.02;
  letter-spacing:-.005em;
}
.headline-sub{
  font-family:var(--font-display);
  font-weight:400;
  font-style:italic;
  font-size:clamp(1.5rem, 3.2vw, 2.3rem);
  color:var(--text-muted);
  line-height:1.2;
  margin-top:2px;
}
.hero .role{
  font-family:var(--font-body);
  font-size:1.15rem;
  color:var(--text-muted);
  margin-top:16px;
  max-width:46ch;
}
.hero .pitch{
  margin-top:22px;
  max-width:52ch;
  color:var(--text);
  font-size:1.02rem;
}
.hero-ctas{
  margin-top:34px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.btn{
  font-family:var(--font-body);
  font-weight:500;
  font-size:.95rem;
  padding:12px 22px;
  border-radius:var(--radius);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .15s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn-primary{
  background:var(--accent);
  color:#221E1A;
}
.btn-ghost{
  border-color:var(--line);
  color:var(--text);
  background:transparent;
}
.btn-ghost:hover{ border-color:var(--accent); }

/* =========================================================
   GENERIC SECTIONS
   ========================================================= */
.section{
  padding:72px 0;
}
.section-head{
  max-width:60ch;
  margin-bottom:8px;
}
.section-num{
  font-family:var(--font-mono);
  font-size:.78rem;
  color:var(--text-muted);
  display:block;
  margin-bottom:10px;
}
.section h2{
  font-size:clamp(1.6rem, 3vw, 2.1rem);
}
.section-intro{
  color:var(--text-muted);
  max-width:56ch;
  margin-top:12px;
}

/* =========================================================
   VIDEO GRID
   ========================================================= */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:22px;
  margin-top:36px;
}
.card{
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  transition:border-color .2s ease, transform .2s ease;
  text-align:left;
}
.card:hover{
  border-color:var(--accent);
  transform:translateY(-2px);
}
.card-media{
  aspect-ratio:16/9;
  background:var(--bg-panel-2);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.play-badge{
  position:absolute;
  top:12px;
  left:12px;
  display:flex;
  pointer-events:none;
}
.play-badge svg{
  width:33px;
  height:33px;
  opacity:.9;
}
.placeholder-fill{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  color:var(--text-muted);
  font-family:var(--font-mono);
  font-size:.75rem;
  padding:14px;
  text-align:center;
}
.card-body{
  padding:16px 18px 18px;
  border:none;
  background:none;
  width:100%;
  color:inherit;
  font:inherit;
}
.card-title{
  font-family:var(--font-display);
  font-size:1.02rem;
  font-weight:600;
}
.card-meta{
  font-family:var(--font-mono);
  font-size:.76rem;
  color:var(--text-muted);
  margin-top:6px;
}

/* ---- Featured video (highlighted above the grid) ---- */
.featured-card{
  background:var(--bg-panel);
  border:1px solid var(--accent);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  margin-top:36px;
  transition:transform .2s ease;
}
.featured-card:hover{ transform:translateY(-2px); }
.featured-card .card-media{
  aspect-ratio:16/8;
  position:relative;
}
.featured-badge{
  position:absolute;
  top:16px;
  left:16px;
  z-index:2;
  background:var(--accent);
  color:#221E1A;
  font-family:var(--font-mono);
  font-size:.76rem;
  letter-spacing:.06em;
  padding:6px 12px;
  border-radius:var(--radius);
}
.featured-card .play-badge{ top:16px; left:16px; }
.featured-card .play-badge svg{ width:51px; height:51px; }
.featured-card .card-body{ padding:22px 26px 26px; }
.featured-card .card-title{ font-size:1.5rem; }
.featured-card .card-meta{ font-size:.85rem; margin-top:8px; }

/* =========================================================
   ILLUSTRATION GRID
   ========================================================= */
.illu-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:18px;
  margin-top:36px;
}
.illu-item{
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  background:var(--bg-panel);
  transition:border-color .2s ease;
}
.illu-item:hover{ border-color:var(--accent); }
.illu-item img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}
.illu-caption{
  padding:10px 12px;
  font-size:.82rem;
  color:var(--text-muted);
  font-family:var(--font-mono);
}

/* =========================================================
   CV
   ========================================================= */
.cv-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:52px;
  margin-top:36px;
}
@media (max-width:800px){ .cv-layout{ grid-template-columns:1fr; } }

.timeline{ position:relative; padding-left:22px; }
.timeline::before{
  content:"";
  position:absolute;
  left:0; top:4px; bottom:4px;
  width:1px;
  background:var(--line);
}
.tl-item{ position:relative; margin-bottom:26px; }
.tl-item::before{
  content:"";
  position:absolute;
  left:-26px; top:5px;
  width:8px; height:8px;
  background:var(--accent);
  border-radius:50%;
}
.tl-role{ font-family:var(--font-display); font-weight:600; font-size:1rem; }
.tl-meta{ font-family:var(--font-mono); font-size:.78rem; color:var(--accent); margin-top:2px; }
.tl-desc{ color:var(--text-muted); font-size:.92rem; margin-top:6px; }

.cv-download{
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  align-self:start;
  position:sticky;
  top:90px;
}
.cv-download h3{ font-size:1.05rem; margin-bottom:10px; }
.cv-download p{ color:var(--text-muted); font-size:.92rem; margin:0 0 20px; }
.skills-list{
  list-style:none;
  padding:0;
  margin:20px 0 0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.skills-list li{
  font-family:var(--font-mono);
  font-size:.76rem;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:5px 10px;
  color:var(--text-muted);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:28px;
}

footer{
  padding:34px 0 50px;
  text-align:center;
  color:var(--text-muted);
  font-family:var(--font-mono);
  font-size:.76rem;
}

/* =========================================================
   LIGHTBOX / MODAL
   ========================================================= */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(10,11,13,.92);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:100;
  padding:16px;
}
.lightbox.open{ display:flex; }
.lightbox-inner{
  width:min(100%, calc((100vh - 170px) * 16 / 9));
  max-width:1700px;
}
.lightbox-inner img{
  width:100%;
  border-radius:var(--radius);
}
.lightbox-inner.vertical{ width:min(100%, calc((100vh - 170px) * 9 / 16)); }
.lightbox-inner.vertical .video-frame-holder{ aspect-ratio:9/16; }
.video-frame-holder{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#000;
}
.video-frame-holder iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}
.video-frame-holder{ overflow:hidden; }
/* YouTube draws its title bar / logo at the edges of the iframe: zoom in slightly so they fall outside the clipped frame */
.yt-shield{ position:absolute; inset:0; z-index:2; cursor:pointer; }
.video-frame-holder.yt-crop iframe{ transform:scale(1.14); transform-origin:center; }
.lightbox-close{
  position:absolute;
  top:18px;
  right:24px;
  background:none;
  border:1px solid var(--line);
  color:var(--text);
  border-radius:var(--radius);
  width:38px;
  height:38px;
  cursor:pointer;
  font-size:1.1rem;
}
.lightbox-close:hover{ border-color:var(--accent); }
.lightbox-caption{
  color:var(--text-muted);
  font-family:var(--font-mono);
  font-size:.8rem;
  line-height:1.6;
  margin-top:14px;
  max-height:220px;
  overflow-y:auto;
}
.lightbox-caption strong{ color:var(--text); font-weight:600; }
.site-version{margin:10px 0 0;font-family:var(--font-mono,monospace);font-size:.72rem;opacity:.6;letter-spacing:.04em}
