/* ==========================================================================
   Cinematic GitHub Portfolio — Dark theme, immersive UI
   Hero orb, Repository constellation, Technology aura, Timeline.
   ========================================================================== */

:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #0d1117;
  --bg-tertiary: #161b22;
  --bg-card: rgba(22, 27, 34, 0.7);
  --border: rgba(48, 54, 61, 0.8);
  --border-subtle: rgba(48, 54, 61, 0.4);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-soft: rgba(88, 166, 255, 0.15);
  --gradient-start: #58a6ff;
  --gradient-end: #a371f7;
  --glow: 0 0 40px rgba(88, 166, 255, 0.25);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-padding: clamp(3rem, 8vw, 5rem);
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --container-max: 720px;
  --container-wide: 960px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-md); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}
.hidden { display: none !important; }

/* Glassmorphism card style */
.glass-card {
  background: rgba(22, 27, 34, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ——— Header & Nav ——— */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}
.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--accent); }
.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin-inline: auto;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(88, 166, 255, 0.15), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 40%, rgba(163, 113, 247, 0.1), transparent 45%),
    radial-gradient(ellipse 60% 40% at 20% 70%, rgba(88, 166, 255, 0.08), transparent 40%);
  pointer-events: none;
}
/* Animated gradient overlay */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(88, 166, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(163, 113, 247, 0.1), transparent 50%);
  animation: bgShift 12s ease-in-out infinite alternate;
  opacity: 0.8;
}
@keyframes bgShift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, 2%) scale(1.05); }
  100% { transform: translate(3%, -2%) scale(1); }
}
/* Mouse-reactive light spot */
.hero-bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.15), transparent 60%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  left: var(--mouse-x, 50%);
  top: var(--mouse-y, 50%);
  opacity: 0;
  transition: opacity 0.4s ease, left 0.15s ease-out, top 0.15s ease-out;
}
.hero:hover .hero-bg::after {
  opacity: 1;
}

