/* ══════════════════════════════════════════════════════════════
   MIRINO — home page
   Concept: the page is seen through a camera. Photos lead, the UI is a
   viewfinder (HUD with real EXIF), the one authored motion is the shutter.
   Palette from the Trapani salt pans at blue hour.
══════════════════════════════════════════════════════════════ */

@property --iris {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 150%;
}

:root {
  --ink: #121524;        /* blue-hour sky over the saline */
  --ink-2: #1B2036;      /* raised surfaces */
  --salt: #ECEAF1;       /* salt crystals: main text on dark */
  --haze: #A3A8C0;       /* secondary text, 7:1 on --ink */
  --ember: #FF8A4C;      /* sunset streak: action colour */
  --neon: #6FE3E8;       /* palace neon: HUD / measurement */
  --line: rgba(236, 234, 241, 0.16);

  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --fg: var(--salt);
  --fg-2: var(--haze);

  --font: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 78rem;
}

/* Light theme = the print: paper instead of negative */
html:not(.dark) {
  --bg: #ECEAF1;
  --bg-2: #FFFFFF;
  --fg: #121524;
  --fg-2: #4A4F66;
  --ember: #C8501A;
  --neon: #0C7C82;
  --line: rgba(18, 21, 36, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--font);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ember); color: var(--ink); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--fg-2) var(--bg); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ember); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; }

/* Film grain over everything: real photographic texture, not decoration */
body::after {
  content: '';
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

/* ══════════════ NAV ══════════════ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter);
  color: #ECEAF1;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out), padding .4s var(--ease-out);
}
.nav.is-solid {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
  padding-block: .7rem;
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
  font-variation-settings: 'wdth' 75;
  letter-spacing: .01em;
}
.nav-links { display: flex; gap: clamp(1rem, 2.4vw, 2rem); font-size: .9rem; }
.nav-links a, .nav-tool { text-decoration: none; opacity: .85; transition: opacity .2s; }
.nav-links a:hover, .nav-tool:hover { opacity: 1; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.5rem); }
.nav-tool { font: 500 .8rem var(--mono); background: none; border: 0; color: inherit; cursor: pointer; padding: .4rem; }
.theme-btn { display: inline-flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; border-radius: 50%; }
.theme-btn svg { width: 1.15rem; height: 1.15rem; }
html.dark .theme-btn .moon, html:not(.dark) .theme-btn .sun { display: none; }

.menu-btn { display: none; }
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 1.25rem;
    padding: var(--gutter);
    background: var(--ink); color: var(--salt);
    font-size: 2.4rem; font-weight: 700; font-variation-settings: 'wdth' 70;
    clip-path: circle(0% at calc(100% - 2.5rem) 2rem);
    transition: clip-path .6s var(--ease-out);
  }
  .nav.is-open .nav-links { clip-path: circle(150% at calc(100% - 2.5rem) 2rem); }
  .nav.is-open { color: var(--salt); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu-btn { display: inline-flex; }
}

/* ══════════════ HERO / VIEWFINDER ══════════════ */
.hero {
  position: relative;
  height: 100svh; min-height: 36rem;
  overflow: hidden;
  background: #0b0d16;
  color: #ECEAF1;
  isolation: isolate;
}
.hero-frames { position: absolute; inset: -3%; z-index: -2; }
.frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.04);
  transition: transform 1.2s var(--ease-out);
}
.frame.is-on { opacity: 1; }
/* scrim: keeps text ≥4.5:1 over any photo */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 12, 22, .6) 0%, rgba(10, 12, 22, 0) 24%),
    linear-gradient(to top, rgba(10, 12, 22, .88) 0%, rgba(10, 12, 22, .35) 45%, rgba(10, 12, 22, 0) 70%),
    linear-gradient(to right, rgba(10, 12, 22, .55), rgba(10, 12, 22, 0) 60%);
}

