/* =============================================================
   Matías Palermo — Fotógrafo & Filmmaker
   Archetype: "Viewfinder" — cinematic dark, tungsten accent
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #08080a;
  --bg-2: #111114;
  --ink: #f3eee6;
  --muted: rgba(243, 238, 230, 0.64);
  --faint: rgba(243, 238, 230, 0.38);
  --line: rgba(243, 238, 230, 0.14);
  --accent: #f2b544;
  --accent-hot: #e8862f;
  --rec: #ff4136;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 5.5vw, 64px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --slide-ms: 6000ms;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; line-height: 1; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .8em;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow span { color: var(--accent); }
.eyebrow::after { content: ""; width: 32px; height: 1px; background: var(--line); }

/* =============================================================
   4. Components
   ============================================================= */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 58px; padding: 0 1.8rem;
  border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; letter-spacing: .01em;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .3s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  color: #160f04;
  background: linear-gradient(135deg, #ffd88a 0%, var(--accent) 45%, var(--accent-hot) 100%);
  box-shadow:
    0 14px 44px -12px rgba(242, 181, 68, .7),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  overflow: hidden;
}
.btn-primary .btn-label { position: relative; z-index: 2; }
/* light sweep */
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.65) 48%, transparent 64%);
  transform: translateX(-120%);
  animation: sweep 4.2s var(--ease-soft) 2.4s infinite;
}
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 56px -12px rgba(242,181,68,.85), inset 0 1px 0 rgba(255,255,255,.6); }
}

.btn-ghost {
  color: var(--ink);
  font-weight: 600; font-size: .95rem;
  background: rgba(243, 238, 230, .045);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-ghost svg { width: 20px; height: 20px; color: var(--accent); }
@media (hover: hover) {
  .btn-ghost:hover { border-color: rgba(242,181,68,.55); background: rgba(242,181,68,.08); }
}

/* =============================================================
   5. HUD (top bar)
   ============================================================= */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 12px) var(--gutter) 12px;
  transition: background-color .5s, -webkit-backdrop-filter .5s, backdrop-filter .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.hud.is-scrolled {
  background: rgba(8, 8, 10, .62);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
}
.hud-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid rgba(243,238,230,.35); border-radius: 50%;
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: .04em;
}
.hud-rec {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--ink);
  padding: .45rem .8rem; border-radius: 999px;
  background: rgba(8,8,10,.35); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rec);
  box-shadow: 0 0 10px var(--rec);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.hud-tc { color: var(--muted); font-variant-numeric: tabular-nums; }
.hud-ig {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(243,238,230,.35);
}
.hud-ig svg { width: 19px; height: 19px; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background: var(--bg);
}
/* letterbox intro: black screen → cinema bars → open */
.hero::before, .hero::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: 30;
  height: 50.5%; background: #000; pointer-events: none;
  animation: 1.7s var(--ease-io) .15s both;
}
.hero::before { top: 0; animation-name: lb-top; }
.hero::after { bottom: 0; animation-name: lb-bottom; }

.hero-media { position: absolute; inset: 0; z-index: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft);
}
.slide.is-active { opacity: 1; z-index: 1; }
.slide picture, .slide img { width: 100%; height: 100%; }
.slide img {
  object-fit: cover;
  object-position: var(--pos-m, 50% 50%);
  transform: scale(1.12);
  will-change: transform;
}
.slide.is-active img { animation: kenburns calc(var(--slide-ms) + 1800ms) linear forwards; }

.hero-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(8,8,10,.9) 22%, rgba(8,8,10,.35) 52%, rgba(8,8,10,.1) 70%, rgba(8,8,10,.6) 100%),
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(0,0,0,.55) 100%);
}

.viewfinder {
  position: absolute; z-index: 2; pointer-events: none;
  inset: calc(var(--safe-t) + 70px) 12px 12px;
}
.vf { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(243,238,230,.7); }
.vf-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.vf-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.vf-focus {
  position: absolute; left: 50%; top: 34%;
  width: 64px; height: 44px; margin: -22px 0 0 -32px;
  border: 1.5px solid rgba(243,238,230,.55);
  border-radius: 3px;
  animation: focus-lock 1.1s var(--ease-out) 1.7s both;
}
.vf-focus.is-locking { animation: focus-lock 1.1s var(--ease-out) both; }

.hero-content {
  position: relative; z-index: 3;
  padding: 0 calc(var(--gutter) + 6px) calc(var(--safe-b) + 44px);
}
.hero-role {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--accent);
  opacity: 0; animation: fade-up 1s var(--ease-out) 1.25s both;
}
.hero-role .line { width: 28px; height: 1px; background: currentColor; }

