﻿:root {
  --bg: #0a0a0a;
  --bg-2: #131312;
  --text: #edeae4;
  --text-2: rgba(237, 234, 228, 0.72);
  --muted: #7d7a74;
  --line: rgba(237, 234, 228, 0.12);
  --accent: #d4b07a;
  --display: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #333 var(--bg); }
/* Menu links land below the fixed nav (#work has no top padding of its own) */
section[id] { scroll-margin-top: 90px; }
#top { scroll-margin-top: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.locked, body.loading { overflow: hidden; }
::selection { background: var(--accent); color: #111; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
em { font-style: italic; }

/* Shared type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}
.eyebrow .line { width: 36px; height: 1px; background: currentColor; }
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-title em { color: var(--accent); }
.section-head .section-title { white-space: nowrap; }
.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.arrow { display: inline-block; transition: transform 0.5s var(--ease); }

/* Film grain */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 300;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- PRELOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter);
  transition: transform 1.1s var(--ease-in-out);
}
.loader.done { transform: translateY(-100%); }
.loader__inner {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 20px;
}
.loader__name {
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  max-width: 11ch;  /* wraps onto two lines: "Photography / by Nithish" */
}
.loader__inner { gap: 24px; }
.loader__count {
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.loader__bar { height: 1px; background: var(--line); overflow: hidden; }
.loader__bar span {
  display: block; height: 100%; background: var(--text);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s linear;
}

/* ---------- CURSOR ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 250;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: var(--text);
  color: #111;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  pointer-events: none;
  transform: scale(0);
  transition: transform 0.45s var(--ease);
  will-change: left, top;
}
.cursor.show { transform: scale(1); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px var(--gutter);
  transition: background 0.6s var(--ease), padding 0.6s var(--ease), transform 0.6s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.nav.hide { transform: translateY(-100%); }
.nav__brand {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative; z-index: 2;
}
.nav__brand em, .loader__name em { color: var(--accent); }
.nav__links { display: flex; gap: clamp(20px, 3.4vw, 48px); }
.nav__links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  color: var(--text-2);
  transition: color 0.3s;
}
.nav__links a::before {
  content: attr(data-index);
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--muted);
  margin-right: 6px;
  vertical-align: 2px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--text);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav__toggle {
  display: none;
  position: relative; z-index: 2;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.nav__toggle span {
  position: absolute; left: 8px; right: 8px; height: 1px; background: var(--text);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 23px; }
.nav.open .nav__toggle span:first-child { top: 20px; transform: rotate(45deg); }
.nav.open .nav__toggle span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 580px;
  overflow: hidden;
  /* Letterbox bar height for a 2.39:1 frame, capped so tall/square screens keep most of the photo */
  --bar: clamp(0px, calc((100svh - 100vw / 2.39) / 2), 10svh);
}
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide {
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.14);
  transition: opacity 2.4s ease, transform 10s cubic-bezier(0.1, 0.4, 0.3, 1);
}
.hero__slide.active { opacity: 1; transform: scale(1.02); }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.65), transparent 45%),
    linear-gradient(100deg, rgba(0,0,0,0.6), transparent 55%),
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}
/* 2.39:1 anamorphic letterbox bars */
.letterbox {
  position: absolute; left: 0; right: 0; z-index: 2;
  height: var(--bar);
  background: #000;
  transform: scaleY(3);
  transition: transform 2s 0.2s var(--ease-in-out);
}
.letterbox--top { top: 0; transform-origin: top; }
.letterbox--bottom { bottom: 0; transform-origin: bottom; }
.ready .letterbox { transform: none; }

.hero__frame {
  position: absolute; z-index: 3;
  inset: max(96px, var(--bar)) var(--gutter) max(28px, var(--bar));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(20px, 3vw, 36px);
}
.hero__eyebrow { color: var(--text-2); }
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 11.5vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(1.6rem, 3vw, 2.6rem);
}
.hero__title em { color: var(--accent); padding-right: 0.05em; }
/* Extra bottom room so descenders (g, y, p) aren't clipped; negative margin keeps the tight line spacing */
.mask { display: block; overflow: hidden; padding-bottom: 0.2em; margin-bottom: -0.14em; }
.mask > span {
  display: block;
  transform: translateY(130%);  /* fully below the mask, including its extra bottom room */
  transition: transform 1.4s var(--ease);
}
.mask:nth-child(2) > span { transition-delay: 0.12s; }
.ready .mask > span { transform: none; transition-delay: 0.6s; }
.ready .mask:nth-child(2) > span { transition-delay: 0.72s; }

