/* ============================================================
   SACHIN ADHIKARI — dark cinematic · liquid glass · photo-first
   ============================================================ */

:root {
  --near:    #05060a;
  --panel:   #0a0c12;
  --fg:      #ffffff;
  --fg-55:   rgba(255,255,255,.55);
  --fg-35:   rgba(255,255,255,.52);   /* small uppercase labels — must clear 4.5:1 */
  --fg-15:   rgba(255,255,255,.15);
  --hair:    rgba(255,255,255,.10);
  --hair-2:  rgba(255,255,255,.055);

  --ease:    cubic-bezier(.22,1,.36,1);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;

  --gut:  clamp(1.15rem, 3.4vw, 3.25rem);
  --maxw: 1440px;

  /* Nudge the hero video framing — the interesting part of a clip is
     rarely dead centre. 0% = centred, negative lifts, positive drops. */
  --video-shift: 0%;
}

/* reading theme for long-form pages; the hero stays cinematic always */
[data-theme="day"] {
  --near:   #f6f5f2;
  --panel:  #ffffff;
  --fg:     #0b0c10;
  --fg-55:  rgba(11,12,16,.58);
  --fg-35:  rgba(11,12,16,.62);      /* small uppercase labels — must clear 4.5:1 */
  --fg-15:  rgba(11,12,16,.15);
  --hair:   rgba(11,12,16,.12);
  --hair-2: rgba(11,12,16,.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--near);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.02em; }
