/* ========================================
   Ryan Donofrio - Portfolio
   Design Tokens + Reset + Layout + Sections
   ======================================== */

/* --- Design Tokens --- */
:root {
  --bg:          #0a0a0b;
  --bg-surface:  #111113;
  --bg-card:     #16161a;
  --border:      #232328;
  --text:        #f0f0f3;
  --text-muted:  #8b8b96;
  --accent:      #3b82f6;
  --accent-2:    #2563eb;
  --gradient:    linear-gradient(135deg, var(--accent), var(--accent-2));
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-pill:  50px;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
  --nav-h:       72px;
  --container:   1120px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-surface);
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header__title {
  font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header__line {
  width: 48px;
  height: 3px;
  background: var(--gradient);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn--outline {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
              var(--gradient) border-box;
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.nav--scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  overflow: hidden;
}

.nav__logo-short,
.nav__logo-full {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease,
              filter 0.4s ease,
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__logo-short {
  max-width: 3ch;
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateX(0);
}

.nav__logo-full {
  max-width: 0;
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.85) translateX(-8px);
}

.nav--logo-expanded .nav__logo-short {
  max-width: 0;
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.85) translateX(-8px);
}

.nav--logo-expanded .nav__logo-full {
  max-width: 15ch;
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateX(0);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text);
}

.nav__link--cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 10px 20px;
  margin-left: 8px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.nav__link--cta:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
}

.hero__content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: var(--glow-opacity);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  color: var(--accent);
  margin-bottom: 8px;
}

.hero__name {
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 30%, #2563eb 60%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 8s ease-in-out infinite;
}

.hero__typed {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  color: var(--accent);
  margin-bottom: 20px;
  min-height: 1.5em;
}

.typed-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__subtitle {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero__socials {
  display: flex;
  gap: 16px;
}

.hero__socials a {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.hero__socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ========================================
   Social Proof Bar
   ======================================== */
.proof {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.proof__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.proof__logos {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.proof__company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.proof__divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* ========================================
   About
   ======================================== */
.about {
  padding: 100px 0;
  position: relative;
}

.about__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

.about__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about__text p strong {
  color: var(--text);
  font-weight: 600;
}

.about__facts {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.about__fact {
  display: flex;
  flex-direction: column;
}

.about__fact-number {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about__fact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   Experience Timeline
   ======================================== */
.experience {
  padding: 100px 0;
  position: relative;
}

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) var(--timeline-progress, 0%), var(--border) var(--timeline-progress, 0%));
}

.timeline__item {
  position: relative;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline__content {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.timeline__content:hover {
  transform: perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow);
}

.timeline__content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: var(--glow-opacity);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
}

.timeline__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.timeline__role {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline__company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline__date {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.timeline__details {
  position: relative;
  z-index: 2;
  list-style: none;
  padding: 0;
}

.timeline__details li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.timeline__details li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--border);
}

.timeline__details li:last-child {
  margin-bottom: 0;
}

/* ========================================
   Featured Projects
   ======================================== */
.projects {
  padding: 100px 0;
  position: relative;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow);
}

.project-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.project-card__body {
  padding: 28px;
  position: relative;
  z-index: 2;
}

.project-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-card__subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-weight: 500;
}

/* ========================================
   Skills
   ======================================== */
.skills {
  padding: 100px 0;
  position: relative;
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  transform: perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow);
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: var(--glow-opacity);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
}

.skill-card__title {
  position: relative;
  z-index: 2;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.skill-card__pills {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 400;
  transition: all var(--transition);
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

/* ========================================
   Contact
   ======================================== */
.contact {
  padding: 100px 0;
  position: relative;
}

.contact__intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 48px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact__link {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  overflow: hidden;
  transition: all var(--transition);
}

.contact__link:hover {
  transform: perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow);
  color: var(--text);
}

.contact__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: var(--glow-opacity);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
}

.contact__link svg,
.contact__link span {
  position: relative;
  z-index: 2;
}