/* Particle system */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  background: var(--color, rgba(88, 166, 255, 0.6));
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat var(--duration, 8s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0);
  }
  10% {
    opacity: var(--opacity, 0.6);
    transform: translate(0, 0) scale(1);
  }
  90% {
    opacity: var(--opacity, 0.6);
    transform: translate(var(--tx, 20px), var(--ty, -40px)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 20px), var(--ty, -40px)) scale(0);
  }
}
.hero-content {
  position: relative;
  text-align: center;
  min-height: 320px;
}
.hero-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto var(--space-xl);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  box-shadow: 0 0 60px rgba(88, 166, 255, 0.4), 0 0 120px rgba(163, 113, 247, 0.2);
  position: relative;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  cursor: pointer;
}
.hero-orb:hover {
  box-shadow: 
    0 0 80px rgba(88, 166, 255, 0.6), 
    0 0 160px rgba(163, 113, 247, 0.35),
    0 0 200px rgba(88, 166, 255, 0.2);
}
.hero-orb.hero-orb--pulse {
  animation: orbPulse 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 60px rgba(88, 166, 255, 0.4), 0 0 120px rgba(163, 113, 247, 0.2); }
  50% { box-shadow: 0 0 80px rgba(88, 166, 255, 0.5), 0 0 140px rgba(163, 113, 247, 0.3); }
}
/* One-time "pop" when data loads */
.hero-orb.hero-orb--loaded {
  animation: orbLoaded 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes orbLoaded {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
/* Staggered entrance animations for hero content */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content-inner.hero-content--visible .hero-orb {
  animation: orbLoaded 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, orbPulse 3s ease-in-out 0.6s infinite;
}
.hero-content-inner.hero-content--visible .hero-name {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.hero-content-inner.hero-content--visible .hero-bio {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.hero-content-inner.hero-content--visible .hero-stats {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}
.hero-content-inner.hero-content--visible .hero-cta {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* Floating stats subtle animation */
@keyframes floatStats {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero-stats {
  animation: floatStats 4s ease-in-out infinite;
  animation-play-state: paused;
}
.hero-content-inner.hero-content--visible .hero-stats {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both, floatStats 4s ease-in-out 1.2s infinite;
}

.hero-name {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}
.hero-bio {
  max-width: 420px;
  margin-inline: auto var(--space-lg);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: var(--space-lg);
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: center;
  margin-bottom: var(--space-xl);
}
.hero-stat {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.hero-stat strong { color: var(--text-primary); }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.35);
}
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-icon { width: 20px; height: 20px; }
.hero-scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--border-subtle), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ——— Hero skeleton ——— */
.hero-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.skeleton-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin-bottom: var(--space-xl);
  background: var(--bg-tertiary);
  animation: skeletonShine 1.5s ease-in-out infinite;
}
.skeleton-line {
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  animation: skeletonShine 1.5s ease-in-out infinite;
}
.skeleton-name { width: 220px; margin-bottom: var(--space-md); animation-delay: 0.1s; }
.skeleton-bio { width: 320px; max-width: 90vw; height: 18px; margin-bottom: var(--space-lg); animation-delay: 0.2s; }
.skeleton-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.skeleton-pill {
  width: 72px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  display: block;
  animation: skeletonShine 1.5s ease-in-out infinite;
  animation-delay: 0.3s;
}
@keyframes skeletonShine {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ——— Section titles ——— */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}
.section-subtitle {
  color: var(--text-secondary);
  margin-top: -var(--space-xs);
  margin-bottom: var(--space-xl);
}

/* ——— Projects: Constellation ——— */
.section-projects { padding: var(--section-padding) 0; }
.constellation {
  position: relative;
  min-height: 420px;
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  background: rgba(22, 27, 34, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 54, 61, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.constellation-star {
  position: absolute;
  left: var(--star-x, 50%);
  top: var(--star-y, 50%);
  width: var(--star-size, 16px);
  height: var(--star-size, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  transform: translate(-50%, -50%);
  animation: starFadeIn 0.6s ease both;
  z-index: 1;
}
.constellation-star-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--star-color, var(--accent));
  box-shadow: 0 0 var(--star-size) calc(var(--star-size) * 0.5) rgba(88, 166, 255, calc(0.3 * var(--star-glow, 1)));
  opacity: var(--star-glow, 0.9);
  transition: transform var(--transition), box-shadow var(--transition);
}
.constellation-star:hover .constellation-star-inner {
  transform: scale(1.5);
  box-shadow: 
    0 0 24px 6px var(--star-color, rgba(88, 166, 255, 0.6)),
    0 0 48px 12px var(--star-color, rgba(88, 166, 255, 0.3));
}
.constellation-star-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.constellation-star-tooltip strong { display: block; color: var(--text-primary); margin-bottom: 2px; }
.constellation-star-tooltip em { display: block; color: var(--text-secondary); font-style: normal; font-size: 0.75rem; }
.constellation-star-tooltip small { color: var(--text-muted); font-size: 0.7rem; }
.constellation-star:hover .constellation-star-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
@keyframes starFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Constellation connector lines */
.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.constellation-line {
  stroke: rgba(88, 166, 255, 0.15);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  animation: lineFadeIn 0.8s ease forwards;
}
@keyframes lineFadeIn {
  from { opacity: 0; stroke-dashoffset: 100; }
  to { opacity: 1; stroke-dashoffset: 0; }
}
.projects-skeleton .skeleton-constellation {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: center;
  min-height: 320px;
  align-items: center;
  align-content: center;
}
.skeleton-constellation span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  animation: skeletonShine 1.5s ease-in-out infinite;
}
.skeleton-constellation span:nth-child(1) { animation-delay: 0s; }
.skeleton-constellation span:nth-child(2) { animation-delay: 0.1s; }
.skeleton-constellation span:nth-child(3) { animation-delay: 0.2s; }
.skeleton-constellation span:nth-child(4) { animation-delay: 0.15s; }
.skeleton-constellation span:nth-child(5) { animation-delay: 0.25s; }
.skeleton-constellation span:nth-child(6) { animation-delay: 0.05s; }
.skeleton-constellation span:nth-child(7) { animation-delay: 0.2s; }
.skeleton-constellation span:nth-child(8) { animation-delay: 0.3s; }

/* ——— Skills: Aura (orbits + bars) ——— */
.section-skills {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}
.skills-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
}

/* Orbital visualization */
.skills-orbits {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  box-shadow: 0 0 40px rgba(88, 166, 255, 0.4), 0 0 80px rgba(163, 113, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(88, 166, 255, 0.15);
  animation: orbitRingPulse 4s ease-in-out infinite;
}
@keyframes orbitRingPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.orbit-planet {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 3;
}
.orbit-planet::before {
  content: attr(data-lang);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.orbit-planet:hover {
  transform: translate(-50%, -50%) scale(1.3);
}
.orbit-planet:hover::before {
  opacity: 1;
}
.orbit-path {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  animation: orbitRotate var(--orbit-duration, 20s) linear infinite;
}
@keyframes orbitRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.orbit-path .orbit-planet {
  position: absolute;
  top: 0;
  left: 50%;
}

/* Skills bars (shown alongside orbits on desktop, primary on mobile) */
.skills-aura {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 400px;
}
.skill-bar-wrap {
  animation: fadeUp 0.5s ease both;
}
.skill-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.skill-bar-label span:last-child {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.skill-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px var(--bar-color, var(--accent));
}

/* Skeleton for orbits */
.skeleton-orbits {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}
.skeleton-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--bg-tertiary);
  animation: skeletonShine 1.5s ease-in-out infinite;
}
.skeleton-orbit-ring:nth-child(1) { width: 80px; height: 80px; }
.skeleton-orbit-ring:nth-child(2) { width: 160px; height: 160px; animation-delay: 0.2s; }
.skeleton-orbit-ring:nth-child(3) { width: 240px; height: 240px; animation-delay: 0.4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Desktop: side by side layout */
@media (min-width: 769px) {
  .skills-wrapper {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-3xl);
  }
  .skills-orbits {
    flex-shrink: 0;
  }
}

/* Mobile: hide orbits, show bars only */
@media (max-width: 768px) {
  .skills-orbits {
    display: none;
  }
}

/* ——— Timeline ——— */
.section-timeline { padding: var(--section-padding) 0; }
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 480px;
  margin-inline: auto;
  position: relative;
  padding-left: var(--space-xl);
  border-left: 2px solid var(--border-subtle);
  margin-left: var(--space-lg);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
  text-decoration: none;
  color: inherit;
  display: block;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.timeline-item--visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-xl) - 5px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.5);
  transition: transform var(--transition);
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(88, 166, 255, 0.6);
}
.timeline-content strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.9375rem;
}
.timeline-content em {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.skeleton-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 480px;
  margin-inline: auto;
  padding-left: var(--space-xl);
}
.skeleton-tline-item {
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  animation: skeletonShine 1.5s ease-in-out infinite;
  width: 80%;
}
.skeleton-tline-item:nth-child(2) { animation-delay: 0.15s; }
.skeleton-tline-item:nth-child(3) { animation-delay: 0.25s; }

