/* ============================================
   TOKENS
   ============================================ */
:root {
  --bg: #05070d;
  --bg-panel: #0b0f1a;
  --bg-panel-2: #0e1424;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --text: #edeff7;
  --text-dim: #9aa1b8;
  --text-faint: #5c6280;

  --cyan: #4cf3ff;
  --violet: #b84fff;
  --gold: #ffd166;

  --grad-primary: linear-gradient(120deg, var(--cyan), var(--violet));
  --grad-text: linear-gradient(100deg, #ffffff 0%, var(--cyan) 45%, var(--violet) 100%);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 14px;
  --max-width: 1080px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   WARP CANVAS BACKGROUND
   ============================================ */
#warp-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 30%, #0c1224 0%, var(--bg) 70%);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 13, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 7, 13, 0.85);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.nav__logo .dot { color: var(--cyan); }

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-dim);
}

.nav__links a { transition: color 0.2s; position: relative; }
.nav__links a:hover { color: var(--text); }

.nav__resume {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  transition: border-color 0.2s, background 0.2s;
}
.nav__resume:hover {
  border-color: var(--cyan);
  background: rgba(76, 243, 255, 0.08);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(78vw, 320px);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 100px 32px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { font-family: var(--font-display); font-size: 20px; }

/* ============================================
   LAYOUT HELPERS
   ============================================ */
main { position: relative; z-index: 1; }

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

.section__head { margin-bottom: 56px; }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn--primary {
  background: var(--grad-primary);
  color: #05070d;
  font-weight: 600;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(76, 243, 255, 0.25);
}

.btn--ghost {
  border: 1px solid var(--border-hover);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  background: rgba(76, 243, 255, 0.06);
  transform: translateY(-2px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 140px 24px 80px;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 128px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}

.hero__role {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--text-dim);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero__desc {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 40px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  background: var(--cyan);
  border-radius: 100px;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ============================================
   ABOUT
   ============================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
}

.about__text p {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 16px;
}

.about__facts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}

.fact { display: flex; flex-direction: column; gap: 4px; }
.fact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fact__value { font-size: 15px; color: var(--text); }

/* ============================================
   SKILLS
   ============================================ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skill-group {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s;
}
.skill-group:hover { border-color: var(--border-hover); }

.skill-group h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--text-dim);
  font-weight: 500;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.tags--sm .tag { font-size: 11px; padding: 5px 10px; }

/* ============================================
   HIGHLIGHTS (stat row after hero)
   ============================================ */
.section--highlights {
  padding-top: 40px;
  padding-bottom: 40px;
}
.section--highlights .achievements__grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   PROJECTS
   ============================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 79, 255, 0.4);
  box-shadow: 0 20px 50px rgba(76, 243, 255, 0.08);
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-card__links { display: flex; gap: 14px; }
.project-card__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.project-card__links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.project-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 20px;
}

.project-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
}

.project-bullets li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.project-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-primary);
}

.project-more {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.project-more summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.project-more summary::-webkit-details-marker { display: none; }

.project-more summary::after {
  content: "▾";
  display: inline-block;
  transition: transform 0.25s var(--ease);
  font-size: 11px;
}

.project-more[open] summary::after { transform: rotate(180deg); }

.project-more summary:hover { color: #fff; }

.project-more__content {
  margin-top: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: expandIn 0.3s var(--ease);
}

.project-more__content p {
  font-size: 13.5px;
  margin-bottom: 12px;
}
.project-more__content p:last-child { margin-bottom: 0; }

.project-more__content strong { color: var(--text); }

.project-more__content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.project-more__content ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.5;
}

.project-more__content ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--violet);
  font-size: 12px;
}

.project-more__img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
}

@keyframes expandIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--cyan), var(--violet));
  opacity: 0.35;
}

.timeline__item {
  position: relative;
  padding-bottom: 48px;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(76, 243, 255, 0.6);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline__content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 8px 0 10px;
  font-weight: 600;
}

.timeline__content p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 600px;
}

/* ============================================
   ACHIEVEMENTS
   ============================================ */
.achievements__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.achievement-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.achievement-card:hover {
  border-color: rgba(76, 243, 255, 0.35);
  transform: translateY(-3px);
}

.achievement-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.achievement-card p {
  color: var(--text-dim);
  font-size: 14px;
}

.achievement-card--stat {
  text-align: center;
  background: linear-gradient(160deg, var(--bg-panel-2), var(--bg-panel));
}

.achievement-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

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

/* ============================================
   CONTACT
   ============================================ */
.section--contact { padding-bottom: 60px; }

.contact__box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(32px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact__box::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 0%, rgba(184, 79, 255, 0.12), transparent 60%);
  pointer-events: none;
}

.contact__box .section__eyebrow { justify-self: center; }
.contact__box .section__title { margin-bottom: 20px; }

.contact__desc {
  color: var(--text-dim);
  max-width: 460px;
  margin: 0 auto 36px;
}

.contact__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, transform 0.2s;
}
.social-link:hover { color: var(--cyan); transform: translateY(-2px); }
.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__resume { display: none; }
  .nav__toggle { display: flex; }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__facts { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 24px; }

  .skills__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .achievements__grid,
  .achievements__grid--certs,
  .section--highlights .achievements__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 80px 20px; }
  .hero { padding-top: 120px; }
}