::selection { background: #fff; color: #000; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

/* ============================================================
   LIQUID GLASS
   ============================================================ */
.glass {
  background: rgba(255,255,255,.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.10);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,.45) 0%,
    rgba(255,255,255,.15) 20%,
    rgba(255,255,255,0)   40%,
    rgba(255,255,255,0)   60%,
    rgba(255,255,255,.15) 80%,
    rgba(255,255,255,.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
/* over light backgrounds the glass needs a darker tint to stay visible */
[data-theme="day"] .glass { background: rgba(11,12,16,.03); box-shadow: inset 0 1px 1px rgba(11,12,16,.06); }
[data-theme="day"] .glass::before {
  background: linear-gradient(180deg, rgba(11,12,16,.22) 0%, rgba(11,12,16,.08) 20%,
    rgba(11,12,16,0) 40%, rgba(11,12,16,0) 60%, rgba(11,12,16,.08) 80%, rgba(11,12,16,.22) 100%);
}

/* ============================================================
   NAV
   ============================================================ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 500; padding: 1.15rem var(--gut); }
.nav__bar {
  max-width: 1080px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: .7rem .75rem .7rem 1.4rem;
  border-radius: 999px;
}
.nav__left { display: flex; align-items: center; gap: 2rem; }
.nav__brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1rem; letter-spacing: -.01em; color: var(--fg); }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { font-size: .82rem; font-weight: 500; color: var(--fg-55); transition: color .3s; }
.nav__links a:hover { color: var(--fg); }
.nav__right { display: flex; align-items: center; gap: .6rem; }
.nav__plain { font-size: .82rem; font-weight: 500; color: var(--fg); padding: .5rem .4rem; }
.nav__cta { border-radius: 999px; padding: .55rem 1.35rem; font-size: .82rem; font-weight: 500; color: var(--fg); }
.nav__icon { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; color: var(--fg); flex-shrink: 0; }
.nav__burger { display: none; width: 38px; height: 38px; border-radius: 999px; place-items: center; }
.nav__burger span { display: block; width: 16px; height: 1.5px; background: var(--fg); margin: 3.5px auto; transition: .35s var(--ease); }

/* While the bar floats over the dark hero video it must be white regardless of
   theme; JS drops this class the moment the hero scrolls away. Without it the
   nav was white-on-white in day mode — a 1.09:1 contrast ratio. */
.nav--hero .nav__brand,
.nav--hero .nav__plain,
.nav--hero .nav__cta,
.nav--hero .nav__icon        { color: #fff; }
.nav--hero .nav__links a     { color: rgba(255,255,255,.82); }
.nav--hero .nav__links a:hover { color: #fff; }
.nav--hero .nav__burger span { background: #fff; }
.nav--hero .nav__bar::before {
  background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%);
}

/* Once it sits over page content it needs a real backdrop to stay legible. */
.nav--solid .nav__bar {
  background: color-mix(in srgb, var(--near) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav.open .nav__burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav.open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.open .nav__burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__links, .nav__plain { display: none; }
  .nav__burger { display: grid; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; gap: 1.1rem;
    position: fixed; inset: 5.2rem var(--gut) auto var(--gut);
    padding: 1.6rem; border-radius: 22px;
    background: rgba(8,9,14,.88); backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.1);
  }
  .nav.open .nav__links a { font-size: 1.05rem; }
}

/* ============================================================
   HERO — full-bleed video
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; background: #000;
  overflow: hidden; display: flex; flex-direction: column; isolation: isolate;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform: translateY(var(--video-shift));
  /* Visible by default. JS sets this to 0 on init and fades it in, so the
     crossfade still happens — but if the script never runs the hero shows the
     video instead of a black rectangle. Fail visible, not invisible. */
  opacity: 1;
  z-index: 0;
}
/* Without JS only the first clip should show; the script takes over from here
   and crossfades between them. */
.hero__video + .hero__video { opacity: 0; }
.hero__fallback {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 110%, rgba(120,140,190,.30), transparent 60%),
    radial-gradient(90% 60% at 20% 0%,   rgba(60,80,140,.28),  transparent 60%),
    radial-gradient(80% 70% at 90% 20%,  rgba(150,110,80,.22), transparent 60%),
    #05060a;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: scale(1.05) translate3d(0,0,0); filter: hue-rotate(0deg); }
  100% { transform: scale(1.16) translate3d(-2%,-2%,0); filter: hue-rotate(-14deg); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* Two layers. The ellipse darkens only behind the centred text, so the
     corners of the footage stay bright; the vertical pass handles the nav at
     the top and the blend into the page at the bottom. The previous single
     gradient sat at 15% opacity where the name is, which was fine over a dark
     clip and illegible over daylight footage. */
  background:
    radial-gradient(ellipse 78% 58% at 50% 48%, rgba(0,0,0,.66), rgba(0,0,0,.28) 55%, transparent 78%),
    linear-gradient(to bottom,
      rgba(0,0,0,.5) 0%, rgba(0,0,0,.2) 26%, rgba(0,0,0,.34) 68%, var(--near) 100%);
}
.hero__body {
  position: relative; z-index: 10; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.9rem; text-align: center; padding: 7rem var(--gut) 3rem;
  transform: translateY(-5%);
}
.hero__kicker { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.hero__title {
  font-family: var(--serif); font-size: clamp(2.9rem, 9vw, 7.5rem);
  line-height: .98; letter-spacing: -.025em; color: #fff; text-wrap: balance;
}
.hero__title em { font-style: italic; }
.hero__sub { max-width: 48ch; color: rgba(255,255,255,.82); font-size: clamp(.95rem,1.5vw,1.05rem); line-height: 1.6; margin: 0; }
.hero__actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.hero__pill { border-radius: 999px; padding: .85rem 1.9rem; color: #fff; font-size: .85rem; font-weight: 500; transition: background .35s; }
.hero__pill:hover { background: rgba(255,255,255,.06); }
.hero__pill--solid { background: #fff; color: #000; box-shadow: none; }
.hero__pill--solid::before { display: none; }
.hero__pill--solid:hover { background: rgba(255,255,255,.86); }
.hero__socials { position: relative; z-index: 10; display: flex; justify-content: center; gap: .85rem; padding-bottom: 3rem; }
.sbtn { width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; color: rgba(255,255,255,.8); transition: color .35s, background .35s, transform .5s var(--ease); }
.sbtn:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateY(-3px); }

/* Hidden only while the entrance is pending. `.loaded` is set synchronously
   by the script; the no-js fallback below covers the case where it never runs
   at all, so the hero can never end up permanently blank. */
.split span { display: inline-block; transform: translateY(.9em); opacity: 0; }
html.no-js .split span, html.no-js .fade-up { opacity: 1 !important; transform: none !important; }
.loaded .split span { animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i) * 34ms + 240ms); }
@keyframes rise { to { transform: none; opacity: 1; } }
.fade-up { opacity: 0; transform: translateY(18px); }
.loaded .fade-up { animation: fu .9s var(--ease) forwards; animation-delay: var(--d, .8s); }
@keyframes fu { to { opacity: 1; transform: none; } }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { position: relative; padding-block: clamp(4.5rem, 11vh, 9rem); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem 3rem; flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vw, 3.6rem);
}
.section__head > :first-child { flex: 1 1 22ch; min-width: 0; }
/* nudge the lead onto the heading's baseline rather than its descender box */
.section__head .section__lead { flex: 0 1 44ch; padding-bottom: .35rem; }
@media (max-width: 720px) { .section__head .section__lead { flex-basis: 100%; padding-bottom: 0; } }
.section__index { font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--fg-35); margin: 0 0 .9rem; }
.section__title { font-size: clamp(2rem, 5.4vw, 4.2rem); letter-spacing: -.03em; max-width: 18ch; }
.section__title em { font-style: italic; }
.section__lead { max-width: 44ch; color: var(--fg-55); font-size: .97rem; margin: 0; }

.rv { opacity: 0; transform: translateY(26px); transition: opacity .95s var(--ease), transform .95s var(--ease); transition-delay: calc(var(--i, 0) * 85ms); }
.rv.in { opacity: 1; transform: none; }
.rv--r { transform: translateX(28px); }

/* ============================================================
   PHOTO-FIRST MOSAIC — the images lead
   ============================================================ */
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(.4rem,.9vw,.8rem); }
.mo { position: relative; overflow: hidden; background: var(--panel); grid-column: span 4; aspect-ratio: 1; }
.mo--wide { grid-column: span 8; aspect-ratio: 16/10; }
.mo--tall { grid-column: span 4; aspect-ratio: 3/4; }
.mo--half { grid-column: span 6; aspect-ratio: 4/3; }
.mo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); will-change: transform; }
.mo:hover img { transform: scale(1.055); }
.mo__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 3rem 1.05rem .95rem;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  color: #fff; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 1rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mo:hover .mo__cap { opacity: 1; transform: none; }
.mo__cap b { font-weight: 500; }
.mo__cap span { color: rgba(255,255,255,.6); }
@media (max-width: 780px) {
  .mo, .mo--tall { grid-column: span 6; aspect-ratio: 1; }
  .mo--wide, .mo--half { grid-column: span 12; aspect-ratio: 4/3; }
  .mo__cap { opacity: 1; transform: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,4.5rem); align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.about__body p { color: var(--fg-55); margin: 0 0 1.1rem; }
.about__body p:first-of-type { font-family: var(--serif); font-size: clamp(1.3rem,2.4vw,1.9rem); line-height: 1.32; color: var(--fg); letter-spacing: -.015em; }
.about__body strong { color: var(--fg); font-weight: 600; }
.about__portrait { position: relative; overflow: hidden; }
.about__portrait img {
  width: 100%;
  height: auto;            /* the height="" attribute otherwise wins and stretches it */
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 4px;
}
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px,1fr)); gap: .5rem; margin-top: 2.4rem; }
.fact { border-radius: 16px; padding: 1.2rem 1.1rem; }
.fact b { display: block; font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--fg); }
.fact span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-35); }

