/* ----------------------------------------------------
   Saadiah Saleem — Portfolio
   Theme: "Trajectory" — a launch-into-frontend space theme.
   Deep-space palette, drifting nebulae, a live starfield,
   and a mission-progress line through the career timeline.
---------------------------------------------------- */
:root {
  /* -- Space palette -- */
  --void: #04050f;
  --void-2: #090c1e;
  --panel: rgba(12, 16, 34, 0.7);
  --panel-strong: rgba(8, 10, 24, 0.95);
  --card: rgba(15, 19, 40, 0.78);
  --card-soft: rgba(148, 163, 255, 0.06);
  --card-text: #eef1ff;
  --card-muted: #a4b0d6;

  --nebula-violet: #8b6bff;
  --nebula-cyan: #35d4ff;
  --nebula-magenta: #d966ff;
  --star-gold: #ffcf6b;

  --accent: #8b6bff;
  --accent-2: #35d4ff;
  --accent-3: #ffcf6b;

  --text: #eef1ff;
  --muted: #93a0c7;
  --border: rgba(150, 165, 255, 0.16);
  --shadow: 0 24px 60px rgba(1, 2, 10, 0.55);
  --max-width: 1160px;
  --radius: 22px;

  --font-display: "Space Grotesk", "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --void: #eef1fb;
  --void-2: #e3e8fa;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --card: #ffffff;
  --card-soft: rgba(15, 23, 42, 0.04);
  --card-text: #10132a;
  --card-muted: #4a5382;

  --accent: #6d3df2;
  --accent-2: #0891b2;
  --accent-3: #b3790a;

  --text: #10132a;
  --muted: #4c5480;
  --border: rgba(20, 24, 60, 0.12);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: 28px;
  font-family: var(--font-body);
  background: var(--void);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, .logo, .btn, .eyebrow, .filter-btn, .nav-links a {
  font-family: var(--font-display);
}
.mono, .telemetry-strip, .telemetry-item { font-family: "IBM Plex Mono", "Space Grotesk", monospace; }

/* ---------------- HUD frame ---------------- */
.hud-corner {
  position: fixed;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 207, 107, 0.55);
  z-index: 1400;
  pointer-events: none;
}
.corner-tl { top: 44px; left: 14px; border-right: none; border-bottom: none; }
.corner-tr { top: 44px; right: 14px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.corner-br { bottom: 14px; right: 14px; border-left: none; border-top: none; }
@media (max-width: 640px) { .hud-corner { width: 16px; height: 16px; } }

.telemetry-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  height: 28px;
  background: rgba(4, 5, 15, 0.92);
  border-bottom: 1px solid rgba(255, 207, 107, 0.22);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent-3);
  padding: 0 1rem;
}
[data-theme="light"] .telemetry-strip { background: rgba(238, 241, 251, 0.95); }
.telemetry-item { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.telemetry-dot { font-size: 0.4rem; color: #34d399; animation: pulse-blip 2s ease-in-out infinite; }
@media (max-width: 720px) { .telemetry-hide-sm { display: none; } }
@media (max-width: 520px) { .telemetry-strip { gap: 1rem; font-size: 0.62rem; } }

/* Push the sticky header below the telemetry strip */
.header { top: 28px; }

.radar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(53, 212, 255, 0.35);
  background: radial-gradient(circle, rgba(53, 212, 255, 0.08), transparent 70%);
  z-index: 1290;
  overflow: hidden;
  pointer-events: none;
}
.radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(53, 212, 255, 0.55), transparent 28%);
  animation: radar-spin 3.2s linear infinite;
}
.radar-blip {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 6px 2px rgba(255, 207, 107, 0.8);
}
.blip-1 { top: 14px; left: 28px; animation: blip-fade 3.2s linear infinite; }
.blip-2 { top: 30px; left: 14px; animation: blip-fade 3.2s linear infinite 1.1s; }
@keyframes radar-spin { to { transform: rotate(360deg); } }
@keyframes blip-fade { 0%, 92%, 100% { opacity: 0; } 94%, 98% { opacity: 1; } }
@media (max-width: 640px) { .radar { display: none; } }

