:root {
  color-scheme: light;
  --bg: #f6f2e8;
  --bg-strong: #efe8dc;
  --card: #fff7ec;
  --ink: #1f2328;
  --ink-muted: #4c5753;
  --accent: #007a78;
  --accent-2: #d86a2a;
  --accent-3: #132837;
  --line: rgba(31, 35, 40, 0.12);
  --shadow: 0 24px 48px rgba(16, 24, 32, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Source Serif 4", "Georgia", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at -10% -10%, #d7ece6, transparent 65%),
    radial-gradient(900px 540px at 110% 0%, #f6d4bf, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  font-size: clamp(2.8rem, 4vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.eyebrow {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--accent-2);
  display: inline-block;
  margin-bottom: 16px;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  line-height: 1.5;
  margin-bottom: 12px;
}

.sublead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  text-decoration: none;
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 122, 120, 0.35);
}

.btn.ghost {
  color: var(--accent-3);
  border-color: rgba(19, 40, 55, 0.25);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-note {
  font-size: 0.95rem;
  color: var(--ink-muted);
  border-left: 3px solid var(--accent-2);
  padding-left: 12px;
}

.hero-card {
  display: grid;
  gap: 24px;
}

.profile-wrap {
  background: linear-gradient(135deg, rgba(0, 122, 120, 0.15), rgba(216, 106, 42, 0.12));
  padding: 18px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-wrap img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(19, 40, 55, 0.92);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.code-banner {
  background: #0f1720;
  border-radius: 18px;
  padding: 16px;
  color: #e2ecf2;
  box-shadow: var(--shadow);
  font-family: "JetBrains Mono", "Menlo", monospace;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: rgba(226, 236, 242, 0.7);
}

.code-header .title {
  margin-left: 8px;
  font-family: "Space Grotesk", "Helvetica", sans-serif;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red {
  background: #ff6b6b;
}

.dot.yellow {
  background: #ffd166;
}

.dot.green {
  background: #51cf66;
}

code {
  font-size: 0.85rem;
  line-height: 1.6;
  display: block;
  white-space: pre-wrap;
}

.token.keyword {
  color: #7dd3fc;
}

.token.string {
  color: #fcd34d;
}

.token.function {
  color: #f472b6;
}

.section {
  margin-top: 80px;
  animation: rise 0.9s ease both;
  animation-delay: var(--delay, 0s);
}

.section h2 {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 20px;
}

.section p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.stack-grid,
.philosophy-grid,
.contact-grid {
  display: grid;
  gap: 18px;
}

.stack-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stack-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.08);
}

.stack-card h3 {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.focus-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.focus-list li {
  background: rgba(0, 122, 120, 0.08);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
}

.callout {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  font-size: 1rem;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(216, 106, 42, 0.12);
  border: 1px solid rgba(216, 106, 42, 0.3);
}

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

.history-intro {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.08);
  color: var(--ink-muted);
}

.history-intro strong {
  display: block;
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.history-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 14px 32px rgba(16, 24, 32, 0.08);
}

.history-entry.generation {
  --gen-border: rgba(0, 122, 120, 0.28);
  --gen-bg: rgba(0, 122, 120, 0.06);
  position: relative;
  border: 1px solid var(--gen-border);
  border-left: 6px solid var(--gen-border);
  background: linear-gradient(135deg, var(--gen-bg), rgba(255, 255, 255, 0.96));
}

.history-entry.generation .pill {
  background: rgba(19, 40, 55, 0.08);
  border-color: rgba(19, 40, 55, 0.2);
}

.history-entry.generation.gen-1 {
  --gen-border: rgba(0, 122, 120, 0.35);
  --gen-bg: rgba(0, 122, 120, 0.1);
}

.history-entry.generation.gen-2 {
  --gen-border: rgba(216, 106, 42, 0.35);
  --gen-bg: rgba(216, 106, 42, 0.12);
}

.history-entry.generation.gen-3 {
  --gen-border: rgba(19, 40, 55, 0.3);
  --gen-bg: rgba(19, 40, 55, 0.08);
}

.history-entry.generation.gen-4 {
  --gen-border: rgba(0, 122, 120, 0.28);
  --gen-bg: rgba(0, 122, 120, 0.08);
}

.history-entry.generation.gen-5 {
  --gen-border: rgba(216, 106, 42, 0.28);
  --gen-bg: rgba(216, 106, 42, 0.1);
}

.history-entry.generation.gen-6 {
  --gen-border: rgba(19, 40, 55, 0.25);
  --gen-bg: rgba(19, 40, 55, 0.07);
}

.history-entry.generation.gen-7 {
  --gen-border: rgba(0, 122, 120, 0.25);
  --gen-bg: rgba(0, 122, 120, 0.07);
}

.history-entry h3 {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.history-entry p {
  color: var(--ink-muted);
}

.history .lead {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 1rem;
  color: var(--ink-muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.pill {
  background: rgba(19, 40, 55, 0.08);
  border: 1px solid rgba(19, 40, 55, 0.18);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.maplink {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.maplink:hover {
  text-decoration: underline;
}

.facts {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
}

.facts li {
  background: rgba(0, 122, 120, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink-muted);
}

.facts strong {
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica", sans-serif;
}

.note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(216, 106, 42, 0.12);
  border: 1px solid rgba(216, 106, 42, 0.3);
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.tree-wrap {
  margin-top: 12px;
}

.tree {
  display: grid;
  gap: 10px;
}

.node {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.node .who {
  margin: 0;
  font-size: 0.95rem;
}

.node span {
  color: var(--ink-muted);
}

.philosophy-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.philosophy-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 30px rgba(16, 24, 32, 0.1);
}

.philosophy-card h3 {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  margin-bottom: 8px;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card span {
  font-family: "Space Grotesk", "Helvetica", sans-serif;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.contact-card strong {
  font-size: 1rem;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(16, 24, 32, 0.12);
}

.footer {
  text-align: center;
  padding: 32px 24px 48px;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.delay-1 {
  --delay: 0.1s;
}

.delay-2 {
  --delay: 0.2s;
}

.delay-3 {
  --delay: 0.3s;
}

.delay-4 {
  --delay: 0.4s;
}

.delay-5 {
  --delay: 0.5s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .page {
    padding-top: 48px;
  }

  .hero {
    gap: 32px;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}

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