/* ============================================================
   WORK
   ============================================================ */
.projects { display: flex; flex-direction: column; gap: .5rem; }
.project {
  position: relative; border-radius: 20px;
  padding: clamp(1.4rem,3vw,2.1rem) clamp(1.2rem,3vw,2rem);
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  transition: transform .55s var(--ease), background .45s;
}
.project:hover { transform: translateY(-3px); background: rgba(255,255,255,.03); }
[data-theme="day"] .project:hover { background: rgba(11,12,16,.03); }
.project__name { font-size: clamp(1.5rem,3.6vw,2.5rem); display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.project__status { font-family: var(--sans); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-35); border: 1px solid var(--hair); border-radius: 999px; padding: .22rem .65rem; }
.project__blurb { color: var(--fg-55); max-width: 62ch; margin: .6rem 0 0; font-size: .92rem; }
.project__tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .9rem; }
.tag { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: .26rem .65rem; border-radius: 999px; border: 1px solid var(--hair); color: var(--fg-55); }
.project__arrow { width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; color: var(--fg); flex-shrink: 0; transition: .5s var(--ease); }
.project:hover .project__arrow { transform: rotate(-45deg); background: #fff; color: #000; }
@media (max-width: 700px) { .project { grid-template-columns: 1fr; } .project__arrow { display: none; } }

.peek { position: fixed; top: 0; left: 0; width: 290px; aspect-ratio: 4/3; z-index: 300; pointer-events: none; opacity: 0; transform: translate(-50%,-50%) scale(.88); transition: opacity .4s var(--ease), transform .5s var(--ease); overflow: hidden; border-radius: 14px; }
.peek.on { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (max-width: 1024px) { .peek { display: none; } }

/* ============================================================
   JOURNAL
   ============================================================ */
.journal { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px,1fr)); gap: clamp(.8rem,2vw,1.4rem); }
.post { position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; transition: transform .6s var(--ease); }
.post:hover { transform: translateY(-5px); }
.post__media { overflow: hidden; aspect-ratio: 3/2; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.post:hover .post__media img { transform: scale(1.07); }
.post__body { padding: 1.4rem 1.3rem 1.6rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post__meta {
  display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-35);
  line-height: 1.6;
  min-height: 1.6em;
}
.post__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-35); }
.post__title { font-size: 1.45rem; }
.post__excerpt { color: var(--fg-55); font-size: .89rem; flex: 1; margin: 0; }
.post__more { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); display: inline-flex; align-items: center; gap: .45rem; }
.post__more::after { content: "→"; transition: transform .4s var(--ease); }
.post:hover .post__more::after { transform: translateX(5px); }
.post__alt { position: absolute; top: .9rem; left: .9rem; z-index: 3; border-radius: 999px; padding: .25rem .7rem; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }

/* ============================================================
   GALLERY STRIP
   ============================================================ */