.hero__eyebrow, .hero__cta, .hero__hud {
  opacity: 0; transform: translateY(16px);
  transition: opacity 1.2s 1s var(--ease), transform 1.2s 1s var(--ease);
}
.ready .hero__eyebrow, .ready .hero__cta, .ready .hero__hud { opacity: 1; transform: none; }

.hero__cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.85rem; font-weight: 400;
  padding: 14px 22px;
  border: 1px solid rgba(237, 234, 228, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.hero__cta:hover { background: var(--text); color: #111; border-color: var(--text); }
.hero__cta:hover .arrow { transform: translateY(3px); }

.hero__hud {
  position: absolute; left: 0; right: 0; bottom: -4px;
  display: flex; justify-content: flex-end; align-items: center; gap: 28px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2);
  pointer-events: none;
}
.hero__counter { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.hero__progress { width: 72px; height: 1px; background: rgba(237, 234, 228, 0.25); overflow: hidden; }
.hero__progress span { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }
.hero__progress span.run { animation: progress linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }
.hero__caption { min-width: 220px; text-align: right; transition: opacity 0.6s; }

/* ---------- STATEMENT ---------- */
.statement {
  max-width: 1180px;
  padding: clamp(110px, 16vw, 220px) var(--gutter);
}
.statement__text {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.statement__text .w { opacity: 0.14; transition: opacity 0.7s ease; }
.statement.in .w { opacity: 1; }

/* ---------- SECTION HEAD ---------- */
.section-head {
  display: grid;
  /* Title keeps its natural width; the right-hand item (filters/intro) wraps into what's left */
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: end;
  gap: 18px 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-head .section-num { align-self: start; padding-top: 0.6em; }
.section-head--plain { border: 0; padding: 0; grid-template-columns: auto 1fr; margin-bottom: 2.2rem; }
.section-head--center { display: flex; justify-content: center; border: 0; padding: 0; margin-bottom: 1rem; gap: 16px; align-items: baseline; }
.section-head--center .section-num { padding: 0; }
.section-head--center .eyebrow { margin: 0; }

/* ---------- WORK / GALLERY ---------- */
.work {
  padding: clamp(70px, 9vw, 120px) var(--gutter) clamp(100px, 13vw, 180px);
  border-top: 1px solid var(--line);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.filters button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.8rem; font-weight: 400;
  color: var(--text-2);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.filters button sup { font-family: var(--mono); font-size: 0.6rem; margin-left: 5px; color: var(--muted); vertical-align: 4px; }
.filters button:hover { border-color: rgba(237, 234, 228, 0.4); color: var(--text); }
.filters button.active { background: var(--text); border-color: var(--text); color: #111; }
.filters button.active sup { color: #555; }

.gallery { columns: 3 320px; column-gap: clamp(12px, 1.6vw, 24px); }
.tile {
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(12px, 1.6vw, 24px);
  cursor: pointer;
  /* Thin print-style frame around each photo + its caption */
  padding: 10px 10px 4px;
  border: 1px solid var(--line);
  background: rgba(237, 234, 228, 0.015);
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), border-color 0.4s;
}
.tile:hover { border-color: rgba(237, 234, 228, 0.32); }
.tile.in { opacity: 1; transform: none; }
.tile.hidden { display: none; }
.tile__media {
  position: relative; overflow: hidden;
  background: var(--bg-2);
}
.tile__media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.tile.loaded .tile__media::before { display: none; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.tile img {
  position: relative;
  width: 100%; height: auto;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 1.4s var(--ease), filter 0.8s;
  filter: saturate(0.9) brightness(0.92);
}
.tile.loaded img { opacity: 1; transform: none; }
.tile:hover img { transform: scale(1.04); filter: saturate(1.05) brightness(1); }
.tile__info {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-top: 12px;
}
.tile__title { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.005em; }
.tile__meta {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}

/* ---------- FEATURE ---------- */
.feature {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.feature__img {
  position: absolute; inset: -12% 0;
  background-size: cover; background-position: center;
  will-change: transform;
}
.feature::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88), rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.35));
}
.feature__text {
  position: relative; z-index: 2;
  max-width: 760px;
  padding: 0 var(--gutter) clamp(56px, 9vw, 120px);
}
.feature__text .eyebrow { color: var(--text-2); }
.feature__text h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.92; letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.feature__body { color: var(--text-2); max-width: 46ch; margin: 0; font-size: 1.05rem; }

/* ---------- GRADING (before / after) ---------- */
.grading { padding: clamp(100px, 13vw, 180px) var(--gutter) 0; }
.grading__intro { margin: 0; max-width: 34ch; color: var(--text-2); font-size: 0.95rem; justify-self: end; text-align: right; }
/* The slider sits centred in a fixed-height stage, so switching between portrait
   and landscape pairs doesn't shove the strip below up and down */
.grading__stage {
  --h: min(72svh, 760px);
  height: var(--h);
  display: flex; justify-content: center; align-items: center;
}
.compare {
  --pos: 50%;
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: var(--ar, 1);  /* set per photo from JS */
  width: min(100%, calc(var(--h) * var(--ar, 1)));
  overflow: hidden;
  background: var(--bg-2);
  /* Frame sits a little outside the photo (outline isn't clipped by overflow) */
  outline: 1px solid var(--line);
  outline-offset: 10px;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.compare__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.compare.switching .compare__img { opacity: 0; }
.compare__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare__label {
  position: absolute; top: 16px; z-index: 2;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 10px;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  pointer-events: none;
}
.compare__label--before { left: 16px; }
.compare__label--after { right: 16px; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  left: var(--pos);
  width: 48px; margin-left: -24px;
  display: flex; align-items: center; justify-content: center;
  outline: none;
}
.compare__handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: var(--text);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}
.compare__knob {
  position: relative;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; letter-spacing: 0.1em;
  background: rgba(10, 10, 10, 0.45);
  border: 1px solid var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s;
}
.compare:hover .compare__knob, .compare.dragging .compare__knob { transform: scale(1.08); }
.compare__handle:focus-visible .compare__knob { background: var(--text); color: #111; }
.compare.hint .compare__after, .compare.hint .compare__handle { transition: clip-path 1.1s var(--ease-in-out), left 1.1s var(--ease-in-out); }

/* Now-showing row: counter + title on the left, prev/next on the right */
.grading__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: clamp(24px, 3vw, 36px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.grading__now { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.grading__count { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.grading__name { font-size: 1.05rem; font-weight: 400; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grading__arrows { display: flex; gap: 8px; flex: 0 0 auto; }
.grading__arrows button {
  width: 44px; height: 44px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--text-2);
  cursor: pointer; font-size: 1rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.grading__arrows button:hover { background: var(--text); color: #111; border-color: var(--text); }

/* Filmstrip of pairs: scrolls sideways, driven by the custom scroll bar below */
.grading__strip {
  display: flex; gap: clamp(12px, 1.4vw, 20px);
  margin-top: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.grading__strip::-webkit-scrollbar { display: none; }
.gcard {
  flex: 0 0 clamp(200px, 22vw, 280px);
  scroll-snap-align: start;
  padding: 0; background: none; border: 0;
  cursor: pointer; text-align: left; color: var(--text);
  opacity: 0.5;
  transition: opacity 0.4s var(--ease);
}
.gcard:hover, .gcard:focus-visible { opacity: 0.85; }
.gcard.active { opacity: 1; }
.gcard__thumb {
  position: relative; display: block;
  aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.gcard__thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.gcard:hover .gcard__thumb img { transform: scale(1.04); }
/* Thin accent line marks the pair on screen */
.gcard__thumb::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.gcard.active .gcard__thumb::after { transform: scaleX(1); }
.gcard__label { display: flex; align-items: baseline; gap: 10px; padding-top: 12px; }
.gcard__num { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); }
.gcard__title { font-size: 0.88rem; font-weight: 400; }

/* Custom horizontal scroll bar for the strip */
.gscroll {
  position: relative;
  height: 22px;             /* tall hit area, thin visible track */
  margin-top: 20px;
  cursor: pointer;
  touch-action: none;
}
.gscroll[hidden] { display: none; }
.gscroll::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--line);
}
.gscroll__thumb {
  position: absolute; top: 50%; height: 3px; margin-top: -1.5px;
  left: 0; width: 30%;
  background: var(--text-2);
  border-radius: 3px;
  transition: background 0.3s, height 0.3s, margin-top 0.3s;
}
.gscroll:hover .gscroll__thumb, .gscroll.dragging .gscroll__thumb, .gscroll:focus-visible .gscroll__thumb {
  background: var(--text); height: 5px; margin-top: -2.5px;
}
.gscroll:focus-visible { outline-offset: 2px; }

/* ---------- ABOUT ---------- */
.about {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(36px, 8vw, 140px);
  align-items: center;
  padding: clamp(100px, 13vw, 180px) var(--gutter);
  border-top: 1px solid var(--line);
}
.about__img {
  aspect-ratio: 4 / 5;
  background-size: cover; background-position: center;
  filter: saturate(0.9);
  outline: 1px solid var(--line);
  outline-offset: 14px;
}
.about__lead {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
  max-width: 22ch;
}
.about__text p:not(.about__lead) { color: var(--text-2); max-width: 54ch; }
.about__meta { list-style: none; padding: 0; margin: 2.8rem 0 0; border-top: 1px solid var(--line); }
.about__meta li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.about__meta span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }

/* ---------- CONTACT ---------- */
.contact {
  text-align: center;
  padding: clamp(100px, 13vw, 180px) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(4rem, 14vw, 13rem); line-height: 0.85; letter-spacing: -0.04em;
  margin: 0 0 2.4rem;
}
.contact__title em { color: var(--accent); }
.contact__mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  padding: 16px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.contact__mail:hover { background: var(--text); color: #111; border-color: var(--text); }
.contact__note { max-width: 44ch; margin: -0.6rem auto 2.2rem; color: var(--text-2); text-wrap: balance; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.contact__alt { margin: 1.1rem 0 0; font-size: 0.85rem; color: var(--muted); }
.contact__copy {
  padding: 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; color: var(--text-2); cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.contact__copy:hover { color: var(--text); border-color: var(--text); }
.contact__copy.copied { color: var(--accent); border-color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact__social { margin-top: 2.4rem; display: flex; justify-content: center; gap: 32px; }
.contact__social a {
  font-size: 0.85rem; color: var(--text-2);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.contact__social a:hover { color: var(--text); border-color: var(--text); }

.footer {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
  padding: 26px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.footer__tag { font-variant-numeric: tabular-nums; }
.footer a { justify-self: end; transition: color 0.3s; }
.footer a:hover { color: var(--text); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 6, 6, 0.98);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.lightbox__count { font-variant-numeric: tabular-nums; }
.lightbox__figure {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  max-width: calc(100vw - 2 * var(--gutter) - 120px);
  transform: scale(0.97);
  transition: transform 0.7s var(--ease);
}
.lightbox.open .lightbox__figure { transform: none; }
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  max-height: calc(100svh - 170px);
  object-fit: contain;
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}
.lightbox__figure img.loading { opacity: 0; transform: scale(0.985); }
.lightbox figcaption {
  width: 100%;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px;
  padding-top: 18px;
}
.lightbox__title { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.lightbox__meta { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lightbox button { background: none; border: 0; cursor: pointer; }
.lightbox__close {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2); transition: color 0.3s;
}
.lightbox__close:hover { color: var(--text); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  border: 1px solid var(--line) !important; border-radius: 50%;
  font-size: 1.1rem; color: var(--text-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.lightbox__nav:hover { background: var(--text); color: #111; border-color: var(--text) !important; }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__img { max-width: 520px; }
  .section-head { grid-template-columns: auto 1fr; }
  .section-head .filters { grid-column: 1 / -1; justify-content: flex-start; }
  .footer { grid-template-columns: 1fr auto; }
  .footer__tag { display: none; }
  .grading__intro { grid-column: 1 / -1; justify-self: start; text-align: left; }
  /* Narrow screens: let the slider size itself from the width instead of a fixed stage */
  .grading__stage { height: auto; }
  .gcard { flex-basis: clamp(150px, 42vw, 220px); }
}

@media (max-width: 720px) {
  .nav__brand { font-size: 1.3rem; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 8px;
    padding: 0 var(--gutter);
    background: var(--bg);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.8s var(--ease-in-out);
  }
  .nav.open .nav__links { clip-path: inset(0); }
  .nav__links a {
    font-family: var(--display);
    font-size: 3.4rem; line-height: 1.1; letter-spacing: -0.02em;
    color: var(--text);
  }
  .nav__links a::before { font-size: 0.7rem; vertical-align: 1.6em; margin-right: 10px; }
  .nav__links a::after { display: none; }
  .nav.open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; }

  .hero__frame { padding-bottom: 52px; }
  .hero__hud { justify-content: flex-start; }
  .hero__caption { display: none; }
  /* Two narrow columns on phones so 40+ photos isn't an endless scroll */
  .gallery { columns: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; padding: 5px 5px 2px; }
  .compare { outline-offset: 6px; }
  .about__img { outline-offset: 8px; }
  .tile__info { padding-top: 6px; }
  .tile__title { font-size: 1rem; }
  .tile__meta { display: none; }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .footer__tag { display: none; }
  .footer a { justify-self: center; }
  .lightbox__figure { max-width: 100vw; padding: 0 16px; }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .lightbox__nav--prev { left: auto; right: calc(var(--gutter) + 54px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .tile, .tile img, .mask > span, .hero__eyebrow, .hero__cta, .hero__hud { opacity: 1; transform: none; }
}