.hero-name {
  margin: .9rem 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(4.1rem, 21vw, 11.5rem);
  line-height: .84;
  letter-spacing: -.025em;
}
.hero-name .mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero-name .mask > span { display: inline-block; transform: translateY(105%); animation: rise 1.3s var(--ease-out) both; }
.hero-name .mask:nth-child(1) > span { animation-delay: 1.05s; }
.hero-name .mask:nth-child(2) > span { animation-delay: 1.18s; padding-left: .5em; }
.hero-name em {
  background: linear-gradient(100deg, var(--ink) 30%, #ffd88a 70%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub {
  max-width: 30ch;
  font-size: clamp(1.02rem, 4.2vw, 1.25rem); line-height: 1.45;
  color: rgba(243,238,230,.82);
  animation: fade-up 1s var(--ease-out) 1.45s both;
}
.hero-actions {
  display: flex; flex-direction: column; align-items: stretch; gap: 1rem;
  margin-top: 1.7rem;
  animation: fade-up 1s var(--ease-out) 1.6s both;
}
.hero-actions .btn { width: 100%; }
.hero-more {
  align-self: center;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--faint); padding: .4rem;
}
.hero-more span { display: inline-block; animation: nudge 2.4s var(--ease-soft) infinite; }

.hero-meta {
  position: absolute; z-index: 3;
  top: calc(var(--safe-t) + 84px); left: calc(12px + 18px); right: calc(12px + 18px);
  animation: fade-up 1s var(--ease-out) 1.6s both;
}
.hero-bars { display: flex; gap: 6px; }
.hero-bars i {
  position: relative; flex: 1; height: 2px; overflow: hidden;
  background: rgba(243,238,230,.22); border-radius: 2px;
}
.hero-bars i::after {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
}
.hero-bars i.is-done::after { transform: scaleX(1); }
.hero-bars i.is-active::after { animation: fill-bar var(--slide-ms) linear forwards; }
.hero-caption {
  display: flex; justify-content: space-between; margin-top: .7rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(243,238,230,.75);
}
.hero-caption [data-caption] { transition: opacity .4s; }
.hero-caption.is-swapping [data-caption] { opacity: 0; }

/* =============================================================
   7. Marquee
   ============================================================= */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--line);
  padding: 1.1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 1.6rem;
  animation: marquee 38s linear infinite;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 7vw, 3.2rem);
  color: rgba(243,238,230,.88); line-height: 1;
}
.marquee-track b { font-style: normal; font-size: .45em; color: var(--accent); font-weight: 400; }

/* =============================================================
   8. Work / pillars
   ============================================================= */
.work { padding: clamp(84px, 14vw, 150px) var(--gutter) clamp(60px, 10vw, 120px); }
.sec-head h2, .about h2, .contact h2 {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 11.5vw, 6rem);
  line-height: .95; letter-spacing: -.02em;
}
.sec-head h2 em, .about h2 em, .contact h2 em { color: var(--accent); }

.pillars { display: grid; gap: 16px; margin-top: clamp(36px, 7vw, 64px); }

