/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  --bg:         #05000f;
  --bg-2:       #080018;
  --bg-3:       #0e0826;
  --bar-bg:     #160a35;
  --green:      #bf5fff;            /* Hornets purple */
  --cyan:       #00d4ff;            /* Hornets teal-blue */
  --blue:       #4d9fff;            /* mid royal blue */
  --green-dim:  #7c3aed;
  --green-dark: #1a0050;
  --text:       #dce8ff;            /* slightly blue-tinted white */
  --text-dim:   #6b72aa;
  --font:       'Courier New', Courier, monospace;
  --glow:       0 0 8px #bf5fff, 0 0 20px #bf5fff55;
  --glow-sm:    0 0 4px #bf5fff, 0 0 10px #bf5fff44;
  --cyan-glow:  0 0 8px #00d4ff, 0 0 20px #00d4ff55;
  --blue-glow:  0 0 8px #4d9fff, 0 0 20px #4d9fff44;
}

/* ── Scanline overlay ───────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Nav ────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: rgba(0,0,0,0.85);
  border-bottom: 1px solid var(--green-dim);
  backdrop-filter: blur(4px);
}
.nav-logo {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-shadow: var(--glow-sm);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover {
  color: var(--green);
  text-shadow: var(--glow-sm);
}
/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: var(--font);
  font-size: 1.2rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
#matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  max-width: 800px;
}
.hero-label {
  font-size: 0.7rem;
  color: var(--green-dim);
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}
.hero-label::before { content: '> '; color: var(--green); }

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: bold;
  color: var(--green);
  text-shadow: var(--glow);
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  position: relative;
}

/* Glitch */
.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
}
.hero-title.glitch-active::before {
  animation: glitch-1 0.4s steps(2) forwards;
  color: var(--cyan);
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  transform: translateX(-3px);
}
.hero-title.glitch-active::after {
  animation: glitch-2 0.4s steps(2) 0.1s forwards;
  color: #00d4ff;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  transform: translateX(3px);
}
@keyframes glitch-1 {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes glitch-2 {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--cyan);
  letter-spacing: 0.25em;
  margin-bottom: 2rem;
  text-shadow: var(--cyan-glow);
}

.hero-typed-wrap {
  font-size: 0.9rem;
  color: var(--text);
  min-height: 1.5rem;
  margin-bottom: 1.5rem;
}
.hero-typed-wrap::before { content: '$ '; color: var(--green); }
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.countdown-num {
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  font-weight: bold;
  color: var(--green);
  text-shadow: var(--glow);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}
.countdown-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}
.countdown-sep {
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  color: var(--green-dim);
  line-height: 1;
  align-self: flex-start;
  padding-top: 0.05em;
}

/* ── Shared section styles ──────────────────────────────── */
section {
  padding: 3.5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.section-header {
  font-size: 0.8rem;
  color: var(--blue);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
.section-header::before { content: '> '; }
h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  color: var(--green);
  text-shadow: var(--glow-sm);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Terminal window ────────────────────────────────────── */
.terminal {
  background: var(--bg-3);
  border: 1px solid var(--green-dim);
  border-radius: 6px;
  overflow: hidden;
}
.terminal-bar {
  background: var(--bar-bg);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--green-dark);
}
.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green  { background: #28ca41; }
.terminal-title {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 0.5rem;
  letter-spacing: 0.1em;
}
.terminal-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text);
}
.terminal-body .prompt::before { content: '$ '; color: var(--green); }
.terminal-body .comment { color: var(--text-dim); }
.terminal-body .hi { color: var(--green); }
.terminal-body .hi2 { color: var(--cyan); }

/* ── About ──────────────────────────────────────────────── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.ascii-art {
  color: var(--green);
  font-size: 0.65rem;
  line-height: 1.3;
  text-shadow: var(--glow-sm);
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--green-dark);
  border-radius: 6px;
  background: var(--bg-3);
  white-space: pre;
}

/* ── Event Details ──────────────────────────────────────── */
#event .event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.event-card {
  background: var(--bg-3);
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.event-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--cyan-glow);
}
.event-card-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
.event-card-label::before { content: '> '; color: var(--green); }
.event-card-value {
  font-size: 1.05rem;
  color: var(--green);
  font-weight: bold;
}
.event-card-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* ── Kiro ───────────────────────────────────────────────── */
#kiro .kiro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.kiro-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.kiro-features li {
  padding: 0.4rem 0;
  color: var(--text);
  font-size: 0.9rem;
}
.kiro-features li::before {
  content: '[✓] ';
  color: var(--green);
}
.kiro-link {
  display: inline-block;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--cyan);
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.kiro-link:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: var(--cyan-glow);
}

/* Kiro demo terminal */
#kiro-demo .terminal-body {
  min-height: 220px;
}
.kiro-line { margin-bottom: 0.25rem; }
.kiro-line.user::before { content: '❯ student: '; color: var(--cyan); }
.kiro-line.kiro-resp::before { content: '⬡ kiro:    '; color: var(--green); }
.kiro-line.code { color: var(--text-dim); padding-left: 1rem; }

/* ── Skills ─────────────────────────────────────────────── */
#skills .skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.skill-card {
  background: var(--bg-3);
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.skill-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--cyan-glow);
}
.skill-card-dir {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.skill-card-name {
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.skill-card-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.skill-card-dl {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.skill-card-dl::before { content: '↓ '; }

/* ── Impact / Timeline ──────────────────────────────────── */
#impact .timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1rem;
}
#impact .timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--cyan), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: var(--cyan-glow);
}
.timeline-year {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  margin-bottom: 0.4rem;
}
.timeline-event {
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 0.4rem;
  font-weight: bold;
}
.timeline-detail {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.stat-number {
  color: var(--green);
  text-shadow: var(--glow-sm);
  font-weight: bold;
}
.loading-block {
  color: var(--green-dim);
  font-style: normal;
}
.loading-block .blink {
  animation: blink 1s step-end infinite;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--green-dark);
  background: var(--bg-3);
  border-radius: 4px;
}
.stat-item { text-align: center; flex: 1; min-width: 100px; }
.stat-val {
  font-size: 1.6rem;
  color: var(--green);
  text-shadow: var(--glow-sm);
  font-weight: bold;
  display: block;
}
.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  display: block;
  margin-top: 0.25rem;
}

/* ── Contact / Footer ───────────────────────────────────── */
#contact {
  text-align: center;
  border-top: 1px solid var(--green-dark);
  padding: 2.5rem 1.5rem;
  max-width: 100%;
}
.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}
.contact-name {
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 0.75rem;
}
.contact-info {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 2;
}
.contact-info a {
  color: var(--cyan);
  text-decoration: none;
}
.contact-info a:hover { text-decoration: underline; }
.footer-line {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.footer-line span { color: var(--green); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 700px) {
  #nav { padding: 0.6rem 1rem; }
  .nav-links { display: none; flex-direction: column; gap: 0.6rem; }
  .nav-links.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--green-dark); }
  .nav-toggle { display: block; }

  section { padding: 2.5rem 1rem; }

  .countdown { gap: 0.75rem; }

  #about .about-grid,
  #kiro .kiro-grid,
  #skills .skills-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar { gap: 0.75rem; padding: 1rem; }

  .ascii-art { font-size: 0.5rem; }

  #kiro-demo .terminal-body { min-height: 160px; }

  .contact-inner { padding: 0 0.5rem; }
}

