/* =====================================================
   VARIABLES & RESET
===================================================== */
:root {
  --bg: #050a0f;
  --bg-1: #080e15;
  --bg-2: #0c1420;
  --bg-card: rgba(12, 20, 32, 0.7);
  --border: rgba(0, 212, 255, 0.1);
  --border-hover: rgba(0, 212, 255, 0.3);
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --orange: #f97316;
  --orange-dim: rgba(249, 115, 22, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --teal: #14b8a6;
  --teal-dim: rgba(20, 184, 166, 0.15);
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #8892a4;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

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

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 2px; }

/* =====================================================
   CUSTOM CURSOR
===================================================== */
.cursor {
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
}

.cursor-follower {
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, opacity 0.2s;
}

body:hover .cursor { opacity: 1; }

/* =====================================================
   NAVIGATION
===================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(5, 10, 15, 0.85);
  backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.1em;
}

.logo-bracket { color: var(--cyan); }
.logo-text { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width var(--transition);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  color: var(--cyan) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  transition: background var(--transition), border-color var(--transition) !important;
}

.nav-cta:hover {
  background: rgba(0, 212, 255, 0.25) !important;
  border-color: var(--cyan) !important;
}

.nav-cta::after { display: none !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: var(--transition);
}

/* =====================================================
   HERO
===================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 60%, transparent 30%, var(--bg) 100%);
  pointer-events: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeInDown 0.8s 0.3s forwards;
}

.badge-pulse {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--cyan);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

.hero-name {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.9s 0.5s forwards;
}

/* Glitch Effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.glitch::before {
  color: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-3px, -2px);
  animation: glitch-top 3.5s infinite 1s;
  opacity: 0.7;
}

.glitch::after {
  color: var(--purple);
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(3px, 2px);
  animation: glitch-bottom 3.5s infinite 1s;
  opacity: 0.7;
}

@keyframes glitch-top {
  0%, 90%, 100% { transform: translate(-3px, -2px); opacity: 0; }
  92% { transform: translate(-6px, -2px); opacity: 0.7; clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%); }
  94% { transform: translate(2px, -2px); opacity: 0.7; clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%); }
  96% { transform: translate(-3px, -2px); opacity: 0; }
}

@keyframes glitch-bottom {
  0%, 90%, 100% { transform: translate(3px, 2px); opacity: 0; }
  92% { transform: translate(6px, 2px); opacity: 0.7; clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); }
  94% { transform: translate(-2px, 2px); opacity: 0.7; clip-path: polygon(0 75%, 100% 75%, 100% 90%, 0 90%); }
  96% { transform: translate(3px, 2px); opacity: 0; }
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--cyan);
  margin-bottom: 1.5rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.9s 0.7s forwards;
}

.role-prefix { opacity: 0.5; margin-right: 0.5rem; }

.type-cursor {
  color: var(--cyan);
  animation: blink 1s infinite;
  margin-left: 2px;
}

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

.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.9s 0.9s forwards;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.9s 1.1s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: none;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeInUp 1s 1.5s forwards;
}

.scroll-track {
  width: 1px; height: 50px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-thumb {
  width: 100%; height: 50%;
  background: var(--cyan);
  position: absolute;
  top: -50%;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -50%; }
  100% { top: 150%; }
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   SECTIONS COMMON
===================================================== */
.section {
  padding: 8rem 0;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: attr(data-label);
  color: var(--text-muted);
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border);
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4rem;
}

.section-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px var(--cyan);
  opacity: 0.8;
}

/* =====================================================
   ABOUT
===================================================== */
.about {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 50%, var(--bg) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-left .section-title { margin-bottom: 2rem; }

.about-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.about-body {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.9;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition), transform var(--transition);
  backdrop-filter: blur(16px);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.stat-num {
  font-family: var(--mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}

.stat-num-plus {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  vertical-align: super;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =====================================================
   PROJECTS
===================================================== */
.projects {
  background: var(--bg-1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card--featured {
  grid-column: span 3;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  backdrop-filter: blur(16px);
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

[data-color="blue"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.15) 0%, transparent 70%); }
[data-color="orange"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,0.15) 0%, transparent 70%); }
[data-color="purple"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168,85,247,0.2) 0%, transparent 70%); }
[data-color="cyan"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.15) 0%, transparent 70%); }
[data-color="red"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(239,68,68,0.15) 0%, transparent 70%); }
[data-color="green"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34,197,94,0.15) 0%, transparent 70%); }
[data-color="teal"] .card-glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(20,184,166,0.15) 0%, transparent 70%); }

