:root {
  --bg: #fbfcfb;
  --bg-alt: #f2f5f3;
  --text: #16201c;
  --text-muted: #5b6b64;
  --accent: #1f8a70;
  --accent-strong: #146b56;
  --accent-soft: #e3f1eb;
  --accent-text: #ffffff;
  --border: #e0e6e2;
  --max-width: 860px;
  --shadow: 0 1px 2px rgba(15, 23, 20, 0.06);
  --shadow-hover: 0 10px 24px rgba(15, 23, 20, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101513;
    --bg-alt: #171d1a;
    --text: #eef4f1;
    --text-muted: #9fb0a8;
    --accent: #4fc9a8;
    --accent-strong: #7ddec3;
    --accent-soft: #1c2f28;
    --accent-text: #08120f;
    --border: #24302b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #101513;
  --bg-alt: #171d1a;
  --text: #eef4f1;
  --text-muted: #9fb0a8;
  --accent: #4fc9a8;
  --accent-strong: #7ddec3;
  --accent-soft: #1c2f28;
  --accent-text: #08120f;
  --border: #24302b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav-brand, .btn, .eyebrow, .timeline-role {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-badge {
  position: absolute;
  top: -1px;
  right: -9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: nav-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes nav-badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.35; }
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 4.5rem 0 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -2rem;
  right: -4rem;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

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

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-title {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
  font-weight: 500;
}

.hero-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
}

.hero-location::before {
  content: "📍 ";
}

.hero-sub {
  max-width: 620px;
  color: var(--text-muted);
  margin: 0 0 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.section {
  padding: 3.25rem 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}

.section-icon {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent);
}

.reveal.reveal-armed {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.reveal-armed.visible {
  opacity: 1;
  transform: none;
}

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

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
}

.stat-num {
  font-family: 'Manrope', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-org {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card p:not(.card-org) {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-item {
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item-condensed::before {
  background: var(--border);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-role {
  font-weight: 700;
}

.timeline-date {
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.timeline-org {
  color: var(--text-muted);
  margin: 0.15rem 0 0.6rem;
  font-size: 0.92rem;
}

.timeline-item ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timeline-item li {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.timeline-item li::marker {
  color: var(--accent);
}

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

.tag-row-muted {
  margin-top: 0.85rem;
}

.tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tag-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}

.playground-intro {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 1.2rem;
}

.game-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.game-hud {
  display: flex;
  justify-content: space-between;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  font-variant-numeric: tabular-nums;
}

.game-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  touch-action: manipulation;
}

.game-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.game-result {
  margin: 0;
  font-weight: 600;
  color: var(--accent-strong);
}

.contact {
  text-align: left;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    gap: 0.85rem;
    display: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-badge {
    animation: none;
  }

  .btn:hover { transform: none; }
}