.pillar {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
}
.pillar-hit { position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.pillar-hit::after {
  content: "⤢"; position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.05rem; color: var(--ink);
  background: rgba(8,8,10,.4); border: 1px solid rgba(243,238,230,.25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .5s var(--ease-out), background-color .3s;
}
.pillar-img { position: absolute; inset: 0; z-index: 0; }
.pillar-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  transform: scale(1.14);
  transition: transform 1.4s var(--ease-out), filter 1s var(--ease-out);
}
.pillar::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,10,.95) 0%, rgba(8,8,10,.55) 34%, transparent 62%);
}
.pillar-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: 22px 22px 24px;
}
.pillar-num {
  position: absolute; left: 22px; bottom: calc(100% + 0px);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--accent);
}
.pillar h3 {
  font-family: var(--serif); font-size: clamp(2.2rem, 9.5vw, 3.4rem);
  line-height: .95; letter-spacing: -.015em;
}
.pillar h3 em { display: block; color: var(--muted); }
.pillar p { margin-top: .7rem; max-width: 32ch; font-size: .96rem; line-height: 1.45; color: rgba(243,238,230,.8); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.tags li {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .45rem .7rem; border-radius: 999px;
  background: rgba(243,238,230,.07); border: 1px solid rgba(243,238,230,.16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

@media (hover: hover) {
  .pillar:hover .pillar-img img { transform: scale(1.06); }
  .pillar:hover .pillar-hit::after { transform: rotate(90deg); background: var(--accent); color: var(--bg); }
}

/* =============================================================
   9. About
   ============================================================= */
.about {
  position: relative;
  display: grid; gap: 8px;
  padding: clamp(40px, 8vw, 100px) var(--gutter) clamp(80px, 12vw, 140px);
}
.about-photo {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  padding-top: 20px;
}
.about-ghost {
  position: absolute; z-index: -1; top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: clamp(5.5rem, 27vw, 15rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(243,238,230,.16);
  white-space: nowrap; letter-spacing: -.02em;
  pointer-events: none;
}
.about-glow {
  position: absolute; z-index: -1; top: 34%; left: 50%;
  width: min(80vw, 460px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(242,181,68,.34) 0%, rgba(232,134,47,.12) 38%, transparent 68%);
  filter: blur(10px);
}
.about-photo img {
  width: min(66vw, 360px);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
}
.about-text { position: relative; margin-top: -40px; }
.about-copy {
  margin-top: 1.3rem; max-width: 40ch;
  font-size: clamp(1.05rem, 4.3vw, 1.25rem); line-height: 1.55; color: rgba(243,238,230,.8);
}
.about-specs { display: flex; gap: 0; margin-top: 1.8rem; border: 1px solid var(--line); border-radius: 999px; width: fit-content; overflow: hidden; }
.about-specs li {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  padding: .75rem 1.15rem; color: var(--muted);
}
.about-specs li + li { border-left: 1px solid var(--line); }
.about-specs li:first-child { color: var(--accent); }

/* =============================================================
   10. Contact
   ============================================================= */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  text-align: center;
  padding: clamp(90px, 15vw, 170px) var(--gutter) clamp(70px, 10vw, 120px);
  border-top: 1px solid var(--line);
}
.contact-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(242,181,68,.16), transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgba(232,134,47,.10), transparent 70%);
}
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--line); order: -1; }
.contact-sub { margin: 1.1rem auto 0; max-width: 32ch; color: var(--muted); font-size: 1.05rem; }
.contact-actions {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 440px; margin: 2.4rem auto 0;
}
.btn-xl { min-height: 66px; font-size: 1.12rem; }

.ig-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 440px; margin: 28px auto 0;
  padding: 12px 18px 12px 12px;
  text-align: left;
  border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line);
  transition: transform .5s var(--ease-out), border-color .3s;
}
.ig-icon {
  flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  box-shadow: 0 10px 30px -8px rgba(214,36,159,.6);
  color: #fff;
}
.ig-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.ig-text { display: grid; flex: 1; min-width: 0; }
.ig-text small { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.ig-text strong { font-size: 1.02rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-arrow { font-size: 1.3rem; color: var(--accent); transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .ig-card:hover { transform: translateY(-3px); border-color: rgba(242,181,68,.45); }
  .ig-card:hover .ig-arrow { transform: translate(3px, -3px); }
}

/* =============================================================
   11. Footer, dock, lightbox
   ============================================================= */
.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 24px var(--gutter) calc(var(--safe-b) + 104px);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); border-top: 1px solid var(--line);
}

