:root {
  color-scheme: light;
  --page: #f6f8f6;
  --surface: #fff;
  --card: #fff;
  --ink: #111816;
  --muted: #52605a;
  --accent: #2c7667;
  --accent-strong: #1c6153;
  --accent-light: #dff0e9;
  --line: #d9e2dd;
  --shadow: 0 18px 55px rgba(29, 57, 43, .08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111b18;
  --surface: #18241f;
  --card: #20312a;
  --ink: #f7f9f5;
  --muted: #c1d1c7;
  --accent: #a4dec7;
  --accent-strong: #a4dec7;
  --accent-light: #294c3e;
  --line: #3b5549;
  --shadow: 0 18px 55px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: clamp(0px, 2vw, 30px);
  background: var(--page);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.skip { position: absolute; left: 18px; top: -80px; z-index: 20; background: var(--ink); color: var(--surface); padding: .6rem 1rem; }
.skip:focus { top: 12px; }
.site-shell {
  max-width: 1480px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: clip;
}
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 clamp(22px, 5vw, 78px);
}
.site-header { min-height: 104px; }
.wordmark { position: relative; display: inline-block; flex-shrink: 0; font-size: clamp(1.28rem, 2vw, 1.65rem); line-height: 1.15; letter-spacing: -.055em; font-weight: 850; text-decoration: none; }
.wordmark-stroke { display: block; position: absolute; width: 55%; height: 3px; right: 3%; bottom: -8px; background: var(--accent); border-radius: 70% 30% 60% 40%; transform: rotate(-4deg); }
.desktop-nav { display: flex; gap: clamp(1.2rem, 3vw, 3rem); margin-left: auto; }
.desktop-nav a { position: relative; text-decoration: none; font-weight: 650; font-size: .98rem; }
.desktop-nav a[aria-current] { color: var(--accent-strong); }
.desktop-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: var(--accent); transform: rotate(-3deg); }
.desktop-nav a:hover, .mobile-menu a:hover { color: var(--accent-strong); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.theme-toggle { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); padding: .45rem .7rem; cursor: pointer; font-size: .84rem; font-weight: 650; }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--accent-strong); stroke-width: 1.8; }
.theme-toggle:hover { background: var(--accent-light); }
.mobile-menu { display: none; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: clamp(24px, 4vw, 60px); padding: clamp(35px, 5vw, 70px) clamp(25px, 6vw, 90px) clamp(28px, 5vw, 70px); }
.hero-copy { position: relative; min-width: 0; }
.hero-kicker, .section-kicker { margin: 0 0 1.1rem; color: var(--accent-strong); font-size: .78rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { margin: 0 0 1.15rem; font-size: clamp(4.1rem, 7.3vw, 8.2rem); line-height: .9; letter-spacing: -.085em; font-weight: 900; }
.accent-dot { color: var(--accent); }
.author { margin: 1.4rem 0 .65rem; font-weight: 800; font-size: clamp(1.25rem, 2vw, 1.8rem); letter-spacing: -.04em; }
.short-stroke { display: block; width: 55px; height: 4px; background: var(--accent); transform: rotate(-2deg); border-radius: 10px; }
.hero-line { position: relative; display: inline-block; margin: 1.5rem 0 0; font-size: clamp(1.12rem, 1.9vw, 1.55rem); letter-spacing: -.035em; font-weight: 520; }
.scribble { position: absolute; width: 80px; height: 9px; right: 10%; bottom: -13px; border-top: 3px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 50%; transform: rotate(-6deg); }
.spark { position: absolute; width: 40px; height: 40px; left: -34px; top: 54px; }
.spark i { position: absolute; left: 12px; top: 2px; display: block; width: 3px; height: 23px; background: var(--accent); border-radius: 9px; transform: rotate(-32deg); }
.spark i:nth-child(2) { left: 0; top: 18px; height: 18px; transform: rotate(-58deg); }
.spark i:nth-child(3) { left: 31px; top: -3px; height: 18px; transform: rotate(-9deg); }
.hero-art { display: flex; justify-content: center; align-items: center; }
.hero-art img { width: min(100%, 430px); height: auto; filter: drop-shadow(0 14px 12px rgba(25, 54, 41, .08)); }

.thoughts-section { padding: 0 clamp(25px, 6vw, 90px) clamp(30px, 5vw, 70px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.3rem 0 2.5rem; border-top: 1px solid var(--line); }
.section-heading .section-kicker { margin-bottom: .4rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3.3vw, 3.5rem); line-height: 1.1; letter-spacing: -.065em; }
.section-heading > p { margin: 0; color: var(--muted); text-align: right; font-size: .95rem; }
.thoughts-layout { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
.margin-note, .closing-note { color: var(--accent-strong); font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; font-size: 1.3rem; font-style: italic; line-height: 1.05; transform: rotate(-8deg); }
.margin-note { padding: 1.3rem 0 0 .1rem; }
.margin-note span { display: block; margin: .2rem 0 0 2.5rem; font-size: 2.4rem; line-height: 1; }
.thought-list { position: relative; display: grid; gap: 18px; list-style: none; margin: 0; padding: 0 0 0 36px; }
.thought-list::before { content: ""; position: absolute; left: 5px; top: 28px; bottom: 34px; border-left: 2px dashed var(--line); }
.thought-row { position: relative; }
.timeline-dot { position: absolute; z-index: 1; left: -36px; top: 50%; width: 13px; height: 13px; margin-top: -6px; background: var(--accent); border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); }
.thought-row a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; align-items: center; gap: .12rem 1rem; min-height: 140px; padding: 1.2rem clamp(20px, 3vw, 44px); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--card); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.thought-row a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.thought-label { display: inline-block; width: fit-content; padding: .08rem .48rem; border-radius: 3px 7px 3px 5px; background: var(--accent-light); color: var(--ink); font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; font-size: .96rem; font-style: italic; line-height: 1.35; transform: rotate(-3deg); }
.thought-title { grid-column: 1; font-size: clamp(1.35rem, 2.2vw, 2.25rem); line-height: 1.15; font-weight: 830; letter-spacing: -.055em; }
.thought-meta { grid-column: 1; font-size: .84rem; color: var(--muted); }
.row-chevron { grid-column: 2; grid-row: 1 / 4; width: 22px; height: 22px; fill: none; stroke: var(--accent-strong); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.closing-note { margin: 2rem 0 0 auto; text-align: right; width: fit-content; }
.closing-note span { margin-left: .5rem; font-family: inherit; }
.site-footer { min-height: 95px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }

.reading-page, .about-page { max-width: 920px; min-height: 68vh; margin: 0 auto; padding: clamp(50px, 7vw, 100px) clamp(24px, 5vw, 60px) 80px; }
.back-link { display: inline-block; margin-bottom: 3.5rem; color: var(--accent-strong); text-decoration: none; font-weight: 700; }
.back-link:hover, .source-note a:hover { text-decoration: underline; }
.reading-header h1, .about-page h1 { margin: 1.1rem 0; font-size: clamp(3.2rem, 6.7vw, 6.1rem); line-height: .98; letter-spacing: -.08em; }
.reading-deck { max-width: 670px; margin: 1.3rem 0; color: var(--muted); font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.4; }
.reading-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.reading-meta span + span::before { content: "·"; margin-right: 1.2rem; }
.prose { max-width: 700px; padding: 1rem 0; font-size: clamp(1.1rem, 1.7vw, 1.28rem); line-height: 1.75; letter-spacing: -.015em; }
.prose p { margin: 1.35rem 0; }
.prose a { color: var(--accent-strong); text-underline-offset: .15em; }
.source-note { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 700px; margin-top: 2rem; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.source-note a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }
.article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 4rem; }
.article-nav a { display: grid; align-content: center; gap: .3rem; min-height: 110px; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.article-nav a:hover { border-color: var(--accent); background: var(--card); }
.article-nav span { color: var(--muted); font-size: .82rem; }
.article-nav strong { font-size: 1.05rem; line-height: 1.3; }
.about-page h1 { margin-bottom: 3rem; }
.about-grid { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about-mark { display: grid; gap: .2rem; width: fit-content; padding: 1.7rem 2.4rem; border: 1px solid var(--line); border-radius: 22px; color: var(--accent-strong); font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; font-size: 1.7rem; font-style: italic; transform: rotate(-5deg); }
.about-mark span:nth-child(2) { padding-left: 1rem; }.about-mark span:nth-child(3) { padding-left: 2rem; }.about-mark span:nth-child(4) { padding-left: 3rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero h1 { font-size: clamp(3.8rem, 10vw, 6.5rem); }
  .hero-art { justify-content: flex-end; margin-top: -30px; }
  .hero-art img { width: min(47vw, 330px); }
  .thoughts-layout { grid-template-columns: 90px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { padding: 0; }
  .site-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .site-header, .site-footer { margin: 0 22px; }
  .site-header { min-height: 82px; }
  .wordmark { font-size: 1.25rem; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { display: grid; gap: 5px; width: 32px; padding: 5px; cursor: pointer; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary span { width: 24px; height: 2px; border-radius: 4px; background: var(--ink); }
  .mobile-menu nav { position: absolute; top: 40px; right: 0; z-index: 10; display: grid; min-width: 170px; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
  .mobile-menu nav a { text-decoration: none; font-weight: 650; }
  .theme-toggle { padding: .4rem; border: 0; }
  .theme-toggle span { display: none; }
  .hero { display: block; padding: 56px 26px 12px; }
  .hero-kicker { margin-bottom: .9rem; font-size: .7rem; }
  .hero h1 { font-size: clamp(3.2rem, 15.5vw, 5.4rem); }
  .author { margin-top: 1.2rem; }
  .hero-line { margin-top: 1.25rem; font-size: 1.06rem; }
  .hero-art { margin: -15px 0 0; justify-content: center; }
  .hero-art img { width: min(66vw, 260px); }
  .spark { left: -20px; top: -21px; transform: scale(.75); }
  .thoughts-section { padding: 0 23px 55px; }
  .section-heading { display: block; padding-bottom: 1.25rem; }
  .section-heading h2 { font-size: 2rem; }
  .section-heading > p { text-align: left; font-size: .9rem; margin-top: .6rem; }
  .section-heading > p br { display: none; }
  .thoughts-layout { display: block; }
  .margin-note { display: none; }
  .thought-list { padding-left: 24px; gap: 12px; }
  .thought-list::before { left: 4px; }
  .timeline-dot { left: -25px; width: 11px; height: 11px; }
  .thought-row a { min-height: 112px; border-radius: 16px; padding: .95rem 1rem; }
  .thought-title { font-size: 1.33rem; }
  .thought-label { font-size: .89rem; }
  .closing-note { font-size: 1rem; }
  .site-footer { display: grid; align-content: center; gap: .15rem; padding: 1rem 0; }
  .reading-page, .about-page { padding: 44px 25px 70px; }
  .back-link { margin-bottom: 2.5rem; }
  .reading-header h1, .about-page h1 { font-size: clamp(3rem, 13vw, 4.8rem); }
  .reading-deck { font-size: 1.15rem; }
  .prose { font-size: 1.08rem; }
  .article-nav { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
  .about-mark { font-size: 1.35rem; padding: 1rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
