/*
 * Blog pages. The :root tokens, base, nav, and footer rules mirror the inline
 * CSS in home.html; content.test.ts checks the :root block matches, so change
 * both together.
 */
:root {
  --night: #080d0c;
  --deep: #101814;
  --paper: #eee8d8;
  --muted: #aba895;
  --gold: #d8ad55;
  --pale: #f3d58a;
  --sage: #758f75;
  --line: rgba(238, 232, 216, 0.14);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  font-family: "IM Fell English", serif;
  font-weight: 400;
}
.kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav: in flow here; home.html positions it absolutely over the hero. */
nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid #ffffff16;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-icon {
  width: 34px;
  height: 42px;
  color: var(--gold);
  filter: drop-shadow(0 0 9px #d8ad5545);
}
.brand-copy {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: "IM Fell English", serif;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.2em;
}
.brand-pronunciation {
  align-self: flex-end;
  margin-top: 5px;
  color: #9d9a8c;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 12px;
}
.navlinks a:not(.navcta) {
  color: #ffffffa8;
}
.navlinks a[aria-current="page"] {
  color: var(--pale);
}
.navcta {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e6c4777a;
  padding: 12px 18px;
  color: var(--pale);
  transition: 0.2s;
}
.navcta:hover {
  background: #d8ad551a;
  border-color: var(--gold);
}

/* Reading column */
.page {
  width: min(720px, calc(100% - 48px));
  margin: auto;
  padding: clamp(60px, 9vw, 110px) 0 clamp(80px, 11vw, 140px);
}
.page h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 18px 0 24px;
}
.page p,
.page li {
  color: #d3cebf;
  font-size: 18px;
  line-height: 1.7;
}
.page a {
  color: var(--pale);
  border-bottom: 1px solid #f3d58a55;
}
.page .kicker {
  color: var(--gold);
  font-size: 11px;
  line-height: 1.4;
}
.page .kicker a {
  color: inherit;
  border: 0;
}
.page .byline,
.page .post-meta,
.page .rss-note {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.post h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  margin: 56px 0 16px;
}
.post h3 {
  font-size: 24px;
  margin: 40px 0 12px;
}
.post img {
  max-width: 100%;
  height: auto;
}
.post blockquote {
  margin: 28px 0;
  padding-left: 22px;
  border-left: 1px solid var(--gold);
  font-family: "IM Fell English", serif;
  font-style: italic;
}
.post hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}
.post code {
  font-size: 0.9em;
  background: #ffffff0d;
  padding: 2px 5px;
}
.post-list {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
}
.post-list li {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.post-list li p {
  margin: 8px 0 0;
}
.post-list li > a {
  font-family: "IM Fell English", serif;
  font-size: 28px;
  line-height: 1.2;
  color: var(--paper);
  border: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 55px clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: #777c70;
  font-size: 11px;
}
.footer-brand {
  font-family: "IM Fell English", serif;
  color: var(--paper);
  font-size: 22px;
  letter-spacing: 0.18em;
}
.footer-links {
  display: flex;
  gap: 25px;
}

@media (max-width: 820px) {
  .navlinks a:not(.navcta) {
    display: none;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 35px;
  }
}

/* App-aligned celestial visual system */
:root {
  --night: #050a18;
  --deep: #0b1228;
  --paper: #f4f0e8;
  --muted: #aeb7d4;
  --gold: #f1b84b;
  --pale: #ffd783;
  --sage: #7187a8;
  --violet: #8f52ff;
  --line: rgba(184, 197, 235, 0.18);
}
body {
  min-height: 100vh;
  background-color: #050a18;
  background-image:
    linear-gradient(90deg, #050a18f5, #071024d9, #050a18ed),
    url("/assets/backgrounds/celestial-frame.jpg");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  color: var(--paper);
}
nav {
  border-bottom-color: #a8b7e829;
  background: linear-gradient(180deg, #050a18e8, #071020b8);
  backdrop-filter: blur(14px);
}
.brand-icon {
  color: var(--gold);
  filter: drop-shadow(0 0 12px #f1b84b80);
}
.navlinks a:not(.navcta) {
  color: #d7def0c7;
}
.navcta {
  border-color: #f1b84b80;
  border-radius: 14px;
  background: #0d1634a8;
  box-shadow:
    inset 0 0 20px #24346238,
    0 0 20px #0008;
}
.navcta:hover {
  background: #f1b84b1f;
  border-color: var(--gold);
  box-shadow: 0 0 22px #f1b84b30;
}
.page {
  position: relative;
  margin-top: clamp(36px, 6vw, 80px);
  margin-bottom: clamp(50px, 8vw, 100px);
  padding: clamp(48px, 7vw, 82px) clamp(24px, 5vw, 62px);
  border: 1px solid #a9b8e12e;
  border-radius: 22px;
  background: linear-gradient(145deg, #111a36df, #070d1ce8);
  box-shadow:
    inset 0 1px #ffffff0a,
    0 28px 70px #02040c78;
  backdrop-filter: blur(12px);
}
.page .kicker,
.post-list time {
  color: #c7a7ff;
}
.page p,
.page li {
  color: #c4cce2;
}
.post-list li,
.post hr {
  border-color: #9cadde2b;
}
footer {
  border-color: #9cadde26;
  background: #030713d9;
  color: #7f89a5;
  backdrop-filter: blur(10px);
}
@media (max-width: 820px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }
  .page {
    width: min(100% - 28px, 720px);
    margin-top: 24px;
    border-radius: 16px;
    backdrop-filter: none;
  }
}
