/* ============================================================
   BASE & RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --neon: #00d9ff;
  --neon-10: rgba(0,217,255,0.1);
  --neon-20: rgba(0,217,255,0.2);
  --neon-30: rgba(0,217,255,0.3);
  --neon-50: rgba(0,217,255,0.5);
  --charcoal-dark: #0a0a0a;
  --charcoal: #121212;
  --charcoal-light: #1a1a1a;
  --charcoal-deeper: #0f0f0f;
  --blueprint: #1a3a4a;
  --terminal-green: #00ff41;
  --terminal-green-dim: #0c3c1a;
  --gray-3: #d1d5db;
  --gray-4: #9ca3af;
  --gray-5: #6b7280;
  --gray-6: #4b5563;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--charcoal-dark);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--charcoal-dark); }
::-webkit-scrollbar-thumb { background: var(--blueprint); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon); }

::selection { color: #fff; background: rgba(0,217,255,0.3); }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes cursorBlink { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulseGlow { 0%,100%{box-shadow:0 0 10px rgba(0,217,255,0.3)} 50%{box-shadow:0 0 25px rgba(0,217,255,0.6)} }
@keyframes spinSlow { to{transform:rotate(360deg)} }
@keyframes spinReverse { to{transform:rotate(-360deg)} }
@keyframes traceLine { from{stroke-dashoffset:400} to{stroke-dashoffset:0} }
@keyframes bounceDot { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes pulseDot { 50%{opacity:0.4} }
@keyframes cubeRotate { to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes revealUp { from{opacity:0;transform:translateY(32px)} to{opacity:1;transform:translateY(0)} }
@keyframes revealLeft { from{opacity:0;transform:translateX(-32px)} to{opacity:1;transform:translateX(0)} }
@keyframes scaleIn { from{opacity:0;transform:scale(0.88)} to{opacity:1;transform:scale(1)} }
@keyframes glowPulse { 0%,100%{opacity:0.3} 50%{opacity:0.7} }
@keyframes typewriter { from{width:0} to{width:100%} }

/* ============================================================
   UTILITIES
   ============================================================ */
.section-inner { max-width: 1152px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 10; }
.section-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 24px;
}
.section-badge.light { color: var(--neon); border: 1px solid rgba(0,217,255,0.3); }
.section-badge.dark { color: var(--neon); border: 1px solid rgba(0,217,255,0.3); }
.section-title { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.section-title.light { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); }
.section-title.dark { color: #121212; font-size: clamp(1.8rem, 4vw, 3rem); }
.section-title .highlight { color: var(--neon); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-sub { color: var(--gray-4); font-style: italic; margin-top: 0.5rem; }

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--neon);
  margin-left: 3px;
  vertical-align: middle;
  animation: cursorBlink 0.8s step-end infinite;
}
.inline-cursor { width: 10px; height: 1em; }

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: rgba(239,68,68,0.8); }
.dot.yellow { background: rgba(234,179,8,0.8); }
.dot.green { background: rgba(34,197,94,0.8); }

