/* andrewyasrebi.com — the whole visual system.
   Palette and type scale are fixed by docs/2026-08-19-design.md. */

:root {
  --ink:   #1a1a18;
  --muted: #6b6862;
  --paper: #faf8f5;
  --rule:  #e4e0d8;
  --rust:  #b4522d;
  --stroke: #918b78;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --column: 46rem;
  --column-wide: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:   #e8e4dc;
    --muted: #9a958b;
    --paper: #15140f;
    --rule:  #302d26;
    --rust:  #e07a4f;
    --stroke: #6d6757;
  }
}

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

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

body {
  margin: 0;
  padding: 3rem 1.5rem 5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
}

@media (min-width: 40rem) {
  body { padding: 4.5rem 2.5rem 6rem; }
}

.wrap { max-width: var(--column); margin: 0 auto; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---- masthead ---------------------------------------------------------- */

h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.role {
  margin: 0.35rem 0 0;
  font-size: 1.0625rem;
  color: var(--muted);
}

.pitch {
  margin: 1.75rem 0 0;
  font-size: 1.375rem;
  line-height: 1.45;
  max-width: 34rem;
}

.bio {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 34rem;
  color: var(--muted);
}

/* ---- sections ---------------------------------------------------------- */

section { margin-top: 4rem; padding-top: 4rem; border-top: 1px solid var(--rule); }

.label {
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---- numbers strip ----------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
}

@media (min-width: 40rem) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat-num {
  display: block;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---- project rows (not cards) ------------------------------------------ */

.rows { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}

.row-title { font-size: 1.1875rem; font-weight: 600; }

.row-outcome {
  grid-column: 1;
  margin-top: 0.3rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.row-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--rust);
  font-size: 1.25rem;
  transition: transform 120ms ease-out;
}

.row:hover .row-arrow,
.row:focus-visible .row-arrow { transform: translateX(4px); }

.row:hover .row-title { color: var(--rust); }

@media (prefers-reduced-motion: reduce) {
  .row-arrow { transition: none; }
}

/* ---- platform list ----------------------------------------------------- */

.group-label {
  margin: 0 0 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.group-label + .platforms + .group-label { margin-top: 1.75rem; }

.platforms {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- contact ----------------------------------------------------------- */

.contact { font-size: 1.1875rem; }

/* ---- case study -------------------------------------------------------- */

.case-outcome {
  margin: 1.5rem 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.figure {
  max-width: var(--column-wide);
  margin: 2.5rem 0;
}

.figure svg { width: 100%; max-width: 30rem; height: auto; display: block; }

.figcaption {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.stack {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.backlink {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
}

/* ---- diagram primitives — SVGs inherit these, so dark mode is free ------ */

.node { fill: var(--paper); stroke: var(--stroke); stroke-width: 1.5; }
.node-hot { fill: var(--paper); stroke: var(--rust); stroke-width: 1.5; }
.node-label { fill: var(--ink); font-family: var(--sans); font-size: 17px; }
.edge { stroke: var(--stroke); stroke-width: 1.5; fill: none; }
.edge-hot { stroke: var(--rust); stroke-width: 1.5; fill: none; }
.label-hot { fill: var(--rust); font-family: var(--sans); font-size: 16px; }
.edge-label { fill: var(--muted); font-family: var(--sans); font-size: 16px; }
.arrow { fill: var(--stroke); }
.arrow-hot { fill: var(--rust); }

/* ---- focus ------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}

.row:focus-visible { outline-offset: -2px; }