/* ---------------- Space background layers ---------------- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
  background: var(--void);
}
[data-theme="light"] #starfield { opacity: 0.35; }

.nebula-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transition: transform 240ms ease-out;
}
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}
[data-theme="light"] .nebula { opacity: 0.28; }
.nebula-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, var(--nebula-violet), transparent 70%);
  animation: drift1 26s ease-in-out infinite;
}
.nebula-2 {
  width: 460px;
  height: 460px;
  top: 30%;
  right: -160px;
  background: radial-gradient(circle, var(--nebula-cyan), transparent 70%);
  animation: drift2 32s ease-in-out infinite;
}
.nebula-3 {
  width: 420px;
  height: 420px;
  bottom: -160px;
  left: 30%;
  background: radial-gradient(circle, var(--nebula-magenta), transparent 72%);
  animation: drift3 30s ease-in-out infinite;
}

/* Cursor-reactive glow that follows the pointer through the hero */
.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 30%), rgba(139, 107, 255, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 400ms ease;
}
.hero-spotlight.active { opacity: 1; }
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 70px) scale(1.08); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.1); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.06); }
}

.container { max-width: var(--max-width); margin: 0 auto; }
.section {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
  position: relative;
  font-size: 1.06rem;
}
.section-header {
  text-align: center;
  margin: 0 auto 2.25rem;
  max-width: 760px;
}
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent-2);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: "IBM Plex Mono", var(--font-display);
}
.eyebrow::before { content: "// "; color: var(--accent-3); }
.eyebrow::after { content: " //"; color: var(--accent-3); }
.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 600;
}
.section-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------------- About ---------------- */
.about-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  box-shadow: var(--shadow);
}
.about-content p {
  margin: 0 0 1rem;
  color: var(--text);
  line-height: 1.8;
  font-size: 1.03rem;
}
.about-content p:last-child { margin-bottom: 0; }

.creative-intro {
  max-width: 820px;
  margin: 0 auto 1.5rem;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
}
.creative-intro a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid rgba(53, 212, 255, 0.35); }

.creative-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}
.creative-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  flex: 0 0 220px;
  box-shadow: var(--shadow);
}
.creative-card:hover, .creative-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.5);
  border-color: rgba(139, 107, 255, 0.5);
}
.creative-card img, .creative-card iframe, .creative-card video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.creative-card-body { padding: 0.9rem 1rem; text-align: center; }
.creative-card-body h3 { margin: 0; font-size: 1rem; font-family: var(--font-display); }

