:root {
  --night: #0d0d0f;
  --light: #f0ede5;
  --light-soft: #b4b0a8;
  --light-faint: #918d85;
  --glow: rgba(240, 237, 229, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  background: var(--night);
  color: var(--light-soft);
  font-family: 'Sora', 'Helvetica Neue', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  line-height: 1.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 0%,
              rgba(240, 237, 229, 0.045), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 8rem) clamp(1.5rem, 6vw, 3rem) clamp(4rem, 10vh, 7rem);
  animation: fade 0.35s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.home {
  position: absolute;
  top: clamp(1rem, 4vh, 2rem);
  left: clamp(1rem, 5vw, 3rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem;
  color: var(--light-faint);
  text-decoration: none;
  font-size: 0.95rem;
}

a { transition: color 0.2s ease, text-shadow 0.2s ease; }
a:focus-visible { outline: 2px solid var(--light-soft); outline-offset: 4px; }
.home:hover, .home:focus-visible,
.thread:hover, .thread:focus-visible {
  color: var(--light);
  text-shadow: 0 0 14px var(--glow);
}

.page-title {
  color: var(--light-faint);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.lede {
  color: var(--light);
  font-weight: 200;
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 0 26px var(--glow);
  margin-bottom: 2.6rem;
}

p {
  font-size: clamp(1rem, 2.1vw, 1.08rem);
  margin-bottom: 1.6rem;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

p a {
  color: inherit;
  text-decoration-color: var(--light-faint);
  text-underline-offset: 0.2em;
}
p a:hover, p a:focus-visible { color: var(--light); }

.coda {
  margin-top: 2.8rem;
  color: var(--light-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 0 18px var(--glow);
}

.sig {
  margin-top: 0.7rem;
  color: var(--light-faint);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-align: right;
}

.reading-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(138, 134, 126, 0.25);
}

.thread {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0;
  color: var(--light-faint);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.page--index {
  max-width: 34rem;
  padding-left: clamp(2rem, 8vw, 5rem);
  padding-right: clamp(2rem, 8vw, 5rem);
}

.page--index .lede {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 3.4rem;
}

.portrait {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  margin: 0 0 2.4rem;
  opacity: 0.85;
  display: block;
}

.entry {
  display: block;
  text-decoration: none;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(138, 134, 126, 0.25);
}
.entry:last-of-type { border-bottom: 1px solid rgba(138, 134, 126, 0.25); }
.entry-title {
  display: block;
  color: var(--light-soft);
  font-size: 1.18rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.entry-line {
  display: block;
  color: var(--light-faint);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.35rem;
}
.entry:hover .entry-title, .entry:focus-visible .entry-title {
  color: var(--light);
  text-shadow: 0 0 16px var(--glow);
}

@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
  a, .entry-title { transition: none; }
}