.gallery__track {
  display: flex; gap: clamp(.5rem,1.2vw,.9rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--gut); padding-bottom: 1.2rem;
  scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__track.dragging .shot { pointer-events: none; }
.shot { position: relative; flex: 0 0 auto; scroll-snap-align: center; width: clamp(220px,27vw,380px); aspect-ratio: 3/4; overflow: hidden; background: var(--panel); border-radius: 16px; }
.shot:nth-child(3n+2) { aspect-ratio: 4/5; align-self: flex-end; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.shot:hover img { transform: scale(1.06); }
.shot__cap { position: absolute; inset: auto 0 0 0; padding: 2.4rem .95rem .85rem; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; transform: translateY(101%); transition: transform .5s var(--ease); }
.shot:hover .shot__cap { transform: none; }
.gallery__ui { display: flex; align-items: center; gap: 1.4rem; margin-top: 1.4rem; }
.gallery__bar { flex: 1; height: 1px; background: var(--hair); position: relative; }
.gallery__bar i { position: absolute; inset: 0 auto 0 0; width: 18%; background: var(--fg); }
.gallery__btns { display: flex; gap: .45rem; }
.gbtn { width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; color: var(--fg); transition: .4s var(--ease); }
.gbtn:hover { background: rgba(255,255,255,.07); }
[data-theme="day"] .gbtn:hover { background: rgba(11,12,16,.05); }
.gbtn:disabled { opacity: .25; pointer-events: none; }
.gallery__hint { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-35); }

.lb { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(0,0,0,.94); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.lb.on { opacity: 1; pointer-events: auto; }
.lb img { max-width: 92vw; max-height: 86vh; object-fit: contain; transform: scale(.93); transition: transform .5s var(--ease); border-radius: 6px; }
.lb.on img { transform: none; }
.lb__x { position: absolute; top: 1.3rem; right: 1.4rem; width: 48px; height: 48px; border-radius: 999px; color: #fff; display: grid; place-items: center; }
.lb__nav { position: absolute; top: 50%; translate: 0 -50%; width: 50px; height: 50px; border-radius: 999px; color: #fff; display: grid; place-items: center; font-size: 1.4rem; }
.lb__nav--p { left: 1.3rem; } .lb__nav--n { right: 1.3rem; }
.lb__cap { position: absolute; bottom: 1.4rem; left: 50%; translate: -50% 0; color: rgba(255,255,255,.6); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }

/* ============================================================
   FILM
   ============================================================ */
.reels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: clamp(.6rem,1.6vw,1.1rem); }
.reel { position: relative; aspect-ratio: 9/16; overflow: hidden; border-radius: 18px; background: var(--panel); cursor: pointer; }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; }
.reel__play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent 45%, rgba(0,0,0,.72)); transition: opacity .4s; }
.reel.playing .reel__play { opacity: 0; }
.reel__play i { width: 58px; height: 58px; border-radius: 999px; display: grid; place-items: center; color: #fff; backdrop-filter: blur(6px); box-shadow: inset 0 1px 1px rgba(255,255,255,.25); transition: transform .5s var(--ease), background .4s; }
.reel:hover .reel__play i { transform: scale(1.1); background: #fff; color: #000; }
.reel__label { position: absolute; left: .9rem; bottom: .9rem; z-index: 2; color: #fff; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }
.field { position: relative; margin-bottom: 1rem; }
.field input, .field textarea {
  width: 100%; border-radius: 999px; padding: 1.05rem 1.4rem;
  background: rgba(255,255,255,.01); color: var(--fg); font: inherit; font-size: .95rem;
  border: none; outline: none; box-shadow: inset 0 1px 1px rgba(255,255,255,.10);
  backdrop-filter: blur(4px);
}
[data-theme="day"] .field input, [data-theme="day"] .field textarea { background: rgba(11,12,16,.03); box-shadow: inset 0 1px 1px rgba(11,12,16,.07); }
.field textarea { border-radius: 22px; resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-35); }
.field input:focus, .field textarea:focus { box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 0 0 1px var(--fg-15); }

.btn { display: inline-flex; align-items: center; gap: .7rem; border-radius: 999px; padding: .95rem 1.9rem; font-size: .83rem; font-weight: 500; color: var(--fg); transition: background .4s; }
.btn:hover { background: rgba(255,255,255,.06); }
[data-theme="day"] .btn:hover { background: rgba(11,12,16,.04); }
.btn--solid { background: var(--fg); color: var(--near); box-shadow: none; }
.btn--solid::before { display: none; }
.btn--solid:hover { opacity: .86; background: var(--fg); }

.contact__links { display: flex; flex-direction: column; }
.clink { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--hair-2); transition: padding-left .45s var(--ease); }
.clink:hover { padding-left: .7rem; }
.clink b { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.clink span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-35); }

.alert { border-radius: 16px; padding: .95rem 1.2rem; margin-bottom: 1.2rem; font-size: .9rem; }
.err { color: #ff8b7d; font-size: .75rem; margin: .35rem 0 0 1.4rem; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { border-top: 1px solid var(--hair-2); padding-block: 3rem 2.2rem; }
.foot__grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-end; }
.foot__name { font-family: var(--serif); font-size: clamp(2.4rem,8vw,5.5rem); line-height: 1; letter-spacing: -.03em; color: var(--fg); opacity: .16; }
.foot__note { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-35); }
a.foot__note:hover { color: var(--fg); }

/* ============================================================
   ARTICLE + CV
   ============================================================ */
.art { padding-top: 7rem; }
.art__hero { position: relative; height: 60vh; min-height: 340px; overflow: hidden; margin-bottom: clamp(2rem,5vw,4rem); }
.art__hero img { width: 100%; height: 100%; object-fit: cover; }
.art__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--near)); }
.art__body { max-width: 66ch; margin-inline: auto; }
.art__body p { color: var(--fg-55); margin: 0 0 1.25rem; font-size: 1.03rem; }
.art__body h2 { font-size: clamp(1.5rem,3.2vw,2.1rem); margin: 2.4rem 0 .9rem; }
/* Section breaks inside an entry. Deliberately lighter than h2 — a 600-word
   piece with three of them should still read as prose, not as a list. */