/* Iris: the aperture closes to black and opens on the next frame */
.iris {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at var(--ix, 50%) var(--iy, 50%), transparent var(--iris), #07080f calc(var(--iris) + 1px));
  transition: --iris .32s cubic-bezier(.7, 0, .84, 0);
}
.hero.is-shooting .iris { --iris: 0%; }
.hero.is-opening .iris { transition: --iris .7s var(--ease-out); }

.vf { position: absolute; inset: clamp(4.5rem, 9vh, 6rem) var(--gutter) clamp(1rem, 3vh, 2rem); pointer-events: none; z-index: 2; }
.vf-corner { position: absolute; width: 28px; height: 28px; border: 0 solid rgba(236, 234, 241, .8); }
.vf-corner.tl { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.vf-corner.tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.vf-corner.bl { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.vf-corner.br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

.hud {
  position: absolute; z-index: 2; pointer-events: none;
  top: calc(clamp(4.5rem, 9vh, 6rem) + 1rem); right: calc(var(--gutter) + 2.25rem);
  display: grid; justify-items: end; gap: .15rem;
  font-family: var(--mono); font-size: .72rem; color: var(--neon);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
html:not(.dark) .hud { color: #6FE3E8; }
.hud-place { color: #ECEAF1; font-size: .8rem; }
.hud-rec { display: inline-flex; align-items: center; gap: .4rem; }
.hud-rec::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Focus reticle: follows the pointer, "locks" after a pause */
.reticle {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 64px; height: 44px; margin: -22px 0 0 -32px;
  pointer-events: none;
  border: 1px solid rgba(236, 234, 241, .85);
  transform: translate3d(var(--rx, 50vw), var(--ry, 50vh), 0) scale(1.25);
  opacity: 0;
  transition: opacity .3s, border-color .2s, scale .25s var(--ease-out);
}
.reticle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: currentColor; border-radius: 50%; color: rgba(236, 234, 241, .85); }
.hero.has-pointer .reticle { opacity: 1; }
.hero.is-locked .reticle { border-color: var(--neon); scale: .8; }
@media (hover: hover) and (pointer: fine) { .hero.has-pointer { cursor: none; } .hero.has-pointer a, .hero.has-pointer button { cursor: pointer; } }

.hero-copy {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter); bottom: clamp(2.5rem, 7vh, 5rem);
  padding-left: clamp(0rem, 2vw, 1.5rem);
  max-width: var(--max);
}
.hero-name {
  font-weight: 800;
  font-size: clamp(3.6rem, 13.5vw, 12.5rem);
  line-height: .84;
  letter-spacing: -0.02em;
  font-variation-settings: 'wdth' var(--wdth, 72);
  margin-bottom: clamp(1rem, 3vh, 1.75rem);
  transition: font-variation-settings .5s var(--ease-out);
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .line > span { display: block; animation: rise 1.1s var(--ease-out) both; }
.hero-name .line:nth-child(2) > span { animation-delay: .12s; color: transparent; -webkit-text-stroke: 1.5px #ECEAF1; }
@keyframes rise { from { transform: translateY(105%); } }
@media (max-width: 760px) { .hero-name { font-size: 21vw; --wdth: 64; } }
.hero-lead {
  max-width: 38rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55;
  color: rgba(236, 234, 241, .9);
  animation: fadein 1s .45s var(--ease-out) both;
}
.hero-lead strong { color: #fff; font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; animation: fadein 1s .6s var(--ease-out) both; }
@keyframes fadein { from { opacity: 0; } }

/* Shutter button */
.shutter {
  position: absolute; z-index: 4; right: calc(var(--gutter) + 1.5rem); bottom: clamp(2.5rem, 7vh, 5rem);
  width: 4.25rem; height: 4.25rem; border-radius: 50%;
  border: 1.5px solid rgba(236, 234, 241, .9);
  background: transparent; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  color: #ECEAF1;
}
.shutter::before {
  content: ''; width: 72%; height: 72%; border-radius: 50%;
  background: #ECEAF1;
  transition: transform .15s var(--ease-out), background-color .2s;
}
.shutter:hover::before { background: var(--ember); }
.shutter:active::before { transform: scale(.82); }
.shutter-count { position: absolute; top: calc(100% + .45rem); font: .7rem var(--mono); white-space: nowrap; color: rgba(236, 234, 241, .8); }
.flash { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }
.hero.is-shooting .flash { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .35; } 100% { opacity: 0; } }

@media (max-width: 760px) {
  .hud { display: none; }
  /* shutter bottom-centre like a phone camera; copy lifted to clear it */
  .shutter { width: 3.75rem; height: 3.75rem; right: auto; left: 50%; translate: -50% 0; bottom: calc(clamp(1rem, 3vh, 2rem) + .75rem); }
  .shutter-count { top: 50%; left: calc(100% + .75rem); translate: 0 -50%; }
  .hero-copy { bottom: calc(clamp(1rem, 3vh, 2rem) + 6rem); }
  .hero-cta { justify-content: center; }
}

/* ══════════════ BUTTONS ══════════════ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font: 600 .92rem var(--font);
  text-decoration: none; cursor: pointer;
  border: 1.5px solid currentColor;
  transition: color .3s var(--ease-out), border-color .3s;
  isolation: isolate;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--ember);
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path .5s var(--ease-out);
}
.btn:hover::before { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.btn:hover { color: #121524; border-color: var(--ember); }
.btn-solid { background: var(--ember); color: #121524; border-color: var(--ember); }
.btn-solid::before { background: #ECEAF1; }
.btn-solid:hover { border-color: #ECEAF1; }
.btn svg { width: 1rem; height: 1rem; flex: none; }

/* ══════════════ SECTIONS ══════════════ */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(4.5rem, 9vw, 7rem) var(--gutter); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.section-title {
  font-weight: 800; line-height: .9; letter-spacing: -0.015em;
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  font-variation-settings: 'wdth' 68;
}
.section-note { color: var(--fg-2); max-width: 22rem; font-size: .95rem; text-align: right; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } .section-note { text-align: left; } }

/* Film-advance reveal: content slides in under a mask, once */
/* negative bottom inset: tight display line-height puts descenders (g, p) outside the box */
.js .reveal { clip-path: inset(-0.1em 100% -0.3em 0); transition: clip-path 1s var(--ease-out); }
.js .reveal.in-view { clip-path: none; }

/* ══════════════ PROJECTS ══════════════ */
.project {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.project + .project { margin-top: clamp(5rem, 10vw, 8rem); }
.project:nth-of-type(even) .project-visual { order: 2; }
.project-visual {
  position: relative; aspect-ratio: 4 / 3;
  display: block;
  perspective: 900px;
}
.project-visual .stage {
  position: absolute; inset: 0;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out);
}
.project-visual img { position: absolute; height: auto; border-radius: 10px; box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .55); transition: transform .7s var(--ease-out); }
/* Hanging Around: three phone screens that fan out */
.fan img { width: 24%; top: 21%; left: 38%; }
.fan img:nth-child(1) { transform: translate3d(-62%, 6%, -40px) rotate(-7deg); }
.fan img:nth-child(3) { transform: translate3d(62%, 6%, -40px) rotate(7deg); }
.fan img:nth-child(2) { transform: translateZ(30px); }
.project-visual:hover .fan img:nth-child(1) { transform: translate3d(-92%, 2%, -40px) rotate(-11deg); }
.project-visual:hover .fan img:nth-child(3) { transform: translate3d(92%, 2%, -40px) rotate(11deg); }
.project-visual:hover .fan img:nth-child(2) { transform: translate3d(0, -4%, 60px); }
/* Egadi: desktop + phone */
.duo .desk { width: 82%; left: 6%; top: 14%; border-radius: 6px; }
.duo .phone { width: 22%; right: 6%; bottom: 8%; transform: translateZ(50px); }
.project-visual:hover .duo .desk { transform: translate3d(-3%, -3%, 0); }
.project-visual:hover .duo .phone { transform: translate3d(4%, -6%, 80px) rotate(3deg); }
.project-logo { position: absolute; left: 0; top: 0; width: clamp(5rem, 22%, 7.5rem); height: auto; box-shadow: none !important; border-radius: 0 !important; z-index: 2; }

.project-title {
  font-weight: 800; font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: .95;
  font-variation-settings: 'wdth' 72; letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.project-title a { text-decoration: none; background: linear-gradient(var(--ember), var(--ember)) 0 100% / 0 3px no-repeat; transition: background-size .5s var(--ease-out); }
.project-title a:hover { background-size: 100% 3px; }
.project-text { color: var(--fg-2); max-width: 34rem; margin-bottom: 1.4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-bottom: 1.8rem; }
.tags li { font: .72rem var(--mono); padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 4px; color: var(--fg-2); }
.project-links { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project-visual { order: 0; }
}

/* ══════════════ PHOTO BAND ══════════════ */
/* Photo sections melt into the page: squared smootherstep mask: a linear ramp leaves a visible edge, and the square slows the onset so dark pixels don't pop out of the light bg */
.band, .contact {
  --fade: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / 0.000) calc(var(--ft) * 0.1), rgb(0 0 0 / 0.003) calc(var(--ft) * 0.2), rgb(0 0 0 / 0.027) calc(var(--ft) * 0.3), rgb(0 0 0 / 0.101) calc(var(--ft) * 0.4), rgb(0 0 0 / 0.250) calc(var(--ft) * 0.5), rgb(0 0 0 / 0.466) calc(var(--ft) * 0.6), rgb(0 0 0 / 0.700) calc(var(--ft) * 0.7), rgb(0 0 0 / 0.888) calc(var(--ft) * 0.8), rgb(0 0 0 / 0.983) calc(var(--ft) * 0.9), #000 var(--ft),
    #000 calc(100% - var(--fb)), rgb(0 0 0 / 0.983) calc(100% - var(--fb) * 0.9), rgb(0 0 0 / 0.888) calc(100% - var(--fb) * 0.8), rgb(0 0 0 / 0.700) calc(100% - var(--fb) * 0.7), rgb(0 0 0 / 0.466) calc(100% - var(--fb) * 0.6), rgb(0 0 0 / 0.250) calc(100% - var(--fb) * 0.5), rgb(0 0 0 / 0.101) calc(100% - var(--fb) * 0.4), rgb(0 0 0 / 0.027) calc(100% - var(--fb) * 0.3), rgb(0 0 0 / 0.003) calc(100% - var(--fb) * 0.2), rgb(0 0 0 / 0.000) calc(100% - var(--fb) * 0.1), transparent 100%);
  -webkit-mask-image: var(--fade); mask-image: var(--fade);
}

.band {
  --h: clamp(26rem, 90vh, 58rem);
  position: relative; margin: 0; height: var(--h); overflow: hidden; color: #ECEAF1;
  /* text stacks at the bottom, just above the fade, over the darkest part of the photo */
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1.25rem;
  padding: 0 var(--gutter) calc(var(--h) * .2);
  --ft: 34%; --fb: 30%;
}
.band img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; }
@supports (animation-timeline: view()) {
  .band img { animation: drift linear both; animation-timeline: view(); }
  @keyframes drift { from { transform: translateY(-8%) scale(1.06); } to { transform: translateY(8%) scale(1); } }
}
.band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 12, 22, .65) 20%, rgba(10, 12, 22, .25) 55%, rgba(10, 12, 22, 0) 70%); }
@media (max-width: 760px) {
  .band figcaption { flex-direction: column; gap: .25rem; }
  .band-quote { font-size: 2rem; }
}
.band figcaption {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .95rem;
}
.band figcaption .mono { color: #6FE3E8; }
/* crop toward the water so the quote sits on the darkest area */
.band:has(.band-quote) img { object-position: 50% 85%; }
.band-quote { position: relative; z-index: 1; max-width: 16ch; font-weight: 800; font-size: clamp(2rem, 4.6vw, 4rem); line-height: .95; font-variation-settings: 'wdth' 70; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }

/* ══════════════ PHOTOGRAPHY / FILM STRIP ══════════════ */
.photo-intro { max-width: 42rem; margin-bottom: 3rem; }
.photo-intro p { color: var(--fg-2); font-size: 1.05rem; }
.photo-intro strong { color: var(--fg); font-weight: 600; }

.strip-wrap { position: relative; }
.strip {
  display: flex; gap: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 26px var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
  background: #0b0c12;
  /* sprocket holes, top and bottom */
  --holes: repeating-linear-gradient(90deg, transparent 0 10px, #2b2d38 10px 22px, transparent 22px 30px);
  background-image: var(--holes), var(--holes);
  background-size: 100% 9px, 100% 9px;
  background-position: 0 8px, 0 calc(100% - 8px);
  background-repeat: repeat-x;
  background-attachment: local; /* holes travel with the frames */
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.shot {
  flex: none; position: relative; scroll-snap-align: center;
  height: clamp(13rem, 34vw, 24rem);
  padding: 0; border: 0; background: none; cursor: zoom-in;
  overflow: hidden;
}
.shot img { height: 100%; width: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s var(--ease-out), filter .5s; filter: saturate(.9); }
.shot img.tall { aspect-ratio: 3 / 4; }
.shot:hover img, .shot:focus-visible img { transform: scale(1.05); filter: saturate(1.1); }
.shot .edge { position: absolute; left: .5rem; bottom: .4rem; font: .7rem var(--mono); color: #FF8A4C; opacity: .9; }
.strip-nav { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }
.strip-nav button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--fg); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, background-color .2s; }
.strip-nav button:hover { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 15%, transparent); }
.strip-nav svg { width: 1.1rem; height: 1.1rem; }

.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(7, 8, 15, .96); color: #ECEAF1; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: fadein .35s var(--ease-out); }
.lightbox figure { margin: 0; display: grid; gap: .75rem; justify-items: center; padding: 3.5rem 1rem 1rem; }
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; animation: develop 1.1s var(--ease-out); }
@keyframes develop { from { filter: brightness(2.2) contrast(.4) blur(6px); } }
.lightbox figcaption { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; font-size: .9rem; }
.lightbox figcaption .mono { color: #6FE3E8; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(236, 234, 241, .3); background: none; color: inherit; cursor: pointer; font-size: 1.4rem; line-height: 1; }

/* ══════════════ SKILLS ══════════════ */
.legend { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--fg-2); font-size: .85rem; margin-bottom: 2rem; }
.legend span { display: inline-flex; align-items: center; gap: .5rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ember); }
.dot.used { background: var(--ember); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.skill-group { padding: 1.75rem 1.5rem 2rem 0; border-bottom: 1px solid var(--line); }
.skill-group h3 { font-weight: 700; font-size: 1.35rem; font-variation-settings: 'wdth' 80; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: baseline; }
.skill-group h3 .mono { color: var(--fg-2); font-weight: 400; }
.skill-list { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.skill-list li { display: inline-flex; align-items: center; gap: .45rem; font-size: .98rem; color: var(--fg); transition: color .2s, transform .3s var(--ease-out); }
.skill-list li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ember); flex: none; }
.skill-list li.used::before { background: var(--ember); }
.skill-list li:not(.used) { color: var(--fg-2); }
.skill-list li:hover { color: var(--ember); transform: translateX(2px); }

