/* Shared stylesheet for the reading pages (/about/, /cv/).
   index.html deliberately does NOT use this file — the homepage is a single screen
   of type and keeps its CSS inline so it renders with zero blocking requests. These
   two pages are secondary, so one cached stylesheet across both beats duplicating
   ~150 lines into each.

   url() here resolves relative to THIS file, so 'fonts/…' and 'mark.svg' both land
   in /assets/ regardless of which page pulls the sheet in. */

/* Variable font, latin subset — one 43 KB file covers every weight used.
   License travels with it: fonts/OFL.txt (SIL OFL-1.1). */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 200 400;
  font-display: swap;
  src: url('fonts/raleway-latin-var.woff2') format('woff2');
}

/* Metric-matched fallback so the swap changes letterforms without reflowing.
   102% is measured against the homepage headline — see the note in index.html
   before changing it. */
@font-face {
  font-family: 'Raleway Fallback';
  src: local('Helvetica Neue'), local('Arial');
  size-adjust: 102%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Raleway', 'Raleway Fallback', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 5vw, 4.5rem);
  overflow-x: hidden;
}

/* Ghost watermark, as a background rather than inline markup — same bleed crop as
   the homepage, same "texture, not decoration" intent. */
body::before {
  content: "";
  position: fixed;
  left: -8vmin;
  bottom: -18vmin;
  height: min(120vh, 160vw);
  aspect-ratio: 83 / 108;
  background: url('mark.svg') no-repeat bottom left / contain;
  opacity: 0.055;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.nav, main, footer { position: relative; z-index: 1; }

/* ── Nav, top right ─────────────────────────────────────────── */
.nav {
  align-self: flex-end;
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  flex-shrink: 0;
}
.nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.5;
  transition: opacity 200ms ease;
  padding: 0.5rem 0.1rem;
  margin: -0.5rem -0.1rem;
}
.nav a:hover,
.nav a:focus-visible { opacity: 1; }
/* Current page reads as present, not clickable-but-inert. */
.nav a[aria-current="page"] { opacity: 1; }

/* On black the UA focus ring is near-invisible; everything interactive gets the
   same deliberate white one. */
.nav a:focus-visible,
.panel-link:focus-visible,
.backlink:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Page body ──────────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 62ch;          /* same measure as the homepage panels */
  margin: 0 auto;
  padding-block: clamp(2.5rem, 8vh, 5rem);
}

h1 {
  font-weight: 200;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

.role {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

main p { margin-top: 1.35rem; line-height: 1.6; }
.lede { font-size: 1.1rem; }

/* Credential lines. A list, not prose — scanned, not read. */
.facts {
  margin-top: 1.75rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.facts li {
  padding-left: 1.15rem;
  position: relative;
  line-height: 1.45;
  font-size: 0.95rem;
}
.facts li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ── About: portrait beside the type ────────────────────────── */
.about-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  column-gap: 1.1rem;
  row-gap: 1.25rem;
  align-items: center;
}
.about-body { grid-column: 1 / -1; }

@media (min-width: 40rem) {
  .about-grid {
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
  }
  .portrait { grid-row: 1 / span 2; }
  .about-body { grid-column: 2; }
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  background: rgba(255, 255, 255, 0.04);
}
.portrait--placeholder {
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  color: var(--muted);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.5rem;
  line-height: 1.6;
}

/* ── CV: the "I built this" artifact ────────────────────────── */
.artifact {
  margin-top: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.artifact img { width: clamp(48px, 12vw, 64px); height: auto; flex-shrink: 0; }
.artifact .name { font-size: 1rem; letter-spacing: 0.01em; }
.artifact .tagline {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ── Links ──────────────────────────────────────────────────── */
.panel-link {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: border-color 180ms ease;
}
.panel-link:hover,
.panel-link:focus-visible { border-bottom-color: var(--fg); }

.backlink {
  display: inline-block;
  margin-top: 2.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 180ms ease;
}
.backlink:hover,
.backlink:focus-visible { color: var(--fg); }

/* ── Domain, bottom right ───────────────────────────────────── */
footer {
  align-self: flex-end;
  font-size: clamp(0.8rem, 1.5vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.01em;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}
footer a:hover,
footer a:focus-visible { color: var(--fg); }

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