:root {
  --bg: #0a0e14;
  --bg-elevated: #121826;
  --surface: #161d2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #6ee7c5;
  --accent-dim: rgba(110, 231, 197, 0.15);
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -40%, rgba(110, 231, 197, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99, 102, 241, 0.06), transparent);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  max-width: 720px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.logo-dot {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.site-nav a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    padding: 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

.hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(4rem, 10vw, 6rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-tagline {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36ch;
}

.hero-tagline strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.code-window {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.code-window-bar {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.code-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3d4556;
}

.code-window-bar span:nth-child(1) {
  background: #ff6b6b;
}

.code-window-bar span:nth-child(2) {
  background: #ffd166;
}

.code-window-bar span:nth-child(3) {
  background: #6ee7c5;
}

.code-snippet {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.8vw, 0.8125rem);
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-muted);
}

.code-snippet .kw {
  color: #c792ea;
}

.code-snippet .type {
  color: #82aaff;
}

.code-snippet .str {
  color: #c3e88d;
}

.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid var(--border);
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.lead strong {
  color: var(--text);
}

.section p {
  color: var(--text-muted);
}

.section p strong {
  color: var(--text);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .timeline-item {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  white-space: nowrap;
}

.timeline-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.timeline-org {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.timeline-body p:last-child {
  margin-bottom: 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-cloud li {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(110, 231, 197, 0.25);
}

.project-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  max-width: 640px;
}

.project-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.project-org {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.project-period {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.section-cta {
  text-align: center;
}

.cta-inner .section-title {
  margin-bottom: 0.75rem;
}

.cta-inner > p {
  margin-top: 0;
  max-width: 42ch;
  margin-inline: auto;
}

.cta-inner .hero-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
