/* ===================================================================
   YN ENGINEER — Design tokens
=================================================================== */
:root{
  --bg:            #faf9f7;
  --bg-alt:        #f1efeb;
  --bg-dark:       #14171a;
  --bg-dark-alt:   #1c2024;
  --surface:       #ffffff;
  --ink:           #16191c;
  --ink-soft:      #565d63;
  --ink-faint:     #8b9096;
  --line:          #e2e0da;
  --line-dark:     #2c3136;
  --accent:        #2653e6;
  --accent-dark:   #1a3aa8;
  --accent-soft:   #e9edfc;

  --font-head: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1180px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --ease: cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: 86px; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4,h5{ font-family: var(--font-head); font-weight:600; margin:0; letter-spacing:.01em; }
p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
svg{ width:100%; height:100%; }

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

/* subtle grain / blueprint texture overlay */
.grain{
  position:fixed; inset:0; pointer-events:none; z-index: 2;
  background-image: radial-gradient(circle, rgba(20,23,26,.035) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity:.5;
}

/* ===================================================================
   Reveal-on-scroll
=================================================================== */
.reveal{ opacity:0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in-view{ opacity:1; transform: translateY(0); }

/* ===================================================================
   Buttons
=================================================================== */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight:600; font-size:.95rem;
  border:1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
  white-space:nowrap;
}
.btn svg{ width:16px; height:16px; }
.btn:hover{ transform: translateY(-2px); }
.btn-primary{ background: var(--accent); color:#fff; }
.btn-primary:hover{ background: var(--accent-dark); }
.btn-outline{ border-color: var(--ink); color: var(--ink); }
.btn-outline:hover{ background: var(--ink); color:#fff; }
.btn-outline-light{ border-color: rgba(255,255,255,.35); color:#fff; }
.btn-outline-light:hover{ background:#fff; color: var(--bg-dark); }
.btn-ghost{ color: var(--ink-soft); }
.btn-ghost:hover{ color: var(--ink); }
.btn-sm{ padding: 10px 20px; font-size:.85rem; }

.pill{
  display:inline-flex; align-items:center;
  padding: 7px 15px; border-radius:999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.04em; font-weight:500;
}

/* ===================================================================
   Nav
=================================================================== */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 50;
  background: rgba(250,249,247,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled{ border-color: var(--line); box-shadow: 0 6px 24px rgba(20,23,26,.05); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; height:78px; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-logo{ width:30px; height:30px; object-fit:contain; }
.brand-text{ font-family: var(--font-head); font-weight:600; letter-spacing:.08em; font-size:1rem; }
.brand-text-accent{ color: var(--accent); }

.nav-links{ display:flex; gap: 34px; }
.nav-link{ position:relative; font-size:.92rem; font-weight:500; color: var(--ink-soft); padding: 6px 0; transition: color .2s; }
.nav-link::after{ content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--accent); transition: right .3s var(--ease); }
.nav-link:hover, .nav-link.active{ color: var(--ink); }
.nav-link.active::after, .nav-link:hover::after{ right:0; }

.nav-actions{ display:flex; align-items:center; gap:12px; }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; padding:8px; }
.nav-toggle span{ width:22px; height:2px; background: var(--ink); border-radius:2px; }

/* ===================================================================
   Hero
=================================================================== */
.hero{
  position:relative; overflow:hidden;
  background: radial-gradient(ellipse 130% 100% at 32% -10%, #f6f6f7 0%, #e8e8ea 45%, #d6d6da 100%);
  min-height: 100vh; min-height: 100svh; display:flex; flex-direction:column; justify-content:center;
  padding-top: 110px;
}
.hero-grid{
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(20,23,26,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,23,26,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 62% 45%, #000 30%, transparent 78%);
}
.hero-canvas{
  position:absolute; top:0; right:0; bottom:0; width:58%; height:100%; display:block;
}
/* !important here (not just a JS-computed animation target) so this
   stays correct if the viewport crosses the breakpoint after load —
   e.g. a tablet loaded wide, then narrowed/rotated into phone-width —
   since a one-time width check baked into the GSAP reveal's target
   opacity doesn't react to that, but a live media query does. */
@media (max-width: 860px){ .hero-canvas{ width:100%; opacity:0.3 !important; } }
.hero-overlay{
  position:absolute; inset:0; pointer-events:none;
  /* The canvas itself is confined to the right portion of the hero (see
     .hero-canvas), and text is now dark-on-light, so this only needs to be
     a very light contact-shadow assist right at the text/model seam. */
  background: linear-gradient(90deg,
    rgba(20,23,26,.06) 0%,
    rgba(20,23,26,0) 34%);
}
.hero-inner{
  position:relative; z-index:1;
  padding: 70px 0 110px;
  padding-left: clamp(24px, 6vw, 96px);
  max-width: 660px;
}
/* Centered portrait block: avatar on top, everything below stacked and centered */
.hero-copy{ text-align:center; }
.hero-identity{ display:flex; flex-direction:column; align-items:center; gap:22px; margin-bottom:28px; }
.hero-avatar{
  width:280px; height:280px; border-radius:50%; object-fit:cover; object-position:center center;
  flex-shrink:0; border:6px solid var(--surface);
  box-shadow: 0 22px 48px -12px rgba(20,23,26,.45), 0 0 0 1px var(--line);
}
.eyebrow{
  font-family: var(--font-mono); font-size:.78rem; letter-spacing:.16em; text-transform:uppercase;
  color: var(--accent-dark); margin-bottom: 10px;
}
.hero-title{ font-size: clamp(2.6rem, 5vw, 4rem); line-height:1.05; letter-spacing:-.01em; margin-bottom:0; color: var(--ink); white-space:nowrap; }
.word{ display:inline-block; will-change:transform; }
.section-title .word{ display:inline-block; }
.hero-lead{ max-width: 520px; margin-left:auto; margin-right:auto; color: var(--ink-soft); font-size:1.1rem; margin-bottom: 28px; }
.hero-tags{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-bottom: 36px; }
.hero-actions{ display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }
.hero .pill{ background: rgba(20,23,26,.05); border:1px solid rgba(20,23,26,.14); color: var(--ink-soft); }

/* ---------------- Preloader ---------------- */
.preloader{
  position:fixed; inset:0; z-index:300; background: var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.preloader-logo{ width:64px; opacity:0; transform: scale(.7); }

/* ---------------- Custom cursor ring ---------------- */
.cursor-ring{
  position:fixed; top:0; left:0; width:34px; height:34px; border-radius:50%;
  border:1.5px solid var(--accent); pointer-events:none; z-index:250; opacity:0;
  transform: translate(-50%,-50%); transition: opacity .25s, width .25s, height .25s, border-color .25s, background .25s;
  mix-blend-mode: normal;
}
.cursor-ring.is-active{ opacity:1; }
.cursor-ring.is-hover{ width:56px; height:56px; background: var(--accent-soft); }
@media (pointer:coarse){ .cursor-ring{ display:none; } }

.stats-bar{ position:relative; z-index:1; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.08); }
.stats-grid{ display:grid; grid-template-columns: repeat(4,1fr); }
.stat{
  padding: 46px 20px; text-align:center; color:#fff;
  border-left: 1px solid rgba(255,255,255,.1);
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
.stat:first-child{ border-left:none; }
.stat-num{ font-family: var(--font-head); font-size:2rem; font-weight:600; }
.stat-suffix{ font-family: var(--font-head); font-size:2rem; font-weight:600; margin-left:-6px; }
.stat-label{ font-size:.78rem; color: rgba(255,255,255,.55); letter-spacing:.03em; }

/* ===================================================================
   Sections
=================================================================== */
.section{ padding: 110px 0; }
.section-alt{ background: var(--bg-alt); }
.section-dark{ background: var(--bg-dark); }
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-kicker{ font-family: var(--font-mono); font-size:.78rem; letter-spacing:.14em; color: var(--accent); margin-bottom:14px; }
.section-kicker-light{ color:#7c93ff; }
.section-title{ font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing:-.01em; margin-bottom: 14px; }
.section-title-light{ color:#fff; }
.section-sub{ color: var(--ink-soft); font-size:1.02rem; }
.section-sub-light{ color: rgba(255,255,255,.6); }

/* About */
.about-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:70px; align-items:start; }
.lead-text{ font-size:1.12rem; color: var(--ink-soft); margin-bottom:34px; }
.skill-block{ margin-bottom: 26px; }
.skill-block-title{ font-family: var(--font-mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color: var(--ink-faint); margin-bottom:12px; }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{ padding:7px 14px; border:1px solid var(--line); border-radius:999px; font-size:.83rem; color: var(--ink-soft); background: var(--surface); }
.tag-mono{ font-family: var(--font-mono); font-size:.78rem; }
.cert-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap:16px; margin: 30px 0 34px; }
.cert-card{
  display:flex; flex-direction:column; gap:10px;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:22px;
  color: var(--ink); text-decoration:none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.cert-card:hover{ transform: translateY(-4px); box-shadow: 0 20px 36px -22px rgba(20,23,26,.22); border-color: var(--accent); }
.cert-card-top{ display:flex; align-items:flex-start; justify-content:space-between; }
.cert-card-icon{
  width:38px; height:38px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(38,83,230,.08); border:1px solid rgba(38,83,230,.2); color: var(--accent);
}
.cert-card-icon svg{ width:19px; height:19px; }
.cert-card-ext{ width:16px; height:16px; color: var(--ink-faint); }
.cert-card h5{ font-size:1rem; }
.cert-card-org{ font-family: var(--font-mono); font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color: var(--ink-faint); }
.cert-card p:not(.cert-card-org){ font-size:.86rem; color: var(--ink-soft); }
.cert-card-link{ font-size:.82rem; font-weight:600; color: var(--accent-dark); margin-top:auto; }
@media (max-width: 620px){
  .cert-grid{ grid-template-columns: 1fr; }
}
.cv-btn svg{ width:18px; height:18px; }

.timeline{ margin-bottom: 44px; }
.timeline-title{ font-family: var(--font-mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color: var(--ink-faint); margin-bottom:26px; }
.timeline-item{ position:relative; padding-left: 28px; padding-bottom: 34px; border-left: 2px solid var(--line); }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{ position:absolute; left:-7px; top:2px; width:12px; height:12px; border-radius:50%; background: var(--surface); border:2px solid var(--accent); }
.timeline-date{ font-family: var(--font-mono); font-size:.74rem; color: var(--accent-dark); letter-spacing:.03em; }
.timeline-content h5{ font-size:1.08rem; margin:6px 0 2px; }
.timeline-org{ color: var(--ink-faint); font-size:.86rem; margin-bottom:8px; }
.timeline-content p:not(.timeline-org){ color: var(--ink-soft); font-size:.92rem; }

.edu-card{ display:flex; gap:16px; padding:24px; background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); }
.edu-icon{ width:44px; height:44px; flex-shrink:0; border-radius:10px; background: var(--accent-soft); color: var(--accent); padding:10px; }
.edu-card h5{ font-size:1.05rem; margin:6px 0 2px; }
.edu-card p:not(.timeline-org):not(.timeline-date){ color: var(--ink-soft); font-size:.9rem; margin-top:8px; }

/* Services */
.service-group{ margin-bottom: 64px; }
.service-group:last-of-type{ margin-bottom: 0; }
.service-group-head{ display:flex; gap:22px; align-items:flex-start; margin-bottom: 34px; max-width: 760px; }
.service-group-num{ font-family: var(--font-head); font-size:1.6rem; color: var(--accent); flex-shrink:0; }
.service-group-head h3{ font-size:1.5rem; margin-bottom:8px; }
.service-group-head p{ color: var(--ink-soft); }

.service-cards{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card{
  display:flex; flex-direction:column;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.service-card:hover{ transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(20,23,26,.2); border-color: var(--accent); }
.service-icon{ width:42px; height:42px; color: var(--accent); margin-bottom:18px; }
.service-card h4{ font-size:1rem; margin-bottom:10px; line-height:1.3; }
.service-card p{ color: var(--ink-soft); font-size:.87rem; margin-bottom:16px; }
.service-link{ font-size:.82rem; font-weight:600; color: var(--accent-dark); margin-top:auto; }

/* Manufacturing-file filter buttons — small pills, icon + name only.
   One is always active; clicking a different one swaps the gallery below. */
.mfg-buttons{ display:flex; flex-wrap:wrap; gap:12px; margin-bottom:22px; }
.mfg-btn{
  appearance:none; display:inline-flex; align-items:center; gap:10px;
  padding:11px 18px; border-radius:999px; border:1px solid var(--line); background: var(--surface);
  font: inherit; font-size:.85rem; font-weight:600; color: var(--ink); cursor:pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.mfg-btn:hover{ border-color: var(--accent); transform: translateY(-2px); }
.mfg-btn-icon{ width:19px; height:19px; color: var(--accent); flex-shrink:0; }
.mfg-btn[aria-pressed="true"]{ background: var(--accent); border-color: var(--accent); color:#fff; }
.mfg-btn[aria-pressed="true"] .mfg-btn-icon{ color:#fff; }

.mfg-gallery{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px 30px;
}
.mfg-gallery h4{ font-size:1rem; margin-bottom:18px; }
.mfg-gallery-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap:18px; }
.mfg-gallery-item{
  border:1px solid var(--line); border-radius: var(--radius-sm); overflow:hidden;
  background: var(--bg-alt); box-shadow: 0 12px 28px -18px rgba(20,23,26,.25);
}
.mfg-gallery-item img{ width:100%; height:auto; display:block; cursor: zoom-in; transition: opacity .2s; }
.mfg-gallery-item img:hover{ opacity:.88; }
.mfg-gallery-placeholder{
  width:100%; min-height:200px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; color: var(--ink-faint); border:1px dashed var(--line); box-sizing:border-box;
}
.mfg-gallery-placeholder svg{ width:26px; height:26px; }
.mfg-gallery-placeholder span{ font-size:.78rem; }
@media (max-width: 720px){
  .mfg-gallery-grid{ grid-template-columns: 1fr; }
}

.render-banner{
  display:grid; grid-template-columns: 1.3fr 1fr; align-items:center; gap: 40px;
  background: var(--ink); color:#fff; border-radius: var(--radius-lg); padding: 50px;
  margin-top: 20px;
}
.render-banner-copy .service-group-num{ color:#7c93ff; }
.render-banner-copy h3{ font-size:1.6rem; margin:10px 0 12px; color:#fff; }
.render-banner-copy p{ color: rgba(255,255,255,.6); margin-bottom:22px; max-width:440px; }
.render-slider{
  position:relative; aspect-ratio: 5/4; border-radius: var(--radius); overflow:hidden;
  border:1px solid var(--line);
  /* Same faint graph-paper surface as the Projects 3D stage — a believable
     studio-floor backdrop so each render's own baked-in reflection reads as
     sitting on a real surface instead of floating on a flat tint. */
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg-alt);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.render-slider-track{ display:flex; width:100%; height:100%; transition: transform .65s cubic-bezier(.65,0,.35,1); }
/* No zoom transform here on purpose: a single blanket scale looked fine on
   wide, tightly-cropped renders but zoomed in far too aggressively on ones
   with a small subject and lots of clear space around it (the dumbbell,
   the functional trainer) — each render keeps its own true framing. */
.render-slide{ flex:0 0 100%; width:100%; height:100%; object-fit:contain; padding:20px; }
.render-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:38px; height:38px; border-radius:50%; padding:0; cursor:pointer;
  background: var(--surface); border:1px solid var(--line); color: var(--ink);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px -12px rgba(20,23,26,.3);
  transition: border-color .2s, transform .2s;
}
.render-arrow:hover{ border-color: var(--accent); transform:translateY(-50%) scale(1.08); }
.render-arrow svg{ width:16px; height:16px; }
.render-arrow-prev{ left:12px; }
.render-arrow-next{ right:12px; }

/* Featured Shop Floor — sits inline in the About sidebar, between the
   Experience timeline and the education card, sized to that column's
   own width (same rectangle width as .edu-card below it) rather than
   the full-bleed dark banner this used to be. Same slider mechanics/
   chrome as the visualization slider above (graph-paper backdrop,
   white circular arrows). */
.shopfloor-inline{ margin: 0 0 28px; }
.shopfloor-inline-title{
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  color: var(--ink-faint); margin-bottom:12px;
}
.shopfloor-slider{
  position:relative; aspect-ratio: 4/3; width:100%; border-radius: var(--radius); overflow:hidden;
  border:1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg-alt);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.shopfloor-slider-track{ display:flex; width:100%; height:100%; transition: transform .65s cubic-bezier(.65,0,.35,1); }
/* Fills the frame edge-to-edge for both photos and video — unlike the
   CAD/screenshot galleries, there's no title block or on-screen text here
   that cropping could cut off, so a snug cover reads better than empty
   side bars. */
.shopfloor-slide{ flex:0 0 100%; width:100%; height:100%; object-fit:cover; }
.shopfloor-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:38px; height:38px; border-radius:50%; padding:0; cursor:pointer;
  background: var(--surface); border:1px solid var(--line); color: var(--ink);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px -12px rgba(20,23,26,.3);
  transition: border-color .2s, transform .2s;
}
.shopfloor-arrow:hover{ border-color: var(--accent); transform:translateY(-50%) scale(1.08); }
.shopfloor-arrow svg{ width:16px; height:16px; }
.shopfloor-arrow-prev{ left:12px; }
.shopfloor-arrow-next{ right:12px; }

/* ===================================================================
   Video showcase — full-bleed cinematic break between Services and
   Projects. Dark vignette (top/bottom for text legibility, edges for a
   letterboxed feel) plus a soft off-center "stage light" bloom blended
   over the footage — the effect the raw clip doesn't carry on its own.
=================================================================== */
.showcase{
  position:relative; overflow:hidden; background:#05060a;
  height:78vh; min-height:460px; max-height:760px;
  display:flex; align-items:flex-end;
}
.showcase-media{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position: center center;
  filter: brightness(.94) contrast(1.06) saturate(1.05);
}
.showcase-vignette{
  position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(180deg, rgba(5,6,10,.8) 0%, rgba(5,6,10,.05) 30%, rgba(5,6,10,.1) 62%, rgba(5,6,10,.95) 100%),
    radial-gradient(ellipse 130% 95% at 50% 50%, transparent 42%, rgba(5,6,10,.6) 100%);
}
.showcase-spot{
  position:absolute; inset:0; pointer-events:none; mix-blend-mode: screen; opacity:.6;
  background: radial-gradient(circle at 74% 30%, rgba(255,255,255,.55) 0%, rgba(154,178,255,.3) 22%, transparent 56%);
}
.showcase-copy{ position:relative; z-index:1; width:100%; padding-bottom: 96px; }
.showcase-kicker{
  display:inline-flex; align-items:center; gap:12px;
  text-transform:uppercase; font-size:.72rem; letter-spacing:.24em;
}
.showcase-kicker::before{ content:""; width:34px; height:1px; background:currentColor; opacity:.65; }
.showcase-title{
  color:#fff; max-width:700px;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height:1.08; letter-spacing:-.015em;
  text-shadow: 0 4px 28px rgba(0,0,0,.4);
}
@media (max-width: 720px){
  .showcase{ height:60vh; min-height:380px; }
  .showcase-copy{ padding-bottom: 52px; }
  .showcase-kicker::before{ width:22px; }
}

/* Projects — 3D slider */
.project-slider{ display:grid; grid-template-columns: 1.4fr 1fr; gap: 44px; align-items:stretch; }
.project-stage{
  position:relative; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow:hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg-alt);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  border:1px solid var(--line);
}
.project-canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; opacity:0; transition: opacity .4s ease; }
.project-stage-placeholder{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  color: var(--ink-faint); font-family: var(--font-mono); font-size:.78rem; letter-spacing:.04em;
}
.project-stage-placeholder svg{ width:15%; height:auto; opacity:.5; }
.slider-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:44px; height:44px; border-radius:50%; background: var(--surface); border:1px solid var(--line);
  color: var(--ink); display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px -12px rgba(20,23,26,.3); transition: transform .2s, border-color .2s;
}
.slider-arrow:hover{ border-color: var(--accent); transform:translateY(-50%) scale(1.08); }
.slider-arrow svg{ width:18px; height:18px; }
.slider-arrow-prev{ left:18px; }
.slider-arrow-next{ right:18px; }

.stage-zoom{
  position:absolute; right:18px; bottom:18px; z-index:2;
  display:flex; gap:10px;
}
.stage-zoom-btn{
  width:38px; height:38px; border-radius:50%; background: var(--surface); border:1px solid var(--line);
  color: var(--ink); display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px -12px rgba(20,23,26,.3); transition: transform .2s, border-color .2s, color .2s;
}
.stage-zoom-btn:hover{ border-color: var(--accent); color: var(--accent); transform:scale(1.08); }
.stage-zoom-btn svg{ width:15px; height:15px; }

.project-slider-info{ display:flex; flex-direction:column; justify-content:space-between; }
.project-slide-index{ font-family: var(--font-mono); font-size:.78rem; color: var(--ink-faint); letter-spacing:.06em; }
.project-slide-title{ font-family: var(--font-head); font-size:1.7rem; margin:14px 0 10px; color: var(--ink); }
.project-tag{ display:inline-block; font-family: var(--font-mono); font-size:.68rem; letter-spacing:.08em; color: var(--accent-dark); text-transform:uppercase; }
.project-slide-desc{ color: var(--ink-soft); font-size:.96rem; margin-top:16px; line-height:1.6; }

.project-slider-dots{ display:flex; flex-wrap:wrap; gap:8px; margin-top:30px; }
.slide-dot{
  width:9px; height:9px; border-radius:50%; background: var(--line); border:none; padding:0; cursor:pointer;
  transition: background .2s, transform .2s;
}
.slide-dot.active{ background: var(--accent); transform: scale(1.25); }
.slide-dot:hover{ background: var(--accent-dark); }

@media (max-width: 900px){
  .project-slider{ grid-template-columns: 1fr; }
  /* Safari has a known bug sizing aspect-ratio on a CSS grid item (a
     circular layout dependency it doesn't always resolve), collapsing
     the box to near-zero height instead — confirmed on a real iPhone
     while Chromium and iPad Safari render it fine. Every child here
     (canvas, arrows, zoom buttons) is already position:absolute, so
     the old height:0 + padding-top percentage trick sizes the box
     without aspect-ratio at all, sidestepping the bug everywhere. */
  .project-stage{ aspect-ratio: none; height:0; padding-top:80%; }
  #projectSlider.reveal{ opacity:1 !important; transform:none !important; }
}

/* Contact */
.section-dark .contact-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:18px; margin-bottom: 50px; }
.contact-card{
  display:flex; align-items:center; gap:16px; padding: 22px; border-radius: var(--radius);
  background: var(--bg-dark-alt); border:1px solid var(--line-dark); transition: all .25s var(--ease);
}
.contact-card:hover{ transform: translateY(-4px); border-color: var(--accent); background:#20262c; }
.contact-icon{ position:relative; width:40px; height:40px; flex-shrink:0; color:#7c93ff; display:flex; align-items:center; justify-content:center; }
.contact-icon svg{ position:relative; z-index:1; width:100%; height:100%; }
.contact-icon-ring{
  position:absolute; inset:-6px; border-radius:50%; border:1px solid rgba(124,147,255,.55);
  animation: contact-ping 2.8s ease-out infinite;
}
.contact-card:nth-child(1) .contact-icon-ring{ animation-delay: 0s; }
.contact-card:nth-child(2) .contact-icon-ring{ animation-delay: .7s; }
.contact-card:nth-child(3) .contact-icon-ring{ animation-delay: 1.4s; }
.contact-card:nth-child(4) .contact-icon-ring{ animation-delay: 2.1s; }
@keyframes contact-ping{
  0%{ transform:scale(.6); opacity:0; }
  35%{ opacity:.8; }
  100%{ transform:scale(1.6); opacity:0; }
}
@media (prefers-reduced-motion: reduce){ .contact-icon-ring{ animation:none; } }
.contact-card h4{ color:#fff; font-size:.96rem; margin-bottom:4px; }
.contact-card p{ color: rgba(255,255,255,.55); font-size:.82rem; }
.contact-cta{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; padding-top:36px; border-top:1px solid var(--line-dark); }
.contact-cta p{ color: rgba(255,255,255,.55); font-size:.92rem; }

/* Footer */
.footer{ background: var(--bg-dark); border-top:1px solid var(--line-dark); padding: 46px 0; }
.footer-inner{ display:flex; flex-direction:column; align-items:center; gap:16px; text-align:center; }
.brand-footer .brand-text{ color:#fff; }
.footer-tagline{ color: rgba(255,255,255,.5); font-size:.88rem; }
.footer-links{ display:flex; gap:24px; flex-wrap:wrap; justify-content:center; }
.footer-links a{ color: rgba(255,255,255,.65); font-size:.86rem; transition: color .2s; }
.footer-links a:hover{ color:#fff; }
.footer-copy{ color: rgba(255,255,255,.35); font-size:.78rem; margin-top:10px; }

/* WhatsApp float */
.wa-float{
  position:fixed; bottom:26px; right:26px; z-index:40;
  width:56px; height:56px; border-radius:50%; background:#25D366; color:#fff;
  display:flex; align-items:center; justify-content:center; padding:14px;
  box-shadow: 0 12px 28px -8px rgba(37,211,102,.6);
  transition: transform .25s var(--ease);
}
.wa-float:hover{ transform: scale(1.08); }

/* Lightbox — click any gallery photo to view it full-size */
.lightbox{
  position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center;
  padding: 48px; background: rgba(10,11,13,.92);
  opacity:0; visibility:hidden; transition: opacity .25s ease, visibility 0s linear .25s;
}
.lightbox.active{ opacity:1; visibility:visible; transition: opacity .25s ease; }
.lightbox-img{
  max-width:100%; max-height:100%; border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  transform: scale(.96); transition: transform .25s ease;
}
.lightbox.active .lightbox-img{ transform: scale(1); }
.lightbox-close{
  position:fixed; top:24px; right:28px; z-index:201; cursor:pointer;
  width:44px; height:44px; border-radius:50%; padding:0;
  background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition: background .2s, transform .2s;
}
.lightbox-close:hover{ background: rgba(255,255,255,.2); transform: scale(1.08); }
.lightbox-close svg{ width:18px; height:18px; }

/* ===================================================================
   Responsive
=================================================================== */
@media (max-width: 980px){
  .about-grid{ grid-template-columns: 1fr; gap:50px; }
  .service-cards{ grid-template-columns: repeat(2, 1fr); }
  .project-grid{ grid-template-columns: repeat(2, 1fr); }
  .render-banner{ grid-template-columns: 1fr; }
  .render-slider{ max-width:320px; margin:0 auto; }
  .contact-grid{ grid-template-columns: repeat(2,1fr) !important; }
  .stats-grid{ grid-template-columns: repeat(2,1fr); }
  .stat{ border-left:none; border-top:1px solid rgba(255,255,255,.1); }
  .stat:nth-child(1), .stat:nth-child(2){ border-top:none; }
}

@media (max-width: 860px){
  .hero-inner{ padding-left:24px; padding-right:24px; margin-left:auto; margin-right:auto; }
  .nav-links{
    position:fixed; top:78px; left:0; right:0; background: var(--bg);
    flex-direction:column; padding: 24px 28px; gap:18px;
    border-bottom:1px solid var(--line);
    transform: translateY(-130%); transition: transform .3s var(--ease);
  }
  .nav-links.open{ transform: translateY(0); }
  .nav-toggle{ display:flex; }
  .nav-actions .btn-ghost{ display:none; }
}

@media (max-width: 620px){
  .container{ padding:0 20px; }
  .section{ padding: 76px 0; }
  .hero{ padding-top: 70px; }
  .hero-inner{ padding-top:30px; padding-bottom:30px; }
  .hero-avatar{ width:140px; height:140px; }
  .hero-identity{ gap:10px; margin-bottom:16px; }
  .eyebrow{ margin-bottom:6px; }
  .hero-title{ white-space:normal; font-size: clamp(2.1rem, 8.5vw, 2.8rem); }
  .hero-lead{ margin-bottom:16px; }
  .hero-tags{ margin-bottom:18px; }
  .service-cards{ grid-template-columns: 1fr; }
  .project-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr !important; }
  .render-banner{ padding: 32px 24px; }
  .contact-cta{ flex-direction:column; align-items:flex-start; }
}
