:root {
  --ink: #17272a;
  --muted: #5d6b6d;
  --paper: #f7f5ef;
  --paper-strong: #fffefa;
  --forest: #173f43;
  --forest-dark: #0e2c30;
  --mint: #bddbd4;
  --coral: #dc604b;
  --yellow: #e8bd58;
  --line: rgba(23, 39, 42, 0.16);
  --line-light: rgba(255, 255, 255, 0.2);
  --content: 1220px;
  --reading: 760px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { color: inherit; font: inherit; }
h1, h2, h3, p { overflow-wrap: break-word; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 200;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--forest-dark);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 239, 0.96);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.02rem; }
.brand-text span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.8rem); }
.site-nav a {
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  font-size: 0.77rem;
  font-weight: 750;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-color: var(--coral); }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}
.language-switch a {
  padding: 0;
  border: 0;
}
.language-switch a[aria-current="true"] { color: var(--ink); }
.language-switch span { color: var(--line); }
.site-nav .contact-link {
  padding: 0.55rem 0.85rem;
  color: white;
  border: 0;
  background: var(--forest);
}
.menu-button {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.menu-button span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: var(--ink);
}

.container { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; }
.section { padding: clamp(4.5rem, 8vw, 7.5rem) max(24px, calc((100% - var(--content)) / 2)); }
.section-paper { background: var(--paper-strong); }
.section-dark { color: white; background: var(--forest-dark); }
.section-mint { --muted: #3f5356; background: var(--mint); }
.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}
.kicker::before { width: 28px; height: 2px; background: var(--coral); content: ""; }
.section-dark .kicker { color: rgba(255, 255, 255, 0.65); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(3.7rem, 7vw, 6.8rem); line-height: 0.96; }
h2 { margin: 0; font-size: clamp(2.4rem, 4.5vw, 4.4rem); line-height: 1.03; }
h3 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.22; }
.lead { color: var(--muted); font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.7; }
.section-dark .lead { color: rgba(255, 255, 255, 0.68); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head > p { margin: 0; }

.home-hero {
  display: grid;
  width: min(calc(100% - 48px), var(--content));
  min-height: calc(100vh - 150px);
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}
.home-hero > * { min-width: 0; }
.home-hero h1 { font-size: clamp(4.4rem, 9vw, 8.4rem); }
.hero-role {
  margin: 1.25rem 0 0;
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
}
.hero-summary { max-width: 700px; margin: 1.6rem 0 0; }
.action-row { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center; margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}
.button-primary { color: white; background: var(--forest); }
.button:hover { color: white; background: var(--coral); border-color: var(--coral); }
.text-link { border-bottom: 1px solid var(--line); font-size: 0.78rem; font-weight: 800; }
.hero-portrait { position: relative; align-self: stretch; min-height: 560px; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }
.portrait-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  color: white;
  background: rgba(14, 44, 48, 0.9);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}
.hero-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.3rem;
  border-top: 1px solid var(--line);
}
.hero-index div { padding: 1rem 1rem 0 0; }
.hero-index dt { color: var(--muted); font-size: 0.62rem; font-weight: 800; text-transform: uppercase; }
.hero-index dd { margin: 0.25rem 0 0; font-family: var(--serif); }

