/* ChrisIsner.com — Editorial figure photography
   Monochrome by default. Themes: light / dark / sepia. */

:root {
  --bg: #efece5;
  --paper: #f7f5f0;
  --ink: #0b0b0b;
  --ink-soft: #1a1a1a;
  --muted: rgba(11,11,11,0.55);
  --rule: rgba(11,11,11,0.18);
  --rule-strong: rgba(11,11,11,0.45);
  --hi: #0b0b0b;
  --film: rgba(11,11,11,0.06);
  --silhouette: #111111;
  --silhouette-bg: #d9d4c7;
  --grain-opacity: 0.06;
  color-scheme: light;
}

[data-theme="light"] {
  --bg: #ffffff;
  --paper: #fafafa;
  --ink: #050505;
  --ink-soft: #1a1a1a;
  --muted: rgba(5,5,5,0.55);
  --rule: rgba(5,5,5,0.14);
  --rule-strong: rgba(5,5,5,0.4);
  --silhouette: #0a0a0a;
  --silhouette-bg: #ebe9e3;
  --grain-opacity: 0.04;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --paper: #111111;
  --ink: #efece5;
  --ink-soft: #d8d4c8;
  --muted: rgba(239,236,229,0.55);
  --rule: rgba(239,236,229,0.18);
  --rule-strong: rgba(239,236,229,0.45);
  --silhouette: #efece5;
  --silhouette-bg: #1c1c1c;
  --grain-opacity: 0.08;
  color-scheme: dark;
}

[data-theme="sepia"] {
  --bg: #e9dcc6;
  --paper: #f0e4cf;
  --ink: #2a1b0e;
  --ink-soft: #3a2818;
  --muted: rgba(42,27,14,0.55);
  --rule: rgba(42,27,14,0.22);
  --rule-strong: rgba(42,27,14,0.5);
  --silhouette: #2a1b0e;
  --silhouette-bg: #d6c5a8;
  --grain-opacity: 0.08;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

/* — Type — */
body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.005em;
  background: var(--bg);
  color: var(--ink);
  transition: background 600ms ease, color 600ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display, h1, h2, h3 {
  font-family: "Bodoni Moda", "Didot", "Bodoni 72", serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}

.serif-italic {
  font-family: "Cormorant Garamond", "Cormorant", "Bodoni Moda", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.eyebrow {
  font-family: "Archivo", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono, .num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* — Layout — */
.site {
  position: relative;
  min-height: 100vh;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; }

/* — Nav — */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 28px;
  background: linear-gradient(to bottom, var(--bg) 0%, color-mix(in oklab, var(--bg) 80%, transparent) 70%, transparent 100%);
  backdrop-filter: blur(2px);
}
.nav__left, .nav__right { display: flex; align-items: center; gap: 26px; }
.nav__right { justify-content: flex-end; }
.nav__brand {
  font-family: "Bodoni Moda", serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.nav__brand .dot { font-style: italic; font-family: "Cormorant Garamond", serif; opacity: 0.6; }
.nav__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1px; background: currentColor;
  transition: right 400ms cubic-bezier(.7,0,.2,1);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { right: 0; }
.nav__link[aria-current="page"] { color: var(--ink); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
  background: color-mix(in oklab, var(--paper) 60%, transparent);
}
.theme-toggle button {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600; letter-spacing: 0;
  color: var(--muted);
  transition: background 300ms ease, color 300ms ease;
}
.theme-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* — Buttons / links — */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
  padding: 16px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  transition: transform 300ms cubic-bezier(.7,0,.2,1), background 300ms ease, color 300ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { display: inline-block; transition: transform 400ms cubic-bezier(.7,0,.2,1); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: baseline; gap: 8px;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: border-color 300ms ease, color 300ms ease;
}
.link-arrow:hover { border-color: var(--ink); }

/* — Sections — */
.section { padding: 120px 28px; position: relative; }
.section--tight { padding: 60px 28px; }
.section__head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  margin-bottom: 80px;
  align-items: end;
}
@media (max-width: 900px) {
  .section { padding: 80px 20px; }
  .section__head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

.section__index {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.divider {
  height: 1px; background: var(--rule); margin: 0 28px;
}
.divider--ink { background: var(--ink); height: 1px; }

/* — Image frames (silhouette placeholders) — */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--silhouette-bg);
  display: block;
  isolation: isolate;
}
.frame__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: transform 1200ms cubic-bezier(.2,.6,.2,1), filter 700ms ease;
}
.frame__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Portrait and figure containers */
.hero__slide img,
.service__hover img,
.bio__portrait img,
.about__portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__stage img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Invert SVG placeholders in dark theme so they remain legible */
[data-theme="dark"] .frame__img img,
[data-theme="dark"] .hero__slide img,
[data-theme="dark"] .lightbox__stage img,
[data-theme="dark"] .bio__portrait img,
[data-theme="dark"] .about__portrait img,
[data-theme="dark"] .service__hover img { filter: invert(1); }
.frame:hover .frame__img { transform: scale(1.04); }
.frame__meta {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 10px; font-family: "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: color-mix(in oklab, var(--silhouette) 70%, transparent);
  opacity: 0; transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
  pointer-events: none;
}
.frame:hover .frame__meta { opacity: 1; transform: translateY(0); }

.frame--3x4 { aspect-ratio: 3 / 4; }
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--1x1 { aspect-ratio: 1 / 1; }
.frame--2x3 { aspect-ratio: 2 / 3; }
.frame--5x4 { aspect-ratio: 5 / 4; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--3x2 { aspect-ratio: 3 / 2; }

/* — Footer — */
.footer {
  border-top: 1px solid var(--rule);
  padding: 60px 28px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer h4 { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: 14px; margin: 0 0 16px; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 12px; }
.footer__brand .word { font-family: "Bodoni Moda", serif; font-size: clamp(48px, 9vw, 140px); line-height: 0.85; letter-spacing: -0.02em; }
.footer__legal {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__legal { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* — Reveal on scroll — */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(.2,.6,.2,1), transform 900ms cubic-bezier(.2,.6,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal--slow { transition-duration: 1400ms; }

.clip-reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1200ms cubic-bezier(.7,0,.2,1);
}
.clip-reveal.is-in {
  clip-path: inset(0 0 0 0);
}

/* — Marquee — */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(34px, 6vw, 80px);
  letter-spacing: -0.02em;
}
.marquee__track { display: inline-flex; gap: 60px; animation: marquee 38s linear infinite; }
.marquee__track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee__track .glyph { font-style: italic; font-family: "Cormorant Garamond", serif; opacity: 0.5; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* — Utility — */
.row { display: flex; }
.between { justify-content: space-between; }
.align-center { align-items: center; }
.stack { display: grid; gap: 16px; }
.muted { color: var(--muted); }
.uppercase { text-transform: uppercase; letter-spacing: 0.2em; font-size: 11px; }
