:root {
  --bg: #050608;
  --bg-elevated: rgba(13, 18, 32, 0.65);
  --bg-card: rgba(17, 25, 40, 0.85);
  --bg-accent: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(59, 130, 246, 0.2));
  --text-primary: #f8fafc;
  --text-secondary: #cbd5f5;
  --text-muted: #9aa4c4;
  --brand: #60a5fa;
  --brand-strong: #3b82f6;
  --brand-soft: rgba(96, 165, 250, 0.65);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(96, 165, 250, 0.35);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-xl: 0 18px 40px rgba(15, 23, 42, 0.45);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.35);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-strong) rgba(15, 23, 42, 0.6);
}

html,
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-secondary);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"%3E%3Cfilter id="n" x="0" y="0" width="1" height="1"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="80" height="80" filter="url(%23n)" opacity="0.16"/%3E%3C/svg%3E');
  z-index: 0;
}

.site-header {
  position: relative;
  padding: clamp(120px, 16vw, 200px) clamp(20px, 5vw, 64px) 0;
  background: radial-gradient(120% 120% at 50% -20%, rgba(56, 189, 248, 0.55), transparent 60%),
    radial-gradient(120% 80% at 120% 10%, rgba(96, 165, 250, 0.4), transparent 60%),
    rgba(5, 6, 8, 0.95);
  overflow: hidden;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 12px clamp(16px, 3vw, 28px);
  backdrop-filter: blur(22px) saturate(150%);
  background: rgba(7, 13, 26, 0.68);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.5);
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 40px));
  z-index: 100;
}

.nav__brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: 20px;
}

.nav__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 120px) 0 clamp(72px, 10vw, 160px);
}

.hero__copy h1 {
  margin: 12px 0 20px;
  font-size: clamp(2.8rem, 5vw, 4rem);
  color: var(--text-primary);
}

.hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

.hero__lead {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 540px;
  color: var(--text-secondary);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.meta-item {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(59, 130, 246, 0.95));
  color: #020617;
  box-shadow: var(--shadow-md);
}

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

.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--brand-strong);
  color: var(--brand);
}

.hero__card {
  position: relative;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.75));
  box-shadow: var(--shadow-xl);
}

.hero__badge {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__card ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--text-secondary);
}

.section {
  position: relative;
  padding: clamp(64px, 9vw, 120px) clamp(20px, 5vw, 64px);
  scroll-margin-top: 140px;
}

.section:not(.section--accent)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 70% at 15% -10%, rgba(96, 165, 250, 0.22), transparent 60%),
    radial-gradient(70% 70% at 90% 0%, rgba(56, 189, 248, 0.16), transparent 60%),
    rgba(5, 6, 8, 0.7);
  opacity: 0.6;
  z-index: 0;
}

.section--accent {
  background: var(--bg-accent);
}

.section__header {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.section__header > h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 20px;
  color: var(--text-primary);
}

.section__header > p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-grid,
.timeline,
.cards-grid,
.skills-grid {
  position: relative;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.about-card,
.card {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.about-card h3,
.card h3 {
  margin: 0 0 14px;
  color: var(--text-primary);
}

.timeline {
  margin-top: 48px;
  display: grid;
  gap: 28px;
}

.timeline__item {
  display: grid;
  gap: 14px;
  border-left: 2px solid rgba(96, 165, 250, 0.25);
  padding-left: 24px;
}

.timeline__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline__role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline__org {
  font-weight: 500;
  color: var(--brand);
}

.timeline__date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card__meta {
  font-size: 0.9rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 12px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.skill-tag {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08);
}

.section--accent .cta {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(36px, 5vw, 52px);
  border-radius: var(--radius-lg);
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.section--accent .cta h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 16px;
}

.section--accent .cta p {
  margin-bottom: 28px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.site-footer {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(2, 6, 23, 0.96);
}

.back-to-top {
  display: inline-block;
  margin-top: 12px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.back-to-top:hover {
  color: var(--text-primary);
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .nav {
    border-radius: 24px;
    padding: 10px 16px;
    width: calc(100% - 24px);
    top: 16px;
  }

  .nav__links {
    position: absolute;
    top: calc(100% + 12px);
    right: 16px;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.92);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav__links--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav__toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .hero__meta,
  .skills-grid {
    gap: 10px;
  }

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