:root {
  --bg: #ffffff;
  --fg: #0b0b0c;
  --muted: #6e6e73;
  --faint: #d9d9de;
  --accent: #000066;
  --accent-2: #005577;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #ededee;
    --muted: #8e8e93;
    --faint: #2a2a2e;
    --accent: #8fa8ff;   /* navy lifted for contrast on black */
    --accent-2: #5fb3cc; /* teal lifted for contrast on black */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
main {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 9rem) 1.25rem 3rem;
  flex: 1;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: text-decoration-color .2s, color .2s; }
a:hover, a:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

/* The sentence */
.sentence {
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.sentence .domain { color: var(--fg); text-decoration: none; }
.sentence .completion { color: var(--muted); }
.sentence .path { color: var(--accent); }
.sentence s { color: var(--muted); text-decoration-thickness: 0.06em; }
.sentence.small { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-bottom: 3rem; }

.caret {
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  margin-left: 0.08em;
  vertical-align: -0.06em;
  background: var(--accent);
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* Home */
body.home main { display: flex; flex-direction: column; justify-content: center; padding-top: 0; padding-bottom: 0; }
body.home .paths { margin-top: 2.5rem; }
.live {
  margin: 4rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
}
.live time { font-variant-numeric: tabular-nums; }
.live .clock { color: var(--fg); }

/* Paths as navigation: valentin.is/building ... */
.paths { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-family: var(--mono); font-size: 0.8125rem; }
.paths a { color: var(--muted); text-decoration: none; }
.paths a::before { content: "/"; color: var(--faint); margin-right: 0.1em; }
.paths a:hover, .paths a[aria-current="page"] { color: var(--accent); }

footer { width: 100%; max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 2.5rem; border-top: 1px solid var(--faint); }

/* Lists */
.list, .links, .timeline { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--faint); }
.list li:last-child { border-bottom: 1px solid var(--faint); }
.list .name { font-size: 1.25rem; }
.list .desc { grid-column: 1 / -1; color: var(--muted); margin-top: 0.15rem; }
.meta { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); align-self: baseline; }
.links li { font-size: 1.5rem; padding: 0.3rem 0; }
.links .meta { margin-left: 0.75rem; }
.quiet { color: var(--muted); }

/* Timeline (/was) */
.timeline { border-left: 1px solid var(--faint); margin-left: 0.25rem; }
.timeline li { position: relative; padding: 0 0 2.75rem 1.75rem; display: flex; flex-direction: column; gap: 0.3rem; }
.timeline li::before { content: ""; position: absolute; left: -4.5px; top: 0.45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); border: 1px solid var(--muted); }
.timeline li.now-entry::before { background: var(--accent); border-color: var(--accent); }
.timeline .range { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.timeline .line { font-size: clamp(1.25rem, 3.4vw, 1.75rem); line-height: 1.3; }
.timeline .line a { text-decoration: none; }

/* Prose */
.prose { max-width: 36rem; }
.prose h1 { font-weight: 400; font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.25rem; }
.prose h1 + .meta { margin: 0 0 2rem; }
.prose h2 { font-weight: 400; font-size: 1.25rem; margin: 2.5rem 0 0.5rem; }
.prose p { margin: 0 0 1.2em; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--accent-2); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.85em; }

/* Placeholders that still need confirming. Visible on purpose. */
mark.todo { background: none; color: #b00020; font-family: var(--mono); font-size: 0.7em; letter-spacing: 0.04em; border: 1px dashed currentColor; border-radius: 3px; padding: 0 0.3em; vertical-align: 0.15em; }

/* Legal */
.legal { display: flex; gap: 1.25rem; font-family: var(--mono); font-size: 0.6875rem; margin-top: 1.25rem; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover, .legal a[aria-current="page"] { color: var(--accent); }
body.home footer { border-top: 0; padding-top: 0; }
body.home footer .legal { margin-top: 0; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { margin: 0.2em 0; }
.legal-text { font-size: 1rem; }
.legal-text h2 { font-size: 1.125rem; }
