:root {
  --bg: #020408;
  --surface: #050c14;
  --cyan: #00f5ff;
  --cyan-dim: #00a8b5;
  --orange: #ff6b2b;
  --white: #e8f4f8;
  --gray: #4a6070;
  --glow-cyan: 0 0 20px rgba(0,245,255,0.4), 0 0 60px rgba(0,245,255,0.1);
  --glow-orange: 0 0 20px rgba(255,107,43,0.5), 0 0 60px rgba(255,107,43,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}

/* ── CURSOR ── */
#cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
  box-shadow: var(--glow-cyan);
  mix-blend-mode: screen;
}
#cursor-trail {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(0,245,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.3s ease, left 0.12s ease, top 0.12s ease;
}

/* ── CANVAS BG ── */
#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  background: linear-gradient(to bottom, rgba(2,4,8,0.95), transparent);
  backdrop-filter: blur(4px);
}
.nav-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.15em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
}
.nav-links a:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }

/* ── SECTIONS ── */
section { position: relative; z-index: 1; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 3rem 4rem;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}
.hero-tag {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
.hero-title .bracket { color: var(--cyan); text-shadow: var(--glow-cyan); }
.hero-name {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}
.hero-desc {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}
.hero-btns { display: flex; gap: 1rem; opacity: 0; animation: fadeUp 0.8s 1s forwards; }
.btn-primary {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  cursor: none;
  transition: background 0.3s, box-shadow 0.3s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.btn-primary:hover { background: rgba(0,245,255,0.08); box-shadow: var(--glow-cyan); }
.btn-secondary {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: #000;
  text-decoration: none;
  cursor: none;
  font-weight: 700;
  transition: box-shadow 0.3s;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}
.btn-secondary:hover { box-shadow: var(--glow-orange); }

/* ── ORB ── */
.hero-orb-wrap {
  width: 320px; height: 320px;
  position: relative;
  opacity: 0;
  animation: fadeIn 1.2s 0.5s forwards;
}
#orbCanvas { width: 100%; height: 100%; border-radius: 50%; }
.orb-ring {
  position: absolute;
  border: 1px solid;
  border-radius: 50%;
  animation: spin 20s linear infinite;
}
.orb-ring:nth-child(2) { inset: -20px; border-color: rgba(0,245,255,0.2); animation-duration: 20s; }
.orb-ring:nth-child(3) { inset: -40px; border-color: rgba(255,107,43,0.15); animation-duration: 35s; animation-direction: reverse; }
.orb-ring:nth-child(4) { inset: -60px; border-color: rgba(0,245,255,0.08); animation-duration: 50s; }

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  opacity: 0; animation: fadeIn 1s 1.5s forwards;
}
.scroll-hint span { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--gray); text-transform: uppercase; }
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollPulse 1.5s ease-in-out infinite;
}

/* ── SECTION COMMON ── */
.sec-wrap { max-width: 1200px; margin: 0 auto; padding: 6rem 3rem; }
.sec-label { font-size: 0.6rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.8rem; }
.sec-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.1;
}
.sec-title .hl { color: var(--cyan); text-shadow: var(--glow-cyan); }
.divider { width: 60px; height: 2px; background: linear-gradient(to right, var(--cyan), transparent); margin-bottom: 3rem; }

