:root {
  --bg: #f2ecdf;
  --bg-deep: #e8decb;
  --ink: #1d1c1a;
  --muted: #625c52;
  --line: rgba(29, 28, 26, 0.12);
  --surface: rgba(255, 251, 244, 0.8);
  --surface-strong: #fffaf0;
  --accent: #ba4a2f;
  --accent-2: #0f5d66;
  --shadow: 0 18px 60px rgba(28, 23, 15, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1200px;
  --font-body: "Manrope", sans-serif;
  --font-display: "Syne", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(186, 74, 47, 0.2), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(15, 93, 102, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.layout {
  position: relative;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 24px auto 40px;
}

.topbar,
.hero,
.stat-card,
.projects-section,
.system-section,
.next-section,
.project-card,
.system-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
}

.brand,
h1,
h2,
h3 {
  font-family: var(--font-display);
}

.brand {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.kicker,
.tag,
.status-pill,
.stat-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--accent-2);
}

.topnav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

main {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.hero,
.projects-section,
.system-section,
.next-section {
  border-radius: var(--radius-xl);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  padding: 30px;
  min-height: 58vh;
  align-items: end;
}

.hero-copy h1 {
  margin: 14px 0;
  max-width: 13ch;
  font-size: clamp(2.7rem, 5.8vw, 4.7rem);
  line-height: 1.02;
}

.lede {
  max-width: 54ch;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.button-dark {
  background: var(--ink);
  color: #fffaf0;
}

.button-light {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line);
}

.hero-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.84), rgba(255, 250, 240, 0.98)),
    linear-gradient(135deg, rgba(186, 74, 47, 0.22), rgba(15, 93, 102, 0.16));
  border: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  font-weight: 800;
}

.hero-panel ul {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  line-height: 1.6;
  color: var(--muted);
}

.stats-grid,
.system-grid,
.projects-grid {
  display: grid;
  gap: 18px;
}

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

.stat-card,
.system-card,
.project-card {
  border-radius: var(--radius-lg);
}

.stat-card {
  padding: 22px;
}

.stat-value {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.stat-copy,
.project-summary,
.project-meta,
.system-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.projects-section,
.system-section,
.next-section {
  padding: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2,
.next-section h2 {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.08;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.filter-button.is-active {
  background: var(--ink);
  color: #fffaf0;
}

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

.project-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: var(--surface-strong);
}

.project-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.project-day {
  font-size: 0.9rem;
  color: var(--accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 93, 102, 0.1);
}

.status-pill.planned {
  background: rgba(186, 74, 47, 0.12);
  color: var(--accent);
}

.project-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.12;
}

.project-tags,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.project-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.project-link {
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

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

.system-card {
  padding: 20px;
}

.system-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.next-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

@media (max-width: 980px) {
  .hero,
  .stats-grid,
  .projects-grid,
  .system-grid,
  .next-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .layout {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .topbar,
  .projects-section,
  .system-section,
  .next-section,
  .hero,
  .stat-card,
  .project-card,
  .system-card {
    padding: 20px;
  }

  .topbar,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .lede,
  .project-summary,
  .system-card p,
  .stat-copy {
    line-height: 1.6;
  }

  .project-card {
    gap: 14px;
  }

  .project-link,
  .tag,
  .filter-button {
    min-height: 36px;
  }
}

@media (max-width: 420px) {
  .layout {
    width: min(calc(100% - 14px), var(--max-width));
    margin: 14px auto 24px;
  }

  .topbar,
  .projects-section,
  .system-section,
  .next-section,
  .hero,
  .stat-card,
  .project-card,
  .system-card {
    padding: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(1.9rem, 10.5vw, 2.55rem);
    max-width: 100%;
  }

  .section-head h2,
  .next-section h2 {
    font-size: clamp(1.3rem, 7.4vw, 1.7rem);
  }

  .topnav {
    gap: 12px;
  }
}