.contact__link svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__socials a {
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========================================
   Responsive
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
  }

  .nav__toggle {
    position: relative;
    z-index: 1000;
  }

  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    background: var(--bg);
    padding-top: var(--nav-h);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav__links--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.1rem;
    padding: 12px 24px;
  }

  .nav__link--cta {
    margin-left: 0;
    margin-top: 8px;
  }

  /* Hamburger open state */
  .nav__toggle--open .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav__toggle--open .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle--open .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__photo {
    max-width: 240px;
    margin: 0 auto;
  }

  .about__facts {
    flex-wrap: wrap;
    gap: 24px;
  }

  /* Projects */
  .projects__grid {
    grid-template-columns: 1fr;
  }

  /* Skills */
  .skills__grid {
    grid-template-columns: 1fr;
  }

  /* Timeline */
  .timeline {
    padding-left: 28px;
  }

  .timeline__dot {
    left: -28px;
    width: 14px;
    height: 14px;
  }

  .timeline::before {
    left: 6px;
  }

  /* Contact */
  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .contact__link {
    width: 100%;
    max-width: 360px;
    justify-content: center;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* Hero */
  .hero {
    min-height: calc(100vh - 40px);
  }

  .hero__ctas {
    flex-direction: column;
    gap: 12px;
  }

  .hero__ctas .btn {
    text-align: center;
  }

  /* Proof */
  .proof .container {
    flex-direction: column;
    gap: 16px;
  }

  .proof__logos {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .about, .experience, .projects, .skills, .contact {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .timeline__content {
    padding: 20px;
  }

  .project-card__body {
    padding: 20px;
  }

  .skill-card {
    padding: 20px;
  }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .typed-cursor {
    animation: none;
  }

  .hero__name,
  .hero__aurora,
  .hero__aurora::before,
  .hero__aurora::after,
  .section-aurora::before,
  .section-aurora::after {
    animation: none;
  }

  .reveal-stagger > * {
    transition-delay: 0ms !important;
  }

  .btn, .project-card, .contact__link, .skill-card, .timeline__content, .pill {
    transition: none;
  }
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* --- Selection --- */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text);
}

/* ========================================
   Visual Effects
   ======================================== */

/* --- Gradient Text Keyframe --- */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Aurora Background --- */
.hero__aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 60% at 50% 70%, rgba(59, 130, 246, 0.10), transparent 70%);
}

.hero__aurora::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 60%;
  top: 20%;
  left: -10%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.18), transparent 70%);
  animation: aurora-drift-1 15s ease-in-out alternate infinite;
  will-change: transform;
}

.hero__aurora::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 50%;
  top: 30%;
  right: -10%;
  background: radial-gradient(ellipse at 70% 60%, rgba(30, 64, 175, 0.15), transparent 70%);
  animation: aurora-drift-2 18s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes aurora-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

@keyframes aurora-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 20px) scale(1.15); }
}

/* --- Hero Particles Canvas --- */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Section Aurora + Particles (shared across all body sections) --- */
.section-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.section-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.about > .container,
.experience > .container,
.projects > .container,
.skills > .container,
.contact > .container {
  position: relative;
  z-index: 1;
}

/* About aurora — transparent bg, lower opacity to preserve dot grid */
.section-aurora--about {
  background: radial-gradient(ellipse 55% 50% at 50% 30%, rgba(59, 130, 246, 0.07), transparent 70%);
}

.section-aurora--about::before {
  content: '';
  position: absolute;
  width: 70%;
  height: 55%;
  top: 25%;
  left: -8%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.10), transparent 70%);
  animation: section-drift-about-1 20s ease-in-out alternate infinite;
  will-change: transform;
}

.section-aurora--about::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 45%;
  top: 40%;
  right: -8%;
  background: radial-gradient(ellipse at 70% 60%, rgba(30, 64, 175, 0.08), transparent 70%);
  animation: section-drift-about-2 24s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes section-drift-about-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(22px, -18px) scale(1.06); }
}

@keyframes section-drift-about-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 14px) scale(1.08); }
}

/* Experience aurora — surface bg, slightly higher opacity */
.section-aurora--experience {
  background: radial-gradient(ellipse 50% 55% at 70% 50%, rgba(59, 130, 246, 0.08), transparent 70%);
}

