/* vta.dev — one stylesheet for both pages. No web fonts, no third-party
   requests: the privacy page promises that, so the site keeps it. */

/* Spectral by Production Type, SIL OFL 1.1 (fonts/OFL.txt). Latin subset,
   served from this site so pages still load nothing from elsewhere. Only
   400 and 500 ship; bold text resolves to 500 instead of a faux bold. */
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/spectral-400.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/spectral-500.woff2") format("woff2");
}

:root {
  --paper: #eceFea;
  --ink: #17201e;
  --muted: #56625e;
  --line: #c6cdc6;
  --led: #f0a500;
  --led-line: #d18f00;
  --led-glow: rgb(240 165 0 / 0.55);

  --serif: "Spectral", Charter, "Sitka Text", Cambria, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  color-scheme: light dark;
}

/* Dark palette. theme.js sets data-theme from the visitor's local clock;
   without JS the system setting decides. */
:root[data-theme="dark"] {
  --paper: #151b1a;
  --ink: #e3e8e4;
  --muted: #9aa6a1;
  --line: #2f3836;
  --led-line: #f0a500;
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #151b1a;
    --ink: #e3e8e4;
    --muted: #9aa6a1;
    --line: #2f3836;
    --led-line: #f0a500;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.62;
  font-kerning: normal;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  transition: background-color 0.6s ease, color 0.6s ease;
}

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / footer (sans, small, quiet) ---------- */

.site-head,
.site-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-head {
  padding-top: 1.5rem;
}

.site-foot {
  margin-top: 6rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.site-head a,
.site-foot a {
  color: inherit;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

/* ---------- Links and focus ---------- */

/* Links: ink text on an amber underline that thickens on hover, the same
   accent as the status light and the pointer glow behind the card. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--led-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 0.15s ease;
}

a:hover {
  text-decoration-thickness: 3px;
}

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

/* ---------- The status light: the full stop in "vta.dev" ---------- */

.led {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin: 0 0.035em;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0.12em 0.02em var(--led-glow), 0 0 0.5em 0.06em var(--led-glow);
  vertical-align: baseline;
}

/* ---------- Home: the card ---------- */

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.dots {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.card,
.home-foot {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter);
}

.card {
  align-self: center;
  justify-self: start;
  margin-left: clamp(0rem, 8vw, 8rem);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.card h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.75rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
}

hgroup {
  margin: 0;
}

/* Second level: the tagline, in the name's serif, a step down in size. */
.tagline {
  margin: 1.25rem 0 0;
  font-size: clamp(1.375rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Third level: work history, set like preformatted text. */
.work {
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  /* shrinks on phones so each line stays on one line, like real <pre> */
  font-size: clamp(0.75rem, 3.4vw, 0.875rem);
  line-height: 1.75;
  color: var(--muted);
  text-wrap: balance;
}

.links {
  display: flex;
  gap: 0.5rem;
  /* pull the first icon's outer stroke onto the text's left edge:
     (52px box - 32px svg) / 2 + 1.25/24 of 32px = ~11.7px */
  margin: 2rem 0 0 -11.5px;
  padding: 0;
  list-style: none;
}

/* Icon links: thin ink outlines that light up amber, like the dots under
   the pointer. 52px hit area around a 32px icon. */
.icon-link {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--ink);
  transition: color 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.icon-link svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link .fill {
  fill: currentColor;
  stroke: none;
}

.icon-link:hover,
.icon-link:focus-visible {
  color: var(--led);
  filter: drop-shadow(0 0 6px var(--led-glow));
  transform: translateY(-1px);
}

.icon-link:focus-visible {
  outline-offset: 0;
}

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

  .icon-link:hover,
  .icon-link:focus-visible {
    transform: none;
  }
}

.home-foot {
  padding-bottom: 1.5rem;
  margin-left: clamp(0rem, 8vw, 8rem);
  font-family: var(--sans);
  font-size: 0.8125rem;
}

.home-foot a {
  color: var(--muted);
}

/* ---------- Toast ---------- */

/* Inverted pill with the amber status light; rises in, fades out. Kept in
   the accessibility tree (opacity, not visibility) so the live region is
   announced. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 4.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.22);
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 6px var(--led-glow);
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-shown {
    transform: translate(-50%, 0);
    transition: opacity 0.2s ease;
  }
}

/* ---------- Prose column ---------- */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin: 4rem 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 2.25rem 0 0.25rem;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.35rem;
}

/* ---------- Privacy page ---------- */

.doc-head {
  padding: clamp(3rem, 10vh, 6rem) 0 0;
}

.doc-head h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.updated {
  margin: 1rem 0 0;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.summary {
  margin: 2.5rem 0 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--led);
  font-size: 1.3125rem;
  line-height: 1.5;
}

.prose h2[id] {
  scroll-margin-top: 1.5rem;
}

@media (max-width: 30rem) {
  body {
    font-size: 1.125rem;
  }
}