.project-card:hover .card-glow { opacity: 1; }

.card-body {
  position: relative;
  z-index: 2;
  padding: 1.75rem;
}

.project-card--featured .card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 0 3rem;
}

.project-card--featured .card-top { grid-column: 1; grid-row: 1; }
.project-card--featured h3.card-title { grid-column: 1; grid-row: 2; }
.project-card--featured .card-sub { grid-column: 1; grid-row: 3; }
.project-card--featured p.card-desc { grid-column: 1; grid-row: 4; }
.project-card--featured .card-tags { grid-column: 1; grid-row: 5; }
.project-card--featured .card-btn { grid-column: 1; grid-row: 6; align-self: start; }
.project-card--featured .topology { grid-column: 2; grid-row: 1 / 7; align-self: center; }

.card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg { width: 22px; height: 22px; }

.icon-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.icon-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(249,115,22,0.2); }
.icon-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }
.icon-cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.icon-red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.icon-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.icon-teal { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(20,184,166,0.2); }

.card-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  text-transform: uppercase;
}

.badge-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.badge-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(249,115,22,0.25); }
.badge-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(168,85,247,0.25); }
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.25); }
.badge-red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-teal { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(20,184,166,0.25); }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--mono);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid;
}

.t-blue { color: var(--blue); border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.t-orange { color: var(--orange); border-color: rgba(249,115,22,0.3); background: rgba(249,115,22,0.08); }
.t-purple { color: var(--purple); border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.08); }
.t-cyan { color: var(--cyan); border-color: rgba(0,212,255,0.3); background: rgba(0,212,255,0.08); }
.t-red { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.t-green { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.t-teal { color: var(--teal); border-color: rgba(20,184,166,0.3); background: rgba(20,184,166,0.08); }
.t-dim { color: var(--text-muted); border-color: var(--border); background: transparent; }

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: none;
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  cursor: none;
  transition: all var(--transition);
  font-family: var(--font);
}

.card-btn:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  transform: translateX(4px);
}

.card-btn--purple { color: var(--purple); }
.card-btn--purple:hover { background: var(--purple-dim); border-color: var(--purple); }

/* =====================================================
   TOPOLOGY DIAGRAM (PQC PROJECT)
===================================================== */
.topology {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2rem 0;
  position: relative;
}

.topo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  border: 1px solid;
  background: var(--bg);
  min-width: 110px;
  text-align: center;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  z-index: 2;
}

.topo-node:hover { transform: translateY(-4px); }

.topo-device {
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 20px rgba(168,85,247,0.1);
}

.topo-broker {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 20px rgba(0,212,255,0.1);
}

.topo-backend {
  border-color: rgba(34,197,94,0.4);
  box-shadow: 0 0 20px rgba(34,197,94,0.1);
}

.topo-icon-wrap {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topo-device .topo-icon-wrap { color: var(--purple); }
.topo-broker .topo-icon-wrap { color: var(--cyan); }
.topo-backend .topo-icon-wrap { color: var(--green); }

.topo-icon-wrap svg { width: 22px; height: 22px; }

.topo-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.topo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--mono);
  white-space: nowrap;
}

.topo-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  flex: 1;
  max-width: 90px;
  z-index: 1;
}

.conn-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--purple);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.topo-connector:last-of-type .conn-label { color: var(--cyan); }

.conn-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(168,85,247,0.5), rgba(0,212,255,0.5));
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}

.conn-dot {
  width: 8px; height: 8px;
  background: var(--purple);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  animation: slideRight 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--purple);
}

.conn-dot--cyan {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: slideRight 2s ease-in-out infinite 0.5s;
}

.conn-lock {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.conn-lock svg { width: 14px; height: 14px; }

@keyframes slideRight {
  0% { left: -8px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% + 8px); opacity: 0; }
}

/* =====================================================
   SKILLS
===================================================== */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.skill-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition), transform var(--transition);
}

.skill-cat:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.skill-cat-header svg {
  width: 18px; height: 18px;
  color: var(--cyan);
  flex-shrink: 0;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pills span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.skill-pills span:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* =====================================================
   CONTACT
===================================================== */
.contact { background: var(--bg-1); }

.contact-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 5rem 4rem;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.contact-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.contact-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 3rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: none;
}