/* ——— Footer ——— */
.footer {
  padding: var(--section-padding) 0 var(--space-xl);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.snapshot-indicator {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-radius: 999px;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
}
.footer-heading { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-sm); color: var(--text-primary); }
.footer-text { color: var(--text-secondary); margin-bottom: var(--space-lg); }
.footer-github {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.footer-github svg { width: 22px; height: 22px; }
.footer-github:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.footer-copy { margin-top: var(--space-2xl); font-size: 0.875rem; color: var(--text-muted); }

/* ——— Responsive ——— */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: var(--space-2xl);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  
  /* Hero adjustments */
  .hero-orb {
    width: 120px;
    height: 120px;
  }
  .hero-bg::after {
    width: 300px;
    height: 300px;
  }
  
  /* Constellation */
  .constellation { 
    min-height: 350px; 
    padding: var(--space-md);
  }
  .constellation-star-tooltip { max-width: 200px; font-size: 0.75rem; }
  
  /* Timeline */
  .timeline-list {
    padding-left: var(--space-lg);
    margin-left: var(--space-md);
  }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: var(--space-md); }
  .hero-orb {
    width: 100px;
    height: 100px;
  }
  .constellation {
    min-height: 300px;
  }
  .section-title {
    font-size: 1.5rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  
  /* Hero animations */
  .hero-orb.hero-orb--pulse,
  .hero-orb.hero-orb--loaded,
  .hero-content-inner.hero-content--visible .hero-orb,
  .hero-content-inner.hero-content--visible .hero-name,
  .hero-content-inner.hero-content--visible .hero-bio,
  .hero-content-inner.hero-content--visible .hero-stats,
  .hero-content-inner.hero-content--visible .hero-cta { 
    animation: none; 
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  .hero-content-inner.hero-content--visible .hero-name,
  .hero-content-inner.hero-content--visible .hero-bio,
  .hero-content-inner.hero-content--visible .hero-stats,
  .hero-content-inner.hero-content--visible .hero-cta {
    transform: none;
  }
  
  /* Background animations */
  .hero-bg::before { animation: none; }
  .particle { display: none; }
  
  /* Constellation */
  .constellation-star { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .constellation-line { animation: none; opacity: 1; }
  
  /* Skills orbits */
  .orbit-path { animation: none; }
  .orbit-ring { animation: none; opacity: 0.6; }
  
  /* Bars and timeline */
  .skill-bar-wrap { animation: none; opacity: 1; transform: none; }
  .timeline-item { 
    opacity: 1 !important; 
    transform: none !important; 
    transition: none !important;
  }
  
  /* Skeleton and scroll indicator */
  .scroll-line { animation: none; opacity: 0.6; }
  .skeleton-orb, .skeleton-line, .skeleton-pill, .skeleton-constellation span,
  .skeleton-orbit-ring, .skeleton-tline-item { animation: none; opacity: 0.7; }
}
