@font-face {
  font-family: "Saira Extra Condensed";
  src: url("fonts/saira-extra-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Saira Condensed";
  src: url("fonts/saira-condensed-800.woff2") format("woff2");
  font-weight: 800;
  /* WELCOME is sized to its own metrics, so it waits for this font rather than shifting when it swaps */
  font-display: block;
}
@font-face {
  font-family: "Anek Latin";
  src: url("fonts/anek-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* A grayscale photographic hero over a white page, one bright blue. */
:root {
  --stage: #ababab;
  /* A light gray, slightly darker at the top left and warming toward the lower right, sampled from the reference */
  --stage-gradient: linear-gradient(118deg, #a3a3a3 0%, #acacac 35%, #bbbbb9 70%, #cccac8 100%);
  --stage-text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
  /* Shading that keeps white text readable on the light stage: a band behind the header,
     and a soft patch behind the hero's copy. Both fade out before the rest of the gray. */
  --stage-header-shade: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.4) 4.5rem, rgba(0, 0, 0, 0) 9rem);
  --stage-copy-shade: radial-gradient(ellipse 42% 52% at 20% 68%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0) 100%);
  --band-title-shade: radial-gradient(ellipse 80% 110% at 35% 50%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.45) 60%, rgba(0, 0, 0, 0) 100%);
  --stage-text: #ffffff;
  --hello: rgba(255, 255, 255, 0.45);
  --page: #ffffff;
  --ink: #141414;
  --muted: #5f5f5f;
  --rule: #e4e4e4;
  --card: #2e2e2e;
  --accent: #00a6f4;
  --accent: lab(63.3038% -18.433 -51.0407);
  --display: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --display-wide: "Saira Condensed", "Arial Narrow", sans-serif;
  --sans: "Anek Latin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(1.25rem, 3.8vw, 3.6rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --stage: #6c6c6c;
    --stage-gradient: linear-gradient(118deg, #646464 0%, #6c6c6c 35%, #7a7a79 70%, #8b8a89 100%);
    --stage-header-shade: linear-gradient(transparent, transparent);
    --stage-copy-shade: linear-gradient(transparent, transparent);
    --band-title-shade: linear-gradient(transparent, transparent);
    --hello: rgba(255, 255, 255, 0.22);
    --page: #121212;
    --ink: #ececec;
    --muted: #a8a8a8;
    --rule: #2c2c2c;
    --card: #2a2a2a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--page);
  scrollbar-color: var(--muted) var(--page);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #141414; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 5px; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header, on the gray stage on every page */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 2rem;
  padding: clamp(1rem, 2vw, 1.75rem) var(--gutter);
  position: relative;
  z-index: 4;
  color: var(--stage-text);
}
.site-title {
  text-shadow: var(--stage-text-shadow);
  font: 700 clamp(1.25rem, 1.7vw, 1.6rem)/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header nav { display: flex; gap: clamp(1.25rem, 3vw, 3rem); }
.site-header nav a {
  font: 500 clamp(1rem, 1.15vw, 1.15rem)/1 var(--sans);
  text-shadow: var(--stage-text-shadow);
  text-decoration: none;
  padding: 0.4rem 0;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

/* The curve that closes every gray band */

.curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 11.72vw;
  fill: var(--page);
  z-index: 1;
}

/* Homepage hero: positions follow the approved comp, in vw so the composition holds at any desktop width */

.home-top { position: relative; }

.hero {
  position: relative;
  height: max(34rem, 48.2vw);
  background: var(--stage);
  background: var(--stage-header-shade), var(--stage-copy-shade), var(--stage-gradient);
  color: var(--stage-text);
  overflow: hidden;
}
.home .site-header {
  position: absolute;
  inset: 0 0 auto 0;
}

/* The cover in colour under the title, hanging over the curve into the page */
.band-cover {
  position: relative;
  z-index: 2;
  margin: 2rem 0 -5vw;
}
.band-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.hello {
  position: absolute;
  /* Sized so the letters' ink runs exactly from one page margin to the other:
     WELCOME's ink is 3.63em wide in this face, and starts 0.014em in from its origin. */
  font: 800 calc((100vw - 2 * var(--gutter)) / 3.63)/1 var(--display-wide);
  letter-spacing: 0.01em;
  left: calc(var(--gutter) - 0.014em);
  top: 5.4vw;
  margin: 0;
  text-transform: uppercase;
  color: var(--hello);
  white-space: nowrap;
  z-index: 0;
  user-select: none;
}

.bust {
  position: absolute;
  left: 16.4vw;
  top: 2.9vw;
  width: 47.7vw;
  z-index: 1;
}
.bust-photo {
  display: block;
  width: 100%;
  height: auto;
}
.bust.is-live .bust-photo { opacity: 0; }

.hero-copy {
  position: absolute;
  left: 7vw;
  top: 24.6vw;
  width: 30vw;
  z-index: 3;
}
.name {
  margin: 0;
  font: 700 9.3vw/0.92 var(--display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}
.tagline {
  margin: 0.9vw 0 1.6vw;
  text-shadow: var(--stage-text-shadow);
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  line-height: 1.45;
  max-width: 26em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: #ffffff;
  color: #141414;
  font: 700 clamp(0.95rem, 1.05vw, 1.05rem)/1 var(--sans);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pill-primary { background: var(--accent); }
.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.pill:focus-visible { outline-color: #141414; }

.latest-card {
  position: absolute;
  left: 64.1vw;
  top: 22.7vw;
  width: 31.9vw;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  z-index: 3;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.latest-card:hover { transform: translateY(-3px); }
.latest-card .thumb {
  flex: 0 0 50%;
  width: 50%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.latest-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem;
  min-width: 0;
}
.latest-title {
  font: 700 clamp(1rem, 1.25vw, 1.3rem)/1.2 var(--sans);
}
.latest-text time {
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  color: #cfcfcf;
}
.latest-text .stat {
  font: 700 clamp(0.75rem, 0.85vw, 0.92rem)/1.3 var(--sans);
  color: var(--accent);
}

/* The canvas the face and its bits are drawn into */

.face-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Writing */

.writing {
  position: relative;
  z-index: 3;
  width: min(80.5vw, 76rem);
  margin: 0 0 0 9.8vw;
  padding: 2.5rem 0 1rem;
}
.writing h2 {
  margin: 0 0 1rem;
  font: 800 clamp(2rem, 3.4vw, 3.4rem)/1.05 var(--sans);
  letter-spacing: -0.02em;
}
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.post-list li { border-bottom: 1px solid var(--rule); }
.post-row {
  display: grid;
  grid-template-columns: clamp(9rem, 13.2vw, 13rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.6rem 0;
  text-decoration: none;
}
.post-row .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.post-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.post-title {
  font: 700 clamp(1.15rem, 1.5vw, 1.45rem)/1.25 var(--sans);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms ease-out;
}
.post-row:hover .post-title { text-decoration-color: var(--accent); }
.post-text time,
.post-text .stat {
  color: var(--muted);
  font-size: 1rem;
}

/* Inner pages: a shorter gray band with the title, closed by the same curve */

.band {
  position: relative;
  background: var(--stage);
  background: var(--stage-header-shade), var(--band-title-shade), var(--stage-gradient);
  color: var(--stage-text);
  padding-bottom: 8.5vw;
}
.band-title {
  position: relative;
  z-index: 2;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(0.5rem, 1.6vw, 1.5rem) 1.25rem 0;
}
.band-title h1 {
  margin: 0;
  text-shadow: var(--stage-text-shadow);
  font: 700 clamp(2.5rem, 5.2vw, 4.5rem)/0.95 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.band-title .meta {
  margin: 0.9rem 0 0;
  text-shadow: var(--stage-text-shadow);
  font-size: 1.05rem;
  color: #f1f1f1;
}

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 0;
}
.page p,
.page li { max-width: 66ch; }
.page h2 {
  margin: 3rem 0 0.75rem;
  font: 800 clamp(1.5rem, 2.4vw, 1.9rem)/1.15 var(--sans);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.page h3 {
  margin: 2rem 0 0.5rem;
  font: 700 1.25rem/1.3 var(--sans);
}

img { max-width: 100%; height: auto; }

.post table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.75rem 0 2.25rem;
  font-size: 1rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.post th,
.post td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.post thead th {
  background: #2e2e2e;
  color: #ffffff;
  font: 700 0.9rem/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post tbody td:first-child { font-weight: 700; }
@media (min-width: 56.01rem) {
  .post tbody td:not(:first-child) { white-space: nowrap; }
}
.post tbody tr:last-child td { border-bottom: 0; }

blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 1px solid var(--muted);
  color: var(--muted);
}

code, pre { font-family: var(--mono); font-size: 0.88em; }
code {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.5;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
pre code { background: none; padding: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.back {
  margin: 3.5rem 0 0;
  font-weight: 700;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin: 5rem auto 0;
  padding: 1.75rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }

/* Narrow screens: the hero stacks, face first, name overlapping its lower edge */

@media (max-width: 56rem) {
  .hero {
    height: auto;
    padding: 4.75rem 0 18vw;
    --stage-copy-shade: linear-gradient(to bottom, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.42) 100%);
  }
  .hello {
    top: 59.5vw;
  }
  .bust {
    position: relative;
    left: auto;
    top: auto;
    width: min(92vw, 32rem);
    margin: 0 auto;
  }
  .hero-copy {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: -27vw var(--gutter) 0;
  }
  .name { font-size: clamp(3.5rem, 19vw, 7rem); }
  .tagline { margin: 0.6rem 0 1.25rem; }
  .latest-card {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: 1.75rem var(--gutter) 0;
  }
  .latest-card .thumb { flex-basis: 42%; width: 42%; }
  .curve { height: 14vw; }
  .writing {
    width: auto;
    margin: 0 var(--gutter);
    padding-top: 1.5rem;
  }
  .post-row { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; }
  .band-cover { margin: 1.25rem 0 -11vw; }
  .band-cover img { border-radius: 10px; }
  .band {
    padding-bottom: 16vw;
    /* The short phone band leaves the date low on the light gray, so shade the whole title area evenly */
    --band-title-shade: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42));
  }
}

@media (max-width: 26rem) {
  .site-header nav { gap: 1.1rem; }
  .pill { padding: 0 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pill, .latest-card, .post-title { transition: none; }
}