/* ============================================================
   NAV
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,217,255,0.1);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.logo-box {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(0,217,255,0.5);
  transition: border-color 0.3s;
}
.logo-box:hover { border-color: var(--neon); }
.logo-box img { width: 20px; height: 20px; object-fit: contain; }
.nav-logo span {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.1em;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 14px; color: var(--gray-3);
  text-decoration: none;
  transition: color 0.3s;
  font-family: var(--font-body);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--neon);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--neon); }
.nav-links a:hover::after { width: 100%; }
.nav-resume {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  min-width: 148px;
  justify-content: center;
  border: 1px solid rgba(0,217,255,0.5);
  border-radius: 6px;
  color: var(--neon);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s;
  overflow: hidden;
}
.nav-resume-default,
.nav-resume-hover {
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}
.nav-resume-hover {
  position: absolute;
  opacity: 0;
  transform: translateY(8px);
}
.nav-resume {
  position: relative;
}
.nav-resume:hover .nav-resume-default {
  opacity: 0;
  transform: translateY(-8px);
}
.nav-resume:hover .nav-resume-hover {
  opacity: 1;
  transform: translateY(0);
}
.nav-resume:hover i {
  opacity: 0;
  width: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease, margin 0.2s ease;
}
.nav-resume i {
  transition: opacity 0.2s ease, width 0.2s ease, margin 0.2s ease;
}
.nav-resume:hover { background: rgba(0,217,255,0.1); border-color: var(--neon); }

.nav-resume-wrapper {
  position: relative;
}
.resume-preview {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: rgba(8, 8, 12, 0.97);
  border: 1px solid rgba(0,217,255,0.3);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(0,217,255,0.75);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,217,255,0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.nav-resume-wrapper:hover .resume-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.resume-preview::before {
  content: '';
  position: absolute;
  top: -5px; right: 20px;
  width: 8px; height: 8px;
  background: rgba(8,8,12,0.97);
  border-left: 1px solid rgba(0,217,255,0.3);
  border-top: 1px solid rgba(0,217,255,0.3);
  transform: rotate(45deg);
}
.rp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,217,255,0.15);
}
.rp-label {
  color: var(--neon);
  font-size: 11px;
  font-weight: 600;
}
.rp-tag {
  color: rgba(0,217,255,0.35);
  font-size: 10px;
}
.rp-section {
  margin-bottom: 10px;
}
.rp-section:last-child { margin-bottom: 0; }
.rp-title {
  color: rgba(0,217,255,0.45);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.rp-line {
  color: rgba(0,217,255,0.8);
  font-size: 11px;
  line-height: 1.6;
}
.rp-dim {
  color: rgba(0,217,255,0.4);
  font-size: 10px;
}
.nav-hamburger {
  display: none;
  background: none; border: none; color: #fff;
  font-size: 20px; cursor: pointer;
  width: 32px; height: 32px;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 3rem;
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid rgba(0,217,255,0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--gray-3);
  text-decoration: none;
  padding: 0.75rem 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--neon); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--charcoal-dark);
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,217,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,217,255,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.03;
  pointer-events: none;
}
.hero-scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(0,217,255,0.02) 50%) 0 0 / 100% 4px;
}
.hero-circuit {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}

/* Terminal panel */
.hero-terminal {
  position: absolute; left: 2rem; top: 50%; transform: translateY(-50%);
  width: 280px;
  background: rgba(10,10,10,0.8);
  border: 1px solid rgba(0,217,255,0.3);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  display: none;
}
@media (min-width: 1024px) { .hero-terminal { display: block; } }
.terminal-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,217,255,0.15);
  background: rgba(10,10,10,0.6);
  border-radius: 8px 8px 0 0;
}
.terminal-name { margin-left: 8px; font-size: 10px; font-family: var(--font-mono); color: rgba(0,255,65,0.6); }
.terminal-body {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  height: 140px;
  overflow: hidden;
  background: rgba(10,10,10,0.4);
  border-radius: 0 0 8px 8px;
}
.terminal-line { color: rgba(0,255,65,0.9); }
.terminal-line.dim { color: rgba(0,255,65,0.5); }

/* Hero content */
.hero-content {
  position: relative; z-index: 10;
  text-align: center;
  padding: 0 1rem;
  max-width: 800px;
  animation: fadeInUp 1s ease-out both;
}
.hero-logo {
  width: 140px; height: 140px; margin: 0 auto 2rem;
}
.hero-logo img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0,217,255,0.5));
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(0,217,255,0.3), 0 0 60px rgba(0,217,255,0.1);
  line-height: 1.1;
}
.hero-roles {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 8px 16px;
  margin-top: 1.5rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}
