/* Layout: after the Frame & Form template, inverted. Thin top bar on every page. Home = seal + statement only;
   Work (password protected), About and Contact are their own pages. */
:root {
  --bg: #0a0a0a;
  --ink: #f2f2f0;
  --muted: #8a8a86;
  --line: #262626;
  --slot: #1b1b1b;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); padding-inline: 20px; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1240px; margin-inline: auto; }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
  display: flex; justify-content: space-between; align-items: center; padding-block: 14px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 14px; }
.mark img { width: 22px; height: auto; display: block; }
.top nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.top nav a { text-decoration: none; font-size: 14px; color: var(--muted); }
.top nav a:hover, .top nav a:focus-visible, .top nav a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero { padding-block: 28px 64px; }
.hero .seal { width: clamp(72px, 9vw, 112px); height: auto; display: block; margin-bottom: 28px; }
.hero h1 { font-weight: 400; font-size: clamp(30px, 4.6vw, 60px); line-height: 1.12; letter-spacing: 0; margin: 0; max-width: 19em; text-wrap: balance; }
.hero .wi { white-space: nowrap; }
.hero h1 strong { font-weight: 600; }
.hero .sub { margin: 24px 0 0; max-width: 34em; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.45; color: var(--muted); text-wrap: pretty; }

/* Section labels */
.label { font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; padding-block: 18px 22px; }

/* Work */
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px; gap: 10px 20px; padding-block: 0 56px; }
.project + .project { padding-top: 20px; }
.slot { background: var(--slot); aspect-ratio: 1; position: relative; overflow: hidden; }
.slot::after { content: attr(data-note); position: absolute; left: 12px; bottom: 10px; font: 400 11px var(--mono); color: #5c5c5a; letter-spacing: .04em; }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cap { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-width: 0; font-size: 14px; }
.cap p { margin: 0; }
.cap .desc { color: var(--muted); }
.meta { display: grid; grid-template-columns: 4.5em 1fr; gap: 2px 8px; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.more { text-decoration: none; font-size: 13px; }
.more:hover { text-decoration: underline; }

/* About / contact */
.block { padding-block: 0 72px; }
.block .body { font-size: clamp(18px, 2vw, 24px); line-height: 1.35; max-width: 34em; }
.block .body p { margin: 0 0 16px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contact-list span { color: var(--muted); display: inline-block; width: 6.5em; font-size: 14px; }
footer { padding-block: 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; font: 400 12px var(--mono); color: var(--muted); }

@media (max-width: 860px) {
  .project { grid-template-columns: 1fr 1fr; }
  .cap { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .top nav ul { gap: 18px; }
  .project { grid-template-columns: 1fr; }
}

/* Page shell: footer sits at the bottom of short pages */
body { min-height: 100vh; min-height: 100dvh; }
.wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
.page-title { font-weight: 400; font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.02em; line-height: 1.08; margin: 0; padding-block: 28px 40px; }

/* Password screen (served by middleware.js) */
.gate { max-width: 420px; padding-block: 0 80px; }
.gate p { color: var(--muted); margin: 0 0 24px; }
.gate form { display: flex; gap: 8px; }
.gate input { flex: 1; min-width: 0; background: transparent; border: 1px solid var(--line); color: var(--ink); font: inherit; padding: 10px 12px; }
.gate input:focus { outline: none; border-color: var(--ink); }
.gate button { background: var(--ink); color: var(--bg); border: 0; font: inherit; font-weight: 500; padding: 10px 16px; cursor: pointer; }
.gate .err { color: #e8826b; margin: 12px 0 0; font-size: 14px; }

/* About facts */
.facts { margin: 0; display: grid; gap: 36px; max-width: 40em; }
.facts dt { font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dd { margin: 0; font-size: clamp(18px, 2vw, 24px); line-height: 1.4; }
.facts strong { font-weight: 600; }
.facts .dim { color: var(--muted); }
.wi { white-space: nowrap; }

.contact-list a { text-decoration: none; border-bottom: 1px solid var(--muted); }
.contact-list a:hover { border-color: var(--ink); }

/* About: headshot beside the facts, stacked on phones */
.about-grid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 48px; align-items: start; }
.headshot { width: 100%; height: auto; max-width: 100%; aspect-ratio: 778 / 1654; object-fit: cover; display: block; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .headshot { max-width: 200px; } }
