:root {
  --bg: #f1ede4; --ink: #1c2a32; --quiet: #5c6a70; --line: #cfc8b9;
  --accent: #94601f; --panel: #e9e3d6;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b141b; --ink: #e7e2d6; --quiet: #93a2a6; --line: #26343c;
    --accent: #e8c27e; --panel: #111d25; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b141b; --ink: #e7e2d6; --quiet: #93a2a6; --line: #26343c;
  --accent: #e8c27e; --panel: #111d25; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* The water */
.water { position: relative; height: min(68svh, 620px); min-height: 380px; background: #0b141b; overflow: hidden; }
.water canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.water-text { position: relative; max-width: 1080px; margin: 0 auto; padding: clamp(36px, 8vh, 84px) 24px 0; color: #ece6d8; }
.water h1 { margin: 0; font-weight: 400; font-size: clamp(56px, 9vw, 112px); line-height: .95; letter-spacing: -.045em; }
.gloss { max-width: 420px; margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: #b9c0bd; }

/* The page */
.page { max-width: 1080px; margin: 0 auto; padding: 72px 24px 24px; display: grid; gap: 72px; }
.label { margin: 0 0 22px; font: 11px/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--quiet); }
.here { max-width: 640px; font-size: 20px; line-height: 1.7; }
.here p:not(.label) { margin: 0 0 18px; }

.works { display: grid; gap: 0; }
.work { display: grid; gap: 8px; padding: 28px 0 30px; border-top: 1px solid var(--line); text-decoration: none; }
.work:last-child { border-bottom: 1px solid var(--line); }
.work-meta { font: 11px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.work-title { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; }
.work-line { font-style: italic; font-size: 19px; color: var(--quiet); }
.work-note { max-width: 600px; font-size: 17px; line-height: 1.65; }
.work:hover .work-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .14em; }

.elsewhere { max-width: 640px; font-size: 17px; line-height: 1.7; }
.elsewhere p:not(.label) { margin: 0; }

.colophon { max-width: 1080px; margin: 0 auto; padding: 48px 24px 64px; font: 13px/1.75 var(--sans); color: var(--quiet); }
.colophon p { max-width: 640px; margin: 0 0 10px; }

@media (min-width: 900px) {
  .page { grid-template-columns: 1fr 1fr; column-gap: 72px; }
  .here, .works { grid-column: 1 / -1; }
  .works { grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
  .works .label { grid-column: 1 / -1; }
  .works .work { grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
  .work:last-child { border-bottom: 0; }
  .work { border-bottom: 0; }
}

/* Reading pages */
.top { max-width: 1080px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; font: 11px/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--quiet); border-bottom: 1px solid var(--line); }
.top a { text-decoration: none; }
.top a:hover { color: var(--accent); }
.reading { max-width: 680px; margin: 0 auto; padding: 64px 24px 40px; }
.reading h1 { font-weight: 400; font-size: clamp(42px, 6vw, 68px); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 14px; }
.reading .sub { font: 12px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--quiet); margin: 0 0 56px; }
.reading h2 { font-weight: 400; font-size: 30px; letter-spacing: -.02em; margin: 64px 0 26px; }
.reading h2::before { content: ''; display: block; width: 28px; height: 2px; background: var(--accent); margin-bottom: 22px; }
.reading p { font-size: 20px; line-height: 1.75; margin: 0 0 16px; }
.reading details { margin: 36px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.reading summary { cursor: pointer; font: 13px/1.6 var(--sans); color: var(--quiet); }
.reading summary:hover { color: var(--accent); }
.reading figure { margin: 20px 0 0; }
.reading img { width: 100%; height: auto; display: block; }
.reading figcaption { font: 13px/1.7 var(--sans); color: var(--quiet); margin-top: 12px; }
.reading .end { margin-top: 72px; font: 13px/1.7 var(--sans); color: var(--quiet); }