/* ── ABOUT ── */
#about { background: linear-gradient(to bottom, transparent, rgba(5,12,20,0.8), transparent); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.terminal-box {
  background: rgba(5,12,20,0.9);
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,245,255,0.05), inset 0 0 40px rgba(0,245,255,0.02);
  transform: perspective(800px) rotateY(-5deg);
  transition: transform 0.5s;
}
.terminal-box:hover { transform: perspective(800px) rotateY(0deg); }
.terminal-bar {
  background: rgba(0,245,255,0.06);
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  border-bottom: 1px solid rgba(0,245,255,0.1);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #ffbd2e; }
.t-dot.g { background: #28ca41; }
.t-title { font-size: 0.65rem; color: var(--gray); margin-left: 0.5rem; letter-spacing: 0.1em; }
.terminal-body { padding: 1.5rem; font-size: 0.75rem; line-height: 2; color: var(--gray); }
.terminal-body .prompt { color: var(--cyan); }
.terminal-body .cmd { color: var(--white); }
.terminal-body .output { color: #6a8a9a; }
.terminal-body .highlight { color: var(--orange); }
.about-text p { font-size: 0.8rem; line-height: 2; color: #6a8a9a; margin-bottom: 1.2rem; }
.about-text p strong { color: var(--white); font-weight: 700; }
.stat-row { display: flex; gap: 2rem; margin-top: 2rem; }
.stat-item { text-align: center; }
.stat-num { font-family: 'Orbitron', monospace; font-size: 2rem; font-weight: 900; color: var(--cyan); text-shadow: var(--glow-cyan); display: block; }
.stat-lbl { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); }

/* ── SKILLS ── */
.skills-3d-container { position: relative; height: 500px; perspective: 1200px; }
#skillsCanvas { width: 100%; height: 100%; }
.skill-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; justify-content: center; }
.skill-pill {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(0,245,255,0.2);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gray);
  transition: all 0.3s;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  cursor: none;
}
.skill-pill:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,245,255,0.05); text-shadow: var(--glow-cyan); }
.skill-pill.orange { border-color: rgba(255,107,43,0.2); }
.skill-pill.orange:hover { border-color: var(--orange); color: var(--orange); background: rgba(255,107,43,0.05); text-shadow: var(--glow-orange); }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card {
  position: relative;
  background: rgba(5,12,20,0.75);
  border: 1px solid rgba(0,245,255,0.12);
  overflow: hidden;
  transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  cursor: none;
}
.project-card:hover { transform: translateY(-10px); border-color: rgba(0,245,255,0.4); box-shadow: var(--glow-cyan); }
.project-card.orange-card:hover { border-color: rgba(255,107,43,0.5); box-shadow: var(--glow-orange); }
.project-visual { height: 180px; position: relative; overflow: hidden; background: var(--bg); }
.project-visual canvas { width: 100%; height: 100%; }
.project-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border: 1px solid;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.project-badge.cyan { border-color: var(--cyan); color: var(--cyan); background: rgba(0,245,255,0.07); }
.project-badge.orange { border-color: var(--orange); color: var(--orange); background: rgba(255,107,43,0.07); }
.project-body { padding: 1.8rem; }
.project-year { font-size: 0.58rem; letter-spacing: 0.25em; color: var(--gray); margin-bottom: 0.6rem; text-transform: uppercase; }
.project-title { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; color: var(--white); line-height: 1.35; margin-bottom: 0.5rem; }
.project-sub { font-size: 0.62rem; color: var(--orange); letter-spacing: 0.1em; margin-bottom: 1rem; }
.project-desc { font-size: 0.7rem; color: var(--gray); line-height: 1.9; margin-bottom: 1.2rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.project-tag {
  font-size: 0.58rem; letter-spacing: 0.12em; padding: 0.25rem 0.7rem;
  border: 1px solid rgba(0,245,255,0.18); color: var(--cyan);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.project-tag.o { border-color: rgba(255,107,43,0.2); color: var(--orange); }
.project-links { display: flex; gap: 1rem; }
.project-link {
  font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none;
  transition: gap 0.3s, color 0.3s;
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: none;
}
.project-link.orange { color: var(--orange); }
.project-link:hover { gap: 0.8rem; }
.project-link::after { content: '→'; }

/* ── CERTS ── */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.cert-card {
  position: relative;
  background: rgba(5,12,20,0.7);
  border: 1px solid rgba(0,245,255,0.15);
  padding: 2rem;
  transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  cursor: none;
}
.cert-card::before {
  content: '';
  position: absolute; top: 0; right: 20px;
  width: 20px; height: 1px;
  background: var(--cyan);
  transform-origin: right;
  transition: width 0.4s;
}
.cert-card:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(0,245,255,0.4); box-shadow: var(--glow-cyan); }
.cert-card:hover::before { width: 60px; }
.cert-logo { font-family: 'Orbitron', monospace; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; color: var(--orange); margin-bottom: 1rem; }
.cert-name { font-family: 'Orbitron', monospace; font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 0.5rem; line-height: 1.4; }
.cert-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none; margin-top: 1.2rem;
  transition: gap 0.3s; cursor: none;
}
.cert-link:hover { gap: 1rem; }
.cert-link::after { content: '→'; }

