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

:root {
  --bg: #000000;
  --surface: rgba(8, 8, 20, .65);
  --surface-solid: #08081a;
  --border: rgba(100, 100, 200, .12);
  --border-hover: rgba(146, 212, 252, .35);
  --text: #cecefe;
  --text-dim: #8888aa;
  --blue: #92d4fc;
  --purple: #9702fa;
  --nav-h: 60px;
  --container: 1060px;
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--purple);
  color: #fff;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--blue); }

.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── PARTICLES BACKGROUND ───────────────────────────── */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#particles-js canvas {
  display: block;
}

/* ─── NAV ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  padding: 0 20px;
  pointer-events: none;
  transition: top .4s cubic-bezier(.16, 1, .3, 1);
}

#nav.hidden {
  top: -80px;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 8px;
  background: rgba(8, 8, 24, .55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(146, 212, 252, .1);
  border-radius: 100px;
  pointer-events: all;
  overflow: hidden;
}

.nav-glow {
  position: absolute;
  inset: -1px;
  border-radius: 100px;
  background: conic-gradient(from var(--glow-angle, 0deg), transparent 60%, rgba(146, 212, 252, .15), rgba(151, 2, 250, .12), transparent 100%);
  z-index: -1;
  animation: navGlowSpin 6s linear infinite;
  opacity: 0;
  transition: opacity .5s;
}

#nav.scrolled .nav-glow {
  opacity: 1;
}

@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes navGlowSpin {
  to { --glow-angle: 360deg; }
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -1px;
  padding: 6px 16px 6px 14px;
  transition: color .3s;
}

.nav-logo:hover {
  color: #fff;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(146, 212, 252, .15);
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
  transition: color .25s, background .25s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(146, 212, 252, .06);
}

.nav-links a.active {
  color: #fff;
  background: rgba(146, 212, 252, .1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  pointer-events: all;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ─── HERO ───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.hero-content {
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  background: rgba(146, 212, 252, .04);
}

.hero-name {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: var(--text-dim);
  margin-bottom: 44px;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  opacity: .5;
}

.scroll-dot {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { cy: 12; opacity: 1; }
  50% { cy: 26; opacity: .2; }
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: transform .2s, box-shadow .3s;
  cursor: pointer;
  border: none;
  letter-spacing: .5px;
}

.btn:hover { transform: translateY(-2px); }

.btn-glow {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 0 30px rgba(146, 212, 252, .2), 0 0 60px rgba(151, 2, 250, .1);
}

.btn-glow:hover {
  box-shadow: 0 0 40px rgba(146, 212, 252, .35), 0 0 80px rgba(151, 2, 250, .2);
}

.btn-glass {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  border-color: var(--border-hover);
  background: rgba(146, 212, 252, .06);
}

/* ─── SECTIONS ───────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}

.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}

.big-heading {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 32px;
}

/* ─── GLASS CARD ─────────────────────────────────────── */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─── ABOUT ──────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-left p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: .97rem;
}

