:root {
  --paper: #f4f0e8;
  --paper-deep: #e9e2d6;
  --ink: #17201f;
  --muted: #66706d;
  --line: rgba(23, 32, 31, 0.14);
  --surface: rgba(255, 255, 255, 0.55);
  --accent: #176b72;
  --accent-soft: #b9e0dd;
  --accent-ink: #073d42;
  --shadow: 0 28px 80px rgba(26, 40, 38, 0.12);
  --radius: 28px;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.theme-node11 {
  --paper: #f7f1e7;
  --paper-deep: #eee1d2;
  --ink: #28201c;
  --muted: #76675f;
  --line: rgba(40, 32, 28, 0.14);
  --surface: rgba(255, 253, 249, 0.62);
  --accent: #a14831;
  --accent-soft: #efc8a9;
  --accent-ink: #5a1f14;
  --shadow: 0 28px 80px rgba(75, 45, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, color-mix(in srgb, var(--accent-soft) 34%, transparent), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.76), transparent 27rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 58%);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

img {
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  background: var(--accent-soft);
  box-shadow: 5px 5px 0 var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}

.page-shell {
  padding: 32px 0 100px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 30px;
  height: 1px;
  content: "";
  background: currentColor;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(54px, 8vw, 120px);
  padding: 70px 0 96px;
}

.hero h1,
.page-title,
.article-title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(62px, 8.4vw, 124px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.hero h1 em,
.page-title em {
  color: var(--accent);
  font-weight: inherit;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button.primary {
  color: white;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--accent-soft);
}

.button.secondary {
  background: var(--surface);
}

.button:hover {
  color: inherit;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--accent-soft);
}

.button.primary:hover {
  color: white;
}

.signal-panel {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-panel::before,
.signal-panel::after {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  border-radius: 50%;
  content: "";
}

.signal-panel::before {
  width: 310px;
  height: 310px;
  top: -70px;
  right: -70px;
  box-shadow:
    0 0 0 42px color-mix(in srgb, var(--accent-soft) 28%, transparent),
    0 0 0 84px color-mix(in srgb, var(--accent-soft) 18%, transparent);
}

.signal-panel::after {
  width: 12px;
  height: 12px;
  top: 82px;
  right: 82px;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-soft) 70%, transparent);
}

.panel-index {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 72px;
  font-style: italic;
  letter-spacing: -0.06em;
}

.panel-note {
  position: relative;
  z-index: 1;
  max-width: 24ch;
  margin: 0;
  color: var(--muted);
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 50px;
  margin-bottom: 54px;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.note-card {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.note-card:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(32, 40, 38, 0.1);
  transform: translateY(-6px);
}

.note-number {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 38px;
  font-style: italic;
}

.note-card h3 {
  margin: auto 0 16px;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.principle {
  min-height: 250px;
  padding: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.1em;
}

.principle h3 {
  margin: 52px 0 12px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.principle p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
}

.quote-block {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 54px;
  align-items: end;
  padding: clamp(38px, 7vw, 86px);
  border-radius: var(--radius);
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.quote-block blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.quote-block p {
  margin: 0;
  color: color-mix(in srgb, white 70%, var(--accent-soft));
}

.page-hero {
  padding: 100px 0 84px;
}

.page-title {
  max-width: 13ch;
  font-size: clamp(58px, 8vw, 106px);
}

.page-lede {
  max-width: 680px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 22px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(48px, 8vw, 110px);
  align-items: start;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.article-title {
  max-width: 13ch;
  font-size: clamp(50px, 7vw, 92px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-body {
  max-width: 760px;
}

.article-body > p:first-child {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.48;
}

.article-body h2 {
  margin: 64px 0 18px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.article-body p,
.article-body li {
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

.article-body ul {
  padding-left: 1.2em;
}

.article-body li + li {
  margin-top: 10px;
}

.article-aside {
  position: sticky;
  top: 112px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.article-aside strong {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-aside a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: var(--accent);
}

.text-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.text-grid h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
}

.prose {
  max-width: 720px;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--muted);
}

.not-found {
  min-height: calc(100vh - 260px);
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found-code {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(100px, 25vw, 260px);
  font-style: italic;
  letter-spacing: -0.09em;
  line-height: 0.72;
}

.not-found h1 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
}

.not-found p {
  max-width: 480px;
  margin: 0 auto 30px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 52px 0;
}

.footer-brand {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
}

.footer-copy,
.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
  font-size: 13px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .hero,
  .section-head,
  .quote-block,
  .text-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 80px;
  }

  .signal-panel {
    min-height: 330px;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .note-card {
    min-height: 310px;
  }

  .article-aside {
    position: static;
    order: -1;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 72px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
    border-radius: 12px;
  }

  .site-nav a:hover {
    background: var(--surface);
  }

  .hero h1 {
    font-size: clamp(54px, 18vw, 82px);
  }

  .hero {
    padding: 56px 0 70px;
    gap: 50px;
  }

  .section {
    padding: 70px 0;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .quote-block {
    padding: 34px 26px;
  }

  .page-hero {
    padding: 68px 0 58px;
  }

  .article-layout {
    padding-top: 58px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111817;
    --paper-deep: #18211f;
    --ink: #edf2ed;
    --muted: #aab7b2;
    --line: rgba(237, 242, 237, 0.14);
    --surface: rgba(28, 39, 36, 0.74);
    --accent: #77c8c2;
    --accent-soft: #285f5c;
    --accent-ink: #9de2dc;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  }

  .theme-node11 {
    --paper: #1e1714;
    --paper-deep: #2b201b;
    --ink: #f6eee8;
    --muted: #c6b3a8;
    --line: rgba(246, 238, 232, 0.14);
    --surface: rgba(47, 34, 28, 0.72);
    --accent: #e59677;
    --accent-soft: #6e3f31;
    --accent-ink: #f2b49c;
  }

  .note-card:hover {
    background: rgba(41, 55, 51, 0.9);
  }
}