/* ---------------- Header / nav ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1200;
  backdrop-filter: blur(14px);
  background: rgba(4, 5, 15, 0.65);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .header { background: rgba(238, 241, 251, 0.75); }
.navbar {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}
.logo {
  font-weight: 600;
  font-size: 1.1rem;
  order: 2;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent-2); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  order: 1;
}
.nav-links a, .nav-links a:visited {
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  transition: all 180ms ease;
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover, .nav-links a:focus-visible {
  color: var(--text);
  background: rgba(139, 107, 255, 0.14);
  outline: none;
}
.theme-toggle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  order: 3;
  transition: transform 200ms ease, border-color 200ms ease;
}
.theme-toggle:hover { transform: rotate(-14deg); border-color: rgba(139, 107, 255, 0.5); }
.theme-toggle:focus-visible { box-shadow: 0 0 0 4px rgba(53, 212, 255, 0.18); }

/* ---------------- Hero ---------------- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  position: relative;
}
.hero-content { max-width: 980px; width: 100%; position: relative; z-index: 2; }

.hero-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(139, 107, 255, 0.22);
  border-radius: 50%;
}
.orbit-ring.ring-2 { inset: 90px; border-color: rgba(53, 212, 255, 0.18); animation: spin-slow 60s linear infinite; }
.orbit-ring.ring-1 { animation: spin-slow-rev 90s linear infinite; }
.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 14px 3px rgba(53, 212, 255, 0.7);
  top: -4px;
  left: 50%;
}
.orbit-dot.dot-1 { animation: spin-slow-rev 90s linear infinite; transform-origin: 0 450px; }
.orbit-dot.dot-2 {
  width: 6px; height: 6px;
  background: var(--star-gold);
  box-shadow: 0 0 12px 3px rgba(255, 207, 107, 0.75);
  top: 86px;
  animation: spin-slow 60s linear infinite;
  transform-origin: 0 360px;
}
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-slow-rev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.hero-tagline {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tagline-blip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px 2px rgba(255, 207, 107, 0.8);
  animation: pulse-blip 1.8s ease-in-out infinite;
}
@keyframes pulse-blip {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  margin: 1.2rem 0 0.9rem;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 600;
  font-family: var(--font-display);
}
.hero h1 span.typewriter {
  background: linear-gradient(120deg, var(--nebula-violet), var(--nebula-cyan) 45%, var(--star-gold) 55%, var(--nebula-violet));
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-sweep 7s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.cursor {
  color: var(--accent-2);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1.7;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #050614;
  box-shadow: 0 16px 35px rgba(139, 107, 255, 0.35);
}
.secondary-btn, .download-btn {
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-2);
  border-color: rgba(53, 212, 255, 0.4);
}
.btn:focus-visible { box-shadow: 0 0 0 5px rgba(53, 212, 255, 0.18); outline: none; }

/* Rocket launch micro-interaction on the primary CTA */
.primary-btn { position: relative; overflow: visible; gap: 6px; }
.btn-rocket {
  display: inline-block;
  transform: translate(0, 0) rotate(0deg);
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 420ms ease;
}
.primary-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-3);
  opacity: 0;
  box-shadow: 0 0 8px 2px rgba(255, 207, 107, 0.7);
  transition: opacity 300ms ease, transform 500ms ease;
}
.primary-btn:hover .btn-rocket {
  transform: translate(5px, -6px) rotate(20deg);
}
.primary-btn:hover::after {
  opacity: 1;
  transform: translate(-16px, 10px);
}

.hero-status { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
  animation: pulse-blip 2s ease-in-out infinite;
}
.dot.dot-static { background: var(--accent-2); box-shadow: 0 0 12px rgba(53, 212, 255, 0.8); animation: none; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 380px;
  margin: 2rem auto 1rem;
}
.metric-card {
  padding: 1rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}
.metric-card strong {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  color: var(--accent-3);
}
.metric-card span { color: var(--muted); font-size: 0.8rem; }

.hero-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; color: var(--muted); }
.hero-meta i { color: var(--accent-2); }

.scroll-cue {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 14px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 6px; }
}

/* ---------------- Skills grid ---------------- */
.skills-grid, .projects-grid, .cert-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.experience-cert-layout {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.experience-cert-layout > .section { width: 100%; margin: 0; padding: 2.5rem 0 0; }
.experience-cert-layout .section-header { margin-bottom: 1.25rem; }
.experience-cert-layout .timeline { max-width: none; }
.experience-cert-layout .cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.experience-cert-layout .cert-card {
  display: block; width: 100%; padding: 0.7rem 0.8rem;
  border-radius: 12px; background: var(--card); border: 1px solid var(--border); box-shadow: none;
}
.experience-cert-layout .cert-card h3 { font-size: 0.9rem; margin: 0 0 0.25rem; }
.experience-cert-layout .cert-card p, .experience-cert-layout .cert-card .cert-cred { font-size: 0.76rem; line-height: 1.45; }

@media (max-width: 640px) { .experience-cert-layout .cert-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .experience-cert-layout { grid-template-columns: 1fr; } }

.skill-card, .cert-card, .timeline-item, .contact-item {
  padding: 1.3rem;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  color: var(--card-text);
  position: relative;
}
.skill-card::before, .cert-card::before,
.skill-card::after, .cert-card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  opacity: 0;
  transition: opacity 200ms ease, border-color 200ms ease;
  pointer-events: none;
}
.skill-card::before, .cert-card::before { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.skill-card::after, .cert-card::after { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.skill-card:hover::before, .cert-card:hover::before,
.skill-card:hover::after, .cert-card:hover::after {
  opacity: 1;
  border-color: var(--accent-3);
}
.cert-card { display: block; text-decoration: none; color: var(--card-text); }
.cert-card:hover, .skill-card:hover, .timeline-item:hover, .contact-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.4);
  border-color: rgba(139, 107, 255, 0.4);
}
.skill-card { text-align: left; }
.skill-card h3 { margin: 0 0 0.8rem; color: var(--card-text); font-size: 1rem; font-weight: 600; }
.skill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-list li {
  background: rgba(139, 107, 255, 0.08);
  border: 1px solid rgba(139, 107, 255, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-2);
  font-size: 0.88rem;
  transition: background 180ms ease, border-color 180ms ease;
}
.skill-list li:hover { background: rgba(139, 107, 255, 0.16); border-color: rgba(139, 107, 255, 0.35); }
.skill-list li span { color: var(--accent-2); }
.skill-list li i { color: var(--accent-2); }