.hero-roles span { font-size: clamp(14px, 2vw, 18px); color: var(--gray-3); letter-spacing: 0.05em; }
.hero-roles .sep { color: rgba(0,217,255,0.6); font-size: 1.2em; }
.hero-desc {
  margin-top: 2rem;
  color: var(--gray-4);
  font-size: clamp(13px, 1.5vw, 15px);
  max-width: 500px; margin-left: auto; margin-right: auto;
  line-height: 1.7;
  animation: fadeInUp 1s ease-out 0.7s both;
}
.hero-buttons {
  margin-top: 2.5rem;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 1s both;
}
.btn-primary {
  padding: 12px 24px;
  background: rgba(0,217,255,0.1);
  border: 1px solid rgba(0,217,255,0.5);
  border-radius: 6px;
  color: var(--neon);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-primary:hover { background: rgba(0,217,255,0.2); border-color: var(--neon); }
.btn-secondary {
  padding: 12px 24px;
  border: 1px solid var(--gray-6);
  border-radius: 6px;
  color: var(--gray-3);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-secondary:hover { border-color: rgba(0,217,255,0.5); color: var(--neon); }

/* 3D cube */
.hero-cube-wrapper {
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  width: 280px; height: 280px;
  display: none;
}
@media (min-width: 1024px) { .hero-cube-wrapper { display: block; } }
.cube-scene {
  width: 100%; height: 100%;
  perspective: 800px;
}
.cube {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 12s linear infinite;
  transition: animation-play-state 0s;
}
.hero-cube-wrapper:hover .cube {
  animation-play-state: paused;
}
.cube-face {
  position: absolute; inset: 0;
  border: 1px solid rgba(0,217,255,0.4);
  background: rgba(10,10,10,0.4);
  backdrop-filter: blur(4px);
}
.cube-face::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(0,217,255,0.2);
}
.cube-face.front  { transform: translateZ(140px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(140px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(140px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(140px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(140px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(140px); }
.face-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.face-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: rgba(0,217,255,0.5);
  letter-spacing: 0.1em;
  text-align: center;
}
.cube-glow-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0,217,255,0.1);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* SVG trace lines */
.trace-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: traceLine 2s ease-out forwards;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.scroll-indicator span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray-5); }
.scroll-track {
  width: 20px; height: 32px;
  border: 1px solid var(--gray-6);
  border-radius: 10px;
  display: flex; justify-content: center;
  padding-top: 4px;
}
.scroll-dot {
  width: 4px; height: 8px;
  background: rgba(0,217,255,0.7);
  border-radius: 2px;
  animation: bounceDot 1.4s ease-in-out infinite;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  position: relative;
  background: #f9fafb;
  padding: 6rem 0 6rem;
  overflow: hidden;
}
.about-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26,58,74,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,58,74,0.3) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.02;
}
.about-inner {
  max-width: 1152px; margin: 0 auto; padding: 0 2rem;
  display: flex; flex-direction: column;
  align-items: center; gap: 3rem;
  position: relative; z-index: 10;
}
@media (min-width: 1024px) {
  .about-inner { flex-direction: row; gap: 5rem; align-items: center; }
}