.art__body h3 { font-size: clamp(1.12rem,2.1vw,1.32rem); margin: 2.2rem 0 .7rem; letter-spacing: -.01em; color: var(--fg); }
.art__body em { font-style: italic; color: var(--fg); }
.art__body blockquote { margin: 2rem 0; padding-left: 1.5rem; border-left: 1px solid var(--fg-15); font-family: var(--serif); font-size: 1.35rem; color: var(--fg); font-style: italic; }
.art__lead { font-family: var(--serif); font-size: clamp(1.25rem,2.4vw,1.65rem) !important; color: var(--fg) !important; line-height: 1.45; }
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--fg); z-index: 600; width: 0; }

.cv { max-width: 880px; margin-inline: auto; padding-top: 7rem; }
.cv h2 { font-family: var(--sans); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-35); font-weight: 600; margin: 2.6rem 0 .9rem; }
.cv__row { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; padding-block: .95rem; border-top: 1px solid var(--hair-2); }
.cv__row > span:first-child { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-35); }
@media (max-width: 640px) { .cv__row { grid-template-columns: 1fr; gap: .25rem; } }
@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  .nav, .foot, .no-print, .progress { display: none !important; }
  .glass::before { display: none; }
  .cv { padding-top: 0; }
  .cv__row { border-color: #ddd; }
  .tag { border-color: #999; color: #333; }
  a { color: #000; }
}

/* ============================================================
   ASSET PLACEHOLDERS
   ============================================================ */
.ph {
  width: 100%; height: 100%; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 1.1rem;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.022) 0 9px, transparent 9px 18px), var(--panel);
  color: var(--fg-35);
}
[data-theme="day"] .ph { background: repeating-linear-gradient(45deg, rgba(11,12,16,.03) 0 9px, transparent 9px 18px), #eeece7; }
.ph span { font-family: var(--serif); font-size: 1.05rem; color: var(--fg-55); }
.ph code { font-size: .6rem; letter-spacing: .03em; color: var(--fg-35); border: 1px solid var(--hair); border-radius: 999px; padding: .22rem .6rem; max-width: 100%; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv, .fade-up { opacity: 1; transform: none; }
  .split span { opacity: 1; transform: none; }
}

/* ============================================================
   ALBUMS
   ============================================================ */
.albums { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(.8rem, 2vw, 1.4rem); }
.album {
  position: relative; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden; background: var(--panel);
  transition: transform .6s var(--ease);
}
.album:hover { transform: translateY(-5px); }
.album__img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.album__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.album:hover .album__img img { transform: scale(1.06); }
.album__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 45%, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .5s var(--ease);
}
.album:hover .album__img::after { opacity: 1; }
.album__body { padding: 1.2rem 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.album__body .album__count { margin-top: auto; padding-top: .3rem; }
.album__meta {
  display: flex; gap: .6rem; align-items: center;
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-35);
  /* An empty row must occupy exactly one line box, or cards missing a place
     sit a few pixels higher than their neighbours. */
  line-height: 1.6;
  min-height: 1.6em;
}
.album__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-35); }
.album__title { font-size: 1.5rem; letter-spacing: -.02em; }
.album__count { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-55); display: inline-flex; align-items: center; gap: .45rem; }
.album__count::after { content: "→"; transition: transform .4s var(--ease); }
.album:hover .album__count::after { transform: translateX(5px); }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.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;
}
.skip {
  position: absolute; left: 50%; top: -100px; translate: -50% 0; z-index: 999;
  background: var(--fg); color: var(--near); padding: .8rem 1.4rem;
  border-radius: 0 0 12px 12px; font-size: .85rem; font-weight: 600;
  transition: top .25s var(--ease);
}
.skip:focus { top: 0; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible { outline-color: #fff; }
/* Touch targets >= 44px (WCAG 2.5.5).
   Gated on BOTH a coarse pointer and small viewports — a pointer-only query
   misses touch laptops, and a width-only query would bloat desktop chrome. */
@media (pointer: coarse), (max-width: 900px) {
  .nav__links a, .clink, .post__more, .album__count { min-height: 44px; display: flex; align-items: center; }
  .gbtn, .sbtn, .nav__icon, .nav__burger, .lb__x, .lb__nav { min-width: 44px; min-height: 44px; }
  .nav__brand { min-height: 44px; }
  .foot__note { display: inline-flex; align-items: center; min-height: 44px; }
  .foot__grid p.foot__note { min-height: 0; }
}

/* ============================================================
   INVERTED SECTION — flip any block to the light palette from
   the admin, so the page has rhythm instead of being dark throughout.
   ============================================================ */
.section--light {
  --near:   #f6f5f2;
  --panel:  #ffffff;
  --fg:     #0b0c10;
  --fg-55:  rgba(11,12,16,.58);
  --fg-35:  rgba(11,12,16,.62);
  --fg-15:  rgba(11,12,16,.15);
  --hair:   rgba(11,12,16,.12);
  --hair-2: rgba(11,12,16,.07);
  background: #f6f5f2;
  color: #0b0c10;
  border-radius: clamp(40px, 5vw, 60px) clamp(40px, 5vw, 60px) 0 0;
  margin-top: clamp(-3.5rem, -4vw, -2.5rem);
  position: relative;
  z-index: 2;
}
.section--light + .section:not(.section--light) {
  border-radius: clamp(40px, 5vw, 60px) clamp(40px, 5vw, 60px) 0 0;
  margin-top: clamp(-3.5rem, -4vw, -2.5rem);
  position: relative;
  z-index: 3;
  background: var(--near);
}
.section--light .glass { background: rgba(11,12,16,.03); box-shadow: inset 0 1px 1px rgba(11,12,16,.06); }
.section--light .glass::before {
  background: linear-gradient(180deg, rgba(11,12,16,.22) 0%, rgba(11,12,16,.08) 20%,
    rgba(11,12,16,0) 40%, rgba(11,12,16,0) 60%, rgba(11,12,16,.08) 80%, rgba(11,12,16,.22) 100%);
}

/* ============================================================
   MARQUEE — two rows of photographs that slide in opposite
   directions with the scroll. Transform-only, so it never
   triggers layout; the browser keeps it on the compositor.
   ============================================================ */
.marquee-sec { overflow: hidden; padding-block: clamp(3rem, 8vh, 6rem); }
.mq { display: flex; flex-direction: column; gap: .75rem; }
.mq__row { display: flex; gap: .75rem; width: max-content; will-change: transform; }
.mq__tile {
  flex: 0 0 auto;
  width: clamp(210px, 26vw, 420px);
  aspect-ratio: 14 / 9;
  border-radius: clamp(14px, 1.4vw, 20px);
  overflow: hidden;
  background: var(--panel);
}
.mq__tile img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .mq__row { transform: none !important; } }

/* ============================================================
   STICKY-STACKING PROJECT CARDS
   ============================================================ */
.stack { position: relative; }
/* The SLOT is the sticky element, not the card. A card pinned inside a
   702px slot un-pins as soon as the slot scrolls past; pinning the slot
   keeps every card on screen so later ones stack over it. */
.stack__slot {
  position: sticky;
  top: calc(6.5rem + var(--i) * 26px);
  height: 78vh;
  min-height: 520px;
  display: flex;
  align-items: flex-start;
}
@media (max-width: 760px) {
  .stack__slot { position: static; height: auto; min-height: 0; margin-bottom: 1rem; }
}

.pcard {
  width: 100%;
  border: 2px solid var(--hair);
  border-radius: clamp(28px, 3.5vw, 56px);
  background: var(--panel);
  padding: clamp(1.1rem, 2.4vw, 2rem);
  transform-origin: top center;
  will-change: transform;
}
@media (max-width: 760px) { .pcard { position: static; transform: none !important; } }

.pcard__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(.9rem, 2.5vw, 2rem);
  align-items: center;
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}
.pcard__no {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: .8;
  color: var(--fg);
  opacity: .9;
}
.pcard__cat { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-35); }
.pcard__name { font-size: clamp(1.35rem, 3.2vw, 2.6rem); letter-spacing: -.025em; margin-top: .2rem; }
.pcard__blurb { color: var(--fg-55); font-size: .9rem; margin: .5rem 0 0; max-width: 60ch; }
.pcard__cta {
  border: 2px solid var(--hair); border-radius: 999px;
  padding: .7rem 1.5rem; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fg); white-space: nowrap; transition: background .35s, border-color .35s;
}
.pcard__cta:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); border-color: var(--fg-35); }
@media (max-width: 760px) {
  .pcard__top { grid-template-columns: auto 1fr; }
  .pcard__cta { grid-column: 1 / -1; text-align: center; }
}

