@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-display: swap; src: url(fonts/CormorantGaramond-400.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-display: swap; src: url(fonts/CormorantGaramond-500.woff2) format("woff2"); }
@font-face { font-family: "Noto Serif Tamil"; font-weight: 400; font-display: swap; src: url(fonts/NotoSerifTamil-400.woff2) format("woff2"); size-adjust: 86%; unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: "Almarai"; font-weight: 400; font-display: swap; src: url(fonts/Almarai-400.woff2) format("woff2"); }
@font-face { font-family: "Almarai"; font-weight: 700; font-display: swap; src: url(fonts/Almarai-700.woff2) format("woff2"); }

:root {
  --ink: #1d1b18;
  --muted: #86837c;
  --bg: #f5f4f0;
  --rule: #dcd9d2;
  --serif: "Cormorant Garamond", "Noto Serif Tamil", Georgia, serif;
  --sans: "Almarai", system-ui, -apple-system, sans-serif;
  --sidebar: 280px;
  --gap: 140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 20; }

/* Sidebar */
.side { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 40px 36px; display: flex; flex-direction: column; gap: 40px; overflow-y: auto; }
.brand { font: 500 28px/1.1 var(--serif); letter-spacing: -.01em; }
.brand span { display: block; color: var(--muted); font-size: 18px; margin-top: 6px; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::before { content: "— "; }
.side-foot { margin-top: auto; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.side-foot a:hover { color: var(--ink); }

/* Main column */
main { margin-left: var(--sidebar); padding: 40px 56px 0 40px; min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; }
footer { color: var(--muted); font-size: 12px; padding: 80px 0 40px; }

/* Photo sequence. Each figure gets --ar (width / height) from the build so tall
   photos never exceed the viewport height and captions stay aligned to the image. */
.seq { display: flex; flex-direction: column; }
.fig { margin: 0 0 var(--gap); --w: 62%; width: min(var(--w), calc(88vh * var(--ar))); }
.fig img { display: block; width: 100%; height: auto; background: var(--rule); cursor: zoom-in; }
.fig figcaption { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 16px; }
.fig figcaption b { font-weight: 400; color: var(--ink); }
.l-full { --w: 100%; }
.l-large-left { --w: 62%; }
.l-large-right { --w: 62%; margin-left: auto; }
.l-medium-left { --w: 46%; }
.l-medium-right { --w: 46%; margin-left: auto; }
.l-small-center { --w: 38%; margin-inline: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: var(--gap); }
.pair .fig { --w: 100%; margin: 0; }
.pair .fig:last-child { justify-self: end; }

/* Series header */
.title { font: 500 clamp(48px, 7.5vw, 112px)/1 var(--serif); letter-spacing: -.02em; margin: 0 0 16px; }
.title span { color: var(--muted); }
.kicker { border-top: 1px solid var(--rule); padding-top: 12px; margin: 0 0 100px; display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.kicker p { margin: 0; white-space: pre-line; }

/* About */
.bio { font: 500 clamp(26px, 3.2vw, 42px)/1.25 var(--serif); max-width: 20em; margin: 0 0 48px; }
.bio p { margin: 0 0 .6em; }
.contact { list-style: none; margin: 0 0 120px; padding: 12px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 40px; color: var(--muted); font-size: 13px; }
.contact a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.contact a:hover { border-color: var(--ink); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: none; grid-template-rows: 1fr auto; gap: 16px; padding: 32px; }
.lb.open { display: grid; }
.lb img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.lb-bar { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.lb-bar button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.lb-bar button:hover { color: var(--ink); }
.lb-hit { position: absolute; top: 0; bottom: 60px; width: 50%; background: none; border: 0; padding: 0; }
.lb-hit.prev { left: 0; cursor: w-resize; }
.lb-hit.next { right: 0; cursor: e-resize; }

@media (max-width: 860px) {
  :root { --gap: 64px; }
  .side { position: static; width: auto; padding: 20px 16px 8px; gap: 12px; overflow: visible; }
  .brand { font-size: 24px; }
  .brand span { font-size: 16px; margin-top: 4px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  .nav a[aria-current="page"]::before { content: none; }
  .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
  .side-foot { display: none; }
  main { margin: 0; padding: 24px 16px 0; min-height: 0; }
  .fig { width: min(100%, calc(88vh * var(--ar))); margin-inline: 0; }
  .l-medium-right, .l-large-right { margin-left: auto; }
  .l-small-center { margin-inline: auto; }
  .pair { grid-template-columns: 1fr; gap: var(--gap); }
  .pair .fig:last-child { justify-self: start; }
  .kicker { margin-bottom: 56px; }
  .contact { margin-bottom: 64px; }
  .lb { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
