/* ===== Design tokens (mirrored from majd-portfolio.framer.website) ===== */
:root{
  --cream:#faf7f3;
  --cream-2:#f1ede7;
  --ink:#111111;
  --ink-soft:#1a1a1a;
  --gray:#8a8a86;
  --gray-light:#b7b3ad;
  --on-dark:#f3efe9;
  --on-dark-muted:#8f8b85;
  --radius-card:24px;
  --radius-pill:999px;
  --radius-box:10px;
  /* Fluid past desktop rather than a breakpoint: identical at every width up
     to 1920 (so the desktop composition is untouched), then widening slowly
     so a 4K canvas holds a composition rather than a 1240px column stranded
     in the middle of it — 1240 is 32% of 3840, which reads as abandoned. */
  --maxw:clamp(1240px, 1240px + (100vw - 1920px) * 0.22, 1680px);
  --pad:clamp(20px,5vw,64px);
  /* Top-anchored fixed UI adds this so it clears a notch or status bar.
     Zero on every device that has no inset, so nothing else moves. */
  --safe-t:env(safe-area-inset-top,0px);
  --ease:cubic-bezier(.22,1,.36,1);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:auto}
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-stopped{overflow:hidden}
.lenis.lenis-smooth iframe{pointer-events:none}
body{
  font-family:'Archivo',system-ui,sans-serif;
  background:var(--cream);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{
  outline:2px solid #6d5cff;outline-offset:3px;
}

/* ===== Opening composition =====
   A short, one-time blur-to-focus sequence inspired by the reference site's
   entrance rhythm. Each hero layer resolves on its own beat. */
html.site-intro-active,html.site-intro-active body{overflow:hidden}
html.site-entering .playground-nav,
html.site-entering .hero__title,
html.site-entering .hero__year,
html.site-entering .hero__since,
html.site-entering .grain{opacity:0}

html.site-entered .hero__title{
  animation:site-enter-title 1.45s cubic-bezier(.22,1,.36,1) .05s backwards;
}
html.site-entered .hero__year{
  animation:site-enter-from-left 1.05s cubic-bezier(.22,1,.36,1) .7s backwards;
}
html.site-entered .hero__since{
  animation:site-enter-from-right 1.05s cubic-bezier(.22,1,.36,1) .78s backwards;
}
html.site-entered .about-portrait{
  animation:site-enter-portrait 1.1s cubic-bezier(.22,1,.36,1) .62s backwards;
}
html.site-entered .playground-nav{
  animation:site-enter-nav .9s cubic-bezier(.22,1,.36,1) .42s backwards;
}
html.site-entered .grain{
  animation:site-enter-grain 1.4s ease .2s backwards;
}

@keyframes site-enter-title{
  0%{opacity:.14;filter:blur(14px);transform:translate3d(0,12px,0) scale(1.025);color:#b7b3ad}
  100%{opacity:1;filter:blur(0);transform:translate3d(0,0,0) scale(1)}
}
@keyframes site-enter-nav{
  0%{opacity:0;filter:blur(6px);transform:translateX(-50%) translateY(-10px) scale(.98)}
  100%{opacity:1;filter:blur(0);transform:translateX(-50%) translateY(0) scale(1)}
}
@keyframes site-enter-portrait{
  0%{opacity:0;filter:blur(10px)}
  100%{opacity:1;filter:blur(0)}
}
@keyframes site-enter-from-left{
  0%{opacity:0;filter:blur(6px);transform:translate3d(-16px,8px,0)}
  100%{opacity:1;filter:blur(0);transform:translate3d(0,0,0)}
}
@keyframes site-enter-from-right{
  0%{opacity:0;filter:blur(6px);transform:translate3d(16px,8px,0)}
  100%{opacity:1;filter:blur(0);transform:translate3d(0,0,0)}
}
@keyframes site-enter-grain{0%{opacity:0}100%{opacity:.5}}

/* film grain overlay */
.grain{
  position:fixed;inset:0;z-index:1;pointer-events:none;
  opacity:.5;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

section{position:relative;z-index:2;padding:0 var(--pad)}

/* ===== Playground nav =====
   Clean sound-button icon inspired by leoparpeix.com's soundButton.
   Clicking/tapping toggles the ambient track; the 4 bars read live
   frequency data when playing, idle wobble when paused.
   Same fixed top-center slot and hide-on-scroll behaviour. */
.playground-nav{
  position:fixed;top:calc(18px + var(--safe-t));left:50%;transform:translateX(-50%);
  z-index:50;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  transition:transform .4s var(--ease),opacity .35s ease;
  user-select:none;
}
.playground-nav:focus-visible{outline:2px solid var(--ink);outline-offset:4px;border-radius:14px}
/* slides up out of view when scrolling down */
.playground-nav--hidden{transform:translateX(-50%) translateY(-170%);opacity:0;pointer-events:none}

.sound-btn__label{
  font-family:'Karla',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  line-height:1;
  color:var(--gray);
  pointer-events:none;
  transition:color .25s ease,transform .25s ease,opacity .25s ease;
  white-space:nowrap;
}
.playground-nav:hover .sound-btn__label{
  color:var(--ink);
  transform:translateY(1px);
}
.playground-nav.is-playing .sound-btn__label{
  color:var(--ink-soft);
  letter-spacing:.11em;
}

/* Sound-button icon: 54×54 rounded container holding 4 animated bars.
   Dual-layer aura glow, ambient idle luminance, spring-bounce hover,
   color-reactive breathing pulse when playing, satisfying press squish. */
.sound-btn{
  position:relative;
  width:54px;height:54px;
  border-radius:14px;
  background:var(--cream-2);
  display:flex;align-items:center;justify-content:center;
  gap:4px;
  flex-shrink:0;
  box-shadow:
    0 2px 12px rgba(0,0,0,.06),
    0 0 0 1px rgba(0,0,0,.04);
  transition:background .35s ease,transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .4s ease;
}
/* Outer ambient aura — faint warm presence even at rest */
.sound-btn::before{
  content:'';
  position:absolute;inset:-8px;
  border-radius:22px;
  background:radial-gradient(circle,rgba(239,49,35,.04) 0%,transparent 65%);
  opacity:1;
  transition:opacity .4s ease,transform .4s ease;
  pointer-events:none;
  animation:sound-btn-idle-aura 4s ease-in-out infinite alternate;
}
@keyframes sound-btn-idle-aura{
  0%{transform:scale(0.92);opacity:.5}
  100%{transform:scale(1.08);opacity:1}
}
/* Inner hover bloom — warm halo intensifies on hover */
.sound-btn::after{
  content:'';
  position:absolute;inset:-5px;
  border-radius:19px;
  background:radial-gradient(circle,rgba(239,49,35,.12) 0%,rgba(255,183,197,.06) 50%,transparent 75%);
  opacity:0;
  transform:scale(.85);
  transition:opacity .35s ease,transform .35s cubic-bezier(.34,1.56,.64,1);
  pointer-events:none;
}
.playground-nav:hover .sound-btn{
  background:#ebe6df;
  transform:scale(1.12);
  box-shadow:
    0 8px 32px rgba(0,0,0,.1),
    0 0 0 1px rgba(0,0,0,.06),
    0 0 18px rgba(239,49,35,.06);
}
.playground-nav:hover .sound-btn::before{
  opacity:1;
  transform:scale(1.2);
  animation:none;
}
.playground-nav:hover .sound-btn::after{
  opacity:1;
  transform:scale(1);
}
/* Press squish on click */
.playground-nav:active .sound-btn{
  transform:scale(.94);
  transition-duration:.08s;
}
/* Playing state: warm background + breathing multi-ring aura */
.playground-nav.is-playing .sound-btn{
  background:#ebe6df;
  animation:sound-btn-breathe 3s ease-in-out infinite;
}
.playground-nav.is-playing .sound-btn::before{
  animation:sound-btn-aura-pulse 2.4s ease-in-out infinite alternate;
}
@keyframes sound-btn-breathe{
  0%,100%{
    box-shadow:
      0 2px 12px rgba(0,0,0,.06),
      0 0 0 1px rgba(0,0,0,.04),
      0 0 0 0 rgba(239,49,35,.0);
  }
  50%{
    box-shadow:
      0 4px 20px rgba(0,0,0,.08),
      0 0 0 1px rgba(0,0,0,.05),
      0 0 0 8px rgba(239,49,35,.1);
  }
}
@keyframes sound-btn-aura-pulse{
  0%{transform:scale(.95);opacity:.6}
  100%{transform:scale(1.25);opacity:1}
}
.sound-btn__bar{
  display:block;
  width:2.5px;height:20px;
  border-radius:3px;
  background:var(--ink);
  transform:scaleY(.12);
  transform-origin:center;
  transition:background .4s ease;
  will-change:transform;
}
/* When playing, bars get a warm tint */
.playground-nav.is-playing .sound-btn__bar{
  background:#2a2220;
}


/* ===== Floating side actions ===== */

/* ===== Hero → About scroll journey ===== */
.hero-journey{
  --journey-vh:100svh;
  --hero-gutter:clamp(32px,9.03vw,130px);
  /* Was sized to match the flying card. With the animation gone the portrait
     is free to be the anchor of the About section, so this is wider now. */
  --bridge-width:min(540px,calc(100vw - 24px));
  position:relative;height:calc(var(--journey-vh) * 2);z-index:2;
}
.hero-panel{
  position:relative;height:var(--journey-vh);min-height:620px;padding:0 var(--hero-gutter);
  background:var(--cream);overflow:hidden;
}
.hero__title{
  position:absolute;top:32.6%;left:var(--hero-gutter);right:var(--hero-gutter);z-index:2;
  height:1.76em;
  font-size:clamp(82px,12.35vw,178px);font-weight:800;line-height:.88;letter-spacing:-.047em;
  color:var(--gray);text-align:center;white-space:nowrap;
  user-select:none;
}
.hero__title-rotator{position:relative;display:block;width:100%;height:100%}
.hero__title-item{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
  opacity:0;transform:translate3d(0,.12em,0);
  animation:hero-role-cycle 5.6s linear infinite both;
  will-change:transform,opacity;
}
.hero__title-item--backend{animation-delay:-.35s}
.hero__title-item--ai{animation-delay:2.45s}
@keyframes hero-role-cycle{
  0%{opacity:0;transform:translate3d(0,.12em,0)}
  7%,43%{opacity:1;transform:translate3d(0,0,0)}
  50%{opacity:0;transform:translate3d(0,-.1em,0)}
  50.01%,100%{opacity:0;transform:translate3d(0,.12em,0)}
}
.hero__year{
  position:absolute;left:var(--hero-gutter);bottom:18px;z-index:3;
  font-size:clamp(44px,5.25vw,76px);font-weight:500;line-height:1;letter-spacing:-.05em;
}
.hero__since{
  position:absolute;right:var(--hero-gutter);bottom:24px;z-index:3;
  font-size:clamp(17px,1.7vw,24px);font-weight:600;letter-spacing:-.025em;
  color:var(--ink);
  /* the lily sits inside the tag so it inherits the entrance animation and
     every existing responsive rule for this corner */
  display:inline-flex;align-items:center;gap:0;white-space:nowrap;
}
/* Pixel-art bouquet, rebuilt from the reference at its true 19px block grid
   (see tools/pixel-flower/). Decorative.

   Two things matter here. It is portrait where the old lily was landscape, so
   it is sized by HEIGHT against the tag's type instead of by width — sizing by
   width would have made it tower over the number. And image-rendering:pixelated
   is load-bearing: without it the browser smooths the art while scaling and the
   hard square edges that make it pixel art in the first place turn to mush. */
.hero__flower{
  height:clamp(38px,4.4vw,66px);width:auto;flex:none;display:block;
  /* Order matters: the last supported declaration wins, so crisp-edges is the
     older fallback and pixelated is what modern browsers actually apply. */
  image-rendering:crisp-edges;
  image-rendering:pixelated;
  margin-left:clamp(3px,.5vw,9px);
  pointer-events:none;user-select:none;
}

/* ===== About ===== */
.intro{
  height:var(--journey-vh);min-height:620px;max-width:none;margin:0;
  display:grid;grid-template-columns:1fr var(--bridge-width) 1fr;gap:clamp(30px,4.2vw,60px);
  align-items:end;padding:0 var(--hero-gutter) 20px;background:var(--cream);
}
.intro__col{position:relative;z-index:2}
/* ===== Aaki =====
   The dancing cat, rendered from her .blend to a 6x5 sprite grid
   (tools/aaki/render_aaki.py) and stepped by script.js — one dance cycle of
   30 frames. She sits under the statement, centred, as if reacting to it. */
.aaki{
  --aaki-cols:6;--aaki-rows:5;
  width:clamp(120px,15vw,210px);
  aspect-ratio:273/235;                 /* the sprite's tile ratio */
  margin:clamp(18px,4vh,46px) auto 0;
  pointer-events:none;user-select:none;
}
.aaki__sprite{
  width:100%;height:100%;
  background-image:url('assets/images/aaki-sprite.webp');
  background-repeat:no-repeat;
  /* 6 columns x 5 rows, so the sheet is 600% x 500% of one tile */
  background-size:calc(100% * var(--aaki-cols)) calc(100% * var(--aaki-rows));
  background-position:0% 0%;
  filter:drop-shadow(0 12px 14px rgba(17,17,17,.14));
}
/* she holds a pose rather than dancing when motion is not wanted */
@media (prefers-reduced-motion:reduce){
  .aaki__sprite{background-position:40% 50%!important}
}
@media (max-width:600px){.aaki{width:clamp(96px,26vw,140px)}}
.intro__col--lead{height:456px;padding-top:24px;display:flex;flex-direction:column;justify-content:space-between}
.intro__col--lead h2{font-size:clamp(56px,5.2vw,76px);font-weight:600;line-height:1;letter-spacing:-.05em}
.intro__col--lead p,.intro__col--body p:first-child{font-size:clamp(18px,1.55vw,22px);font-weight:600;line-height:1.32}
.intro__col--body{padding-bottom:1px}
.intro__col--body p{font-size:clamp(16px,1.25vw,18px);line-height:1.38;color:var(--gray);margin-bottom:24px}
/* pencil-write reveal: text inks in char-by-char with a pencil following the line */
.js [data-write]{opacity:0;position:relative}
.js [data-write].writing,.js [data-write].done{opacity:1}
[data-write] .w-ch{opacity:0;filter:blur(1.4px)}
[data-write] .w-ch.inked{opacity:1;filter:none;transition:opacity .13s ease,filter .13s ease}
.write-pencil{position:absolute;top:0;left:0;pointer-events:none;font-size:1.05em;line-height:1;
  opacity:0;transition:opacity .18s ease;transform:translate(-999px,-999px);z-index:2;
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.25))}
.write-pencil.on{opacity:1}
@media (prefers-reduced-motion:reduce){
  .js [data-write]{opacity:1}
  [data-write] .w-ch{opacity:1;filter:none}
  .write-pencil{display:none}
}
/* ===== About "lights": copy that hides in daylight and resolves in the dark =====
   The about prose reads as unmistakable writing but stays illegible while this
   section shares the site's cream daylight. Pulling the cord dims *only* this
   section to a night-time room and brings the words into focus; scrolling back
   up turns the light off and the words blur again. */
#about{transition:background-color .9s var(--ease)}
#about::before{                       /* warm lamp pool + floor vignette, lit with the switch */
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  opacity:0;transition:opacity .9s var(--ease);
  background:
    radial-gradient(44% 48% at 10% 22%, rgba(255,206,150,.22), rgba(255,206,150,0) 60%),
    radial-gradient(130% 100% at 50% 120%, rgba(0,0,0,.45), rgba(0,0,0,0) 60%);
}
#about.lights-on{background-color:#100f13;color:var(--on-dark)}
#about.lights-on::before{opacity:1}