.pcard__grid { display: grid; grid-template-columns: 40% 1fr; gap: clamp(.5rem, 1vw, .8rem); }
.pcard__col { display: flex; flex-direction: column; gap: clamp(.5rem, 1vw, .8rem); }
.pcard__shot { overflow: hidden; border-radius: clamp(20px, 2.6vw, 44px); background: var(--panel); }
.pcard__shot img { width: 100%; height: 100%; object-fit: cover; }
.pcard__shot--a { height: clamp(110px, 14vw, 210px); }
.pcard__shot--b { height: clamp(130px, 19vw, 300px); }
.pcard__shot--tall { height: clamp(248px, 33.8vw, 518px); }
@media (max-width: 620px) {
  .pcard__grid { grid-template-columns: 1fr 1fr; }
  .pcard__shot--tall { height: clamp(240px, 60vw, 400px); }
}

/* ============================================================
   CHARACTER SCROLL REVEAL
   ============================================================ */
.reveal-text { color: var(--fg); }
.reveal-text .ch { opacity: .18; transition: opacity .25s linear; }
.reveal-text .ch.lit { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .reveal-text .ch { opacity: 1; } }

/* ============================================================
   ARC CAROUSEL — tiles fanned along a curve, drifting right→left,
   draggable, click to open. Rotation/translate are set per tile by
   JS from its distance to the viewport centre.
   ============================================================ */