/* ══════════════ JOURNEY ══════════════ */
.timeline { position: relative; max-width: 50rem; padding-left: clamp(2.5rem, 8vw, 7rem); }
.timeline::before { content: ''; position: absolute; left: clamp(.6rem, 2.5vw, 2.25rem); top: .5rem; bottom: .5rem; width: 1px; background: var(--line); }
.timeline::after {
  content: ''; position: absolute; left: clamp(.6rem, 2.5vw, 2.25rem); top: .5rem; bottom: .5rem; width: 2px; margin-left: -.5px;
  background: linear-gradient(var(--neon), var(--ember));
  transform-origin: top; transform: scaleY(var(--progress, 1));
}
@supports (animation-timeline: view()) {
  .timeline::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 70%; }
  @keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
.step { position: relative; padding-bottom: clamp(2.75rem, 6vw, 4rem); }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: calc(-1 * clamp(2.5rem, 8vw, 7rem) + clamp(.6rem, 2.5vw, 2.25rem) - 6px); top: .45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ember); }
.step time { display: block; font: .78rem var(--mono); color: var(--neon); margin-bottom: .35rem; }
.step h3 { font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); font-variation-settings: 'wdth' 78; line-height: 1.1; margin-bottom: .6rem; }
.step p { color: var(--fg-2); max-width: 38rem; margin-bottom: .9rem; }
.step .tags { margin-bottom: 0; }
.text-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .9rem; font-weight: 600; color: var(--ember); text-decoration: none; }
.text-link svg { width: .95rem; height: .95rem; transition: transform .3s var(--ease-out); }
.text-link:hover svg { transform: translateX(4px); }

