/* christopherwolter.com — hand-built static site */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..700;1,6..72,300..700&display=swap');

:root {
  --ink: #1f2024;
  --ink-soft: #55565c;
  --paper: #ffffff;
  --paper-edge: #f0f0ee;
  --rule: #d8d8d4;
  --curtain: #6e1f2e;        /* links, one accent */
  --curtain-deep: #4b1420;
  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e7e2;
    --ink-soft: #a8a6a0;
    --paper: #161618;
    --paper-edge: #1e1e21;
    --rule: #333336;
    --curtain: #d88a97;
    --curtain-deep: #ecb3bc;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: 1.1875rem;
  line-height: 1.55;
  font-weight: 400;
  font-optical-sizing: auto;
}

a {
  color: var(--curtain);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--curtain-deep); }
a:focus-visible { outline: 2px solid var(--curtain); outline-offset: 3px; }

/* ---------- frame ---------- */

.frame {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 4rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  min-height: 100vh;
}

/* ---------- masthead + nav ---------- */

.mast { position: sticky; top: 3.5rem; align-self: start; }

.mast .name {
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.mast .name small {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0.25rem;
  font-style: italic;
}

.nav { margin-top: 2.25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0 0 0.35rem; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--curtain);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

.nav-toggle { display: none; }

/* ---------- main ---------- */

main { max-width: var(--measure); }

h1 {
  font-size: 2.25rem;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 500;
  margin: 2.75rem 0 0.75rem;
}

p { margin: 0 0 1.25rem; }

.lede {
  font-size: 1.45rem;
  line-height: 1.4;
  font-weight: 300;
  margin-bottom: 1.75rem;
}

/* home: the one big sentence */
.hero {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  font-weight: 300;
  letter-spacing: -0.012em;
  margin: 0 0 2.5rem;
  max-width: 24ch;
}
.hero em { font-style: italic; font-weight: 300; }

figure { margin: 2.5rem 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 2px; }
figure.portrait { max-width: 18rem; }
figure.portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.5rem; font-style: italic; }

.placeholder {
  background: var(--paper-edge);
  border: 1px dashed var(--rule);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
  aspect-ratio: 3 / 2;
}
figure.portrait .placeholder { aspect-ratio: 4 / 5; }

/* writing & talks list */
.entries { list-style: none; margin: 0; padding: 0; }
.entries li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.entries li:last-child { border-bottom: 1px solid var(--rule); }
.entries .when {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}
.entries .what {
  display: block;
  font-size: 1.2rem;
  line-height: 1.3;
}
.entries .where {
  display: block;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
.entries p { margin: 0.6rem 0 0; font-size: 1.05rem; }

/* contact */
.contact-block { margin: 2rem 0; line-height: 1.6; }
.contact-block a { word-break: break-word; }

/* footer */
.foot {
  grid-column: 1 / -1;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}
.foot a { color: inherit; }

/* ---------- small screens ---------- */

@media (max-width: 48rem) {
  .frame {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.75rem 1rem 3rem;
  }
  .mast { position: static; }
  .nav { margin-top: 1rem; }
  .nav ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
  .nav li { margin: 0; }
  body { font-size: 1.125rem; }
  h1 { font-size: 1.9rem; }
  .hero { max-width: none; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 120ms ease; }
}