.arc { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.arc__track {
  display: flex;
  gap: clamp(.6rem, 1.4vw, 1.1rem);
  padding-inline: 50vw;                 /* first and last tile can reach centre */
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  /* No scroll-snap here on purpose: snapping fights the slow auto-drift —
     a ~0.45px-per-frame nudge is below the snap threshold, so the browser
     pulls it straight back and the strip never moves. */
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  will-change: scroll-position;
}
.arc__track::-webkit-scrollbar { display: none; }
.arc__track.dragging { cursor: grabbing; }
.arc__track.dragging .arc__item { pointer-events: none; }

.arc__item {
  flex: 0 0 auto;
  width: clamp(150px, 19vw, 280px);
  aspect-ratio: 3 / 4;
  border-radius: clamp(12px, 1.4vw, 18px);
  overflow: hidden;
  background: var(--panel);
  transform-origin: center bottom;
  will-change: transform;
  transition: filter .5s var(--ease);
  position: relative;
}
.arc__item img { width: 100%; height: 100%; object-fit: cover; }
.arc__item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.6));
  opacity: 0; transition: opacity .45s var(--ease);
}
.arc__item:hover::after { opacity: 1; }
.arc__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 1.6rem .8rem .8rem;
  color: #fff; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.arc__item:hover .arc__cap { opacity: 1; transform: none; }

.arc__hint {
  text-align: center; margin-top: 1.4rem;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-35);
}
@media (prefers-reduced-motion: reduce) { .arc__item { transform: none !important; } }

/* ============================================================
   LIGHTBOX — grows out of the tile that was clicked
   ============================================================ */
.lb { transition: opacity .4s var(--ease), backdrop-filter .4s; }
.lb__stage { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.lb img {
  max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 10px;
  transform-origin: center center;
  transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .35s var(--ease);
}
.lb:not(.on) img { opacity: 0; }
.lb__count {
  position: absolute; top: 1.4rem; left: 50%; translate: -50% 0;
  color: rgba(255,255,255,.65); font-size: .72rem; letter-spacing: .18em;
}

/* ============================================================
   PROJECT CARD — empty state when a project has no screenshots
   ============================================================ */
.pcard__empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--hair);
  border-radius: clamp(20px, 2.6vw, 44px);
  padding: clamp(1.6rem, 4vw, 3rem);
  text-align: center;
  color: var(--fg-35);
  font-size: .82rem;
}

/* ============================================================
   MOBILE — sections the admin has marked "hide on phone"
   ============================================================ */
@media (max-width: 700px) {
  .section--no-mobile { display: none; }
}

/* ============================================================
   ALBUM STAGE — one photograph pinned at the centre of the
   screen while the page scrolls through the album. Nothing
   repeats: each frame is shown exactly once, in order.
   ============================================================ */
.stage { position: relative; }
.stage__pin {
  position: sticky; top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  overflow: hidden;
}
.stage__frames { position: relative; display: grid; place-items: center; height: 100%; padding: clamp(4.5rem,9vh,7rem) var(--gut) 0; }
.stage__item {
  position: absolute;
  max-width: min(88vw, 940px);
  max-height: 64svh;
  border-radius: clamp(10px, 1.2vw, 16px);
  overflow: hidden;
  will-change: transform, opacity;
  cursor: zoom-in;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8);
}
.stage__item img { display: block; max-width: min(88vw, 940px); max-height: 64svh; width: auto; height: auto; object-fit: contain; }

.stage__meta {
  padding: 0 var(--gut) clamp(2rem, 5vh, 3.5rem);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  max-width: var(--maxw); margin-inline: auto; width: 100%;
}
.stage__caption { max-width: 46ch; }
.stage__caption h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.9rem); letter-spacing: -.02em;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.stage__caption p {
  margin: .4rem 0 0; color: var(--fg-55); font-size: .92rem;
  transition: opacity .35s var(--ease);
}
.stage__caption.swap h2, .stage__caption.swap p { opacity: 0; transform: translateY(6px); }

.stage__count {
  font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1;
  color: var(--fg); white-space: nowrap;
}
.stage__count small { font-size: .42em; color: var(--fg-35); margin-left: .35em; letter-spacing: .1em; }

.stage__rail { display: flex; gap: 5px; margin-top: .8rem; }
.stage__dot { width: 22px; height: 2px; background: var(--hair); transition: background .35s var(--ease); }
.stage__dot.on { background: var(--fg); }

.stage__scroll {
  position: absolute; left: 50%; translate: -50% 0; bottom: .6rem; z-index: 5;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-35);
  transition: opacity .4s var(--ease);
}
.stage__pin.started .stage__scroll { opacity: 0; }