/* the pencil still writes the story, but ALL of it stays blurred until the lamp is on (JS only) */
.js #about h2,
.js #about .intro__col--lead p,
.js #about .intro__col--body p,
.js #about .intro__col--body .link-arrow{
  filter:blur(3px);will-change:filter;user-select:none;
  transition:filter .95s var(--ease),color .95s var(--ease);
}
/* …resolved sharp under the light, and lightened so it reads in the dark room */
.js #about.lights-on h2,
.js #about.lights-on .intro__col--lead p,
.js #about.lights-on .intro__col--body p,
.js #about.lights-on .intro__col--body .link-arrow{filter:blur(0);user-select:text}
.js #about.lights-on h2,
.js #about.lights-on .intro__col--lead p,
.js #about.lights-on .intro__col--body p{color:var(--on-dark)}

/* heading + CTA follow the room into the dark */
#about.lights-on .link-arrow__box{border-color:rgba(243,239,233,.5)}
#about.lights-on .link-arrow:hover .link-arrow__box{
  background:var(--on-dark);color:#100f13;border-color:var(--on-dark);
}
/* the portrait catches a soft rim of lamplight */
#about.lights-on .about-portrait{
  box-shadow:0 0 60px 2px rgba(255,206,150,.12),0 0 150px 24px rgba(255,150,90,.06);
}

