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

:root {
  --bg: #030014;
  --bg-panel: rgba(10, 8, 32, 0.6);
  --cyan: #00e5ff;
  --violet: #7b2fff;
  --text: #c9d4e3;
  --text-dim: #6b7690;
  --line: rgba(0, 229, 255, 0.15);
  --hover-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --return-ease: cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

html { scroll-behavior: smooth; }

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

::selection { background: var(--cyan); color: var(--bg); }

/* ============ FX LAYERS ============ */
#progressBar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px var(--cyan);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

#bootScreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#bootScreen.done { opacity: 0; pointer-events: none; }

#bootLog {
  font-family: monospace;
  font-size: 14px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  white-space: pre-wrap;
  min-width: 320px;
  min-height: 8em;
}

/* neon custom cursor (desktop only) */
#cursorDot, #cursorRing {
  display: none;
  position: fixed;
  top: 0; left: 0;
  z-index: 250;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

#cursorDot {
  width: 6px; height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

#cursorRing {
  width: 34px; height: 34px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}

#cursorRing.on-target {
  width: 56px; height: 56px;
  border-color: var(--violet);
  box-shadow: 0 0 20px rgba(123, 47, 255, 0.4);
}

@media (hover: hover) and (pointer: fine) {
  body, a, button, .card-wrap { cursor: none; }
  #cursorDot, #cursorRing { display: block; }
}

h1, h2, h3, .btn, .nav-logo, .sound-toggle {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
}

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

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(3, 0, 20, 0.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.25s, text-shadow 0.25s;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan);
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  padding: 7px 11px;
  cursor: pointer;
  transition: all 0.25s;
}

.lang-btn:hover { color: var(--cyan); background: rgba(0, 229, 255, 0.08); }

.lang-btn.active {
  color: var(--bg);
  background: var(--cyan);
  text-shadow: none;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

.sound-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--cyan);
  font-size: 11px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.25s;
}

.sound-toggle:hover { background: rgba(0, 229, 255, 0.1); box-shadow: 0 0 15px rgba(0, 229, 255, 0.3); }
.sound-toggle.muted { color: var(--text-dim); border-color: rgba(255,255,255,0.08); }
.sound-icon { animation: pulse 2s infinite; display: inline-block; }
.sound-toggle.muted .sound-icon { animation: none; opacity: 0.4; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000 url("https://i.ibb.co/rm2ZShj/sky1.jpg") center/cover;
}

.webgl {
  position: absolute;
  inset: 0;
  z-index: 1;
  outline: none;
}

.webgl canvas { display: block; width: 100%; height: 100%; }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  pointer-events: none;
}

.hero-content a { pointer-events: auto; }

.hero-eyebrow {
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0.3em;
  margin-bottom: 18px;
  text-shadow: 0 0 10px var(--cyan);
}

.hero-title {
  font-size: clamp(44px, 9vw, 110px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.5), 0 0 80px rgba(123, 47, 255, 0.4);
}

/* glitch flicker on the hero name */
.glitch { position: relative; animation: glitch-flicker 6s infinite; }
@keyframes glitch-flicker {
  0%, 91%, 94%, 100% { opacity: 1; transform: none; }
  92% { opacity: 0.8; transform: translateX(2px) skewX(2deg); }
  93% { opacity: 0.9; transform: translateX(-2px); }
}

.hero-sub {
  margin-top: 18px;
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text);
  letter-spacing: 0.12em;
  min-height: 1.6em;
}

.cursor { color: var(--cyan); animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { margin-top: 40px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--hover-ease);
}

.btn-primary {
  color: var(--bg);
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 45px rgba(0, 229, 255, 0.6);
}

.btn-ghost {
  color: var(--cyan);
  border: 1px solid var(--cyan);
  background: rgba(0, 229, 255, 0.05);
  backdrop-filter: blur(5px);
}

.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.35);
  transform: translateY(-3px);
}

.btn-big { font-size: 16px; padding: 18px 40px; }

.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.3em;
  pointer-events: none;
}

.scroll-arrow { color: var(--cyan); animation: bob 1.6s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============ SECTIONS ============ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 32px;
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s var(--hover-ease), transform 0.9s var(--hover-ease);
}

.reveal.visible { opacity: 1; transform: none; }

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  color: #fff;
  margin-bottom: 40px;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

.section-index {
  color: var(--cyan);
  font-size: 0.55em;
  vertical-align: middle;
  margin-right: 14px;
  opacity: 0.8;
}

.section-note { color: var(--text-dim); font-size: 13px; letter-spacing: 0.1em; margin: -26px 0 30px; }

.terminal-line {
  font-family: monospace;
  color: var(--cyan);
  font-size: 14px;
  margin-bottom: 14px;
  opacity: 0.85;
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 50px;
  align-items: start;
}

.about-text p + p { margin-top: 14px; }
.about-text strong { color: #fff; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  transition: all 0.3s var(--hover-ease);
}

.stat:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
  transform: translateY(-4px);
}

.stat-num {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }

/* ============ SKILLS ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.skill-cell {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  transition: all 0.3s var(--hover-ease);
}

.skill-cell:hover {
  border-color: var(--violet);
  box-shadow: 0 0 25px rgba(123, 47, 255, 0.25);
}

.skill-name { font-size: 14px; color: #fff; letter-spacing: 0.05em; }

.skill-bar {
  margin-top: 12px;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
  transition: width 1.4s var(--hover-ease) 0.3s;
}

.visible .skill-bar i { width: var(--lvl); }

/* ============ 3D TILT CARDS ============ */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.card-wrap {
  margin: 12px;
  transform: perspective(800px);
  transform-style: preserve-3d;
  cursor: pointer;
}