/* ---------------- Timeline / mission trajectory ---------------- */
.timeline {
  position: relative;
  display: block;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 30px;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(150, 165, 255, 0.16);
}
.timeline-progress {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 2px;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px 1px rgba(53, 212, 255, 0.6);
  transition: height 120ms linear;
  z-index: 1;
}
.timeline-progress::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--star-gold);
  box-shadow: 0 0 12px 4px rgba(255, 207, 107, 0.75);
}
.timeline-item { position: relative; margin-bottom: 0.9rem; padding: 1rem 1.1rem 1rem 1.8rem; }
.timeline-item:before {
  content: "";
  position: absolute;
  left: -30px;
  top: 1.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--void-2);
  border: 2px solid var(--accent-2);
  z-index: 2;
}
.timeline-item h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 600; }
.timeline-meta { display: block; margin-bottom: 0.55rem; color: var(--muted); font-size: 0.86rem; }
.timeline-item p { margin: 0; color: var(--muted); line-height: 1.7; }

/* ---------------- Projects ---------------- */
.project-filters { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 180ms ease;
  font-size: 0.88rem;
  font-weight: 500;
}
.filter-btn:hover, .filter-btn:focus-visible { color: var(--text); border-color: rgba(139, 107, 255, 0.5); background: rgba(139, 107, 255, 0.08); }
.filter-btn.active { color: #050614; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; perspective: 1400px; }
.project-card {
  display: block;
  text-decoration: none;
  color: var(--card-text);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
  transform: perspective(1400px) rotateX(0deg) rotateY(0deg) translateY(0);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  will-change: transform;
}
.project-card:hover { box-shadow: 0 25px 50px rgba(2, 6, 23, 0.45); border-color: rgba(53, 212, 255, 0.45); }
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(53, 212, 255, 0.16), transparent 65%);
  transition: opacity 260ms ease;
}
.project-card:hover::before { opacity: 1; }
.project-card--flutter { overflow: hidden; }
.project-card--flutter .project-info { padding: 1rem; }
.project-card--flutter .project-links { display: flex; gap: 0.55rem; align-items: center; margin-top: 0.8rem; flex-wrap: wrap; }
.project-card--flutter .live-demo-btn {
  padding: 0.5rem 0.8rem; min-height: 36px; font-size: 0.8rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #050614;
  box-shadow: 0 8px 20px rgba(12, 20, 44, 0.25); border: 0;
}
.project-card--flutter .secondary-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--card-text);
}
.project-card--flutter .secondary-btn i { font-size: 1rem; }
.project-image img { width: 100%; height: 180px; object-fit: cover; display: block; }
.project-info { padding: 1rem; }
.project-info h3 { margin: 0 0 0.45rem; color: var(--card-text); font-size: 1.05rem; font-weight: 600; }
.project-info p { margin: 0; color: var(--card-muted); line-height: 1.6; }
.project-tags { color: var(--muted); margin-top: 0.6rem; font-size: 0.82rem; }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 0.9rem; text-decoration: none; color: inherit;
  width: 100%; min-width: 0; padding: 1rem; border-radius: 14px;
}
.contact-item i { font-size: 1.3rem; color: var(--accent-2); margin-top: 0.3rem; flex-shrink: 0; }
.social-contact { align-items: center; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; border-radius: 12px; flex-shrink: 0; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.social-icon i { display: block; font-size: 1.3rem; line-height: 1; margin-top: 0; color: #ffffff; }
.social-icon img { display: block; width: 1.2rem; height: 1.2rem; object-fit: cover; }   
.skill-icon { width: 1.1rem; height: 1.1rem; object-fit: contain; display: inline-block; }
.project-card--flutter .secondary-btn img { width: 1rem; height: 1rem; display: block; }
.constellation-mount .skill-source-list li a img, .constellation-mount .skill-source-list li img { width: 18px; height: 18px; display: inline-block; }
.social-github .social-icon { background: #0d1117; border: 1px solid rgba(255,255,255,0.12); }
.social-linkedin .social-icon { background: #0a66c2; border: 1px solid rgba(255,255,255,0.18); }
.contact-content { display: flex; flex-direction: column; min-width: 0; width: 100%; }
.contact-item span { display: block; margin-bottom: 0.2rem; font-weight: 600; }
.contact-item p { margin: 0; color: var(--muted); line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; }

.footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto; padding: 2rem 0 3rem; text-align: center; color: var(--muted); border-top: 1px solid var(--border);
}
.footer span { color: var(--accent-2); font-weight: 600; }

.cert-card .cert-cred { color: var(--muted); margin-top: 0.4rem; }
.cert-card .cert-cred strong { color: var(--text); }
.cert-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; font-weight: 600; }
.cert-card p { color: var(--muted); margin: 0; }
.cert-card a { color: inherit; }

/* ---------------- Floating controls ---------------- */
.scroll-top {
  position: fixed; right: 20px; bottom: 90px; width: 48px; height: 48px; border-radius: 12px;
  background: var(--panel-strong); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); transition: all 240ms ease; z-index: 1299;
}
.scroll-top.show { opacity: 1; transform: translateY(0); }
.scroll-top:hover { border-color: rgba(139, 107, 255, 0.5); }

.fab {
  position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #050614;
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer; box-shadow: 0 16px 34px rgba(139, 107, 255, 0.4);
  z-index: 1305; transition: transform 200ms ease;
}
.fab:hover { transform: scale(1.07) rotate(8deg); }
.fab.open { transform: rotate(135deg); }

.fab-menu {
  position: fixed; right: 20px; bottom: 88px; display: flex; flex-direction: column; gap: 10px; align-items: center;
  padding: 8px; z-index: 1304; pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.94);
  transition: opacity 200ms ease, transform 200ms ease;
}
.fab-menu.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-item {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-strong); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  position: relative; box-shadow: var(--shadow); transition: transform 180ms ease, border-color 180ms ease;
}
.fab-item:hover { transform: translateX(-3px); border-color: rgba(53, 212, 255, 0.5); }
.fab-item i { color: var(--accent-2); }
.fab-label {
  position: absolute; right: 56px; top: 50%; transform: translateY(-50%) translateX(6px);
  background: var(--panel-strong); color: var(--text); padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--border); white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease; font-size: 0.85rem;
}
.fab-item:hover .fab-label, .fab-item:focus .fab-label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------------- Reveal on scroll ---------------- */
.section.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.section.reveal.active { opacity: 1; transform: translateY(0); }

