:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0f172a;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-strong: rgba(30, 41, 59, 0.86);
  --border: rgba(148, 163, 184, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #22d3ee;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.28), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(52, 211, 153, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, var(--bg) 42%, #020617 100%);
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 75%);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #001018;
  font-weight: 800;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.68);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.nav {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #020617;
  box-shadow: 0 16px 40px rgba(56, 189, 248, .22);
}

.brand-text {
  color: #f8fafc;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.nav-links a {
  padding: .65rem .85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #f8fafc;
  background: rgba(148, 163, 184, .13);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, .72);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.section-shell {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 6rem 0;
}

.section-shell.compact {
  padding-top: 2rem;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  margin: 0 0 .85rem;
  color: var(--accent-strong);
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 7.2vw, 6.2rem);
  line-height: 1.08;
  letter-spacing: -.06em;
  text-wrap: balance;
}

h2 {
  margin-bottom: .85rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.055em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
}

.hero-copy,
.section-subtitle,
.contact-card p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #020617;
  box-shadow: 0 18px 38px rgba(56, 189, 248, .22);
}

.button.secondary {
  border-color: var(--border);
  background: rgba(15, 23, 42, .5);
  color: #f8fafc;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-weight: 800;
}

.social-links a {
  text-decoration: none;
}

.social-links a:hover {
  color: var(--accent);
}

.hero-card,
.experience-card,
.project-card,
.skill-group,
.timeline-card,
.focus-card,
.contact-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(15, 23, 42, .48));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 999px;
  background: rgba(52, 211, 153, .08);
  color: #bbf7d0;
  font-size: .83rem;
  font-weight: 900;
}

.pulse {
  width: .65rem;
  height: .65rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.metric-grid article {
  min-height: 148px;
  padding: 1.1rem;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 20px;
  background: rgba(2, 6, 23, .38);
}

.metric-grid strong {
  display: block;
  margin-bottom: .45rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.06em;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: .95rem;
}

.focus-grid,
.project-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.focus-card,
.project-card,
.skill-group,
.timeline-card {
  padding: 1.35rem;
}

.card-kicker,
.project-card-header,
.timeline-card span {
  color: var(--accent);
  font-size: .83rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.focus-card p,
.project-card p,
.skill-group p,
.timeline-card p,
.experience-card p,
.impact-list {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 2rem;
}

.experience-card {
  padding: clamp(1.25rem, 4vw, 2rem);
}

.experience-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.experience-topline h3 {
  margin-bottom: .25rem;
}

.experience-topline p,
.experience-topline span {
  margin-bottom: 0;
  color: var(--muted);
}

.experience-topline span {
  flex: 0 0 auto;
  font-weight: 800;
}

.impact-list {
  display: grid;
  gap: .85rem;
  margin: 1.4rem 0 0;
  padding-left: 1.15rem;
}

.project-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin-bottom: .75rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.tag-list span {
  padding: .4rem .6rem;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #bae6fd;
  font-size: .8rem;
  font-weight: 800;
}

.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-group h3 {
  margin-bottom: .55rem;
}

.skill-group p {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.timeline-list {
  display: grid;
  gap: 1rem;
}

.contact-section {
  padding-bottom: 4rem;
}

.contact-card {
  padding: clamp(1.5rem, 5vw, 3rem);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, .18), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .58));
}

.footer {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 0;
}

.footer a {
  color: #f8fafc;
  font-weight: 800;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .focus-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(2, 6, 23, .94);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: .9rem 1rem;
  }

  .metric-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .experience-topline,
  .project-card-header,
  .footer {
    flex-direction: column;
  }

  .project-card {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.8rem);
    line-height: 1.1;
    letter-spacing: -.055em;
  }
  
}

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

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

.top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