/* ── CONTACT ── */
#contact { background: linear-gradient(to bottom, transparent, rgba(5,12,20,0.9), transparent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.contact-info h3 { font-family: 'Orbitron', monospace; font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; }
.contact-info p { font-size: 0.75rem; color: var(--gray); line-height: 2; margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem; text-decoration: none;
  color: var(--gray); font-size: 0.72rem;
  transition: color 0.3s; cursor: none;
}
.contact-item:hover { color: var(--cyan); }
.contact-item-icon {
  width: 36px; height: 36px;
  border: 1px solid rgba(0,245,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-item:hover .contact-item-icon { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.socials { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 2rem; }
.social-btn {
  width: 40px; height: 40px;
  border: 1px solid rgba(0,245,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); text-decoration: none; font-size: 0.8rem;
  transition: all 0.3s; cursor: none;
}
.social-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-3px); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(5,12,20,0.8);
  border: 1px solid rgba(0,245,255,0.15);
  color: var(--white);
  padding: 0.9rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: none; cursor: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--gray); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--cyan); box-shadow: 0 0 15px rgba(0,245,255,0.1); }
.form-group textarea { height: 120px; }
.form-submit {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 1rem 2rem; background: transparent;
  border: 1px solid var(--cyan); color: var(--cyan);
  cursor: none; transition: all 0.3s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  align-self: flex-start;
}
.form-submit:hover { background: rgba(0,245,255,0.08); box-shadow: var(--glow-cyan); }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(0,245,255,0.08);
  padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
}
footer p { font-size: 0.62rem; color: var(--gray); letter-spacing: 0.1em; }
footer .footer-logo { font-family: 'Orbitron', monospace; font-size: 0.8rem; color: var(--cyan); text-shadow: var(--glow-cyan); text-decoration: none; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ── SCANLINES ── */
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.015) 0px, rgba(0,0,0,0.015) 1px, transparent 1px, transparent 2px);
  pointer-events: none; z-index: 9997;
}

/* ── INTRO ── */
#intro {
  position: fixed; inset: 0;
  background: #020408; z-index: 99999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#intro.hide { opacity: 0; transform: scale(1.04); pointer-events: none; }
#intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.intro-logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900; color: var(--cyan);
  text-shadow: 0 0 40px rgba(0,245,255,0.7), 0 0 80px rgba(0,245,255,0.3);
  letter-spacing: 0.1em;
  opacity: 0; transform: translateY(20px);
  animation: introFadeUp 0.7s 0.3s forwards;
}
.intro-logo .bracket { color: rgba(0,245,255,0.45); }
.intro-sub { font-size: 0.65rem; letter-spacing: 0.45em; text-transform: uppercase; color: var(--gray); opacity: 0; animation: introFadeUp 0.7s 0.6s forwards; }
.intro-bar-wrap {
  width: 220px; height: 1px;
  background: rgba(0,245,255,0.1);
  margin-top: 1.5rem; position: relative; overflow: hidden;
  opacity: 0; animation: introFadeUp 0.5s 0.9s forwards;
}
.intro-bar {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  box-shadow: 0 0 10px var(--cyan);
  animation: introLoad 2s 1s cubic-bezier(0.4,0,0.2,1) forwards;
}
.intro-pct { font-family: 'Orbitron', monospace; font-size: 0.6rem; color: var(--cyan); letter-spacing: 0.2em; margin-top: 0.8rem; opacity: 0; animation: introFadeUp 0.5s 1s forwards; }
.intro-skip {
  position: absolute; bottom: 2rem; right: 2.5rem;
  font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gray); cursor: none;
  border: 1px solid rgba(0,245,255,0.15); padding: 0.4rem 1rem;
  transition: color 0.3s, border-color 0.3s;
  opacity: 0; animation: introFadeUp 0.5s 1.2s forwards;
}
.intro-skip:hover { color: var(--cyan); border-color: var(--cyan); }
@keyframes introFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introLoad { from { width: 0%; } to { width: 100%; } }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-orb-wrap { width: 220px; height: 220px; margin: 0 auto; }
  .hero-btns { justify-content: center; }
  .hero-desc { margin: 0 auto 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.2rem; }
  .sec-wrap { padding: 4rem 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .stat-row { gap: 1rem; }
}