.page-hero {
  display: grid;
  width: min(calc(100% - 48px), var(--content));
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 8rem) 0 clamp(4rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .lead { margin: 0; }
.page-hero-compact h1 { font-size: clamp(3.5rem, 6vw, 5.8rem); }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.theme {
  min-height: 330px;
  padding: clamp(1.8rem, 3vw, 2.8rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.theme-no { color: var(--coral); font-family: var(--serif); }
.theme h3 { margin-top: 2.5rem; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.theme p { max-width: 560px; color: var(--muted); }
.topic-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.4rem; }
.topic-list span { padding: 0.3rem 0.55rem; border: 1px solid var(--line); font-size: 0.67rem; font-weight: 750; }

.feature-list { border-top: 1px solid var(--line); }
.feature-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(160px, 0.28fr);
  gap: 2rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}
.feature-row .year { color: var(--coral); font-family: var(--serif); }
.feature-row p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.84rem; }
.feature-row .meta { color: var(--muted); font-size: 0.7rem; font-weight: 800; text-align: right; text-transform: uppercase; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-light); }
.project {
  min-height: 360px;
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--forest-dark);
}
.project .status { color: var(--mint); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; }
.project h3 { margin-top: 4rem; font-size: clamp(2rem, 3.5vw, 3.2rem); }
.project p { color: rgba(255,255,255,.65); }
.project a { display: inline-block; margin-top: 1rem; color: var(--mint); border-bottom: 1px solid var(--line-light); font-size: 0.75rem; font-weight: 800; }

.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.preview {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 2rem;
  border-right: 1px solid var(--line);
}
.preview:last-child { border-right: 0; }
.preview .label { margin: 0; color: var(--coral); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.preview h3 { margin-top: 1.2rem; }
.preview p { color: var(--muted); font-size: 0.82rem; }
.preview .text-link { width: fit-content; margin-top: auto; }

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
}
.split-aside h2 { font-size: clamp(2.3rem, 4vw, 3.8rem); }
.prose { max-width: var(--reading); }
.prose p:first-child { margin-top: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.5; }
.prose p { color: #3f5356; }
.fact-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.fact {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.fact dt { color: var(--muted); font-size: 0.67rem; font-weight: 800; text-transform: uppercase; }
.fact dd { margin: 0; }

.course-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
}
.course-intro { align-self: start; }
.course-intro p { color: var(--muted); }
.course-series { border-top: 1px solid var(--line); }
.lesson {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 1.3rem;
  align-items: start;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.lesson-no { color: var(--coral); font-family: var(--serif); font-size: 1.1rem; }
.lesson h3 { font-size: 1.35rem; }
.lesson p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.78rem; }
.file-link { white-space: nowrap; border-bottom: 1px solid var(--line); font-size: 0.7rem; font-weight: 800; }

.bibliography-tools {
  position: sticky;
  z-index: 50;
  top: 78px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem max(24px, calc((100% - var(--content)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 239, 0.97);
  backdrop-filter: blur(12px);
}
.publication-search {
  display: flex;
  min-width: 240px;
  flex: 1;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}
.publication-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 0.8rem; }
.filter-set { display: flex; gap: 0.35rem; }
.filter-button {
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 800;
}
.filter-button:hover, .filter-button.is-active { color: white; background: var(--forest); }
.result-count { color: var(--muted); font-size: 0.68rem; white-space: nowrap; }
.bibliography { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; padding: clamp(4rem, 7vw, 6rem) 0; }
.publication-group { margin-bottom: clamp(4rem, 7vw, 6rem); }
.publication-group[hidden], .citation[hidden] { display: none; }
.group-head { display: grid; grid-template-columns: 100px 1fr; gap: 1.5rem; margin-bottom: 1.8rem; }
.group-head .group-no { color: var(--coral); font-family: var(--serif); }
.group-head p { margin: 0.5rem 0 0; color: var(--muted); }
.citation {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(130px, auto);
  gap: 1.5rem;
  align-items: start;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}
.citation:last-child { border-bottom: 1px solid var(--line); }
.citation-year { color: var(--coral); font-family: var(--serif); }
.citation-main p { margin: 0; }
.citation-title { font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.48rem); line-height: 1.35; }
.citation-details { margin-top: 0.4rem !important; color: var(--muted); font-size: 0.78rem; }
.citation-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.citation-links a { padding: 0.35rem 0.55rem; border: 1px solid var(--line); font-size: 0.65rem; font-weight: 800; }
.citation-links a:hover { color: white; border-color: var(--forest); background: var(--forest); }
.empty-state { padding: 2rem; border: 1px solid var(--line); color: var(--muted); text-align: center; }
.source-note { padding: 1.2rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; }
.source-note a { border-bottom: 1px solid var(--line); font-weight: 800; }

.writing-list { border-top: 1px solid var(--line); }
.writing {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 150px;
  gap: 2rem;
  align-items: start;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}
.writing .year { color: var(--coral); font-family: var(--serif); }
.writing p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.8rem; }
.writing .outlet { color: var(--muted); font-size: 0.68rem; font-weight: 800; text-align: right; text-transform: uppercase; }