.dock {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px);
  display: flex; gap: 8px; padding: 7px;
  border-radius: 999px;
  background: rgba(18, 18, 21, .74);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.8);
  transform: translateY(calc(100% + 30px));
  transition: transform .7s var(--ease-out);
}
.dock.is-visible { transform: translateY(0); }
.dock-main {
  flex: 1; display: grid; place-items: center; min-height: 50px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; color: #160f04;
  background: linear-gradient(135deg, #ffd88a 0%, var(--accent) 45%, var(--accent-hot) 100%);
}
.dock-icon {
  flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(243,238,230,.05);
}
.dock-icon svg { width: 21px; height: 21px; }
.dock a:active { transform: scale(.95); }

.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .45s var(--ease-out), display .45s allow-discrete, overlay .45s allow-discrete;
}
.lightbox:not([open]) { display: none; }
.lightbox[open] { opacity: 1; }
@starting-style { .lightbox[open] { opacity: 0; } }
.lightbox::backdrop { background: rgba(4,4,6,.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lightbox img {
  max-width: 100vw; max-height: 100svh; width: auto; height: auto;
  object-fit: contain;
  transform: scale(.96); transition: transform .6s var(--ease-out);
}
.lightbox[open] img { transform: none; }
.lightbox-close {
  position: fixed; top: calc(var(--safe-t) + 14px); right: 14px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(243,238,230,.1); border: 1px solid var(--line);
  font-size: 1.05rem;
}

/* =============================================================
   12. Reveals (only hidden when JS is running)
   ============================================================= */
.js .reveal {
  opacity: 0; transform: translateY(34px); filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }
.js .pillar.reveal:nth-child(2) { transition-delay: .08s; }
.js .pillar.reveal:nth-child(3) { transition-delay: .16s; }

/* Scroll-driven extras (2026 browsers; silently skipped elsewhere) */
@supports (animation-timeline: view()) {
  .pillar-img img {
    animation: plx linear both;
    animation-timeline: view();
  }
  .hero-content {
    animation: hero-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 85vh;
  }
  .hero-media {
    animation: hero-sink linear both;
    animation-timeline: scroll(root);
    animation-range: 0 100vh;
  }
  .about-ghost {
    animation: ghost-drift linear both;
    animation-timeline: view();
  }
}

/* =============================================================
   13. Keyframes
   ============================================================= */
@keyframes lb-top    { 0% { transform: translateY(0); } 50% { transform: translateY(-88%); } 72% { transform: translateY(-88%); } 100% { transform: translateY(-101%); } }
@keyframes lb-bottom { 0% { transform: translateY(0); } 50% { transform: translateY(88%); }  72% { transform: translateY(88%); }  100% { transform: translateY(101%); } }
@keyframes rise      { to { transform: translateY(0); } }
@keyframes fade-up   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes kenburns  { from { transform: scale(1.14); } to { transform: scale(1.0); } }
@keyframes fill-bar  { to { transform: scaleX(1); } }
@keyframes sweep     { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
@keyframes blink     { 0% { opacity: 1; } 100% { opacity: .15; } }
@keyframes nudge     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes marquee   { to { transform: translateX(-50%); } }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); } 100% { transform: translate(0, 0); }
}
@keyframes focus-lock {
  0%   { opacity: 0; transform: scale(1.6); border-color: rgba(243,238,230,.6); }
  45%  { opacity: 1; transform: scale(.94); }
  70%  { transform: scale(1.03); border-color: var(--accent); }
  100% { opacity: .9; transform: scale(1); border-color: var(--accent); }
}
@keyframes plx       { from { transform: translateY(-7%) scale(1.16); } to { transform: translateY(7%) scale(1.16); } }
@keyframes hero-out  { to { opacity: 0; transform: translateY(-60px); } }
@keyframes hero-sink { to { transform: translateY(18%) scale(1.04); } }
@keyframes ghost-drift { from { transform: translate(-38%, -50%); } to { transform: translate(-62%, -50%); } }

/* =============================================================
   14. Responsive (mobile-first → up)
   ============================================================= */
@media (min-width: 540px) {
  .hero-actions { flex-direction: row; align-items: center; gap: 1.6rem; }
  .hero-actions .btn { width: auto; }
  .hero-more { align-self: auto; }
}

@media (min-width: 720px) {
  .slide img { object-position: var(--pos, 50% 50%); }
  .viewfinder { inset: calc(var(--safe-t) + 84px) 28px 28px; }
  .vf { width: 30px; height: 30px; }
  .hero-content { padding-bottom: 72px; max-width: 1100px; }
  .hero-meta {
    top: auto; bottom: 64px; left: auto; right: calc(28px + 30px);
    width: 260px;
  }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
}

@media (min-width: 960px) {
  .dock { display: none; }
  .footer { padding-bottom: 28px; }

  /* horizontal accordion */
  .pillars { display: flex; height: min(82vh, 760px); gap: 12px; }
  .pillar, .pillar:first-child {
    flex: 1; aspect-ratio: auto; min-width: 0;
    transition: flex 1s var(--ease-out);
  }
  .pillar.is-active { flex: 3.2; }
  .pillar p, .pillar .tags {
    opacity: 0; transform: translateY(10px);
    transition: opacity .5s var(--ease-out), transform .7s var(--ease-out);
  }
  .pillar.is-active p, .pillar.is-active .tags { opacity: 1; transform: none; transition-delay: .25s; }
  .pillar h3 { font-size: clamp(2rem, 2.6vw, 2.6rem); white-space: nowrap; }
  .pillar.is-active h3 { font-size: clamp(2.6rem, 4vw, 4rem); }
  .pillar:not(.is-active) .pillar-img img { filter: grayscale(.7) brightness(.65); }

  .about {
    grid-template-columns: 1fr 1.1fr; align-items: center; gap: 4vw;
    max-width: 1280px; margin: 0 auto;
  }
  .about-text { margin-top: 0; }
  .about-photo img { width: min(32vw, 420px); }
}