/* Image */
.about-image-wrap {
  position: relative;
  width: 300px; height: 300px;
  flex-shrink: 0;
}
@media (min-width: 768px) { .about-image-wrap { width: 380px; height: 380px; } }
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,217,255,0.3);
}
.orbit-ring.outer { inset: -12px; animation: spinSlow 12s linear infinite; }
.orbit-ring.inner { inset: -24px; border-style: dashed; border-color: rgba(0,217,255,0.15); animation: spinReverse 16s linear infinite; }
.about-photo-frame {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 20px 25px rgba(0,0,0,0.1);
}
.about-photo-frame img {
  width: 85%; height: 85%; object-fit: contain; object-position: center;
  position: absolute; top: 62%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2;
}
.photo-grid-overlay {
  position: absolute; top: 0; right: 0;
  width: 50%; height: 100%;
  background:
    linear-gradient(rgba(0,217,255,0.08) 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(90deg, rgba(0,217,255,0.08) 1px, transparent 1px) 0 0 / 10px 10px;
  pointer-events: none;
  z-index: 1;
}
.photo-corner {
  position: absolute; width: 24px; height: 24px;
  z-index: 3;
}
.photo-corner.tl { top: 12px; right: 12px; border-top: 2px solid rgba(0,217,255,0.5); border-right: 2px solid rgba(0,217,255,0.5); }
.photo-corner.tr { top: 12px; left: 12px; border-top: 2px solid rgba(0,217,255,0.5); border-left: 2px solid rgba(0,217,255,0.5); }
.photo-corner.br { bottom: 12px; right: 12px; border-bottom: 2px solid rgba(0,217,255,0.5); border-right: 2px solid rgba(0,217,255,0.5); }
.photo-corner.bl { bottom: 12px; left: 12px; border-bottom: 2px solid rgba(0,217,255,0.5); border-left: 2px solid rgba(0,217,255,0.5); }

/* About text */
.about-text { flex: 1; }
.about-quotes { margin: 1.5rem 0 2rem; display: flex; flex-direction: column; gap: 1rem; }
.about-quotes p { font-size: clamp(15px, 1.5vw, 18px); color: #1a1a1a; line-height: 1.7; font-style: italic; }
.stat-cards {
  display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.25rem;
}
@media (min-width: 540px) { .stat-cards { grid-template-columns: repeat(3,1fr); } }
.stat-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  border: 2px solid #e5e7eb;
  transition: border-color 0.5s, transform 0.5s;
  overflow: hidden;
}
.stat-card:hover { border-color: rgba(0,217,255,0.6); transform: translateY(-8px); }
.stat-card::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.5s, opacity 0.5s;
  opacity: 0;
  pointer-events: none;
}
.stat-card:hover::after { border-color: rgba(0,217,255,0.4); opacity: 1; animation: pulseGlow 2s ease-in-out infinite; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--neon); margin-bottom: 4px; }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-5); font-weight: 600; margin-bottom: 10px; }
.stat-label.module-subtitle { text-transform: none; letter-spacing: 0.02em; font-size: 12px; color: var(--gray-4); }
.stat-card p { font-size: 13px; color: var(--gray-6); line-height: 1.5; }

/* Touch-only elements: hidden on desktop, shown by @media (hover: none) */
.stat-card-back { display: none; }
.flip-hint { display: none; }
.card-expand-panel { display: none; }
.card-tap-hint { display: none; }
.back-label, .back-items { /* styles in touch block */ }

/* ============================================================
   PROJECTS
   ============================================================ */
#projects {
  position: relative;
  background: var(--charcoal);
  padding: 6rem 0;
  overflow: hidden;
}
.projects-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,217,255,0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,217,255,0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.04;
}
.projects-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(transparent 40%, rgba(0,0,0,0.4) 100%);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3,1fr); } }

.proj-card {
  position: relative;
  background: rgba(26,26,26,0.9);
  border-radius: 8px;
  border: 1px solid rgba(26,58,74,0.4);
  padding: 2rem;
  overflow: hidden;
  transition: border-color 0.5s, transform 0.5s;
  cursor: default;
}
.proj-card:hover { border-color: rgba(0,217,255,0.6); transform: translateY(-12px); }

/* Corner brackets */
.card-corner {
  position: absolute; width: 16px; height: 16px;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.card-corner.tl { top: 12px; left: 12px; border-top: 1px solid rgba(0,217,255,0.4); border-left: 1px solid rgba(0,217,255,0.4); }
.card-corner.tr { top: 12px; right: 12px; border-top: 1px solid rgba(0,217,255,0.4); border-right: 1px solid rgba(0,217,255,0.4); }
.card-corner.bl { bottom: 12px; left: 12px; border-bottom: 1px solid rgba(0,217,255,0.4); border-left: 1px solid rgba(0,217,255,0.4); }
.card-corner.br { bottom: 12px; right: 12px; border-bottom: 1px solid rgba(0,217,255,0.4); border-right: 1px solid rgba(0,217,255,0.4); }
.proj-card:hover .card-corner { width: 24px; height: 24px; border-color: var(--neon); }

.card-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(0,217,255,0.3);
  background: rgba(10,10,10,0.6);
  margin-bottom: 1.25rem;
  font-size: 24px; color: var(--neon);
  transition: transform 0.5s, border-color 0.3s;
}
.proj-card:hover .card-icon { transform: rotate(360deg); border-color: rgba(0,217,255,0.6); }
.card-category { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-5); font-weight: 600; display: block; margin-bottom: 8px; }
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700; color: #fff;
  margin-bottom: 0.75rem;
  display: inline-block;
  position: relative;
}
.card-title::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--neon);
  transition: width 0.5s;
}
.proj-card:hover .card-title::after { width: 100%; }
.card-desc { font-size: 13px; color: var(--gray-4); line-height: 1.6; margin-bottom: 1.25rem; }
.card-tech { font-size: 12px; color: var(--neon); line-height: 1.6; margin-bottom: 1.25rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(26,58,74,0.5);
  color: var(--gray-4);
  background: rgba(10,10,10,0.5);
}

