:root {
  --ink: #1f2a44;
  --text: #2b2f36;
  --muted: #6b7280;
  --line: #e7e5e0;
  --bg: #fdfcfa;
  --tint: #f4f1ec;
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; }
a { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }

.site-head { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 22px 16px; border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.site-head nav { display: flex; gap: 22px; }
.site-head nav a { text-decoration: none; color: var(--text); font-size: 0.95rem; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.masthead { padding: 64px 0 24px; border-bottom: 1px solid var(--line); }
.masthead h1 { margin: 0; color: var(--ink); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; }
.masthead p { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--muted); text-wrap: pretty; }

.list-head { padding: 48px 0 8px; }
.list-head h1 { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.list-head p { color: var(--muted); margin: 8px 0 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 32px; padding: 36px 0 72px; }
.card-img img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.card-text { padding-top: 14px; }
.card-tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card h2 { font-size: 1.25rem; line-height: 1.3; margin: 6px 0 8px; letter-spacing: -0.01em; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card time { font-size: 0.85rem; color: var(--muted); }

.post { max-width: 720px; margin: 0 auto; padding: 56px 0 80px; }
.post-tag { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.post h1 { color: var(--ink); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -0.025em; margin: 10px 0 16px; }
.excerpt { font-size: 1.2rem; color: var(--muted); margin: 0 0 24px; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.byline a { font-weight: 600; text-decoration: none; }
.byline span { display: block; color: var(--muted); }
.feature { margin: 36px 0; }
.feature img { width: 100%; border-radius: 4px; }
.feature figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 8px; }

.content { font-family: var(--serif); font-size: 1.16rem; line-height: 1.75; }
.content p { margin: 0 0 1.4em; }
.content h2, .content h3 { font-family: var(--sans); color: var(--ink); line-height: 1.3; letter-spacing: -0.015em; margin: 2em 0 0.6em; }
.content h2 { font-size: 1.55rem; }
.content h3 { font-size: 1.25rem; }
.content blockquote { margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 3px solid var(--ink); font-style: italic; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.content li { margin-bottom: 0.5em; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.content figure { margin: 2em 0; }
.content figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.tags a { font-size: 0.85rem; text-decoration: none; padding: 4px 12px; border-radius: 999px; background: var(--tint); }
.tags a:hover { background: var(--line); }

.site-foot { border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.9rem; padding: 32px 16px 48px; }
.site-foot p { margin: 4px 0; }

.feed-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 1.6em; padding: 14px 16px; background: var(--tint); border-radius: 6px; font-family: var(--sans); }
.feed-box code { flex: 1 1 260px; font-size: 0.95rem; color: var(--ink); overflow-wrap: anywhere; }
.feed-box button { font: 600 0.9rem var(--sans); color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.feed-box button:hover { opacity: 0.9; }
.nowrap { white-space: nowrap; }

.finder { padding: 28px 0 0; }
.search input { width: 100%; max-width: 360px; font: inherit; font-size: 1rem; line-height: 1.3; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.search input:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.topic { font-size: 0.8rem; line-height: 1.4; text-decoration: none; color: var(--text); background: var(--tint); border: 1px solid transparent; border-radius: 999px; padding: 3px 11px; }
.topic:hover { border-color: var(--ink); }
.topic[aria-pressed="true"] { background: var(--ink); color: #fff; }
.finder-note { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
.finder + .cards { padding-top: 16px; }
.card[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .masthead { padding-top: 16px; }
  .masthead h1 { font-size: 7.4vw; white-space: nowrap; }
}

/* Phone menu: the three links fold behind a button with three lines. */
.menu-button { display: none; }
@media (max-width: 600px) {
  .site-head { padding: 14px 16px; }
  .has-menu .menu-button { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; background: none; border: 0; cursor: pointer; color: var(--ink); }
  .bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; }
  .bars::after { top: 6px; }
  .menu-open .bars { background: transparent; }
  .menu-open .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .has-menu nav { display: none; }
  .has-menu.menu-open nav { display: flex; flex-direction: column; gap: 0; width: 100%; }
  .has-menu.menu-open nav a { padding: 10px 0; font-size: 1rem; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .bars, .bars::before, .bars::after { transition: none; } }

/* The home page has the big title, so the small name in the top bar is left out there. */
.on-home .logo-name { display: none; }

.symbol { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Home page: the title area is a night sky opening into dawn. */
:root { --night: #141b33; }
body { overflow-x: clip; }
.sky {
  margin: 0 calc(50% - 50vw); padding: 0 calc(50vw - 50%) 20px;
  background: linear-gradient(180deg, var(--night) 0%, #232549 50%, #352f55 85%, #45375e 100%);
}
.sky .masthead { padding: 24px 0 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.sky .finder { padding-top: 20px; }
.sky .masthead h1 { color: #fdfcfa; font-weight: 600; letter-spacing: -0.01em; }
.sky .masthead p { color: rgba(240, 210, 160, 0.85); font-size: clamp(1rem, 2.2vw, 1.3rem); letter-spacing: 0.01em; }
.sky .search input { border-color: transparent; }
.sky .topic { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.16); }
.sky .topic:hover { border-color: rgba(255, 255, 255, 0.6); }
.sky .topic[aria-pressed="true"] { background: #fdfcfa; color: var(--ink); }
.sky .finder-note { color: #f1e9e1; margin-bottom: -10px; }
.sky + .cards { padding-top: 28px; }
.sky .search input:focus { outline-color: #e9c9a0; }
/* The top bar is a strip of night sky on every page. */
.site-head { background: var(--night); box-shadow: 0 0 0 100vmax var(--night); clip-path: inset(0 -100vmax); border-bottom: 0; }
.site-head.on-home { box-shadow: 0 2px 0 100vmax var(--night); clip-path: inset(0 -100vmax -2px); }
/* The top bar and the sky are separate pieces; overlap them and keep night behind the seam so no hairline shows. */
.sky { margin-top: -1px; padding-top: 1px; }
body:has(.on-home) { background: linear-gradient(var(--night) 0 240px, var(--bg) 240px); }
.site-head .logo { color: #f3ece4; }
.site-head .symbol { color: #f0c27a; }
.site-head nav a, .site-head .menu-button { color: #ece4da; }
.site-head nav a:hover { color: #fff; }
.site-head.menu-open nav a { border-top-color: rgba(255, 255, 255, 0.14); }
.sky .finder-note:empty { display: none; }
@media (max-width: 600px) {
  .sky .masthead { padding-top: 4px; padding-bottom: 18px; }
  .sky .finder { padding-top: 18px; }
}
.folded .extra { display: none; }
.more-topics { font: inherit; font-size: 0.8rem; line-height: 1.4; padding: 3px 11px; border-radius: 999px; cursor: pointer; background: none; color: var(--ink); border: 1px dashed var(--muted); }
.sky .more-topics { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.more-topics:hover { border-style: solid; }
.folded .extra[aria-pressed="true"] { display: inline-block; }
