:root {
  --bg: #090d18;
  --surface: #0f1628;
  --surface-2: #121b31;
  --text: #f2f5fb;
  --muted: #a8b2c7;
  --line: rgba(255,255,255,.10);
  --accent: #8fb5ff;
  --accent-2: #76e1c6;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
  --radius: 24px;
  --max-width: 1180px;
}

:root[data-theme="light"] {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #111827;
  --muted: #5b6475;
  --line: rgba(17,24,39,.11);
  --accent: #315fcf;
  --accent-2: #168f77;
  --shadow: 0 24px 70px rgba(36,50,78,.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: .08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.nav-links a:hover { color: var(--text); }

.theme-toggle, .nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  border-radius: 12px;
  padding: 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 88px;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  pointer-events: none;
  filter: blur(10px);
  border-radius: 50%;
  opacity: .23;
}

.hero-bg-one {
  width: 520px;
  height: 520px;
  right: -180px;
  top: -170px;
  background: radial-gradient(circle, var(--accent), transparent 68%);
}

.hero-bg-two {
  width: 460px;
  height: 460px;
  left: -220px;
  bottom: -250px;
  background: radial-gradient(circle, var(--accent-2), transparent 68%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr);
  gap: 72px;
  align-items: center;
}

.eyebrow, .section-kicker, .small-caps {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 860px;
  margin-bottom: 26px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: .99;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: -.02em;
}

.hero-lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 20px;
}

.hero-lead strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 42px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-meta div { display: grid; gap: 4px; }

.meta-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.signal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-2) 15%, transparent);
}

.profile-monogram {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  margin: 44px 0 36px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)),
    color-mix(in srgb, var(--accent-2) 18%, var(--surface)));
  border: 1px solid var(--line);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -.05em;
}

.profile-statement {
  font-size: 17px;
  line-height: 1.55;
}

.profile-tags, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-tags span, .chip-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

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

.section-muted {
  background: color-mix(in srgb, var(--surface) 48%, var(--bg));
}

.split-layout {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 80px;
}

.prose {
  color: var(--muted);
  font-size: 20px;
}
.prose p:last-child { margin-bottom: 0; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 48px;
}

.section-note {
  max-width: 430px;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 48px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.timeline-company {
  margin-bottom: 14px;
  color: var(--accent);
  font-weight: 700;
}

.timeline-content > p:not(.timeline-company) {
  max-width: 760px;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.project-featured {
  min-height: 380px;
  grid-column: span 2;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 12%, var(--surface)),
      color-mix(in srgb, var(--accent-2) 10%, var(--surface)));
}

.project-topline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.project-card p { color: var(--muted); }

.project-points {
  padding-left: 20px;
  color: var(--muted);
}

.project-link {
  margin-top: auto;
  padding-top: 24px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 750;
}

.disabled-link {
  color: var(--muted);
  cursor: default;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.skill-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.skill-group p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-section {
  padding-top: 108px;
  padding-bottom: 108px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 48px;
  align-items: end;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 13%, var(--surface)),
      color-mix(in srgb, var(--accent-2) 9%, var(--surface)));
  box-shadow: var(--shadow);
}

.contact-card p { color: var(--muted); max-width: 700px; }

.contact-actions {
  display: grid;
  gap: 10px;
}

.footer {
  padding: 30px 0 42px;
  color: var(--muted);
  font-size: 13px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.footer p { margin: 0; }

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

  .hero-grid { gap: 44px; }
  .hero-card { max-width: 620px; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--max-width)); }

  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    inset: 72px 14px auto;
    display: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: grid;
    gap: 8px;
  }

  .nav-links a {
    padding: 10px 4px;
    font-size: 15px;
  }

  .theme-toggle {
    margin-top: 8px;
  }

  .brand-text { display: none; }

  .hero { padding: 72px 0 64px; }
  h1 { font-size: clamp(44px, 15vw, 66px); }
  .hero-lead { font-size: 18px; }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section { padding: 72px 0; }

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

  .project-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }

  .skill-grid { grid-template-columns: 1fr; }

  .contact-card {
    padding: 28px;
  }

  .footer-row {
    flex-direction: column;
  }
}