/* SVG border draw */
.card-border-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.card-border-svg rect { transition: stroke-dashoffset 1.5s ease-in-out; }
.proj-card:hover .card-border-svg { opacity: 1; }
.proj-card:hover .card-border-svg rect { stroke-dashoffset: 0; }

/* ============================================================
   SKILLS
   ============================================================ */
#skills {
  position: relative;
  background: var(--charcoal-deeper);
  padding: 6rem 0;
  overflow: hidden;
}
.skills-dots-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,217,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, rgba(0,217,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(0,217,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(0,217,255,0.3) 1px, transparent 1px);
  background-size: 200px 200px;
  opacity: 0.03;
}
.skills-cloud {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px;
}
.skill-pill {
  position: relative;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(0,217,255,0.3);
  background: rgba(26,26,26,0.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 500;
  cursor: default;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.skill-pill:hover {
  background: rgba(0,217,255,0.15);
  border-color: var(--neon);
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(0,217,255,0.2);
}

/* Tooltip */
.skill-pill::after {
  content: attr(data-desc);
  position: absolute;
  left: 50%; transform: translateX(-50%) translateY(-4px);
  bottom: calc(100% + 10px);
  padding: 6px 12px;
  background: var(--charcoal-dark);
  border: 1px solid rgba(0,217,255,0.3);
  border-radius: 4px;
  font-size: 12px;
  color: var(--gray-3);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 20;
}
.skill-pill:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.skills-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 3.5rem;
  font-family: var(--font-mono); font-size: 12px; color: var(--gray-5);
}
.divider-line {
  width: 48px; height: 1px;
}
.divider-line.left { background: linear-gradient(to right, transparent, rgba(0,217,255,0.4)); }
.divider-line.right { background: linear-gradient(to left, transparent, rgba(0,217,255,0.4)); }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  position: relative;
  background: #000;
  padding: 6rem 0;
  overflow: hidden;
}
.contact-scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,255,65,0.1) 0px, transparent 1px, transparent 2px, rgba(0,255,65,0.1) 3px);
  opacity: 0.03;
}
.contact-radial {
  position: absolute; inset: 0;
  background: radial-gradient(rgba(0,255,65,0.02) 0%, transparent 60%);
}
.contact-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(transparent 30%, rgba(0,0,0,0.6) 100%);
}
.contact-inner { max-width: 720px; }
.terminal-window {
  border: 2px solid rgba(0,255,65,0.4);
  border-radius: 4px;
}
.terminal-window .terminal-titlebar {
  background: rgba(10,10,10,0.6);
  border-bottom: 1px solid rgba(0,255,65,0.2);
  border-radius: 4px 4px 0 0;
}
.contact-terminal {
  padding: 1.5rem 2rem;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.8;
  background: rgba(10,10,10,0.4);
  min-height: 360px;
  border-radius: 0 0 4px 4px;
}
.contact-channels {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.channel-btn {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: rgba(0,255,65,0.7);
  font-family: var(--font-mono); font-size: 13px;
  transition: color 0.2s;
  cursor: pointer;
}
.channel-btn:hover { color: var(--terminal-green); }
.ch-num { color: rgba(0,255,65,0.5); flex-shrink: 0; }
.channel-btn:hover .ch-num { color: var(--terminal-green); }
.ch-label { color: rgba(0,255,65,0.7); }
.channel-btn:hover .ch-label { color: var(--terminal-green); }
.ch-arrow { color: rgba(0,255,65,0.3); margin: 0 4px; }
.ch-icon { color: rgba(0,255,65,0.3); font-size: 13px; margin-left: auto; }
.channel-btn:hover .ch-icon { color: var(--terminal-green); }

.terminal-output {
  min-height: 0;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
}
.terminal-output::-webkit-scrollbar { width: 6px; }
.terminal-output::-webkit-scrollbar-thumb { background: rgba(0,255,65,0.25); border-radius: 999px; }
.terminal-prompt { color: var(--terminal-green); margin-right: 6px; }
.terminal-row { margin-bottom: 8px; }
.terminal-user { color: rgba(0,255,65,0.9); }
.terminal-ai { color: rgba(0,255,65,0.72); white-space: pre-wrap; }
.terminal-status { color: rgba(0,255,65,0.45); font-style: italic; }

.terminal-input-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(0,255,65,0.95);
  font-family: var(--font-mono);
  font-size: 13px;
}
.terminal-input::placeholder { color: rgba(0,255,65,0.35); }
.terminal-send {
  border: 1px solid rgba(0,255,65,0.35);
  background: rgba(0,255,65,0.08);
  color: rgba(0,255,65,0.9);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
}
.terminal-send:hover { background: rgba(0,255,65,0.14); }
.terminal-hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(0,255,65,0.4);
}
.t-green { color: var(--terminal-green); }
.t-dim { color: rgba(0,255,65,0.6); }
.t-sep { color: rgba(0,255,65,0.4); }
.t-link { color: var(--neon); text-decoration: none; transition: color 0.3s; }
.t-link:hover { color: #fff; text-decoration: underline; }
.t-available { color: rgba(0,255,65,0.9); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--charcoal-dark);
  border-top: 1px solid rgba(0,217,255,0.1);
}
.footer-inner {
  max-width: 1152px; margin: 0 auto; padding: 3rem 2rem;
  display: flex; flex-direction: column; gap: 2rem; align-items: flex-start;
}
@media (min-width: 768px) { .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand .logo-box { flex-shrink: 0; border-color: rgba(0,217,255,0.4); }
.footer-name { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 14px; letter-spacing: 0.1em; }
.footer-brand p { font-size: 13px; color: var(--gray-5); margin-top: 4px; }
.footer-copy { font-size: 12px; color: var(--gray-6); margin-top: 4px; }
.footer-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-nav a { font-size: 13px; color: var(--gray-4); text-decoration: none; transition: color 0.3s; }
.footer-nav a:hover { color: var(--neon); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(0,217,255,0.4); display: inline-block; }
.footer-bottom {
  border-top: 1px solid var(--charcoal-light);
  padding: 1.25rem 2rem;
  max-width: 1152px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.footer-bottom span { font-size: 11px; color: var(--gray-6); font-style: italic; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,217,255,0.6); animation: pulseDot 2s ease-in-out infinite; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal-up, .reveal-left, .reveal-pill {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up { transform: translateY(32px); }
.reveal-left { transform: translateX(-32px); }
.reveal-pill { transform: scale(0.88); transition-delay: var(--delay, 0s); }

.reveal-up.visible, .reveal-left.visible, .reveal-pill.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  .nav-links, .nav-resume { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 1.5rem; }
  .hero-content { padding: 0 1.5rem 6rem; }
  .about-inner { padding: 0 1.5rem; }
  .section-inner { padding: 0 1.5rem; }
}

/* ============================================================
   TOUCH / NO-HOVER INTERACTIONS (mobile & tablet)
   Replaces :hover effects with :active tap feedback
   ============================================================ */
@media (hover: none) {
  /* Buttons */
  .btn-primary:active {
    background: rgba(0,217,255,0.2);
    border-color: var(--neon);
    transform: scale(0.97);
  }
  .btn-secondary:active {
    border-color: rgba(0,217,255,0.5);
    color: var(--neon);
    transform: scale(0.97);
  }

  /* ── About: Tap to Flip stat cards ── */
  .stat-card {
    perspective: 900px;
    background: transparent;
    border-color: transparent;
    padding: 0;
    overflow: visible;
    min-height: 215px;
    cursor: pointer;
    transition: none;
  }
  .stat-card::after { display: none; }
  .stat-card-inner {
    position: relative;
    width: 100%;
    min-height: 215px;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .stat-card.flipped .stat-card-inner { transform: rotateY(180deg); }
  .stat-card-front,
  .stat-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
  }
  .stat-card-front {
    background: #fff;
    border: 2px solid #e5e7eb;
  }
  .stat-card-back {
    display: flex;
    transform: rotateY(180deg);
    background: var(--charcoal-deeper);
    border: 2px solid rgba(0,217,255,0.4);
    gap: 0.5rem;
  }
  .flip-hint {
    display: block;
    font-size: 9px;
    font-family: var(--font-mono);
    color: rgba(0,217,255,0.4);
    margin-top: auto;
    padding-top: 0.4rem;
    text-align: right;
    letter-spacing: 0.08em;
  }
  .back-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--neon);
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
  }
  .back-items {
    font-size: 13px;
    color: var(--gray-3);
    line-height: 1.9;
    flex: 1;
  }

  /* ── Projects: Tap to Expand ── */
  .proj-card { cursor: pointer; overflow: visible; }
  .proj-card:active {
    border-color: rgba(0,217,255,0.6);
    transform: translateY(-3px);
  }
  .proj-card:active .card-icon { border-color: rgba(0,217,255,0.6); }
  .card-expand-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding-top 0.3s ease;
    border-top: 1px solid rgba(0,217,255,0.12);
    margin-top: 1rem;
    padding-top: 0;
    font-family: var(--font-mono);
    font-size: 11px;
  }
  .proj-card.expanded .card-expand-panel {
    max-height: 180px;
    opacity: 1;
    padding-top: 0.7rem;
  }
  .expand-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
  }
  .expand-key { color: var(--neon); min-width: 56px; }
  .expand-val { color: var(--gray-3); flex: 1; }
  .card-tap-hint {
    display: block;
    font-size: 9px;
    font-family: var(--font-mono);
    color: rgba(0,217,255,0.3);
    text-align: center;
    margin-top: 0.6rem;
    letter-spacing: 0.1em;
    transition: color 0.3s;
  }
  .proj-card.expanded .card-tap-hint { color: rgba(0,217,255,0.6); }
  .proj-card.expanded .card-border-svg { opacity: 1; }
  .proj-card.expanded .card-border-svg rect { stroke-dashoffset: 0; }

  /* ── Skills: Tap to Highlight ── */
  .skill-pill.active {
    background: rgba(0,217,255,0.15);
    border-color: var(--neon);
    color: var(--neon);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(0,217,255,0.2);
  }
  .skill-pill.active::after { opacity: 1; transform: translateX(-50%) translateY(0); }
  .skill-pill:hover {
    background: rgba(26,26,26,0.8);
    border-color: rgba(0,217,255,0.2);
    color: #fff;
    transform: none;
    box-shadow: none;
  }
  .skill-pill:hover::after { opacity: 0; }

  /* Contact channel buttons */
  .channel-btn:active { color: var(--terminal-green); }
  .channel-btn:active .ch-num,
  .channel-btn:active .ch-label,
  .channel-btn:active .ch-icon { color: var(--terminal-green); }

  /* Terminal send button */
  .terminal-send:active { background: rgba(0,255,65,0.14); }

  /* Footer nav */
  .footer-nav a:active { color: var(--neon); }

  /* Logo box */
  .logo-box:active { border-color: var(--neon); }

  /* Inline terminal links */
  .t-link:active { color: #fff; text-decoration: underline; }

  /* Mobile menu links */
  .mobile-menu a:active { color: var(--neon); }
}