.contact-link svg { width: 16px; height: 16px; }

.contact-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.15);
}

/* =====================================================
   MODAL
===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: none;
  color: var(--text-dim);
  transition: all var(--transition);
}

.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.modal-close svg { width: 16px; height: 16px; }

.modal-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.modal-icon svg { width: 26px; height: 26px; }

.modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.modal-sub {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.modal-tech-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* =====================================================
   SCROLL ANIMATIONS (GSAP targets)
===================================================== */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-card {
  will-change: transform, opacity;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card--featured { grid-column: span 2; }
  .project-card--featured .card-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .project-card--featured .card-top,
  .project-card--featured h3.card-title,
  .project-card--featured .card-sub,
  .project-card--featured p.card-desc,
  .project-card--featured .card-tags,
  .project-card--featured .card-btn { grid-column: 1; }
  .project-card--featured .topology { grid-column: 1; grid-row: auto; padding: 1.5rem 0; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(5, 10, 15, 0.97);
    backdrop-filter: blur(24px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card--featured { grid-column: span 1; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 3rem 1.75rem; }
  .section { padding: 5rem 0; }
  .topology { flex-direction: column; gap: 0; }
  .topo-connector { flex-direction: row; max-width: none; width: 100%; max-height: 50px; }
  .conn-label { writing-mode: horizontal-tb; }
  .conn-line { flex: 1; }
  .modal-box { padding: 2rem 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; align-items: center; }
  .contact-links { flex-direction: column; align-items: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .bg-layout { grid-template-columns: 1fr; }
  .cert-card { padding: 1.25rem; }
}

/* =====================================================
   HERO META (location + social links)
===================================================== */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeInUp 0.9s 1.3s forwards;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.hero-location svg { flex-shrink: 0; }

.hero-dot { color: var(--border); }

.hero-social-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  font-family: var(--mono);
}

.hero-social-link:hover { color: var(--cyan); }

/* =====================================================
   BACKGROUND SECTION
===================================================== */
.background {
  background: var(--bg);
}

.bg-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* Timeline */
.bg-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.bg-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan-dim), var(--purple-dim));
}

.tl-item {
  position: relative;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.tl-marker {
  position: absolute;
  left: -1.875rem;
  top: 1.5rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid;
  background: var(--bg);
  flex-shrink: 0;
}

.tl-marker--cyan { border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,212,255,0.4); }
.tl-marker--orange { border-color: var(--orange); box-shadow: 0 0 8px rgba(249,115,22,0.4); }

.tl-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition), transform var(--transition);
}

.tl-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.tl-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tl-period {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.tl-type {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tl-type--edu { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.tl-type--exp { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(249,115,22,0.2); }

.tl-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tl-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--mono);
}

.tl-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tl-bullets li {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.tl-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--orange);
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Certifications Column */
.bg-certs {
  position: sticky;
  top: 100px;
}

.certs-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-bottom: 1rem;
}

.cert-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition), transform var(--transition);
}

.cert-card:hover {
  transform: translateX(4px);
}

.cert-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
}

.cert-glow--blue { background: radial-gradient(ellipse 80% 60% at 0% 50%, rgba(59,130,246,0.12) 0%, transparent 70%); }
.cert-glow--red { background: radial-gradient(ellipse 80% 60% at 0% 50%, rgba(239,68,68,0.12) 0%, transparent 70%); }

.cert-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-icon svg { width: 24px; height: 24px; }
.cert-icon--blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.cert-icon--red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cert-issuer {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cert-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.cert-code {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cert-check {
  width: 28px; height: 28px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.cert-check svg { width: 14px; height: 14px; }

/* Wide skill cat (last row spanning full width) */
.skill-cat--wide {
  grid-column: span 2;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link svg { width: 15px; height: 15px; }
.footer-link:hover { color: var(--cyan); }

/* Responsive for new sections */
@media (max-width: 1024px) {
  .bg-layout { grid-template-columns: 1fr; }
  .bg-certs { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .certs-heading { grid-column: span 2; }
  .skill-cat--wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .bg-layout { grid-template-columns: 1fr; }
  .bg-certs { grid-template-columns: 1fr; }
  .certs-heading { grid-column: span 1; }
  .skill-cat--wide { grid-column: span 1; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .hero-meta { flex-wrap: wrap; gap: 0.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
