/* Anne Touchie — personal page in progress.
   Parchment and ink, one moss-green accent, one hairline crescent. Nothing else.
   Spacing scale: .8 / 1.5 / 2 / 2.6 / 3.4rem. Do not invent new gaps. */

:root {
  --paper: #f7f3ea;
  --paper-deep: #efe8da;
  --ink: #1b1a17;
  --body: #34312b;
  --muted: #6b6459;
  --rule: #ded4c1;
  --moss: #33422d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% -10%, #fbf8f1 0%, var(--paper) 46%, var(--paper-deep) 100%);
  color: var(--body);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------- masthead */

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.6rem 1.8rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-left: .3em; /* letterspacing adds trailing space; this rebalances it */
  white-space: nowrap;
}

header.site nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

header.site nav a {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: .15rem;
  transition: color .15s ease, border-color .15s ease;
}

header.site nav a:hover,
header.site nav a:focus-visible {
  color: var(--moss);
  border-bottom-color: var(--moss);
}

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

main {
  flex: 1;
  max-width: 40rem;
  padding: 2.6rem 1.8rem 2rem;
  margin: 0 auto;
  width: 100%;
}

/* hairline, crescent, hairline — the only ornament on the page */
.sigil {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--moss);
  margin: 0 0 2.6rem;
  opacity: .9;
}
.sigil .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule) 25%, var(--rule));
}
.sigil .line:last-child {
  background: linear-gradient(to left, transparent, var(--rule) 25%, var(--rule));
}

.kicker {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 1.5rem;
}

h1 {
  font-weight: 400;
  font-size: clamp(1.95rem, 5.8vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -.011em;
  margin: 0 0 1.5rem;
  color: var(--ink);
  max-width: 20ch;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  color: var(--moss);
}

.note {
  font-size: 1.06rem;
  line-height: 1.72;
  margin: 0 0 2rem;
  max-width: 44ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.rule-dot {
  width: 1.4rem;
  height: 1px;
  background: var(--moss);
  opacity: .75;
}

/* ---------------------------------------------------------------- sections */

section[id] {
  margin-top: 3.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

section h2 {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.entry-title {
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 .35rem;
}

.entry-meta {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}

.entry p:last-child {
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 0;
  max-width: 46ch;
}

/* honest placeholders: what will live here, and nothing invented */
.pending {
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
  border-left: 1px solid var(--rule);
  padding-left: 1rem;
}

/* ---------------------------------------------------------------- links */

.cite {
  display: block;
  text-decoration: none;
  color: var(--body);
  border-left: 1px solid var(--rule);
  padding: .1rem 0 .1rem 1rem;
  max-width: 46ch;
  transition: border-color .15s ease, color .15s ease;
}

.cite + .cite { margin-top: 1.5rem; }

.cite:hover,
.cite:focus-visible {
  border-left-color: var(--moss);
  color: var(--ink);
}

.cite:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

.cite-meta {
  display: block;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}

.cite-title {
  font-size: 1.06rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--rule);
  transition: border-color .15s ease;
}

.cite:hover .cite-title,
.cite:focus-visible .cite-title {
  border-bottom-color: var(--moss);
}

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

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  padding: 1.1rem 1.8rem 1.7rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nowrap { white-space: nowrap; }

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

@media (max-width: 640px) {
  header.site {
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.3rem 1.4rem 1rem;
  }
  header.site nav { gap: .9rem; justify-content: flex-start; }
  header.site nav a { font-size: .72rem; letter-spacing: .08em; }
  main { padding: 2rem 1.4rem 1.4rem; }
  .sigil { margin-bottom: 2rem; }
  h1 { max-width: none; }
  section[id] { margin-top: 2.6rem; padding-top: 1.2rem; }
  footer {
    padding: 1rem 1.4rem 1.4rem;
    font-size: .72rem;
    letter-spacing: .06em;
    flex-direction: column;
    gap: .3rem;
  }
  footer span:last-child { text-align: left; }
}

/* read in the dark, after the reading room closes */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14150f;
    --paper-deep: #0e0f0a;
    --ink: #f2ead9;
    --body: #cdc5b4;
    --muted: #aaa395;
    --rule: #34372c;
    --moss: #a3b48f;
  }
  body {
    background: radial-gradient(120% 80% at 50% -10%, #1c1e17 0%, var(--paper) 50%, var(--paper-deep) 100%);
  }
}
