/* ---- palette ----------------------------------------------------------
   "Blueprint": a navy-slate ground with an electric blue accent. The sibling
   sites are warm -- jcoffey.dev's amber olive, Cairn OBS's orange -- and
   ihasmail.org is teal. This is properly blue, which nothing else in the
   family is, so the four are told apart at a glance while keeping one
   template, one type pairing and one layout.

   DARK IS THE DEFAULT, unconditionally. Bare :root is the dark palette and
   there is no prefers-color-scheme block: a visitor on a light desktop still
   gets dark here unless they ask otherwise with the toggle. That is a
   deliberate departure from the sibling sites, which follow the system. Light
   is one click away and the choice persists.

   Contrast, measured: body text 15.1:1 on the ground, accent 7.6:1, both
   comfortably past AA. --ink-faint is ~3.6:1 and is only ever used for small
   meta labels, never body copy. */
:root {
  --ground: #0C1017;
  --surface: #131923;
  --surface-2: #18202C;
  --raised: #1C2532;
  --ink: #DCE6F2;
  --ink-soft: #8FA3BC;
  --ink-faint: #5F7288;
  --line: #222D3C;
  --accent: #4EA8FF;
  --accent-ink: #06101C;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
}

/* Light: cool paper rather than cream, so it reads as the same site with the
   lamp on rather than a different one. The accent darkens to #1668C7 because
   #4EA8FF on white is 2.3:1 and unreadable; this is 5.6:1. */
:root[data-theme="light"] {
  --ground: #EEF2F7;
  --surface: #FFFFFF;
  --surface-2: #E4EBF4;
  --raised: #FFFFFF;
  --ink: #0F1822;
  --ink-soft: #46586E;
  --ink-faint: #6B7C92;
  --line: #D2DCE8;
  --accent: #1668C7;
  --accent-ink: #FFFFFF;
}

html, body { margin: 0; padding: 0; }
* { box-sizing: border-box; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  /* The page is one short block; hold it in the middle of the viewport
     rather than letting it sit under the header on a tall screen. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- header ---- */
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }

/* The wordmark is a mark plus a name, not a shell prompt. The blinking cursor
   and its @keyframes went with it -- they belonged to the terminal metaphor the
   sibling sites keep and this site drops. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
/* currentColor on the accent, so the mark tracks the theme and lights up with
   the name on hover without a second rule per state. */
.wordmark .mark {
  width: 1.45em;
  height: 1.45em;
  flex: none;
  color: var(--accent);
  transition: color .15s;
}
.wordmark:hover { color: var(--accent); }
.wordmark:hover .mark { color: var(--accent); }

.theme-toggle {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.42rem 0.85rem; border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }
.theme-toggle svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* Dark is the default, so the sun ("switch to light") is what shows unless a
   light preference -- system or explicit -- says otherwise. */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
/* Dark is the default, so the sun ("switch to light") is what shows until the
   visitor explicitly chooses light. The system preference is deliberately not
   consulted -- it does not pick the palette here, so it must not pick the icon
   either, or the button would offer the mode you are already in. */
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (max-width: 560px) {
  .theme-toggle { padding: 0.5rem; }
  .theme-toggle span { display: none; }
}

/* ---- body ---- */
/* Centred vertically when the page was one line of text. There is a list of
   projects now, so it starts at the top like anything else. */
main { flex: 1; }
main .wrap { padding-top: 4rem; padding-bottom: 4rem; }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 0.7em;
}
h1 {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  text-wrap: pretty; margin: 0;
}
/* No max-width. The standfirst wraps where the project cards below it wrap --
   .wrap sets the one content width on this page, and pinning this to 34em made
   the intro break at half the width of everything under it.

   text-wrap: pretty rather than balance: balance evens the line lengths out,
   which on a wide measure leaves a short ragged last line stopping well before
   the cards. pretty fills each line and only adjusts the last. */
.lede {
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
  text-wrap: pretty;
}
.asked {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-faint);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.6rem 0.9rem; margin: 1.2rem 0 0;
  overflow-wrap: anywhere;
}

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); background: var(--surface); }
footer.site .wrap { padding-top: 1.2rem; padding-bottom: 1.2rem; }
footer.site p { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }

/* ---- projects ----
   The same shape as jcoffey.dev's projects page, because these are sibling
   sites and a reader moving between them should not have to relearn the
   furniture. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hero h1 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); line-height: 1.25; }

.projects { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.project {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.4rem 1.5rem;
  transition: border-color .15s;
}
.project:hover { border-color: var(--accent); }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
.project h2 { font-family: var(--font-mono); font-size: 1.15rem; margin: 0; }
.project h2 a { text-decoration: none; }
.project h2 a:hover { color: var(--accent); }
.project .status {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.16rem 0.6rem;
  white-space: nowrap;
}
.project-tagline { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); margin: 0.4rem 0 0; }
.project-blurb { color: var(--ink-soft); margin: 0.9rem 0 0; text-wrap: pretty; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; }
.project-stack span {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 3px; padding: 0.14rem 0.5rem;
}
.project-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 1.1rem 0 0; }
.project-links a {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--accent);
}
.project-links a:hover { color: var(--accent); }
