:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --text: #1f2937;
  --muted: #5b6472;
  --border: #dde3eb;
  --accent: #2b5cab;
  --accent-soft: #e9f0fb;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  --max-width: 1100px;
  --narrow-width: 820px;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2rem), var(--narrow-width));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.site-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.site-title:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
}

.site-nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 1rem;
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 58ch;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: white;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.section,
.page-header {
  padding: 3.5rem 0;
}

.page-header {
  padding-bottom: 1.5rem;
}

.alt-bg {
  background: var(--bg-alt);
}

.two-col,
.cards-grid {
  display: grid;
  gap: 1.5rem;
}

.two-col {
  grid-template-columns: 1.25fr 1fr;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.4rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card h2,
.profile-card h3,
.card h2,
.card h3 {
  margin-top: 0;
}

.card-label,
.post-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.link-list,
.feature-list,
.timeline-list,
.publication-list {
  padding-left: 1.2rem;
}

.link-list.compact {
  margin-bottom: 0;
}

.timeline-list li,
.feature-list li,
.publication-list li {
  margin-bottom: 0.8rem;
}

.publication-list {
  padding-left: 1.35rem;
}

.pub-title {
  font-weight: 600;
}

.pub-note,
.pub-links {
  color: var(--muted);
}

.post-preview {
  padding: 1.5rem;
}

.post-body h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

.post-body p code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .hero-grid,
  .two-col,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 0.8rem 0;
  }

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