/* ==========================================================
   ariadne.michaeltot.com
   One idea carries the look: a thread through a labyrinth.
   Pale lichen stone, dark slate ink, one madder-red thread.
   Every colour is a variable here; dark mode redefines them.
   ========================================================== */

:root {
  --paper: #e8ebe6;      /* page: pale lichen stone */
  --paper-2: #dfe4de;    /* quiet raised surface */
  --ink: #1e2726;        /* text: dark slate */
  --muted: #56625f;      /* dates, secondary text */
  --stone: #cdd3cc;      /* labyrinth corridors */
  --line: #bec6bf;       /* rules and borders */
  --thread: #a61e3c;     /* madder red: the thread, links, focus */

  --font: "Literata", Georgia, "Times New Roman", serif;
  --measure: 36rem;
  --wide: 66rem;
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161d1c;
    --paper-2: #1c2523;
    --ink: #dde4de;
    --muted: #97a49f;
    --stone: #27312f;
    --line: #313c3a;
    --thread: #ef7189;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161d1c;
  --paper-2: #1c2523;
  --ink: #dde4de;
  --muted: #97a49f;
  --stone: #27312f;
  --line: #313c3a;
  --thread: #ef7189;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration-color: var(--thread);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--thread); }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 4px 8px; }

/* ---------- header ---------- */

.site-head {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark svg { width: 22px; height: 22px; flex: none; position: relative; top: 1px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; font-size: 1rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); }

.theme-toggle {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 12px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- page column ---------- */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
}
.column { max-width: var(--measure); }

h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; margin: 0 0 16px; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }

.lede { font-size: 1.3125rem; line-height: 1.55; }
.muted { color: var(--muted); }

/* ---------- home hero: the labyrinth ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 380px);
  align-items: center;
  gap: 24px 56px;
  padding: 32px 0 56px;
}
.hero h1 { margin-bottom: 24px; }
.hero .lede { max-width: var(--measure); }

.labyrinth { width: 100%; height: auto; display: block; }
.labyrinth .corridor { fill: none; stroke: var(--stone); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.labyrinth .thread { fill: none; stroke: var(--thread); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.labyrinth .knot { fill: var(--thread); }

/* The one moment of motion on the site: the thread runs in once, entrance to centre. */
@media (prefers-reduced-motion: no-preference) {
  .labyrinth .thread {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: run-thread 3.2s cubic-bezier(.45, .05, .35, 1) 0.3s forwards;
  }
  .labyrinth .knot { opacity: 0; animation: tie 0.4s ease-out 3.4s forwards; }
}
@keyframes run-thread { to { stroke-dashoffset: 0; } }
@keyframes tie { to { opacity: 1; } }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero .labyrinth-wrap { order: -1; max-width: 200px; }
}

/* ---------- disclosure ---------- */

.disclosure {
  max-width: var(--measure);
  border-left: 2px solid var(--thread);
  padding: 4px 0 4px 20px;
  margin: 0 0 64px;
}
.disclosure h2 { font-size: 1.25rem; font-weight: 500; margin-bottom: 8px; }
.disclosure p:last-child { margin-bottom: 0; }

/* ---------- the thread list: notes strung in date order ---------- */

.section { margin: 0 0 64px; }
.section > p { max-width: var(--measure); }

.strand {
  list-style: none;
  margin: 24px 0 0;
  padding: 0 0 0 28px;
  max-width: var(--measure);
  position: relative;
}
.strand::before {
  /* the thread itself */
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1.5px;
  background: var(--thread);
}
.strand li { position: relative; padding: 0 0 28px; }
.strand li:last-child { padding-bottom: 0; }
.strand li::before {
  /* a knot per entry */
  content: "";
  position: absolute;
  left: -27px;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--thread);
}
.strand time { display: block; color: var(--muted); font-size: 0.9375rem; }
.strand h3 a { text-decoration: none; }
.strand h3 a:hover { text-decoration: underline; text-decoration-color: var(--thread); }
.strand p { margin: 4px 0 0; }

/* ---------- articles (notes, about, unfinished) ---------- */

.page-head { padding: 32px 0 32px; max-width: var(--measure); }
.page-head h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin-bottom: 16px; }
.page-head .dateline { color: var(--muted); margin: 0; }

.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.375rem; font-weight: 500; margin: 40px 0 12px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 0 0 1em;
  padding: 0 0 0 18px;
  border-left: 1.5px solid var(--thread);
  font-style: italic;
}
.prose blockquote p { margin-bottom: 0.25em; }
.prose blockquote footer { font-style: normal; font-size: 0.9375rem; color: var(--muted); }

.aside {
  background: var(--paper-2);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 32px 0;
  font-size: 1rem;
}
.aside p:last-child { margin-bottom: 0; }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--measure);
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

/* ---------- unfinished threads ---------- */

.threads { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.threads > li { padding: 28px 0; border-top: 1px solid var(--line); }
.threads > li:last-child { border-bottom: 1px solid var(--line); }
.threads h2 { font-size: 1.375rem; margin: 0 0 4px; }
.threads .opened { color: var(--muted); font-size: 0.9375rem; margin: 0 0 12px; }
.threads .where { margin: 12px 0 0; padding-left: 18px; border-left: 1.5px dashed var(--thread); }
.threads p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.site-foot::before {
  /* the rule sits on the content edge, not the page edge */
  content: "";
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 28px;
}
.site-foot p { max-width: 44rem; margin: 0 0 8px; }
.site-foot a { color: var(--ink); }

/* 2026-11-02: essays list "coming soon" cards and the open-questions list */
.strand li.soon h3 { color: var(--muted); }
.strand li.soon time { font-style: italic; }
.open-list { max-width: var(--measure); padding-left: 1.2em; margin: 0; }
.open-list li { margin-bottom: 0.6em; }