.section-aurora--experience::before {
  content: '';
  position: absolute;
  width: 65%;
  height: 50%;
  top: 15%;
  left: -6%;
  background: radial-gradient(ellipse at 25% 40%, rgba(59, 130, 246, 0.12), transparent 70%);
  animation: section-drift-exp-1 22s ease-in-out alternate infinite;
  will-change: transform;
}

.section-aurora--experience::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 45%;
  bottom: 10%;
  left: 25%;
  background: radial-gradient(ellipse at 50% 70%, rgba(30, 64, 175, 0.10), transparent 70%);
  animation: section-drift-exp-2 26s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes section-drift-exp-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(28px, -20px) scale(1.08); }
}

@keyframes section-drift-exp-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-18px, 16px) scale(1.10); }
}

/* Projects aurora — transparent bg, medium opacity */
.section-aurora--projects {
  background: radial-gradient(ellipse 55% 55% at 40% 40%, rgba(59, 130, 246, 0.07), transparent 70%);
}

.section-aurora--projects::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 50%;
  top: 15%;
  right: -6%;
  background: radial-gradient(ellipse at 70% 35%, rgba(59, 130, 246, 0.10), transparent 70%);
  animation: section-drift-proj-1 21s ease-in-out alternate infinite;
  will-change: transform;
}

.section-aurora--projects::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 45%;
  bottom: 10%;
  left: 20%;
  background: radial-gradient(ellipse at 45% 70%, rgba(30, 64, 175, 0.08), transparent 70%);
  animation: section-drift-proj-2 25s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes section-drift-proj-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-24px, -16px) scale(1.07); }
}

@keyframes section-drift-proj-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, 18px) scale(1.09); }
}

/* Skills aurora — surface bg, slightly higher opacity */
.section-aurora--skills {
  background: radial-gradient(ellipse 50% 50% at 60% 60%, rgba(59, 130, 246, 0.08), transparent 70%);
}

.section-aurora--skills::before {
  content: '';
  position: absolute;
  width: 65%;
  height: 50%;
  top: 20%;
  left: -5%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.12), transparent 70%);
  animation: section-drift-skills-1 23s ease-in-out alternate infinite;
  will-change: transform;
}

.section-aurora--skills::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 45%;
  top: 15%;
  right: -5%;
  background: radial-gradient(ellipse at 75% 35%, rgba(30, 64, 175, 0.10), transparent 70%);
  animation: section-drift-skills-2 27s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes section-drift-skills-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(26px, -22px) scale(1.07); }
}

@keyframes section-drift-skills-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-22px, 18px) scale(1.10); }
}

/* Contact aurora — transparent bg, lightest opacity for clean CTA */
.section-aurora--contact {
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(59, 130, 246, 0.06), transparent 70%);
}

.section-aurora--contact::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 50%;
  top: 15%;
  left: -8%;
  background: radial-gradient(ellipse at 25% 40%, rgba(59, 130, 246, 0.08), transparent 70%);
  animation: section-drift-contact-1 24s ease-in-out alternate infinite;
  will-change: transform;
}

.section-aurora--contact::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 45%;
  top: 35%;
  right: -6%;
  background: radial-gradient(ellipse at 75% 60%, rgba(30, 64, 175, 0.06), transparent 70%);
  animation: section-drift-contact-2 28s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes section-drift-contact-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -18px) scale(1.06); }
}

@keyframes section-drift-contact-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-18px, 14px) scale(1.08); }
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* --- Stagger Reveal --- */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger--visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger--visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger--visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger--visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger--visible > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger--visible > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger--visible > *:nth-child(6) { transition-delay: 500ms; }

/* --- Project Card Glow Overlay --- */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: var(--glow-opacity);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
}

/* --- Timeline Dot Active --- */
.timeline__dot--active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

/* --- Aurora Mobile --- */
@media (max-width: 768px) {
  .hero__aurora::before {
    width: 80%;
    height: 40%;
  }
  .hero__aurora::after {
    width: 70%;
    height: 35%;
  }
}