/* Staggered card-by-card reveal for project and certification grids */
.stagger-grid > * {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 520ms ease, transform 520ms ease;
}
.stagger-grid.in-view > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}

:focus { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid rgba(53, 212, 255, 0.5); outline-offset: 3px; }

/* ---------------- Two-column layout ---------------- */
.two-column {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.25rem;
  align-items: start;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}
.right-column { display: flex; flex-direction: column; gap: 1rem; padding-right: 6px; }
.right-column .section { margin-bottom: 0; }
.two-column .section {
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 980px) {
  .two-column { grid-template-columns: 1fr; padding: 0 1rem; }
  .two-column .section { padding: 1.25rem; }
  .right-column { max-height: none; overflow: visible; }
}

/* ---------------- Constellation skill map ---------------- */
.skills-grid { gap: 0.6rem; }
.skill-card { padding: 0.9rem; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.skill-card h3 { margin: 0; }
.skill-list li { padding: 0.38rem 0.6rem; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.skill-list li span { display: inline-block; text-align: left; }

.constellation-panel {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  padding-bottom: 4px;
}
.constellation-panel:hover { border-color: rgba(139, 107, 255, 0.4); }

.panel-header {
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  margin: 0;
  text-align: left;
  max-width: none;
}
.panel-header h2 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.panel-header p { margin: 0; color: var(--muted); font-size: 0.86rem; }

.accordion-icon {
  font-size: 1.1rem;
  color: var(--accent-2);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(53, 212, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.accordion-icon img { width: 18px; height: 18px; display: block; }

.constellation-mount { padding: 4px 4px 10px; }
.constellation-mount .skill-source-list { list-style: none; margin: 0; padding: 10px 16px 14px; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.constellation-mount.enhanced .skill-source-list { display: none; }
.constellation-mount .skill-source-list li {
  background: rgba(139, 107, 255, 0.08);
  border: 1px solid rgba(139, 107, 255, 0.16);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.constellation-mount .skill-source-list li a { display: inline-flex; align-items: center; gap: 0.4rem; color: inherit; text-decoration: none; }

.constellation-svg { display: block; width: 100%; height: auto; }
.constellation-line {
  stroke: rgba(139, 107, 255, 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}
.star-group { cursor: pointer; outline: none; }
.star-hit { fill: transparent; }
.star-core {
  fill: var(--star-gold);
  transition: r 200ms ease, fill 200ms ease;
}
.star-group:hover .star-core, .star-group:focus-visible .star-core {
  fill: var(--nebula-cyan);
}
.star-label {
  fill: var(--muted);
  font-family: "IBM Plex Mono", var(--font-display);
  font-size: 10.5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.star-group:hover .star-label, .star-group:focus-visible .star-label {
  opacity: 1;
  transform: translateY(0);
  fill: var(--text);
}
.star-group:focus-visible .star-core { outline: none; filter: drop-shadow(0 0 4px var(--nebula-cyan)); }


/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .navbar { padding: 0.7rem 0; }
  .nav-links { display: none; }
  .hero { min-height: 78vh; }
  .hero-orbit { width: 640px; height: 640px; }
}

@media (max-width: 640px) {
  .section { width: min(var(--max-width), calc(100% - 1.25rem)); padding: 4rem 0; }
  .about-content { padding: 1.2rem; }
  .hero-status { flex-direction: column; align-items: center; }
  .hero-metrics { grid-template-columns: 1fr; max-width: 220px; }
  .creative-card { flex: 1 1 100%; }
  .creative-card img { height: 150px; }
  .project-image img { height: 150px; }
  .hero-orbit { width: 420px; height: 420px; }
  .project-card--flutter .project-links { gap: 0.45rem; }
  .project-card--flutter .live-demo-btn { padding: 0.46rem 0.7rem; font-size: 0.75rem; }
  .project-card--flutter .secondary-btn { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
  .fab { right: 14px; bottom: 16px; }
  .fab-menu { right: 14px; bottom: 74px; }
  .scroll-top { right: 14px; bottom: 78px; }
}

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

small { color: var(--muted); }

@media print {
  :root { color-scheme: light; }
  body { background: #fff !important; color: #000 !important; }
  .header, .fab, .fab-menu, .scroll-top, #starfield, .nebula, .hero-orbit { display: none !important; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .cursor { animation: none; opacity: 1; }
  .hero-spotlight { display: none; }
  .project-card { transform: none !important; }
  .project-card::before { display: none; }
  .stagger-grid > * { opacity: 1; transform: none; }
  .radar-sweep, .telemetry-dot, .radar-blip { animation: none; }
}