@media (max-width: 700px) {
  .stage__meta { flex-direction: column; align-items: flex-start; gap: .8rem; padding-bottom: 2rem; }
  .stage__item, .stage__item img { max-height: 52svh; }
  .stage__count { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stage__pin { position: static; height: auto; }
  .stage__frames { height: auto; display: flex; flex-direction: column; gap: 1rem; padding-top: 2rem; }
  .stage__item { position: static; opacity: 1 !important; transform: none !important; max-height: none; }
}

/* ============================================================
   ARC — album variant. Bigger frames, the centred one lifted
   and full-bright, and no wrap-around: each photograph once.
   ============================================================ */
.arc--centre .arc__item {
  width: clamp(210px, 27vw, 400px);
  aspect-ratio: 3 / 4;
  border-radius: clamp(14px, 1.6vw, 22px);
  box-shadow: 0 30px 70px -34px rgba(0,0,0,.7);
}
.arc--centre .arc__track { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.arc--centre .arc__hint { margin-top: .4rem; }

/* caption for whichever frame is currently centred */
.arc__now {
  text-align: center;
  margin: clamp(1.2rem, 3vw, 2rem) auto 0;
  max-width: 52ch; padding-inline: var(--gut);
}
.arc__now h2 {
  font-size: clamp(1.2rem, 2.6vw, 2rem); letter-spacing: -.02em;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.arc__now p { margin: .35rem 0 0; color: var(--fg-55); font-size: .92rem; transition: opacity .3s var(--ease); }
.arc__now.swap h2, .arc__now.swap p { opacity: 0; transform: translateY(5px); }
.arc__now .arc__no {
  display: block; margin-bottom: .5rem;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-35);
}

/* suggested albums at the foot of an album page */
.suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(.7rem, 1.6vw, 1.2rem); }

/* ============================================================
   BLOOM — the lotus mandala behind the page.
   Fixed, non-interactive, and driven entirely by scroll position
   so scrolling back up folds it closed again.
   ============================================================ */
.bloom {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* JS drives `color` across the sunrise; this is the closed-state fallback
     for no-JS and reduced-motion. One property, so both themes share it. */
  color: hsl(234 64% 58%);
  opacity: .2;
  transition: opacity .6s var(--ease);
}
/* Per-theme colour and opacity are written inline by JS — it already owns the
   hue, and splitting appearance between a CSS override and an inline style
   meant the two disagreed. This block is only the no-JS fallback. */

.bloom__svg {
  width: min(128vh, 132vw);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
}
.bloom__spin { transform-box: view-box; transform-origin: 200px 200px; will-change: transform; }

.bloom__petal, .bloom__ring {
  transform-box: view-box;
  transform-origin: 200px 200px;      /* grow outward from the mandala's heart */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;               /* undrawn until scroll opens it */
  will-change: transform, stroke-dashoffset;
}

/* Everything above the drawing. Sections with their own background hide it,
   which is intentional — the hero covers it completely.

   Only `main` and the footer need a stacking context added. The nav, lightbox
   and cursor preview already position themselves (fixed) with z-indexes well
   above 0 — listing them here set `position: relative`, which knocked the nav
   out of fixed positioning into normal flow and pushed the whole page down. */
main, .foot { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  /* no motion, but not a blank page either — show it fully drawn and still */
  .bloom__petal, .bloom__ring { stroke-dashoffset: 0 !important; transform: none !important; }
  .bloom__spin { transform: none !important; }
}

/* ============================================================
   WORK DETAIL PAGE
   ============================================================ */
.work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.work__head > :first-child { flex: 1 1 20ch; min-width: 0; }
.work__head .section__lead { flex: 0 1 46ch; padding-bottom: .35rem; }

.work__hero { border-radius: clamp(20px, 2.6vw, 44px); overflow: hidden; background: var(--panel); }
.work__hero img { width: 100%; height: auto; display: block; }

.work__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; }
.work__fact { border-radius: 16px; padding: 1.1rem 1.2rem; }
.work__fact b { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; letter-spacing: -.01em; }
.work__fact span { display: block; margin-top: .3rem; font-size: .82rem; color: var(--fg-55); line-height: 1.45; }

.work__body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 26%, 320px); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .work__body { grid-template-columns: 1fr; } }

.work__stack { position: sticky; top: 7rem; }
@media (max-width: 900px) { .work__stack { position: static; } }
.work__stackgroup { padding-block: .8rem; border-top: 1px solid var(--hair-2); }
.work__stackgroup > span {
  display: block; margin-bottom: .5rem;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-35);
}
.work__stackgroup > div { display: flex; flex-wrap: wrap; gap: .3rem; }

/* the project card is a link now, so it must not inherit link colouring */
a.pcard { display: grid; color: inherit; text-decoration: none; }

/* ============================================================
   WORK DETAIL PAGE
   ============================================================ */
.work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.work__head > :first-child { flex: 1 1 20ch; min-width: 0; }
.work__head .section__lead { flex: 0 1 46ch; padding-bottom: .35rem; }

.work__hero { border-radius: clamp(20px, 2.6vw, 44px); overflow: hidden; background: var(--panel); }
.work__hero img { width: 100%; height: auto; display: block; }

.work__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; }
.work__fact { border-radius: 16px; padding: 1.1rem 1.2rem; }
.work__fact b { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; letter-spacing: -.01em; }
.work__fact span { display: block; margin-top: .3rem; font-size: .82rem; color: var(--fg-55); line-height: 1.45; }

.work__body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 26%, 320px); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .work__body { grid-template-columns: 1fr; } }

.work__stack { position: sticky; top: 7rem; }
@media (max-width: 900px) { .work__stack { position: static; } }
.work__stackgroup { padding-block: .8rem; border-top: 1px solid var(--hair-2); }
.work__stackgroup > span {
  display: block; margin-bottom: .5rem;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-35);
}
.work__stackgroup > div { display: flex; flex-wrap: wrap; gap: .3rem; }

/* the project card is a link now, so it must not inherit link colouring */
a.pcard { display: grid; color: inherit; text-decoration: none; }