@media (min-width: 1280px) {
  .work { max-width: 1440px; margin: 0 auto; }
}

/* =============================================================
   15. Reduced motion — only the intrusive stuff
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .slide.is-active img { animation: none; transform: scale(1.02); }
  .hero::before, .hero::after { animation-duration: .6s; }
  .btn-primary::after { animation: none; }
  .rec-dot { animation: none; }
  .hero-media { animation: none !important; }
}

/* =============================================================
   16. Proyectos — horizontal rows by category
   ============================================================= */
.reel { padding: clamp(30px, 6vw, 70px) 0 clamp(70px, 11vw, 130px); }
.reel-head { padding: 0 var(--gutter); }
.reel-head h2 {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 11vw, 5.5rem);
  line-height: .95; letter-spacing: -.02em;
}
.reel-head h2 em { color: var(--accent); }
.reel-row { margin-top: clamp(34px, 6vw, 56px); }
.reel-cat {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 var(--gutter) 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 6vw, 2.1rem);
  line-height: 1.1; color: var(--ink);
}
.reel-cat span { font-family: var(--mono); font-style: normal; font-size: .66rem; letter-spacing: .2em; color: var(--accent); }
.reel-track {
  display: flex; gap: 10px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-item {
  position: relative; flex: none; overflow: hidden;
  width: min(62vw, 270px); aspect-ratio: 3 / 4;
  border-radius: 18px; background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
  scroll-snap-align: start;
}
.reel-item img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  transition: transform 1.2s var(--ease-out);
}
.reel-item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,10,.92) 0%, rgba(8,8,10,.5) 30%, transparent 55%);
}
.reel-item figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; pointer-events: none;
  display: grid; gap: 2px;
}
.reel-item figcaption strong { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.05; }
.reel-item figcaption span { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.reel-item figcaption small {
  margin-top: 8px; width: fit-content;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .38rem .6rem; border-radius: 999px;
  background: rgba(243,238,230,.08); border: 1px solid rgba(243,238,230,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.reel-hit { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
@media (hover: hover) { .reel-item:hover img { transform: scale(1.05); } }
.reel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 26px var(--gutter) 0;
}
.reel-hint {
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--faint);
}
.reel-hint i { position: relative; width: 50px; height: 1px; background: var(--line); overflow: hidden; }
.reel-hint i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: hint 2.2s var(--ease-soft) infinite; }
@keyframes hint { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.reel-more {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); padding: .7rem 1rem; border: 1px solid rgba(242,181,68,.35); border-radius: 999px;
}
@media (min-width: 960px) {
  .reel { max-width: 1440px; margin: 0 auto; }
  .reel-item { width: 280px; }
  .reel-hint { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .reel-hint i::after { animation: none; } }

/* =============================================================
   17. Gallery viewer (extends .lightbox)
   ============================================================= */
.lightbox { grid-template-rows: auto 1fr auto; place-items: stretch; }
.lb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(var(--safe-t) + 12px) 14px 10px 18px;
}
.lb-title { display: grid; min-width: 0; }
.lb-title strong { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-title span { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; color: var(--accent); }
.lightbox .lightbox-close { position: static; flex: none; }
.lb-track {
  display: flex; min-height: 0;
  overflow-x: auto; overscroll-behavior: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%; display: grid; place-items: center; min-width: 0;
  scroll-snap-align: center; scroll-snap-stop: always;
  padding: 0 8px;
}
.lb-slide img {
  max-width: 100%; max-height: calc(100svh - var(--safe-t) - var(--safe-b) - 150px); width: auto; height: auto;
  object-fit: contain; border-radius: 6px;
  transform: none; transition: none;
}
.lightbox[open] .lb-slide img { transform: none; }
.lb-nav {
  position: fixed; top: 50%; z-index: 2; margin-top: -26px;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(243,238,230,.08); border: 1px solid var(--line);
  font-size: 1.2rem; display: none;
}
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-nav[disabled] { opacity: .25; cursor: default; }
.lb-link {
  justify-self: center; margin: 12px 0 calc(var(--safe-b) + 16px);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); padding: .75rem 1.1rem; border: 1px solid rgba(242,181,68,.35); border-radius: 999px;
}
.lb-link[hidden] { display: none; }
.lightbox.is-single .lb-nav { display: none !important; }
@media (hover: hover) and (min-width: 720px) { .lb-nav { display: grid; place-items: center; } .lb-slide { padding: 0 90px; } }