.card {
  position: relative;
  width: 240px;
  height: 320px;
  background-color: #0a0820;
  overflow: hidden;
  border-radius: 10px;
  box-shadow:
    rgba(0, 0, 0, 0.66) 0 30px 60px 0,
    inset #0a0820 0 0 0 5px,
    inset rgba(0, 229, 255, 0.4) 0 0 0 6px;
  transition: 1s var(--return-ease);
}

.card-bg {
  opacity: 0.72;
  position: absolute;
  top: -20px; left: -20px;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: 1s var(--return-ease), opacity 5s 1s var(--return-ease);
  pointer-events: none;
}

.card-info {
  padding: 20px;
  position: absolute;
  bottom: 0;
  width: 100%;
  color: #fff;
  transform: translateY(40%);
  transition: 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.card-info * { position: relative; z-index: 1; }

.card-info h3 {
  font-size: 22px;
  letter-spacing: 0.06em;
  text-shadow: rgba(0, 229, 255, 0.5) 0 0 15px, rgba(0, 0, 0, 0.5) 0 10px 10px;
}

.card-info p {
  opacity: 0;
  font-size: 13px;
  margin-top: 8px;
  text-shadow: rgba(0, 0, 0, 1) 0 2px 3px;
  transition: 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.card-info::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom, transparent 0%, rgba(3, 0, 20, 0.75) 100%);
  opacity: 0;
  transform: translateY(100%);
  transition: 5s 1s var(--return-ease);
}

.card-wrap:hover .card-info { transform: translateY(0); transition: 0.6s var(--hover-ease); }
.card-wrap:hover .card-info p { opacity: 1; transition: 0.6s var(--hover-ease); }
.card-wrap:hover .card-info::after { opacity: 1; transform: translateY(0); transition: 5s var(--hover-ease); }
.card-wrap:hover .card-bg { opacity: 1; transition: 0.6s var(--hover-ease), opacity 5s var(--hover-ease); }

.card-wrap:hover .card {
  transition: 0.6s var(--hover-ease), box-shadow 2s var(--hover-ease);
  box-shadow:
    rgba(0, 229, 255, 0.25) 0 0 40px 5px,
    rgba(0, 229, 255, 0.9) 0 0 0 1px,
    rgba(0, 0, 0, 0.66) 0 30px 60px 0,
    inset #0a0820 0 0 0 5px,
    inset rgba(0, 229, 255, 0.8) 0 0 0 6px;
}

/* ============ CONTACT ============ */
.contact-box {
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 60px 30px;
}

.contact-lead { font-size: 20px; color: #fff; margin-bottom: 30px; }

.socials { margin-top: 34px; display: flex; gap: 30px; justify-content: center; }

.socials a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.2em;
  transition: color 0.25s, text-shadow 0.25s;
}

.socials a:hover { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.15em;
  border-top: 1px solid var(--line);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 20px; }
}

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

/* ============ MENTOR + FACTS (about) ============ */
.mentor {
  margin-top: 26px;
  padding: 16px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--violet);
  border-radius: 10px;
  transition: all 0.3s var(--hover-ease);
}

.mentor:hover { border-color: var(--cyan); box-shadow: 0 0 25px rgba(123, 47, 255, 0.2); }

.mentor-label {
  display: block;
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--violet);
  margin-bottom: 6px;
}

.mentor-name {
  font-family: "Orbitron", sans-serif;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s, text-shadow 0.25s;
}

.mentor-name:hover { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.mentor-role { display: block; margin-top: 6px; font-size: 13px; color: var(--text-dim); }

.facts { list-style: none; margin-top: 26px; display: grid; gap: 8px; }

.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.12);
  font-size: 13px;
}

.facts span { color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }
.facts b { color: #fff; font-weight: 500; text-align: right; }

/* ============ EXPERIENCE TIMELINE ============ */
.timeline { list-style: none; position: relative; padding-left: 28px; }

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

.tl-item {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  transition: all 0.3s var(--hover-ease);
}

.tl-item + .tl-item { margin-top: 18px; }

.tl-item::before {
  content: '';
  position: absolute;
  top: 28px; left: -28px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.tl-item:hover { border-color: var(--cyan); transform: translateX(4px); box-shadow: 0 0 25px rgba(0, 229, 255, 0.15); }

.tl-date {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.tl-role { font-size: 17px; color: #fff; margin: 6px 0 2px; }
.tl-org { display: block; font-size: 13px; color: var(--violet); margin-bottom: 10px; }
.tl-item p { font-size: 14px; color: var(--text); }

.tl-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

.tl-tags span {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 11px;
}

@media (max-width: 820px) {
  .facts li { flex-direction: column; gap: 2px; }
  .facts b { text-align: left; }
  .timeline { padding-left: 20px; }
  .tl-item::before { left: -20px; }
}

.contact-phone { margin-top: 16px; font-family: monospace; font-size: 15px; letter-spacing: 0.1em; }
.contact-phone a { color: var(--cyan); text-decoration: none; }
.contact-phone a:hover { text-shadow: 0 0 12px var(--cyan); }