/* ---- Pull-cord lamp: a physics-driven cord, pinned to the corner (driven by script.js) ---- */
.lamp{
  position:absolute;top:0;left:clamp(18px,6vw,84px);z-index:5;
  width:300px;height:560px;pointer-events:none;      /* only the bead is interactive; scrolls with #about */
  transition:opacity .5s var(--ease),transform .5s var(--ease);
}
.lamp.is-leaving{opacity:0;transform:translateY(-16px)}   /* animated retract instead of a sudden hide */
.lamp__cord{position:absolute;inset:0;overflow:visible}
.lamp__cord-path{
  fill:none;stroke:#b4afa6;stroke-width:2;stroke-linecap:round;
  transition:stroke .7s var(--ease);
}
.lamp.is-lit .lamp__cord{filter:drop-shadow(0 0 6px rgba(255,193,110,.45))}
.lamp.is-lit .lamp__cord-path{stroke:#f0c58a}
.lamp__bead{
  position:absolute;top:0;left:0;width:24px;height:32px;
  transform-origin:50% 0;transform:translate(26px,240px) translate(-50%,0);
  padding:0;border:0;background:transparent;cursor:grab;pointer-events:auto;
  touch-action:none;-webkit-tap-highlight-color:transparent;will-change:transform;
}
.lamp__bead:active{cursor:grabbing}
.lamp__bead-dot{
  display:block;width:100%;height:100%;border-radius:12px/14px;
  background:linear-gradient(#e6e0d6,#a9a39a);
  box-shadow:0 3px 8px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.7);
  transition:background .7s var(--ease),box-shadow .7s var(--ease);
}
.lamp.is-lit .lamp__bead-dot{
  background:radial-gradient(circle at 50% 34%,#fff3d8,#ffcf87 58%,#efa94e 100%);
  box-shadow:0 0 20px 6px rgba(255,193,110,.6),0 3px 8px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.8);
}
.lamp.is-dragging .lamp__bead{cursor:grabbing}
.lamp.is-armed .lamp__hint{opacity:1;color:#e7b06a}      /* pulled far enough — release to toggle */
.lamp__bead:focus-visible{outline:2px solid #6d5cff;outline-offset:4px;border-radius:12px}
.lamp__hint{
  position:absolute;top:0;left:0;transform:translate(26px,280px) translateX(-50%);white-space:nowrap;
  font-size:11px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
  color:var(--gray);opacity:.72;transition:color .7s var(--ease),opacity .4s ease;pointer-events:none;
}
.lamp.is-lit .lamp__hint{color:rgba(255,216,174,.9);opacity:.9}
html:not(.js) .lamp{display:none}      /* no JS: no cord, copy stays plainly readable */
@media (prefers-reduced-motion:reduce){ .lamp__bead-dot{transition:none} }

/* ===== Jukebox Floating Music Notes ===== */
.floating-music-note{
  position:fixed;
  pointer-events:none;
  user-select:none;
  z-index:99;
  font-family:"Newsreader",serif;
  font-size:clamp(16px,2vw,22px);
  color:#ff4d24;
  text-shadow:0 0 10px rgba(255,77,36,.6),0 0 20px rgba(255,183,197,.8);
  opacity:0;
  transform:translate3d(0,0,0) rotate(0deg);
  animation:float-music-note 2.4s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes float-music-note{
  0%{
    opacity:0;
    transform:translate3d(0,0,0) scale(0.6) rotate(0deg);
  }
  20%{
    opacity:1;
    transform:translate3d(calc(var(--drift-x) * 0.3), -28px, 0) scale(1.1) rotate(var(--rot));
  }
  80%{
    opacity:0.85;
  }
  100%{
    opacity:0;
    transform:translate3d(var(--drift-x), -90px, 0) scale(0.8) rotate(calc(var(--rot) * 1.8));
  }
}




/* The portrait, shown directly. It used to be an empty landing slot with its
   image held at visibility:hidden until the flying card arrived; with the
   animation gone the image simply shows, and it is sized to carry the section
   rather than to match a card. */
.about-portrait{
  margin:0;width:100%;
  aspect-ratio:400/545;
  border-radius:20px;overflow:hidden;
  background:#851818;
  box-shadow:0 26px 70px rgba(60,10,10,.28);
}
.about-portrait img{
  width:100%;height:100%;
  object-fit:cover;object-position:center 34%;
  display:block;
}

/* Atmospheric cherry blossom petals drift canvas */
.sakura-drift{
  position:fixed;inset:0;z-index:1;
  pointer-events:none;
  /* inset:0 already sizes this. The 100vw that used to sit here counted the
     scrollbar, making the canvas wider than the viewport it covers. */
}

/* ===== Statement ===== */
.statement{
  position:relative;overflow:visible;
  max-width:1000px;margin:0 auto;text-align:center;
  padding-top:clamp(60px,10vh,140px);padding-bottom:clamp(60px,10vh,140px);
}

.statement p{
  font-size:clamp(28px,4vw,52px);font-weight:500;line-height:1.25;letter-spacing:-.02em;color:var(--gray);
}
.statement b{color:var(--ink);font-weight:600}
.statement .rw{transition:none}

/* ===== Section title (blur reveal) ===== */
.section-title{
  font-size:clamp(48px,8vw,110px);font-weight:600;line-height:.95;letter-spacing:-.03em;
  color:var(--ink);
}
[data-reveal-title]{opacity:.12;transform:translate3d(0,22px,0);
  transition:opacity .68s var(--ease),transform .68s var(--ease)}
[data-reveal-title].in{opacity:1;transform:translate3d(0,0,0)}
.section-title--on-dark{color:var(--on-dark)}

/* ===== Services ===== */
.services{max-width:var(--maxw);margin:0 auto;padding-top:clamp(60px,9vh,120px);padding-bottom:clamp(60px,9vh,120px)}
.services__list{list-style:none;margin-top:60px;border-top:1px solid rgba(17,17,17,.12)}
.service{
  display:grid;grid-template-columns:80px 1.2fr 2fr;gap:24px;align-items:baseline;
  padding:36px 0;border-bottom:1px solid rgba(17,17,17,.12);
  transition:background .3s ease;
}
.service>*{transition:transform .34s var(--ease)}
@media (hover:hover) and (pointer:fine){.service:hover>*{transform:translate3d(12px,0,0)}}
.service__no{font-size:16px;color:var(--gray);font-weight:600}
.service h3{font-size:clamp(24px,2.4vw,34px);font-weight:500;letter-spacing:-.02em}
.service p{font-size:17px;line-height:1.5;color:var(--gray)}

/* ===== Work ===== */
.work{max-width:var(--maxw);margin:0 auto;padding-top:clamp(60px,9vh,120px);padding-bottom:clamp(60px,9vh,120px)}
.work__head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap}
.work__grid{margin-top:60px;display:grid;grid-template-columns:repeat(4,1fr);gap:20px;perspective:1500px}

/* ===== Projects showcase: cards moving through depth past a fixed camera =====
   While armed, the grid stops being a grid and becomes a 3D stage: every card
   is absolutely stacked at the centre and positioned purely by transform, so
   the browser can depth-sort them and nothing triggers layout per frame. */
.work__cell{transform-style:preserve-3d}
/* the card is an <a>; the cell wrapper is what gets laid out, so without this
   the anchor falls back to display:inline and its box collapses */
.work__cell > .card{display:block;width:100%;height:100%}

[data-spin-grid].is-stack{
  display:block;position:relative;
  height:var(--stage-h,420px);
  margin-top:clamp(20px,4vh,44px);
  perspective:var(--persp,1200px);
  perspective-origin:50% 50%;
  transform-style:preserve-3d;
}
[data-spin-grid].is-stack .work__cell{
  position:absolute;top:50%;left:50%;margin:0;
  width:var(--card-w,420px);height:var(--card-h,525px);
  will-change:transform,opacity;
  backface-visibility:hidden;
  transform-style:preserve-3d;
}
[data-spin-grid].is-stack .card{
  aspect-ratio:auto;
  /* one shadow, no blur filters: several of these move every frame */
  box-shadow:0 30px 80px rgba(17,17,17,.16);
}
.project-card__image{width:100%;height:100%;object-fit:cover;display:block}
.project-card__visual{background:#eeeae3}

/* the heading stays above the stage, so a card passing the lens cannot
   smother it on its way out of frame */
.work.is-showcase .work__head{position:relative;z-index:3}
/* the pinned stage holds steady while the cards travel through it */
.work.is-showcase{
  position:relative;
  /* dvh, not vh: with mobile browser chrome showing, 100vh is taller than
     the visible area, so the pinned stage started life already clipped. */
  min-height:100dvh;display:flex;flex-direction:column;justify-content:center;
}

/* Hidden only once the script has armed the stage, so a missing GSAP (or
   reduced motion) leaves the plain, readable grid in place instead of blank. */
.js [data-spin-grid].is-stack .work__cell{opacity:0}
.js [data-spin-grid] .card:not(.flip-in){opacity:1;transform:none}
[data-spin-grid] .work__cell,
[data-spin-grid] .card{transition-delay:0s!important}
@media (prefers-reduced-motion:reduce){
  .js [data-spin-grid] .work__cell{opacity:1!important;transform:none!important}
}

/* development-only readout: append ?debugCards=1 to the URL */
.work__debug{
  position:absolute;left:clamp(12px,3vw,32px);bottom:clamp(12px,3vh,28px);z-index:50;
  margin:0;padding:10px 12px;border-radius:8px;pointer-events:none;
  background:rgba(17,17,17,.86);color:#e9e6e0;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11px;line-height:1.45;white-space:pre;
}

/* ===== Flip card (projects) ===== */
.card{
  aspect-ratio:3/4;border-radius:var(--radius-card);
  perspective:1600px;background:transparent;color:var(--on-dark);
  opacity:1;transform:translateY(0);
  transition:opacity .68s var(--ease),transform .72s var(--ease);
}
.card__inner{
  position:relative;width:100%;height:100%;
  transform-style:preserve-3d;transform:rotateX(180deg);      /* content face at rest */
  transition:transform .88s var(--ease);transition-delay:.08s;
}
/* pre-entrance state (applied only while JS is active): logo face, dropped + hidden */
.js .card:not(.flip-in){opacity:0;transform:translateY(64px)}
.js .card:not(.flip-in) .card__inner{transform:rotateX(0deg)}
/* left-to-right cascade: card drops, then its inner flips open a beat later */
.work__grid .card:nth-child(2){transition-delay:.12s}
.work__grid .card:nth-child(3){transition-delay:.24s}
.work__grid .card:nth-child(4){transition-delay:.36s}
.work__grid .card:nth-child(2) .card__inner{transition-delay:.24s}
.work__grid .card:nth-child(3) .card__inner{transition-delay:.36s}
.work__grid .card:nth-child(4) .card__inner{transition-delay:.48s}
.card:hover .card__face{box-shadow:0 30px 70px rgba(0,0,0,.32)}
.card__face{
  position:absolute;inset:0;border-radius:var(--radius-card);
  -webkit-backface-visibility:hidden;backface-visibility:hidden;
  overflow:hidden;display:flex;flex-direction:column;
  background:var(--ink);box-shadow:0 22px 50px rgba(0,0,0,.18);
}
.card__face--front{align-items:center;justify-content:center}
.card__face--back{transform:rotateX(180deg);padding:26px;justify-content:space-between}
.card__face--back::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.3;
  background:radial-gradient(120% 85% at 82% 0%, var(--glow, #5b6470) 0%, transparent 55%);
}
.card__tag{
  position:relative;z-index:1;align-self:flex-start;
  font-size:12px;letter-spacing:.04em;text-transform:uppercase;
  color:var(--on-dark);border:1px solid rgba(255,255,255,.18);
  padding:6px 12px;border-radius:var(--radius-pill);backdrop-filter:blur(4px);
}
.card__logo{display:flex;align-items:center;justify-content:center;color:#fff;opacity:.94}
.card__logo svg{width:clamp(56px,7vw,90px);height:auto}
.card__meta{position:relative;z-index:1}
.card__meta h3{font-size:22px;font-weight:600;margin-bottom:4px;letter-spacing:-.01em}
.card__meta p{font-size:15px;color:var(--on-dark-muted);margin-bottom:12px}
.card__cta{font-size:14px;color:#fff;opacity:.9}

/* Live particle project cards: monochrome, responsive, and spatial rather than image swaps. */
.project-card{
  --card-rx:0deg;--card-ry:0deg;--image-x:0px;--image-y:0px;
  position:relative;isolation:isolate;overflow:hidden;cursor:pointer;
  background:#f9f7f2;color:var(--ink);border:1px solid rgba(17,17,17,.16);
  transform-style:preserve-3d;box-shadow:0 16px 40px rgba(0,0,0,.1);
  transition:opacity .68s var(--ease),transform .34s var(--ease),box-shadow .34s var(--ease),border-color .24s ease;
}
.project-card::after{
  content:"";position:absolute;inset:0;z-index:4;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);
}
.project-card__visual{position:absolute;inset:0;overflow:hidden;background:#f9f7f2}
.project-card__visual::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to bottom,transparent 58%,rgba(249,247,242,.58) 78%,rgba(249,247,242,.92) 100%);
}
.project-card__canvas{
  width:100%;height:100%;display:block;
  transform:translate3d(var(--image-x),var(--image-y),0) scale(1.035);
  transform-origin:50% 47%;transition:transform .5s var(--ease);will-change:transform;
}
.project-card__top{
  position:absolute;top:14px;left:14px;right:14px;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.project-card__tag,.project-card__number{
  min-height:30px;display:inline-flex;align-items:center;border:1px solid rgba(17,17,17,.16);
  background:rgba(250,247,243,.9);color:#272727;border-radius:var(--radius-pill);
  font-size:10px;font-weight:700;line-height:1;letter-spacing:.07em;text-transform:uppercase;
  box-shadow:0 5px 16px rgba(0,0,0,.06);
}
.project-card__tag{padding:0 12px}
.project-card__number{min-width:30px;justify-content:center;padding:0 8px}
/* Sized for the project name alone — it used to carry a blurb underneath and
   still had that block's min-height, which left a slab of black over the card. */
.project-card__info{
  position:absolute;left:12px;right:12px;bottom:12px;z-index:3;
  padding:11px 12px 11px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#111;color:#f7f5f0;border:1px solid rgba(255,255,255,.11);border-radius:14px;
  box-shadow:0 12px 26px rgba(0,0,0,.18);transform:translate3d(0,0,24px);
  transition:transform .34s var(--ease),box-shadow .34s var(--ease);
}
.project-card__info h3{max-width:none;font-size:clamp(14px,1.15vw,17px);font-weight:600;line-height:1.15;letter-spacing:-.02em}
.project-card__info p{margin-top:7px;color:#a9a9a6;font-size:12px;line-height:1.35}
.project-card__arrow{
  width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:none;
  color:#111;background:#f7f5f0;border-radius:9px;transition:transform .3s var(--ease),background .2s ease;
}
.project-card__arrow svg{width:16px;height:16px}
@media (hover:hover) and (pointer:fine){
  .project-card.card--interactive:hover{
    transform:translate3d(0,-8px,0) rotateX(var(--card-rx)) rotateY(var(--card-ry));
    border-color:rgba(17,17,17,.28);box-shadow:0 28px 62px rgba(0,0,0,.18);
  }
  .project-card.card--interactive:hover .project-card__canvas{transform:translate3d(var(--image-x),var(--image-y),0) scale(1.075)}
  .project-card.card--interactive:hover .project-card__info{transform:translate3d(0,-4px,30px);box-shadow:0 22px 42px rgba(0,0,0,.27)}
  .project-card.card--interactive:hover .project-card__arrow{transform:translate3d(2px,-2px,0);background:#fff}
}
.project-card:focus-visible{border-color:#111;box-shadow:0 0 0 4px rgba(17,17,17,.12),0 22px 54px rgba(0,0,0,.16)}
.work__grid .project-card.card--interactive{transition-delay:0s}

/* ===== Thoughts ===== */
.thoughts{max-width:var(--maxw);margin:0 auto;padding-top:clamp(60px,9vh,120px);padding-bottom:clamp(60px,9vh,120px)}
.thoughts__grid{margin-top:60px;display:grid;grid-template-columns:1fr 1fr;gap:24px}
.post{display:flex;flex-direction:column;gap:16px}
.post__cover{
  aspect-ratio:16/9;border-radius:20px;background:linear-gradient(140deg,#e7e2da,#d8d2c8);
  display:flex;align-items:center;justify-content:center;font-size:60px;color:rgba(17,17,17,.2);
  transition:transform .5s var(--ease)
}
.post__cover--b{background:linear-gradient(140deg,#1c1c1c,#0a0a0a);color:rgba(255,255,255,.2)}
.post:hover .post__cover{transform:scale(1.01)}
.post h3{font-size:clamp(22px,2.2vw,30px);font-weight:600;letter-spacing:-.02em}
.post__more{font-size:16px;color:var(--gray)}

/* ===== Contact ===== */
.contact{
  position:relative;
  max-width:var(--maxw);margin:0 auto;
  display:grid;grid-template-columns:minmax(0,.78fr) minmax(520px,1.22fr);gap:clamp(38px,6vw,92px);align-items:center;
  padding-top:clamp(60px,9vh,120px);padding-bottom:clamp(80px,12vh,160px);
}

/* ===== Hovering bee (modelled in Blender, rendered to a sprite strip) ===== */
.bee{
  --bee-frames:10;
  --bee-w:76px;
  --bee-flip:1;
  position:absolute;top:0;left:0;z-index:3;
  width:var(--bee-w);
  aspect-ratio:187/204;              /* sprite tile ratio */
  pointer-events:none;
  opacity:0;
  transition:opacity .8s ease;
  will-change:transform;
}
.bee.is-flying{opacity:1}
/* 10 frames side by side: background-size is 1000% wide, so stepping
   background-position-x from 0% to 100% in 9 equal steps lands on each frame. */
.bee__sprite{
  width:100%;height:100%;
  background-image:url('assets/images/bee-sprite.webp');
  background-repeat:no-repeat;
  background-size:calc(100% * var(--bee-frames)) 100%;
  background-position:0% 0%;
  filter:drop-shadow(0 8px 10px rgba(17,17,17,.16));
  transform:scaleX(var(--bee-flip));
  animation:bee-flap .5s steps(1,end) infinite;
}
@keyframes bee-flap{
  0%   {background-position-x:0%}
  10%  {background-position-x:11.111%}
  20%  {background-position-x:22.222%}
  30%  {background-position-x:33.333%}
  40%  {background-position-x:44.444%}
  50%  {background-position-x:55.556%}
  60%  {background-position-x:66.667%}
  70%  {background-position-x:77.778%}
  80%  {background-position-x:88.889%}
  90%  {background-position-x:100%}
  100% {background-position-x:0%}
}
@media (prefers-reduced-motion:reduce){
  .bee__sprite{animation:none}
}
@media (max-width:760px){
  .bee{--bee-w:56px}
}
.contact__left{max-width:500px}
.contact__eyebrow{
  margin-bottom:20px;color:#6e6e6e;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;font-weight:700;letter-spacing:.12em;
}
.contact__title{line-height:.82;letter-spacing:-.06em}
/* The mailbox has to live *outside* the <h2>: that heading carries a clip-path
   for its scroll reveal, and clip-path clips every descendant — at rest it is
   inset(0), which crops to the heading's box and sliced ~21px off the mailbox's
   right edge.
   Wrapping both in a max-content box keeps the anchor honest though: the
   wrapper shrinks to the widest line of the title, so left:100% still tracks
   the right edge of "talk_" at any font size, with no per-breakpoint offset. */
.contact__title-wrap{position:relative;width:max-content;max-width:100%}
.contact__mailbox{
  position:absolute;
  left:calc(100% + clamp(10px,1.4vw,24px));
  top:50%;
  width:clamp(84px,9.5vw,132px);
  height:auto;
  transform:translateY(-50%) rotate(-4deg);
  transform-origin:center;
  pointer-events:none;
  user-select:none;
  filter:drop-shadow(0 12px 20px rgba(90,40,30,.16));
  animation:mailbox-float 5.5s ease-in-out infinite alternate;
}
@keyframes mailbox-float{
  0%  {transform:translateY(-50%) rotate(-4deg)}
  100%{transform:translateY(calc(-50% - 9px)) rotate(-1deg)}
}
@media (prefers-reduced-motion:reduce){
  .contact__mailbox{animation:none}
}
.contact__cursor{color:#777;font-weight:400;animation:terminal-cursor 1s steps(1,end) infinite}
.contact__lede{max-width:440px;margin-top:34px;color:var(--gray);font-size:clamp(17px,1.45vw,20px);line-height:1.55}
.contact__meta{display:grid;gap:0;margin-top:34px;border-top:1px solid rgba(17,17,17,.12)}
.contact__meta div{display:grid;grid-template-columns:88px 1fr;gap:18px;padding:14px 0;border-bottom:1px solid rgba(17,17,17,.12)}
.contact__meta dt{
  color:var(--gray);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11px;letter-spacing:.1em;text-transform:uppercase;
}
.contact__meta dd{font-size:14px;font-weight:600}

/* ===== Live presence indicator =====
   Apple's status dot reads as *lit* rather than merely coloured, and that is
   almost entirely shading, not hue: a bright specular highlight off the
   top-left falling to a deeper edge, plus a rim seating it against the
   surface. So even in a light mint green the dot still reads as a lit bead
   rather than the flat #25b86a speck it started as — the shading is doing the
   work, the colour is just the tint.

   Flexing the row rather than relying on vertical-align keeps the dot centred
   against the cap height at any font size. */
.contact__status{display:flex;align-items:center}
.contact__status-dot{
  position:relative;
  flex:none;
  width:10px;height:10px;
  margin-right:10px;
  border-radius:50%;
  background:radial-gradient(circle at 34% 30%,
    #b6f7cf 0%, #5fe08d 30%, #2fcc6a 66%, #1da555 100%);
  box-shadow:
    inset 0 -1px 1.5px rgba(16,100,52,.36),  /* rounds the underside */
    0 0 0 .5px rgba(20,110,60,.46),          /* rim, pitched to suit a light bead */
    0 1px 2px rgba(22,120,66,.3),
    0 0 10px 1px rgba(70,215,130,.62);       /* the lit halo */
  transition:transform .32s var(--ease),box-shadow .32s ease;
}
/* The two rings carry all the motion, so the dot itself never moves and stays
   crisp at 10px. ::before is the outward broadcast ripple; ::after is a slower
   glow that breathes underneath it. */
.contact__status-dot::before,
.contact__status-dot::after{
  content:'';
  position:absolute;inset:0;
  border-radius:50%;
  pointer-events:none;
}
.contact__status-dot::before{
  border:1.5px solid rgba(60,205,125,.8);
  animation:status-ripple 2.6s cubic-bezier(.22,1,.36,1) infinite;
}
.contact__status-dot::after{
  background:radial-gradient(circle,rgba(85,222,143,.55) 0%,rgba(85,222,143,0) 70%);
  animation:status-breathe 2.6s ease-in-out infinite;
}
@keyframes status-ripple{
  0%   {transform:scale(1);opacity:.85}
  70%  {transform:scale(3.1);opacity:0}
  100% {transform:scale(3.1);opacity:0}
}
@keyframes status-breathe{
  0%,100%{transform:scale(1.6);opacity:.45}
  50%    {transform:scale(2.4);opacity:.85}
}
/* Hovering the row leans into it: the dot swells slightly and the halo tightens
   and brightens, so the status reads as something live you can poke at. */
.contact__meta-row--status:hover .contact__status-dot{
  transform:scale(1.18);
  box-shadow:
    inset 0 -1px 1.5px rgba(16,100,52,.36),
    0 0 0 .5px rgba(20,110,60,.52),
    0 1px 3px rgba(22,120,66,.34),
    0 0 16px 2px rgba(95,224,141,.85);
}
.contact__meta-row--status:hover .contact__status-dot::before{animation-duration:1.5s}
.contact__meta-row--status:hover .contact__status-dot::after{animation-duration:1.5s}
@media (prefers-reduced-motion:reduce){
  .contact__status-dot::before,
  .contact__status-dot::after{animation:none}
  .contact__status-dot::before{opacity:.5;transform:scale(1.8)}
  .contact__status-dot::after{opacity:.6;transform:scale(2)}
}
.socials{display:flex;gap:12px;margin-top:32px}
.socials a{
  width:48px;height:48px;border-radius:12px;background:var(--cream-2);
  display:flex;align-items:center;justify-content:center;font-weight:600;font-size:15px;
  transition:transform .3s var(--ease),background .3s;
}
.socials a:hover{transform:translateY(-3px);background:var(--ink);color:#fff}
.contact__form{
  position:relative;isolation:isolate;overflow:hidden;
  background:#0a0a0a;border:1px solid rgba(255,255,255,.14);border-radius:20px;
  color:#dedede;box-shadow:0 34px 90px rgba(0,0,0,.23),0 2px 0 rgba(255,255,255,.05) inset;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.contact__form::before{
  content:"";position:absolute;inset:45px 0 0;z-index:-1;pointer-events:none;opacity:.34;
  background:radial-gradient(circle at 78% 0%,rgba(255,255,255,.09),transparent 36%),repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.012) 3px 4px);
}
.terminal__bar{
  min-height:46px;padding:0 16px;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;
  background:#171717;border-bottom:1px solid rgba(255,255,255,.09);font-size:11px;color:#8d8d8d;
}
.terminal__lights{display:flex;gap:6px}
.terminal__lights i{display:block;width:9px;height:9px;border-radius:50%;background:#5c5c5c}
.terminal__lights i:nth-child(2){background:#909090}
.terminal__lights i:nth-child(3){background:#d4d4d4}
.terminal__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.terminal__secure{display:flex;align-items:center;gap:7px;color:#b4b4b4;white-space:nowrap}
.terminal__secure i{width:6px;height:6px;border-radius:50%;background:#d7d7d7;box-shadow:0 0 9px rgba(255,255,255,.48)}
.terminal__body{position:relative;padding:clamp(22px,3vw,34px)}
.terminal__intro{margin-bottom:25px;font-size:12px;line-height:1.7;color:#828282}
.terminal__intro span{color:#d5d5d5}
.terminal__intro strong{color:#d0d0d0;font-weight:600}
.terminal__typed{color:#e1e1e1;font-weight:400}
.terminal__typed.is-typing::after{
  content:"";display:inline-block;width:.52em;height:1.05em;margin-left:3px;vertical-align:-.15em;
  background:#d8d8d8;animation:terminal-type-cursor .62s steps(1,end) infinite;
}
.terminal__output{opacity:1;transform:translate3d(0,0,0);transition:opacity .3s ease,transform .3s var(--ease)}
.terminal__field{
  display:block;margin-bottom:13px;padding:13px 15px 14px;
  background:rgba(255,255,255,.028);border:1px solid rgba(255,255,255,.08);border-radius:9px;
  transition:border-color .22s ease,background .22s ease,box-shadow .22s ease;
}
.terminal__field:focus-within{background:rgba(255,255,255,.048);border-color:rgba(255,255,255,.44);box-shadow:0 0 0 3px rgba(255,255,255,.07)}
.terminal__prompt{display:block;margin-bottom:8px;color:#828282;font-size:11px;letter-spacing:.035em}
.terminal__prompt b{color:#c8c8c8;font-weight:500}
.contact__form input,.contact__form textarea{
  display:block;width:100%;padding:0;background:transparent;border:0;color:#f0f0f0;
  font-family:inherit;font-size:14px;line-height:1.5;resize:vertical;caret-color:#f2f2f2;
}
.contact__form input::placeholder,.contact__form textarea::placeholder{color:#606060;opacity:1}
.contact__form input:focus,.contact__form textarea:focus{outline:none}
.contact__form textarea{min-height:104px;max-height:220px}
.terminal__command{margin:20px 0 11px;color:#929292;font-size:12px}
.terminal__command span{color:#d0d0d0}
.terminal--armed .terminal__output{opacity:0;transform:translate3d(0,5px,0)}
.terminal--armed .terminal__output.is-visible{opacity:1;transform:translate3d(0,0,0)}
.terminal--armed .terminal__field,
.terminal--armed .terminal__command,
.terminal--armed .btn-submit{visibility:hidden;opacity:0;transform:translate3d(0,10px,0)}
.terminal--armed.terminal--ready .terminal__field,
.terminal--armed.terminal--ready .terminal__command,
.terminal--armed.terminal--ready .btn-submit{
  visibility:visible;opacity:1;transform:translate3d(0,0,0);
  transition:opacity .42s ease,transform .42s var(--ease),visibility 0s;
}
.terminal--ready .terminal__field:nth-of-type(1){transition-delay:.04s}
.terminal--ready .terminal__field:nth-of-type(2){transition-delay:.11s}
.terminal--ready .terminal__field:nth-of-type(3){transition-delay:.18s}
.terminal--ready .terminal__command{transition-delay:.25s}
.terminal--ready .btn-submit{transition-delay:.32s}
.terminal--booting .terminal__secure i{animation:terminal-pulse .55s ease-in-out infinite alternate}
.btn-submit{
  width:100%;min-height:50px;padding:11px 13px 11px 17px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:#eee;color:#111;border:1px solid #fff;border-radius:9px;
  font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;
  box-shadow:0 9px 28px rgba(0,0,0,.24);transition:transform .25s var(--ease),background .2s ease,box-shadow .25s ease;
}
.btn-submit:hover{transform:translateY(-2px);background:#fff;box-shadow:0 13px 34px rgba(0,0,0,.3)}
.btn-submit:disabled{cursor:wait;opacity:.72;transform:none}
.btn-submit__key{padding:7px 9px;border:1px solid rgba(17,17,17,.2);border-radius:6px;background:rgba(255,255,255,.45);font-size:9px;letter-spacing:.08em}
.contact__note{margin-top:15px;color:#adadad;font-size:11px;line-height:1.55;text-align:left}
.contact__note strong{color:#dedede}
.contact__note a{color:#fff;border-bottom:1px solid rgba(255,255,255,.35)}
.contact__form.is-running .terminal__secure i{animation:terminal-pulse .65s ease-in-out infinite alternate}
@keyframes terminal-cursor{50%{opacity:0}}
@keyframes terminal-type-cursor{50%{opacity:0}}
@keyframes terminal-pulse{to{opacity:.35;box-shadow:0 0 3px rgba(255,255,255,.55)}}

/* ===== link with arrow box ===== */
.link-arrow{display:inline-flex;align-items:center;gap:12px;font-size:18px;font-weight:500}
.link-arrow__box{
  width:34px;height:34px;border:1px solid rgba(17,17,17,.4);border-radius:8px;
  display:flex;align-items:center;justify-content:center;font-size:16px;
  transition:transform .3s var(--ease),background .3s,color .3s,border-color .3s;
}
.link-arrow:hover .link-arrow__box{background:var(--ink);color:#fff;border-color:var(--ink);transform:translate(2px,-2px)}

/* ===== Footer ===== */
.footer{
  position:relative;z-index:2;background:var(--ink);color:var(--on-dark);
  border-radius:32px 32px 0 0;margin-top:40px;padding:clamp(60px,9vh,110px) var(--pad) 0;overflow:hidden;
}
.footer__top{
  max-width:var(--maxw);margin:0 auto;
  display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px;
}
.footer__headline{font-size:clamp(34px,5vw,64px);font-weight:700;line-height:1.02;letter-spacing:-.03em}
.footer__links h4,.footer__contact h4{color:var(--on-dark-muted);font-size:20px;font-weight:500;margin-bottom:24px}
.footer__pills{display:flex;flex-wrap:wrap;gap:10px;max-width:280px}
.footer__pills a{
  background:rgba(255,255,255,.08);padding:10px 18px;border-radius:var(--radius-pill);font-size:15px;
  transition:background .3s
}
.footer__pills a:hover{background:rgba(255,255,255,.18)}
.footer__contact a{color:var(--on-dark);font-size:18px;border-bottom:1px solid rgba(255,255,255,.2);padding-bottom:2px}
.footer__wordmark{
  margin-top:clamp(30px,6vh,70px);text-align:center;line-height:.8;
  font-size:clamp(80px,20vw,320px);font-weight:800;letter-spacing:-.03em;
  color:rgba(255,255,255,.04);user-select:none;
  transform:translateY(18%);
}

/* ===== Generic reveal ===== */
[data-reveal]{opacity:0;transform:translate3d(0,24px,0);transition:opacity .68s var(--ease),transform .68s var(--ease)}
[data-reveal].in{opacity:1;transform:none}

/* ===== Responsive ===== */
@media (max-width:900px){
  .hero-journey{--hero-gutter:clamp(24px,5vw,48px);--bridge-width:min(360px,calc(48vw - 36px))}
  .hero__title{top:34%;font-size:clamp(70px,12.4vw,112px)}
  .hero__since{right:190px}
  .intro{grid-template-columns:var(--bridge-width) 1fr;gap:clamp(24px,5vw,44px);padding:0 var(--hero-gutter) 20px}
  .intro__col--media{grid-column:1;grid-row:1/3}
  .intro__col--lead{grid-column:2;grid-row:1;height:auto;align-self:end;gap:24px}
  .intro__col--body{grid-column:2;grid-row:2}
  .intro__col--lead h2{font-size:clamp(48px,7vw,64px)}
  .intro__col--lead p,.intro__col--body p:first-child{font-size:18px}
  .intro__col--body p{font-size:16px;margin-bottom:16px}
  .work__grid{grid-template-columns:1fr 1fr}
  .service{grid-template-columns:50px 1fr;row-gap:10px}
  .service p{grid-column:1/-1}
  .thoughts__grid,.contact,.footer__top{grid-template-columns:1fr}
}
@media (max-width:600px){
  .hero-journey{--hero-gutter:12px;--bridge-width:calc(100vw - 24px);height:auto}
  .hero-panel{min-height:540px}
  .hero__title{top:32%;font-size:clamp(44px,15.5vw,64px);line-height:.9;letter-spacing:-.055em}
  .hero__year{left:18px;bottom:16px;font-size:42px}
  .hero__since{right:18px;bottom:20px;font-size:15px}
  .intro{position:relative;height:auto;min-height:100svh;display:block;padding:calc(32svh + (100vw - 24px) * 1.3625 + 34px) 18px 72px}
  /* Width stated outright rather than via left+right: 100% here is the
     containing block, so it can't pick up the scrollbar the way 100vw did. */
  .intro__col--media{position:absolute;top:32svh;left:12px;width:calc(100% - 24px)}
  .intro__col--lead{display:block;height:auto;padding-top:0}
  .intro__col--lead h2{margin-bottom:22px}
  .intro__col--lead p{margin-bottom:28px}
  .intro__col--body p{font-size:16px;line-height:1.45}
  .work__grid{grid-template-columns:1fr}
  .card{aspect-ratio:16/11}
  .project-card{aspect-ratio:4/5}
  .project-card__info{min-height:108px}
  .project-card__info h3{max-width:none;font-size:22px}
  .sound-btn{width:46px;height:46px;border-radius:12px}
  .sound-btn__bar{height:17px;width:2.5px}
  .contact{gap:44px}
  .contact__lede{margin-top:26px}
  .contact__meta div{grid-template-columns:76px 1fr;gap:12px}
  .terminal__bar{grid-template-columns:auto minmax(0,1fr);padding:0 13px;gap:10px}
  .terminal__title{text-align:left}
  .terminal__secure{display:none}
  .terminal__body{padding:20px 16px}
  .terminal__intro{font-size:10px}
  .terminal__field{padding:12px 13px 13px}
  .btn-submit__key{display:none}
}
/* ===== Supari-inspired editorial motion study ===== */
:root{
  --studio-red:#ee4036;
  --studio-blush:#f3ddd5;
  --studio-offwhite:#fffaf4;
  --studio-display:'Londrina Solid','Archivo',sans-serif;
  --studio-body:'Karla','Archivo',sans-serif;
  --studio-snap:cubic-bezier(.16,1,.3,1);
}
body{font-family:var(--studio-body)}
.work,.footer{font-family:'Archivo',system-ui,sans-serif}
.work .section-title{
  font-family:'Archivo',system-ui,sans-serif;font-weight:600;line-height:.95;
  letter-spacing:-.03em;text-transform:none;
}
.work [data-reveal-title]{
  opacity:.12;clip-path:none;transform:translate3d(0,22px,0);
  transition:opacity .68s var(--ease),transform .68s var(--ease);
}
.work [data-reveal-title].in{opacity:1;transform:none}
.footer [data-reveal]{
  opacity:0;transform:translate3d(0,24px,0);
  transition:opacity .68s var(--ease),transform .68s var(--ease);
}
.footer [data-reveal].in{opacity:1;transform:none}
.hero__title,.section-title,.intro__col--lead h2,.service h3,
.statement p,.contact__title{
  font-family:var(--studio-display);
}
.hero__title{
  font-weight:900;letter-spacing:.005em;line-height:.78;color:#878782;
  text-shadow:3px 3px 0 rgba(238,64,54,.13);
}
.hero__since{font-family:var(--studio-body);font-weight:800;letter-spacing:.06em}
.section-title{
  font-weight:900;letter-spacing:.01em;line-height:.82;text-transform:uppercase;
}
[data-reveal-title]{
  opacity:0;clip-path:inset(100% 0 0);transform:translate3d(0,72px,0) rotate(2.5deg);
  transform-origin:0 100%;
  transition:opacity .15s ease,clip-path .9s var(--studio-snap),transform .9s var(--studio-snap);
}
[data-reveal-title].in{opacity:1;clip-path:inset(0);transform:none}
[data-reveal]{
  transform:translate3d(0,48px,0) rotate(.7deg);
  transition:opacity .72s ease,transform .9s var(--studio-snap);
}
.statement{max-width:1180px}
.statement p{
  font-size:clamp(42px,7vw,100px);font-weight:900;line-height:.88;letter-spacing:.005em;
  text-transform:uppercase;color:#99958f;
}
.statement b{color:var(--studio-red);font-weight:900}
.service{position:relative;overflow:hidden;isolation:isolate}
.service::before{
  content:"";position:absolute;inset:0;z-index:-1;background:var(--studio-red);
  transform:translateX(-102%);transition:transform .6s var(--studio-snap);
}
.service h3{font-size:clamp(30px,3.3vw,48px);font-weight:900;letter-spacing:.01em;text-transform:uppercase}
@media (hover:hover) and (pointer:fine){
  .service:hover::before{transform:none}
  .service:hover{color:var(--studio-offwhite)}
  .service:hover p,.service:hover .service__no{color:var(--studio-offwhite)}
}
.link-arrow__box,.btn-submit{transition-duration:.5s;transition-timing-function:var(--studio-snap)}
@media(max-width:600px){
  .hero__title{line-height:.82}
  .statement p{font-size:clamp(38px,12vw,68px)}
  .service h3{font-size:31px}
}
@media (pointer:coarse){
  .grain{display:none}
  /* Touch targets. The mic toggle is a 20px-tall pill and the form fields sit
     at 24px — both well under the 44px a fingertip needs. The toggle keeps its
     exact size and grows only its hit area through a pseudo-element, so the
     visual stays identical; the fields, having nothing to hide behind, take a
     real min-height. Both are scoped to coarse pointers, so the mouse-driven
     desktop composition is untouched. */
  .rio-mic{position:fixed}
  .rio-mic::before{
    content:"";position:absolute;left:0;right:0;top:50%;
    transform:translateY(-50%);height:44px;
  }
  .contact__form input,.contact__form textarea{min-height:44px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
  [data-reveal],[data-reveal-title]{opacity:1!important;filter:none!important;transform:none!important}
  .hero-journey{height:auto}
  .intro{height:auto;min-height:100svh}
  .hero__title-item{opacity:0!important;transform:none!important}
  .hero__title-item--backend{opacity:1!important}
  .project-card__canvas{will-change:auto}
}

/* Projects handoff: a quick scene transition, never a loading screen. */
body::after{
  content:"";position:fixed;z-index:9999;inset:0;background:#000;pointer-events:none;
  opacity:0;transform:scaleY(0);transform-origin:50% 100%;
  transition:transform .46s cubic-bezier(.76,0,.24,1),opacity .18s ease;
}
body.projects-departing{overflow:hidden}
body.projects-departing::after{opacity:1;transform:scaleY(1)}
body.projects-departing .work{transform:scale(.975);filter:blur(3px);opacity:.45;transition:transform .44s ease,filter .3s ease,opacity .3s ease}

/* ===== Rio: voice-summoned mascot =====
   Sits exactly where the music toggle sits, and only one of them is ever
   on screen. Springs out of a dot on arrival, shrinks back into one to go. */
.rio{
  position:fixed;top:calc(8px + var(--safe-t));left:50%;transform:translateX(-50%);
  z-index:52;
  pointer-events:none;visibility:hidden;
  /* Deliberately not var(--ease): that is an easeOutQuint, which covers most
     of its distance in the first fraction of the duration. Lovely for things
     arriving, wrong for something leaving — it snaps away then crawls. This
     curve is gentle at both ends, and both properties share it so they move
     as one rather than finishing at different times. */
  --rio-ease:cubic-bezier(.33,.68,.24,1);
  transition:transform .78s var(--rio-ease),
             opacity .60s var(--rio-ease);
}
/* Visibility flips instantly with the class — the stage owns the visible
   fade now, so delaying this would only keep a fully transparent element
   in the way for another half second. */
.rio--on{visibility:visible}

/* The lifecycle layer. Nothing else animates its transform, so entering and
   leaving can move it freely without touching the scroll-away on .rio or
   the breathing/lean on the canvas. */
.rio__stage{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  opacity:0;
}
.rio--on .rio__stage{opacity:1}
.rio__canvas{display:block;width:108px;height:108px}
.rio__caption{
  font-family:'Karla',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:9.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted,#8a8a8a);min-height:12px;
}
/* Once the page scrolls past the hero, Rio gets out of the way exactly as the
   nav does. It stays awake and listening — scroll back up and it is still
   there — it simply stops hovering over the content on the way down. */
html.scrolled-past-hero .rio{
  /* -150% clears the top with room to spare; -190% was nearly twice the
     distance actually needed, which forced it to move fast to arrive on
     time. The slight scale makes it recede rather than merely slide. */
  transform:translateX(-50%) translateY(-150%) scale(.94);
  opacity:0;pointer-events:none;
}

/* ...but not at the moment it is summoned. That rule above only ever has a
   visible effect on an awake Rio, so calling it from anywhere below the hero
   used to wake it up 216px off the top of the screen at opacity 0 — it came
   when called, invisibly, and after that it was no longer dormant so the
   phrase stopped being a summons at all. Rio is pinned when called and the
   pin is dropped on the next deliberate scroll, so getting out of the way
   stays a response to scrolling rather than a place it can wake up into. */
html.rio-pinned .rio--on{
  transform:translateX(-50%);opacity:1;
}

/* ── Rio lifecycle ────────────────────────────────────────────────────────
   Enter and exit are two halves of one idea: materialise then settle,
   contract then dissolve. Both run on .rio__stage, both travel a handful of
   pixels, both use the same curve. Rio is meant to read as waking up in the
   place it already occupied, not as a panel arriving from somewhere.

   The curve is cubic-bezier(.33,0,.30,1) throughout. An easeOutQuint is the
   usual reach here, but measured against this motion it reaches 76% opacity
   in the first quarter and puts 44% of the travel into the first 11% of the
   time — 4.07x the average step. That reads as the pop we are removing.
   This curve peaks at 2.17x and accelerates gently before settling. */
:root{ --rio-life:cubic-bezier(.33,0,.30,1) }

.rio--entering .rio__stage{
  animation:rio-rise .56s var(--rio-life) both,
            rio-emerge .56s var(--rio-life) both;
}
/* Split in two so the settle can have its own timing without forcing the
   opacity to bend around it. Blur clears early — a blurred hold at the end
   reads as out of focus rather than as arriving. */
@keyframes rio-emerge{
  0%{opacity:0}
  100%{opacity:1}
}
@keyframes rio-rise{
  0%{transform:translateY(8px) scale(.962);filter:blur(5px)}
  62%{transform:translateY(0) scale(1.006);filter:blur(0);
      animation-timing-function:cubic-bezier(.4,0,.35,1)}
  100%{transform:translateY(0) scale(1);filter:blur(0)}
}

/* Contract first, dissolve second — hence the near-full opacity at 35%
   while the scale has already begun to give. Reversing that order makes it
   vanish and then move, which is what "removed from the DOM" looks like. */
.rio--leaving .rio__stage{
  animation:rio-dissolve .32s var(--rio-life) forwards;
}
@keyframes rio-dissolve{
  0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}
  35%{opacity:.88;transform:translateY(1px) scale(.991);filter:blur(.6px)}
  100%{opacity:0;transform:translateY(4.5px) scale(.972);filter:blur(3px)}
}

/* opt-in toggle, tucked under the nav in the same visual key */
.rio-mic{
  /* clears the nav, which stands 70px tall (icon + its own label) */
  position:fixed;top:calc(94px + var(--safe-t));left:50%;transform:translateX(-50%);
  z-index:49;display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border-radius:999px;
  background:transparent;border:1px solid transparent;
  font-family:'Karla',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:8.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted,#8a8a8a);cursor:pointer;
  opacity:.5;transition:opacity .3s ease,border-color .3s ease,color .3s ease;
}
.rio-mic:hover{opacity:1;border-color:rgba(0,0,0,.12)}
.rio-mic:focus-visible{outline:2px solid var(--ink);outline-offset:3px;opacity:1}
.rio-mic__dot{
  position:relative;
  width:5px;height:5px;border-radius:50%;
  background:currentColor;opacity:.45;transition:background .3s ease,opacity .3s ease;
}
.rio-mic--on{opacity:1;color:var(--ink,#111)}
.rio-mic--on .rio-mic__dot{background:#2394e5;opacity:1}
/* The pulse rides on a pseudo-element via transform+opacity. Animating
   box-shadow instead would repaint this every frame for as long as Rio is
   listening, which is exactly the kind of cost you don't want running idle. */
.rio-mic--on .rio-mic__dot::after{
  content:"";position:absolute;inset:0;border-radius:50%;
  background:rgba(35,148,229,.55);
  animation:rio-mic-pulse 1.8s ease-in-out infinite;
}
@keyframes rio-mic-pulse{
  0%,100%{transform:scale(1);opacity:.55}
  70%{transform:scale(3);opacity:0}
}
/* The toggle rides along with the nav when it slides away — on scroll, and
   also while Rio is on stage, since Rio borrows that whole spot. Escape
   dismisses Rio if you want the toggle back sooner. */
.playground-nav--hidden ~ .rio-mic{transform:translateX(-50%) translateY(-300%);opacity:0;pointer-events:none}

@media (prefers-reduced-motion:reduce){
  /* Rio still appears and still leaves — only the travel, scale and blur
     go. A straight fade at a fraction of the length. */
  .rio--entering .rio__stage{animation:rio-emerge .12s linear both}
  .rio--leaving .rio__stage{animation:rio-emerge .12s linear reverse forwards}
  .rio-mic--on .rio-mic__dot::after{animation:none}
}

/* Only shown when speech synthesis produced no audio at all — a spoken-only
   answer that silently fails is a dead end, so the text steps in. */
.rio__say{
  max-width:min(320px,80vw);margin-top:2px;
  font-family:'Karla',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:11.5px;line-height:1.45;text-align:center;
  color:var(--ink,#111);background:var(--bg,#fdfbf8);
  border:1px solid rgba(0,0,0,.10);border-radius:10px;
  padding:6px 10px;box-shadow:0 6px 18px rgba(0,0,0,.07);
  opacity:0;transform:translateY(-4px);pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}
.rio__say--on{opacity:1;transform:translateY(0)}
