:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #6f6f68;
  --line: #deded7;
  --soft-line: #ecece6;
  --blue: #305f7a;
  --green: #4f6b5b;
  --red: #9b584d;
  --shadow: 0 18px 38px rgba(20, 20, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header,
.site-footer,
main {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 248, 0.92);
  backdrop-filter: blur(12px);
}

.wordmark {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.top-nav,
.hero-links,
.site-footer div {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-nav a,
.hero-links a,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
  transition: color 180ms ease, transform 180ms ease;
}

.top-nav a:hover,
.hero-links a:hover,
.site-footer a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 56px;
  align-items: end;
  min-height: min(760px, calc(100vh - 78px));
  padding: 66px 0 56px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 28px;
  font-size: 62px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1.08;
}

h3 {
  margin-bottom: 12px;
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-text {
  max-width: 830px;
  margin-bottom: 34px;
  color: #42423d;
  font-size: 20px;
  line-height: 1.55;
}

.hero-links {
  flex-wrap: wrap;
}

.hero-links a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.fit-panel {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.fit-row {
  padding: 26px;
  border-bottom: 1px solid var(--soft-line);
  transition: background 180ms ease, transform 180ms ease;
}

.fit-row:last-child {
  border-bottom: 0;
}

.fit-row:hover {
  background: #f4f6f3;
  transform: translateY(-2px);
}

.fit-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fit-row strong {
  display: block;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.42;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.section-heading .eyebrow {
  min-width: 170px;
  margin-bottom: 8px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 24px;
}

.feature-card,
.paper-card,
.repo-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.feature-card:hover,
.paper-card:hover,
.repo-row:hover {
  border-color: #c7c7bf;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-7px);
}

.feature-card {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
}

.feature-card.primary {
  background: #111111;
  color: #f8f8f4;
}

.feature-card p {
  color: #55554e;
  font-size: 17px;
}

.feature-card.primary p {
  color: #d6d6cf;
}

.card-index {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feature-card.primary .card-index {
  color: #bfbfb8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.primary .tag-list li {
  border-color: #42423d;
  color: #efefe9;
}

.split-section {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.split-section .section-heading {
  display: block;
  margin-bottom: 0;
}

.sticky-heading {
  position: sticky;
  top: 112px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.timeline-item h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.timeline-item p {
  margin-bottom: 10px;
  color: #4e4e48;
}

.timeline-item div p {
  color: var(--muted);
  font-size: 14px;
}

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

.paper-card {
  overflow: hidden;
}

.paper-card img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.paper-body {
  padding: 24px;
}

.paper-meta {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.paper-body p:last-child {
  color: #55554e;
}

.repo-list {
  border-top: 1px solid var(--line);
}

.repo-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 14px;
  padding: 22px 26px;
}

.repo-row span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.repo-row p {
  margin-bottom: 0;
  color: #4f4f49;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0 54px;
}

.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 48px;
  }

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

  .feature-card {
    min-height: 300px;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 1480px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-height: 116px;
  }

  .top-nav,
  .hero-links,
  .site-footer div {
    gap: 14px;
    flex-wrap: wrap;
  }

  .top-nav a {
    font-size: 13px;
  }

  .hero {
    padding: 38px 0 38px;
  }

  h1 {
    font-size: 33px;
  }

  h2 {
    font-size: 31px;
  }

  .hero-text {
    font-size: 16px;
  }

  .section {
    padding: 50px 0;
  }

  .section-heading {
    display: block;
  }

  .timeline-item,
  .repo-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fit-row,
  .feature-card,
  .paper-body,
  .repo-row {
    padding: 20px;
  }

  .site-footer {
    flex-direction: column;
  }
}
