:root {
  --bg: #0d0f12;
  --bg-elevated: #151922;
  --border: #242b38;
  --text: #d7dde8;
  --muted: #8d98aa;
  --accent: #89b4fa;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(13, 15, 18, 0.82);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}

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

.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 720px;
}

.hero-links {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 12px 18px;
  border-radius: 4px;
  transition: 160ms ease;
  font-size: 0.95rem;
}

.button:hover {
  border-color: var(--accent);
}

.terminal {
  border: 1px solid var(--border);
  background: #0b0d11;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.terminal-top {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.terminal-body {
  padding: 20px;
  color: #b8c2d6;
}

.terminal-line {
  margin-bottom: 10px;
}

.terminal-line span {
  color: var(--accent);
}

section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-description {
  color: var(--muted);
  max-width: 520px;
}

.projects-header {
  align-items: start;
  margin-bottom: 24px;
}

.projects-description {
  margin-top: 14px;
  max-width: 760px;
}

.timeline-header {
  margin-bottom: 20px;
}

.timeline-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}

.timeline-list {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.timeline-range {
  padding-top: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.timeline-card {
  position: relative;
  border-radius: 4px;
  padding: 16px 20px 18px 28px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: var(--border);
}

.timeline-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

.domain-index-wrap {
  max-width: 760px;
  margin-bottom: 56px;
}

.domain-index-label {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.domain-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.domain-index a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.domain-index a:hover,
.domain-index a:focus-visible {
  color: var(--accent);
  border-color: rgba(137, 180, 250, 0.45);
  background: rgba(137, 180, 250, 0.08);
  transform: translateY(-1px);
}

.domain-index a:focus-visible {
  outline: none;
}

.domain-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.domain {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 36px;
  padding: 42px 0 22px;
  scroll-margin-top: 100px;
}

.domain:first-child {
  border-top: 0;
  padding-top: 0;
}

.domain-header {
  padding: 4px 0 0;
}

.domain-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.domain-subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 28ch;
}

.domain-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
  max-width: 34ch;
}

.project-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  padding: 10px 0 0 28px;
}

.project {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.project:last-child {
  border-bottom: none;
}

.project-link {
  color: var(--text);
  display: inline-block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 160ms ease;
}

.project-link:hover {
  color: var(--accent);
}

.project p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 760px;
}

.philosophy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.philosophy-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 28px;
}

.philosophy-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.philosophy-card p {
  color: var(--muted);
  margin: 0;
}

footer {
  padding: 48px 0 80px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
  max-width: 600px;
}

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

@media (max-width: 900px) {
  .hero-grid,
  .philosophy {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 72px;
  }

  .section-header {
    flex-direction: column;
    align-items: start;
  }

  .domain-index-wrap {
    margin-bottom: 42px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-range {
    padding-top: 0;
  }

  .domain {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 34px 0 18px;
  }

  .domain-subtitle {
    max-width: 760px;
  }

  .domain-header {
    padding: 0 0 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }

  .project-list {
    border-left: 0;
    border-top: 0;
    background: rgba(255, 255, 255, 0.025);
    padding: 4px 16px 0;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: start;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .container {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .projects-header {
    margin-bottom: 20px;
  }

  .timeline-note {
    margin-bottom: 24px;
  }

  .timeline-card {
    padding: 15px 16px 17px 24px;
  }

  .timeline-card h3 {
    font-size: 1rem;
  }

  .domain-index-wrap {
    margin-bottom: 36px;
  }

  .domain-index {
    gap: 10px;
  }

  .domain-index a {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.98rem;
  }

  .domain {
    padding: 30px 0 14px;
  }

  .domain-header {
    padding-bottom: 14px;
    margin-bottom: 12px;
  }

  .domain-title {
    font-size: 1.18rem;
  }

  .domain-subtitle {
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .project {
    padding: 16px 0;
  }

  .project-list {
    padding: 4px 14px 0;
  }
}
