:root {
  color-scheme: light;
  --paper: #f0ede5;
  --paper-deep: #e4dfd2;
  --ink: #172429;
  --muted: #627077;
  --line: rgba(23, 36, 41, 0.18);
  --rust: #b2482d;
  --teal: #183c49;
  --acid: #d3e2a4;
  --max: 1440px;
  --serif: Iowan Old Style, Songti SC, STSong, Noto Serif CJK SC, Georgia, serif;
  --sans: Inter, SF Pro Display, PingFang SC, Microsoft YaHei, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
::selection { background: var(--acid); color: var(--ink); }

.site-grain { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 10; 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.site-header { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; min-height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.brand b { color: var(--rust); font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--serif); font-size: 19px; font-style: italic; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--rust); }
.eyebrow { margin: 0 0 20px; color: var(--rust); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.hero { width: min(calc(100% - 48px), var(--max)); min-height: 720px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); align-items: center; gap: 36px; }
.hero-copy { padding: 76px 0 64px; }
.hero h1 { max-width: 780px; margin: 0; font-family: var(--serif); font-size: clamp(62px, 7vw, 112px); font-weight: 400; line-height: .94; letter-spacing: -.055em; }
.hero h1 em { color: var(--rust); font-weight: 400; }
.hero h1 em { white-space: nowrap; }
.hero-intro { max-width: 610px; margin: 42px 0 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; margin-top: 40px; }
.primary-action, .secondary-action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.primary-action { color: var(--paper); background: var(--ink); }
.primary-action:hover { background: var(--rust); border-color: var(--rust); }
.secondary-action:hover { color: var(--paper); background: var(--teal); border-color: var(--teal); }
.hero-stats { display: flex; gap: 42px; margin: 66px 0 0; }
.hero-stats div { min-width: 92px; }
.hero-stats dt { font-family: var(--serif); font-size: 34px; line-height: 1; }
.hero-stats dd { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.orbit { position: relative; min-height: 580px; display: grid; place-items: center; }
.orbit svg { width: min(100%, 680px); overflow: visible; }
.orbit-glow { fill: rgba(178, 72, 45, .12); filter: url(#glow); }
.orbit-path { fill: none; stroke: url(#arc); stroke-width: 1.2; stroke-dasharray: 3 8; opacity: .65; }
.path-two { stroke-dasharray: 1 9; }
.feedback, .feedback-arrow { fill: none; stroke: var(--rust); stroke-width: 1.6; }
.orbit-core circle { fill: var(--ink); }
.orbit-core text { fill: var(--paper); font-family: var(--serif); font-size: 22px; }
.orbit-node circle { fill: var(--rust); }
.orbit-node text { fill: var(--ink); font-size: 15px; letter-spacing: .04em; }
@media (prefers-reduced-motion: no-preference) {
  .path-one { animation: dash 28s linear infinite; }
  .path-two { animation: dash 34s linear infinite reverse; }
  .orbit-core { transform-origin: 360px 258px; animation: pulse 7s ease-in-out infinite; }
}
@keyframes dash { to { stroke-dashoffset: -220; } }
@keyframes pulse { 50% { transform: scale(1.035); } }

.thesis-band { min-height: 100px; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 42px); padding: 24px; color: var(--paper); background: var(--ink); overflow: hidden; }
.thesis-band p { margin: 0; white-space: nowrap; font-family: var(--serif); font-size: clamp(15px, 1.5vw, 21px); }
.thesis-band span { color: var(--rust); }

.research-shell { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 120px 0 140px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); }
.research-rail, .research-list { min-width: 0; }
.research-rail { position: sticky; top: 34px; align-self: start; }
.research-rail h2 { margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 400; }
.research-rail > p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.topic-filters { margin-top: 36px; border-top: 1px solid var(--line); }
.topic-filter { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.topic-filter span { font-family: var(--serif); }
.topic-filter:hover, .topic-filter.is-active { color: var(--rust); }
.research-entry { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(220px, 34%); gap: 24px; align-items: center; min-height: 270px; padding: 32px 0; border-top: 1px solid var(--line); }
.research-entry:last-of-type { border-bottom: 1px solid var(--line); }
.entry-number { align-self: start; color: var(--rust); font-family: var(--serif); font-size: 18px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.entry-meta span:not(:last-child)::after { content: "/"; padding-left: 12px; color: var(--line); }
.entry-copy h3 { max-width: 720px; margin: 15px 0 10px; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); font-weight: 400; line-height: 1.08; letter-spacing: -.025em; }
.entry-copy h3 a { text-decoration: none; }
.entry-copy h3 a:hover { color: var(--rust); }
.entry-copy > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 14px; }
.entry-links { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.text-link, .muted-link { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.text-link { color: var(--rust); }
.muted-link { color: var(--muted); }
.entry-preview, .entry-abstract { min-height: 180px; border: 1px solid var(--line); overflow: hidden; text-decoration: none; }
.entry-preview img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; filter: saturate(.78) contrast(.96); transition: transform .5s ease, filter .5s ease; }
.entry-preview:hover img { transform: scale(1.025); filter: saturate(1); }
.entry-abstract { position: relative; display: block; background: var(--paper-deep); }
.entry-abstract span { position: absolute; display: block; border: 1px solid currentColor; border-radius: 50%; opacity: .7; }
.entry-abstract span:nth-child(1) { width: 160px; height: 160px; left: 15%; top: 12%; }
.entry-abstract span:nth-child(2) { width: 100px; height: 100px; right: 12%; bottom: 8%; }
.entry-abstract span:nth-child(3) { width: 1px; height: 130%; left: 56%; top: -15%; background: currentColor; transform: rotate(28deg); }
.topic-agent-systems { color: var(--rust); background: #dfd6c7; }
.topic-llm-systems { color: var(--teal); background: #cbd6d1; }
.topic-ai-research { color: #6d6548; background: #dad5bd; }
.topic-research-method { color: #4e5962; background: #d8d9d5; }
.empty-state { color: var(--muted); }

.method-callout { width: min(calc(100% - 48px), var(--max)); margin: 0 auto 130px; padding: 70px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; color: var(--paper); background: var(--teal); }
.method-callout .eyebrow { color: var(--acid); }
.method-callout h2 { max-width: 560px; margin: 0; font-family: var(--serif); font-size: clamp(40px, 5vw, 72px); font-weight: 400; line-height: 1; }
.method-callout > div:last-child { align-self: end; }
.method-callout > div:last-child p { max-width: 560px; color: rgba(240, 237, 229, .76); }
.method-callout .text-link { color: var(--acid); }

.site-footer { width: min(calc(100% - 48px), var(--max)); min-height: 150px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p:last-child { text-align: right; }

.page-intro { max-width: 900px; padding: 110px 0 72px; }
.page-intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(56px, 7vw, 100px); font-weight: 400; line-height: .95; }
.page-intro > p:last-child { max-width: 700px; margin-top: 30px; color: var(--muted); font-size: 18px; }
.archive-page, .method-page { width: min(calc(100% - 48px), 1180px); margin: 0 auto 130px; }
.archive-table { border-top: 1px solid var(--line); }
.archive-row { display: grid; grid-template-columns: 130px 1fr 100px 24px; gap: 24px; align-items: center; min-height: 92px; border-bottom: 1px solid var(--line); text-decoration: none; }
.archive-row time, .archive-row span { color: var(--muted); font-size: 12px; }
.archive-row strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.archive-row:hover strong { color: var(--rust); }
.method-steps { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 50px; }
.method-steps section { min-height: 280px; padding: 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method-steps section > span { color: var(--rust); font-family: var(--serif); }
.method-steps h2 { margin: 48px 0 12px; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.method-steps p { color: var(--muted); }

.article-page { width: min(calc(100% - 48px), 1320px); margin: 0 auto; }
.article-header { max-width: 1060px; padding: 80px 0 90px; }
.back-link { color: var(--muted); font-size: 12px; }
.article-kicker { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 60px; color: var(--rust); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.article-header h1 { margin: 26px 0 24px; font-family: var(--serif); font-size: clamp(54px, 7vw, 104px); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.article-header > p { max-width: 800px; color: var(--muted); font-size: 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tag-row span { padding: 6px 10px; border: 1px solid var(--line); font-size: 10px; }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 820px); gap: clamp(50px, 8vw, 110px); justify-content: center; padding: 78px 0 140px; border-top: 1px solid var(--line); }
.article-outline { position: sticky; top: 34px; align-self: start; }
.article-outline > p { color: var(--rust); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.article-outline ol { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.article-outline li { border-bottom: 1px solid var(--line); }
.article-outline a { display: block; padding: 12px 0; color: var(--muted); font-size: 12px; text-decoration: none; }
.article-outline a:hover { color: var(--rust); }
.prose { min-width: 0; font-family: var(--serif); font-size: 18px; line-height: 1.9; }
.prose h1 { display: none; }
.prose h2 { margin: 3.2em 0 .9em; font-size: 40px; font-weight: 400; line-height: 1.2; letter-spacing: -.025em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2.3em; font-size: 25px; font-weight: 500; }
.prose p, .prose li { color: #2f3c41; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 2.2em 0; padding: 20px 26px; border-left: 3px solid var(--rust); background: rgba(178, 72, 45, .06); }
.prose pre { overflow-x: auto; padding: 22px; border-radius: 2px; font-size: 13px; line-height: 1.6; }
.prose code:not(pre code) { padding: .12em .35em; background: var(--paper-deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.prose table { width: 100%; margin: 2.2em 0; border-collapse: collapse; font-family: var(--sans); font-size: 13px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.prose th { color: var(--rust); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.prose img, .prose svg { width: min(1100px, calc(100vw - 48px)); max-width: none; margin: 2.6em 0 2.6em 50%; transform: translateX(-50%); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-bottom: 0; }
  .orbit { min-height: 460px; }
  .research-shell { grid-template-columns: minmax(0, 1fr); }
  .research-rail { position: static; }
  .topic-filters { display: flex; gap: 8px; overflow-x: auto; border: 0; padding-bottom: 8px; }
  .topic-filter { width: auto; flex: 0 0 auto; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); }
  .research-entry { grid-template-columns: 36px minmax(0, 1fr); }
  .entry-preview, .entry-abstract { grid-column: 2; }
  .method-callout { grid-template-columns: 1fr; gap: 34px; padding: 50px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-outline { position: static; }
  .article-outline ol { display: grid; grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .hero h1 { font-size: clamp(60px, 6.3vw, 74px); }
}

@media (max-width: 680px) {
  .site-header { width: min(calc(100% - 28px), var(--max)); min-height: 72px; }
  .site-header nav { gap: 14px; }
  .site-header nav a:nth-child(2), .site-header nav a:nth-child(4) { display: none; }
  .brand { letter-spacing: .05em; }
  .hero, .research-shell, .method-callout, .site-footer, .article-page, .archive-page, .method-page { width: min(calc(100% - 28px), var(--max)); }
  .hero-copy { padding-top: 62px; }
  .hero h1 { font-size: clamp(51px, 16vw, 74px); }
  .hero h1 em { white-space: normal; }
  .hero-intro { margin-top: 28px; font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-stats { gap: 20px; margin-top: 44px; }
  .hero-stats div { min-width: 0; }
  .orbit { min-height: 370px; margin: 0 -14px; }
  .thesis-band { justify-content: flex-start; overflow-x: auto; }
  .research-shell { padding: 82px 0 96px; gap: 42px; }
  .research-rail h2 { font-size: 40px; }
  .research-entry { grid-template-columns: 26px minmax(0, 1fr); min-height: 0; padding: 28px 0; gap: 14px; }
  .entry-copy h3 { font-size: 30px; }
  .entry-preview, .entry-abstract { min-height: 150px; }
  .method-callout { margin-bottom: 90px; padding: 36px 28px; }
  .site-footer { grid-template-columns: 1fr; gap: 2px; padding: 36px 0; }
  .site-footer p { margin: 2px 0; }
  .site-footer p:last-child { text-align: left; }
  .page-intro { padding: 72px 0 50px; }
  .page-intro h1 { font-size: 54px; }
  .archive-row { grid-template-columns: 80px 1fr 20px; gap: 12px; padding: 16px 0; }
  .archive-row span { display: none; }
  .archive-row strong { font-size: 18px; line-height: 1.25; }
  .method-steps { grid-template-columns: 1fr; }
  .method-steps section { min-height: 230px; padding: 28px; }
  .article-header { padding: 54px 0 64px; }
  .article-kicker { margin-top: 40px; }
  .article-kicker { gap: 10px; font-size: 9px; letter-spacing: .11em; }
  .article-header h1 { font-size: clamp(38px, 11vw, 44px); line-height: 1.02; letter-spacing: -.035em; }
  .article-header > p { font-size: 17px; }
  .article-grid { padding-top: 48px; gap: 40px; }
  .article-outline ol { grid-template-columns: 1fr; }
  .prose { font-size: 17px; line-height: 1.85; }
  .prose h2 { font-size: 32px; }
  .prose table { display: block; overflow-x: auto; white-space: normal; font-size: 12px; }
  .prose th, .prose td { min-width: 112px; padding: 10px 8px; }
  .prose img, .prose svg { width: calc(100vw - 28px); }
}

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