/* ══════════════ CONTACT ══════════════ */
.contact {
  position: relative; overflow: hidden; color: #ECEAF1; isolation: isolate;
  --ft: 14rem; --fb: 10rem;
}
.contact > .section { padding-top: calc(clamp(4.5rem, 9vw, 7rem) + 6rem); padding-bottom: calc(clamp(4.5rem, 9vw, 7rem) + 4rem); }
.contact > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.contact::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 12, 22, .92) 0%, rgba(10, 12, 22, .7) 50%, rgba(10, 12, 22, .35)); }
.contact .section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact .section-title { margin-bottom: 1.5rem; }
.contact-lead { color: rgba(236, 234, 241, .85); max-width: 28rem; margin-bottom: 2.25rem; font-size: 1.05rem; }
.channels { display: grid; gap: 0; border-top: 1px solid rgba(236, 234, 241, .2); }
.channels a, .channels div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: .95rem 0; border-bottom: 1px solid rgba(236, 234, 241, .2); text-decoration: none; transition: padding .35s var(--ease-out), color .2s; overflow-wrap: anywhere; }
.channels .mono { color: #6FE3E8; padding-top: .2rem; }
.channels a:hover { padding-left: .6rem; color: #FF8A4C; }

.form { display: grid; gap: 1.1rem; background: rgba(18, 21, 36, .72); border: 1px solid rgba(236, 234, 241, .14); border-radius: 8px; padding: clamp(1.5rem, 3vw, 2.25rem); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.form label { display: block; font: .75rem var(--mono); color: #A3A8C0; margin-bottom: .35rem; }
.form input, .form textarea {
  width: 100%; font: 1rem var(--font); color: #ECEAF1;
  background: transparent; border: 0; border-bottom: 1px solid rgba(236, 234, 241, .3);
  padding: .55rem 0; border-radius: 0; resize: vertical;
  transition: border-color .25s;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(236, 234, 241, .4); }
.form input:focus, .form textarea:focus { outline: none; border-color: #FF8A4C; }
.form .btn { justify-self: start; margin-top: .5rem; }
@media (max-width: 860px) { .contact .section { grid-template-columns: 1fr; } }

.footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter); color: var(--fg-2); font-size: .85rem; }

/* ══════════════ REDUCED MOTION ══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  body::after { animation: none; }
  .frame, .project-visual .stage, .project-visual img { transition: none; }
  .js .reveal { clip-path: none; transition: none; }
  .iris { transition-duration: .01ms !important; }
}