.ai-placeholder {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) max(24px, calc((100% - var(--content)) / 2));
  color: white;
  background: var(--forest-dark);
}
.ai-placeholder h1 { color: var(--mint); font-size: clamp(6rem, 16vw, 13rem); }
.ai-placeholder .status-line { display: flex; align-items: center; gap: 0.7rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.ai-placeholder .status-line::before { width: 9px; height: 9px; background: var(--yellow); border-radius: 50%; content: ""; }
.ai-placeholder .lead { margin-top: 1.5rem; }

.contact-page {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.6fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) max(24px, calc((100% - var(--content)) / 2));
  color: white;
  background: var(--coral);
}
.contact-page h1 { max-width: 850px; }
.contact-panel { align-self: end; }
.contact-email {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.55);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}
.contact-panel address { margin-top: 2rem; font-style: normal; }
.external-links { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; margin-top: 2rem; }
.external-links a { border-bottom: 1px solid rgba(255,255,255,.5); font-size: 0.72rem; font-weight: 800; }

.site-footer {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem max(24px, calc((100% - var(--content)) / 2));
  color: rgba(255,255,255,.65);
  background: var(--forest-dark);
  font-size: 0.68rem;
  font-weight: 750;
}
.site-footer p { margin: 0; }
.site-footer a { color: white; }

@media (max-width: 1060px) {
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    top: 78px;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem 24px;
    background: var(--paper);
    transform: translateX(100%);
    transition: transform 180ms ease;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a, .site-nav .contact-link {
    padding: 0.9rem 0;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    background: transparent;
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 400;
  }
  .language-switch {
    gap: 0.7rem;
    padding: 1rem 0;
    border-left: 0;
  }
  .language-switch a {
    width: auto;
    padding: 0;
    border: 0;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 800;
  }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .hero-portrait { width: min(100%, 620px); min-height: 600px; }
  .page-hero, .section-head, .split, .course-layout, .ai-placeholder, .contact-page { grid-template-columns: 1fr; }
  .bibliography-tools { position: static; flex-wrap: wrap; }
  .filter-set { width: 100%; overflow-x: auto; }
}

@media (max-width: 720px) {
  .header-inner, .container, .home-hero, .page-hero, .bibliography { width: min(calc(100% - 32px), var(--content)); }
  .brand-text span { display: none; }
  h1 { font-size: clamp(3.2rem, 16vw, 4.7rem); }
  .home-hero h1 { font-size: clamp(3.8rem, 18vw, 5.5rem); }
  .home-hero > div:first-child { min-width: 0; max-width: 100%; }
  .hero-role, .hero-summary { max-width: 100%; }
  .hero-portrait { min-height: 470px; }
  .hero-index { grid-template-columns: 1fr; }
  .hero-index div { display: grid; grid-template-columns: 90px 1fr; }
  .theme-grid, .project-grid, .preview-grid { grid-template-columns: 1fr; }
  .preview { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview:last-child { border-bottom: 0; }
  .feature-row, .citation, .writing { grid-template-columns: 58px minmax(0, 1fr); gap: 1rem; }
  .feature-row .meta, .citation-links, .writing .outlet { grid-column: 2; justify-content: flex-start; text-align: left; }
  .group-head { grid-template-columns: 1fr; gap: 0.5rem; }
  .lesson { grid-template-columns: 42px minmax(0, 1fr); }
  .lesson .file-link { grid-column: 2; width: fit-content; }
  .fact { grid-template-columns: 1fr; gap: 0.3rem; }
  .publication-search { min-width: 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

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