:root {
  --bg: #e9eef2;
  --bg-deep: #dfe7ee;
  --ink: #172033;
  --ink-soft: #4a5568;
  --accent: #7a4e63;
  --accent-soft: rgba(122, 78, 99, 0.14);
  --line: rgba(23, 32, 51, 0.12);
  --paper: rgba(255, 255, 255, 0.55);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --measure: 38rem;
  --page: min(72rem, calc(100% - 2.5rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.7;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(122, 78, 99, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(90, 130, 160, 0.16), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.page-shell {
  width: var(--page);
  margin: 0 auto;
  padding: 2.75rem 0 4rem;
  animation: rise 700ms ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header {
  margin-bottom: 2.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.brand a:hover {
  color: var(--accent);
}

.hero-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-lede {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

.header-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-main {
  min-height: 40vh;
}

.archive-intro {
  max-width: 36rem;
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper);
  border-left: 3px solid var(--accent);
}

.archive-intro p {
  margin: 0;
  color: var(--ink-soft);
}

.year-block {
  margin-bottom: 2.75rem;
  animation: rise 800ms ease both;
}

.year-block:nth-child(2) { animation-delay: 40ms; }
.year-block:nth-child(3) { animation-delay: 80ms; }
.year-block:nth-child(4) { animation-delay: 120ms; }
.year-block:nth-child(5) { animation-delay: 160ms; }

.year-heading {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.post-list li {
  border-bottom: 1px solid var(--line);
}

.post-link {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0.15rem;
  color: inherit;
  text-decoration: none;
}

.post-link:hover .post-title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-date {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.post-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.35;
}

.post {
  max-width: var(--measure);
}

.post-header {
  margin-bottom: 1.75rem;
}

.post-heading {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.post-body {
  font-size: 1.125rem;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote {
  margin: 0 0 1.15rem;
}

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.post-body blockquote {
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--accent-soft);
  color: var(--ink-soft);
}

.post-body a {
  text-decoration-color: rgba(122, 78, 99, 0.45);
}

.post-body a:hover {
  text-decoration-color: currentColor;
}

.post-nav {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.not-found {
  max-width: var(--measure);
}

.not-found h1 {
  font-family: var(--serif);
  font-size: 2.25rem;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1.5rem, 72rem);
    padding-top: 1.75rem;
  }

  .post-link {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 1rem 0;
  }

  .brand {
    margin-bottom: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page-shell,
  .year-block {
    animation: none;
  }

  a {
    transition: none;
  }
}
