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

:root {
  --blue:     #4A9EFF;
  --blue-d:   #1A6EE8;
  --blue-dim: rgba(74,158,255,0.12);
  --cyan:     #00D4FF;
  --dark:     #060810;
  --dark-2:   #0B0F1A;
  --dark-3:   #0F1525;
  --text:     rgba(255,255,255,0.85);
  --muted:    rgba(255,255,255,0.4);
  --mono:     'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ── Animated canvas background ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  transition: background 0.3s, border-color 0.3s;
}
#nav.scrolled {
  background: rgba(6,8,16,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74,158,255,0.15);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-home {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-home:hover { color: var(--blue); }
.nav-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-right: auto;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

/* ── Hero ── */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}
.hero-mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s forwards;
}
.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.5rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}
.hero-title {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s forwards;
}
.hero-sub {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 400px;
  opacity: 0;
  animation: fadeUp 0.7s 0.35s forwards;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.4s forwards;
}
.chip {
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(74,158,255,0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.04em;
  background: var(--blue-dim);
}
.hero-cta {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--blue);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
  opacity: 0;
  animation: fadeUp 0.7s 0.5s forwards;
}
.hero-cta:hover { background: #6FB3FF; transform: translateY(-2px); }

/* Terminal */
.hero-terminal {
  opacity: 0;
  animation: fadeUp 0.9s 0.6s forwards;
}
.terminal {
  background: #0D1117;
  border: 1px solid rgba(74,158,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(74,158,255,0.05);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
}
.terminal-bar {
  background: #161B22;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot--red    { background: #FF5F57; }
.dot--yellow { background: #FFBD2E; }
.dot--green  { background: #28CA41; }
.terminal-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}
.terminal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.t-prompt { color: var(--cyan); margin-right: 0.5rem; }
.t-cmd    { color: #E6EDF3; }
.t-out    { color: rgba(255,255,255,0.45); padding-left: 1rem; }
.t-cursor {
  display: inline-block;
  color: var(--cyan);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Progress bar & glitch ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  z-index: 200;
  box-shadow: 0 0 12px rgba(0,212,255,0.5);
}

.glitchable { position: relative; }

.glitching::before,
.glitching::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  white-space: pre;
  background: var(--dark);
  overflow: hidden;
}
.glitching::before {
  color: var(--cyan);
  transform: translate(3px, -2px);
  clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%);
  animation: glitch-jitter 0.18s steps(2) infinite;
}
.glitching::after {
  color: #FF4D6D;
  transform: translate(-3px, 2px);
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation: glitch-jitter 0.22s steps(2) infinite reverse;
}
@keyframes glitch-jitter {
  0%   { transform: translate(2px, -2px); }
  50%  { transform: translate(-3px, 1px); }
  100% { transform: translate(1px, 2px); }
}

@media (prefers-reduced-motion: reduce) {
  .glitching::before, .glitching::after { display: none; }
}

/* ── Shared ── */
section {
  position: relative;
  z-index: 1;
  padding: 7rem 2rem;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
}

/* ── About ── */
#about { background: var(--dark-2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 160px;
}
.a-stat { text-align: right; }
.a-num {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--blue);
  line-height: 1;
}
.a-plus { font-size: 2rem; }
.a-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ── NASA ── */
#nasa {
  background:
    radial-gradient(ellipse 70% 60% at 80% 10%, rgba(74,158,255,0.08) 0%, transparent 60%),
    var(--dark);
  border-top: 1px solid rgba(74,158,255,0.12);
  border-bottom: 1px solid rgba(74,158,255,0.12);
}

.nasa-intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 720px;
  margin: -1.5rem 0 3rem;
}

.nasa-intro strong { color: var(--text); }

.nasa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.nasa-card {
  background: rgba(74,158,255,0.04);
  border: 1px solid rgba(74,158,255,0.18);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.nasa-card:hover {
  border-color: rgba(74,158,255,0.45);
  background: rgba(74,158,255,0.08);
  transform: translateY(-4px);
}

.nasa-card--wide {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(74,158,255,0.08) 0%, rgba(0,212,255,0.04) 100%);
  border-color: rgba(0,212,255,0.3);
}

.nasa-icon { font-size: 1.8rem; margin-bottom: 0.9rem; }

.nasa-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.nasa-card--wide h3 { font-size: 1.25rem; color: var(--cyan); }

.nasa-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
}

.nasa-card p strong { color: var(--cyan); }

.nasa-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--blue);
  transition: color 0.2s;
}

.nasa-link:hover { color: var(--cyan); }

@media (max-width: 900px) {
  .nasa-grid { grid-template-columns: 1fr; }
  .nasa-card--wide { grid-column: span 1; }
}

/* ── Career Timeline ── */
#career { background: var(--dark); }
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.tl-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 0.1rem;
}
.tl-year {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  white-space: nowrap;
  margin-bottom: 0.4rem;
}
.tl-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, rgba(74,158,255,0.3), transparent);
  margin-right: 0;
  align-self: stretch;
}
.timeline-item:last-child .tl-line { display: none; }
.tl-content {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1.5rem;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s, background 0.2s;
}
.tl-content:hover {
  border-color: rgba(74,158,255,0.25);
  background: rgba(74,158,255,0.04);
}
.timeline-item--current .tl-content {
  border-color: rgba(74,158,255,0.3);
  background: rgba(74,158,255,0.05);
}
.timeline-item--edu .tl-content {
  border-color: rgba(0,212,255,0.2);
}
.tl-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.tl-content h3 {
  font-size: 1rem;
  font-weight: 600;
}
.tl-company {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--blue);
  padding: 0.15rem 0.6rem;
  background: var(--blue-dim);
  border-radius: 4px;
}
.timeline-item--edu .tl-company {
  color: var(--cyan);
  background: rgba(0,212,255,0.1);
}
.tl-location {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.tl-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

/* ── Expertise ── */
#expertise { background: var(--dark-2); }
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.exp-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.exp-card:hover {
  border-color: rgba(74,158,255,0.3);
  background: rgba(74,158,255,0.05);
  transform: translateY(-4px);
}
.exp-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.exp-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.exp-card p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── Beyond Work ── */
#beyond { background: var(--dark-3); }
.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.beyond-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: border-color 0.2s;
}
.beyond-card:hover { border-color: rgba(74,158,255,0.2); }
.beyond-card--feature {
  border-color: rgba(74,158,255,0.25);
  background: rgba(74,158,255,0.04);
}
.beyond-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.beyond-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.beyond-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
}
.beyond-card strong { color: var(--text); }
.beyond-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.beyond-link:hover { color: var(--cyan); }

/* ── Contact ── */
#contact { background: var(--dark); }
.contact-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contact-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.contact-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.contact-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--blue);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}
.contact-btn:hover { background: #6FB3FF; transform: translateY(-2px); }

/* ── Footer ── */
footer {
  background: #040508;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--blue);
}
.footer-sub {
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-home {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-home:hover { color: var(--blue); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #hero { grid-template-columns: 1fr; }
  .hero-terminal { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; }
  .expertise-grid { grid-template-columns: 1fr 1fr; }
  .beyond-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .expertise-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .timeline-item { grid-template-columns: 60px 1fr; gap: 1rem; }
}
