/* ========= TOKENS ========= */
:root {
  --bg: #050608;
  --bg-soft: #0b0e13;
  --surface: #0f141b;
  --text: #f2f5f8;
  --text-dim: #8b97a6;
  --neon: #2fe6ff;
  --neon-soft: rgba(47, 230, 255, 0.15);
  --neon-glow: rgba(47, 230, 255, 0.45);
  --border: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --max: 1080px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 20% 10%, var(--neon-soft), transparent 45%),
    radial-gradient(700px circle at 85% 90%, rgba(47, 230, 255, 0.08), transparent 50%);
  pointer-events: none;
}

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

/* ========= NAV ========= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 8, 0.55);
  border-bottom: 1px solid var(--border);
}
.nav__logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
}
.nav__logo span { color: var(--neon); }
.nav__links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.nav__links a {
  position: relative;
  transition: color 0.25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
  transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

/* ========= HERO ========= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.2rem, 6vw, 4rem);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero__greeting {
  font-family: "JetBrains Mono", monospace;
  color: var(--neon);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.hero__name {
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -2px;
  background: linear-gradient(180deg, #fff 30%, #8fd9e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__role {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1rem, 3.5vw, 1.7rem);
  color: var(--neon);
  margin: 0.8rem 0 1.6rem;
  min-height: 1.6em;
  text-shadow: 0 0 18px var(--neon-glow);
}
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__desc {
  max-width: 580px;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero__desc strong { color: var(--text); }
.hero__cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 1.7rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--neon);
  color: #03252b;
  box-shadow: 0 0 20px var(--neon-glow);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px var(--neon-glow), 0 0 60px var(--neon-soft);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--neon);
  color: var(--neon);
  transform: translateY(-3px);
  box-shadow: 0 0 22px var(--neon-soft);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.hero__mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  position: relative;
}
.hero__mouse::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 7px;
  border-radius: 2px;
  background: var(--neon);
  animation: scroll 1.6s infinite;
}
@keyframes scroll { 0% { opacity: 1; top: 7px; } 100% { opacity: 0; top: 18px; } }

/* ========= SECTIONS ========= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem clamp(1.2rem, 6vw, 4rem);
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section__index {
  font-family: "JetBrains Mono", monospace;
  color: var(--neon);
  font-size: 1rem;
}
.section__title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
}
.section__title::after {
  content: "";
  display: inline-block;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, var(--neon), transparent);
  margin-left: 1rem;
  vertical-align: middle;
}

/* ========= ABOUT ========= */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about__text p { color: var(--text-dim); margin-bottom: 1.1rem; }
.about__text strong { color: var(--text); }
.about__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.about__pills span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--neon);
  border: 1px solid var(--neon-soft);
  background: var(--neon-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  transition: box-shadow 0.3s, transform 0.25s var(--ease);
}
.about__pills span:hover {
  box-shadow: 0 0 16px var(--neon-glow);
  transform: translateY(-2px);
}
.about__facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about__facts li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.about__facts li:hover {
  border-color: var(--neon);
  transform: translateX(6px);
}
.about__facts .num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--neon);
  font-family: "JetBrains Mono", monospace;
  line-height: 1;
}
.about__facts .lbl { color: var(--text-dim); font-size: 0.9rem; }

/* ========= SKILLS ========= */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.skill-group:hover {
  border-color: var(--neon);
  box-shadow: 0 0 30px var(--neon-soft);
}
.skill-group h3 {
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
  color: var(--neon);
}
.bar { margin-bottom: 1.1rem; }
.bar span {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
}
.bar__track {
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  overflow: hidden;
}
.bar__track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 50px;
  background: linear-gradient(90deg, #1aa9bd, var(--neon));
  box-shadow: 0 0 12px var(--neon-glow);
  transition: width 1.2s var(--ease);
}

/* ========= PROJECTS ========= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--neon-soft), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--neon);
}
.card:hover::before { opacity: 1; }
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card__tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--neon);
  border: 1px solid var(--neon-soft);
  background: var(--neon-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.card__arrow { color: var(--text-dim); transition: transform 0.3s, color 0.3s; }
.card:hover .card__arrow { transform: translate(4px, -4px); color: var(--neon); }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--text-dim); font-size: 0.92rem; flex-grow: 1; }
.card__stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.card__stack span {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.projects__more { text-align: center; margin-top: 2.5rem; }

/* ========= CONTACT ========= */
.section--contact { text-align: center; padding-bottom: 4rem; }
.contact .section__index { display: block; margin-bottom: 0.8rem; }
.contact__title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff, #8fd9e8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact p { color: var(--text-dim); max-width: 480px; margin: 0 auto 2rem; }
.contact__links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ========= FOOTER ========= */
.footer {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer strong { color: var(--neon); }

/* ========= REVEAL ANIMATION ========= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========= RESPONSIVE ========= */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .about { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