/* code window */
.code-window .code-dots,
.terminal .code-dots {
  display: flex;
  gap: 6px;
  padding: 14px 18px 0;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-tab {
  padding: 8px 18px 0;
  font-size: .7rem;
  color: var(--text-dim);
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
}

.code-body {
  padding: 16px 20px 20px;
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
  font-size: .78rem;
  line-height: 1.9;
  overflow-x: auto;
}

.c-key { color: var(--blue); }
.c-str { color: #98c379; }
.c-num { color: #d19a66; }
.c-arr { color: #c678dd; }

/* stats */
.stat-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.stat-pill {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-lbl {
  display: block;
  font-size: .65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ─── EXPERIENCE ─────────────────────────────────────── */
.xp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.xp-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}

.xp-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(146, 212, 252, .08);
}

.xp-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(146, 212, 252, .08);
  color: var(--blue);
  margin-bottom: 18px;
}

.xp-card h3 {
  font-size: 1rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.xp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xp-tags span {
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(146, 212, 252, .06);
  border: 1px solid rgba(146, 212, 252, .1);
  color: var(--text-dim);
  transition: color .2s, border-color .2s;
}

.xp-card:hover .xp-tags span {
  color: var(--text);
  border-color: rgba(146, 212, 252, .2);
}

/* ─── SCHOOL ─────────────────────────────────────────── */
.edu-summary {
  padding: 24px 28px;
  margin-bottom: 24px;
}

.edu-summary p {
  color: var(--text-dim);
  font-size: .92rem;
  margin-bottom: 6px;
}

.edu-summary strong { color: var(--text); }

.edu-roles {
  color: var(--blue) !important;
  font-size: .82rem !important;
  font-weight: 500;
  margin-top: 8px !important;
}

.year-block {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.year-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}

.year-toggle:hover {
  background: rgba(146, 212, 252, .03);
}

.chevron {
  transition: transform .3s;
  color: var(--text-dim);
}

.year-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.year-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}

.year-content.open {
  max-height: 600px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead { background: rgba(255, 255, 255, .02); }

th {
  text-align: left;
  padding: 10px 24px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

td {
  padding: 11px 24px;
  font-size: .88rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

td:last-child { text-align: right; width: 1%; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(146, 212, 252, .02); }

.g {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .82rem;
  background: rgba(146, 212, 252, .1);
  color: var(--blue);
}

.g.ten {
  background: linear-gradient(135deg, rgba(146, 212, 252, .15), rgba(151, 2, 250, .15));
  color: #c4a0ff;
}

.g.v {
  background: rgba(255, 255, 255, .04);
  color: var(--text-dim);
}

.doc-link {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  background: rgba(146, 212, 252, .08);
  color: var(--blue);
  border: 1px solid rgba(146, 212, 252, .15);
  transition: background .2s, border-color .2s;
}

.doc-link:hover {
  background: rgba(146, 212, 252, .18);
  border-color: rgba(146, 212, 252, .4);
}

/* ─── CONTACT ────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-left p {
  color: var(--text-dim);
  margin-bottom: 28px;
  font-size: .97rem;
}

/* terminal */
.terminal .term-body {
  padding: 16px 20px 20px;
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
  font-size: .78rem;
  line-height: 2;
}

.terminal .term-body p { margin: 0; }
.t-p { color: var(--blue); }
.t-c { color: var(--text); }
.t-o { color: var(--text-dim); padding-left: 18px; }

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

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

/* contact links */
.contact-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color .25s, transform .2s, background .25s;
}

.contact-row:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  background: rgba(146, 212, 252, .04);
}

.contact-row > svg:first-child {
  flex-shrink: 0;
  color: var(--blue);
}

.contact-row div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-row strong {
  font-size: .82rem;
  color: var(--text);
  font-weight: 600;
}

.contact-row span {
  font-size: .78rem;
  color: var(--text-dim);
}

.contact-row .arrow {
  color: var(--text-dim);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .25s, transform .25s;
}

.contact-row:hover .arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--text-dim);
}

.footer-dim { opacity: .4; }

/* ─── REVEAL ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1),
              transform .8s cubic-bezier(.16, 1, .3, 1);
}

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

/* stagger children */
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* hero stagger */
#hero .reveal:nth-child(1) { animation: fadeUp .7s .2s both; }
#hero .reveal:nth-child(2) { animation: fadeUp .7s .35s both; }
#hero .reveal:nth-child(3) { animation: fadeUp .7s .5s both; }
#hero .reveal:nth-child(4) { animation: fadeUp .7s .65s both; }

#hero .reveal {
  opacity: 0;
  transform: none;
  transition: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .xp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-pill {
    display: none;
  }

  .nav-toggle {
    display: flex;
    z-index: 110;
    position: fixed;
    top: 24px;
    right: 20px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 80vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 80px 36px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .35s ease;
    border-left: 1px solid var(--border);
    border-radius: 0;
  }

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

  .nav-links a {
    font-size: .82rem;
    padding: 12px 16px;
    border-radius: 10px;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .xp-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .stat-row { gap: 8px; }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .footer-row {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}
