:root {
  color-scheme: light;
  --paper: #f7f4ef;
  --surface: #ffffff;
  --surface-soft: #edf4f3;
  --ink: #1f2a2e;
  --muted: #657174;
  --line: #d7dfdc;
  --teal: #0f766e;
  --teal-dark: #0d4d4b;
  --blue: #335f8f;
  --clay: #a3563f;
  --gold: #b4862f;
  --shadow: 0 18px 50px rgba(31, 42, 46, 0.08);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
  padding: 0.55rem 0.8rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 244, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.site-nav__link {
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1;
  padding: 0.62rem 0.74rem;
  text-decoration: none;
}

.site-nav__link:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal-dark);
}

.site-nav__link.is-active {
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(31, 42, 46, 0.08);
  color: var(--teal-dark);
  font-weight: 700;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero,
.page-hero {
  padding: clamp(3rem, 7vw, 6.5rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero__text {
  max-width: 720px;
}

.eyebrow,
.card-kicker {
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: 3rem;
  max-width: 900px;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.1rem;
}

.lede {
  color: var(--muted);
  font-size: 1.25rem;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.button {
  align-items: center;
  background: var(--teal-dark);
  border: 1px solid var(--teal-dark);
  border-radius: var(--radius);
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  min-height: 44px;
  padding: 0.72rem 1rem;
  text-decoration: none;
}

.button:hover {
  background: var(--teal);
  color: #ffffff;
}

.button--secondary {
  background: var(--blue);
  border-color: var(--blue);
}

.button--ghost {
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover {
  background: var(--surface);
  color: var(--teal-dark);
}

.portrait {
  margin: 0;
}

.portrait img {
  aspect-ratio: 1 / 1.08;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.portrait figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.section-band,
.two-column,
.content-grid,
.project-stack,
.publication-groups,
.post-index {
  padding: 3.5rem 0;
}

.section-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 1.4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.project-panel,
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(31, 42, 46, 0.05);
}

.feature-card {
  padding: 1.2rem;
}

.feature-card p,
.publication-item p,
.post-item p,
.project-panel p,
.prose p {
  color: var(--muted);
}

.text-link {
  font-weight: 800;
}

.two-column,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.publication-list,
.post-list {
  display: grid;
  gap: 0.9rem;
}

.publication-item,
.post-item,
.post-row {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.publication-item h3,
.post-item h3,
.post-row h2 {
  font-size: 1.04rem;
}

.publication-item a,
.post-item a,
.post-row a {
  color: var(--ink);
  text-decoration: none;
}

.publication-item a:hover,
.post-item a:hover,
.post-row a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.post-item time,
.post-row time,
.post-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  padding: 4rem 0;
}

.hero h1 {
  font-size: 4.25rem;
}

.page-hero h1,
.post-header h1 {
  font-size: 2.85rem;
  max-width: 860px;
}

.content-grid {
  align-items: start;
}

.prose {
  max-width: 760px;
}

.prose h2,
.timeline h2 {
  margin-bottom: 1rem;
}

.timeline {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.timeline-item {
  border-top: 1px solid var(--line);
  padding: 1rem 0 0;
  margin-top: 1rem;
}

.timeline-item:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.timeline-item p {
  color: var(--clay);
  font-size: 0.83rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
}

.timeline-item span {
  color: var(--muted);
}

.timeline-item.is-current h3 {
  color: var(--teal-dark);
}

.project-stack {
  display: grid;
  gap: 1rem;
}

.project-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 2rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
}

.project-panel--highlight {
  border-left: 4px solid var(--teal);
}

.project-tags {
  margin-bottom: 0.85rem;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.inline-links a {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0 0.85rem 1.4rem;
  position: relative;
}

.check-list li::before {
  color: var(--gold);
  content: "+";
  font-weight: 900;
  left: 0;
  position: absolute;
}

.year-group {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.year-group h2 {
  color: var(--clay);
  font-size: 1.2rem;
}

.post-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  padding-bottom: 1.2rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-row span,
.sample-badge {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
}

.sample-badge {
  background: rgba(180, 134, 47, 0.12);
  color: #765411;
}

.post-shell {
  max-width: 820px;
  padding: 4rem 0;
}

.post-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.post-content {
  font-size: 1.06rem;
}

.post-content li + li {
  margin-top: 0.45rem;
}

.contact-panel {
  display: inline-flex;
  margin-top: 1rem;
  padding: 1rem;
}

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

.site-footer__inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 1.8rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
}

@media (max-width: 860px) {
  .site-header__inner,
  .hero,
  .two-column,
  .content-grid,
  .project-panel,
  .year-group,
  .post-row {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    align-items: flex-start;
    display: grid;
    padding: 1rem 0;
  }

  .site-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

  h1,
  .hero h1,
  .page-hero h1,
  .post-header h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .lede {
    font-size: 1.14rem;
  }

  .site-footer__inner {
    display: grid;
  }
}

@media (max-width: 520px) {
  main,
  .site-header__inner,
  .site-footer__inner {
    width: min(100% - 24px, var(--max));
  }

  .site-nav__link {
    padding: 0.55rem 0.62rem;
  }

  .hero,
  .page-hero {
    padding: 2.4rem 0;
  }

  h1,
  .hero h1,
  .page-hero h1,
  .post-header h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .lede {
    font-size: 1.05rem;
  }
}
