:root {
  --bg: #070b16;
  --bg-2: #0b1020;
  --surface: #10172b;
  --surface-2: #161e38;
  --border: rgba(148, 163, 184, 0.12);
  --border-2: rgba(148, 163, 184, 0.22);
  --text: #eef2fb;
  --text-soft: #b4bed1;
  --text-mute: #6e7a96;
  --accent: #6ee7b7;
  --accent-2: #60a5fa;
  --accent-3: #a78bfa;
  --accent-4: #f472b6;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --ring: 0 0 0 1px var(--border-2);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px -8px rgba(110, 231, 183, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: rgba(110, 231, 183, 0.3); color: #fff; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(110, 231, 183, 0.6);
  transition: width 0.08s linear;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle at center,
    rgba(110, 231, 183, 0.18) 0%,
    rgba(96, 165, 250, 0.12) 35%,
    transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}
.orb-1 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: 15%; left: -100px;
}
.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
  bottom: 10%; right: -140px;
  animation-delay: -6s;
}
.orb-3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  top: 55%; left: 45%;
  animation-delay: -12s;
  opacity: 0.22;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 20px) scale(0.95); }
}

/* Film grain / noise overlay */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Cursor glow follower */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.12) 0%, rgba(96, 165, 250, 0.06) 35%, transparent 70%);
  pointer-events: none;
  transform: translate(-9999px, -9999px);
  z-index: 3;
  transition: opacity 0.3s;
  opacity: 0;
  filter: blur(8px);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  body:hover .cursor-glow { opacity: 1; }
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  transition: border-color 0.3s, background 0.3s;
}
.navbar.scrolled {
  background: rgba(7, 11, 22, 0.92);
  border-bottom-color: var(--border-2);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s;
}
.brand:hover { transform: scale(1.03); }
.brand-bracket { color: var(--accent); }
.brand-name { color: var(--text); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.25s;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  margin-left: 20px;
  transition: border-color 0.2s, background 0.2s;
}
.lang-toggle:hover {
  border-color: var(--accent);
  background: rgba(110, 231, 183, 0.06);
}
.lang-opt {
  padding: 2px 6px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.lang-opt.active {
  color: var(--accent);
  background: rgba(110, 231, 183, 0.12);
}
.lang-sep { color: var(--text-mute); opacity: 0.5; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 100px 0 90px; position: relative; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text-soft);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
}
.dot {
  width: 8px; height: 8px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.05); }
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.accent { color: var(--accent); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shift 6s ease infinite;
}
@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.caret {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.lead {
  color: var(--text-soft);
  font-size: 17px;
  max-width: 560px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad);
  color: #061018;
  box-shadow: 0 10px 28px -10px rgba(110, 231, 183, 0.55);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.35), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(110, 231, 183, 0.65);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary svg { transition: transform 0.25s; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-2);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-mute);
  font-size: 14px;
}
.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta svg { color: var(--accent); }

/* ---------- Code window ---------- */
.hero-card {
  display: flex;
  justify-content: center;
  position: relative;
}
.code-window {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px -10px rgba(96, 165, 250, 0.2);
  transform: perspective(1200px) rotateY(-6deg) rotateX(4deg);
  transition: transform 0.5s ease;
  position: relative;
}
.code-window::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.4), transparent 40%, transparent 60%, rgba(167, 139, 250, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.code-window:hover {
  transform: perspective(1200px) rotateY(0) rotateX(0);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.code-header span:not(.code-title) {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-title {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
}
.code-body {
  margin: 0;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
  overflow-x: auto;
}
.tok-k { color: #f472b6; }
.tok-c { color: #fbbf24; }
.tok-s { color: var(--accent); }
.tok-f { color: var(--accent-2); }
.tok-a { color: var(--accent-3); }

/* Floating tech badges around code window */
.hero-float-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 23, 43, 0.85);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  animation: floatY 5s ease-in-out infinite;
}
.hero-float-badge svg { color: var(--accent); }
.badge-float-1 { top: -14px; left: -18px; animation-delay: -1s; }
.badge-float-2 { top: 40%; right: -26px; animation-delay: -2.5s; }
.badge-float-2 svg { color: var(--accent-3); }
.badge-float-3 { bottom: -12px; left: 14%; animation-delay: -4s; }
.badge-float-3 svg { color: var(--accent-2); }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  animation: fadeInUp 1s ease 0.6s both;
}
.mouse {
  width: 22px; height: 36px;
  border: 1.5px solid var(--text-mute);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.mouse span {
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: wheel 1.8s ease infinite;
}
@keyframes wheel {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Tech marquee ---------- */
.marquee-wrap {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(110, 231, 183, 0.03), rgba(167, 139, 250, 0.03));
  overflow: hidden;
}
.marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 28px;
  align-items: center;
  white-space: nowrap;
  animation: marquee 36s linear infinite;
  padding-right: 28px;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.mq-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.mq-item:hover { color: var(--accent); }
.mq-dot {
  color: var(--accent);
  font-size: 8px;
  opacity: 0.5;
}
.marquee-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-fade-l { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-fade-r { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
  position: relative;
}
.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(96, 165, 250, 0.04), transparent);
}
.section-head {
  margin-bottom: 50px;
  position: relative;
}
.section-head.center { text-align: center; }
.section-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.15em;
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-num::before,
.section-head.center .section-num::after {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-head.center .section-num {
  justify-content: center;
}
.section-head h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.section-sub {
  color: var(--text-soft);
  max-width: 640px;
  margin: 8px auto 0;
}

/* ---------- Spotlight hover (shared for cards) ---------- */
.spotlight {
  position: relative;
  overflow: hidden;
}
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(110, 231, 183, 0.08),
    transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  align-items: start;
}
.about-text p {
  color: var(--text-soft);
  font-size: 16px;
  margin: 0 0 16px;
}
.about-text strong { color: var(--text); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.stat-num {
  font-size: 36px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-label {
  color: var(--text-mute);
  font-size: 13px;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.4;
}
.tl-item {
  position: relative;
  margin-bottom: 40px;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -32px; top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.1);
  z-index: 2;
}
.tl-marker::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(0.5); opacity: 1; }
}
.tl-marker.edu {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}
.tl-marker.edu::after { background: var(--accent-3); }
.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.tl-content:hover {
  border-color: var(--border-2);
  transform: translateX(6px);
  box-shadow: var(--shadow-glow);
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.tl-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.12);
  color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.3);
  margin-left: 8px;
  vertical-align: middle;
}
.badge-alt {
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent-2);
  border-color: rgba(96, 165, 250, 0.3);
}
.badge-edu {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-3);
  border-color: rgba(167, 139, 250, 0.3);
}
.tl-date {
  color: var(--text-mute);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.tl-company {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 12px;
  font-style: italic;
}
.tl-list {
  margin: 0; padding: 0;
  list-style: none;
}
.tl-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 14.5px;
}
.tl-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.tl-desc {
  color: var(--text-soft);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.25s, transform 0.25s, background 0.25s, box-shadow 0.25s;
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  background: var(--surface-2);
  box-shadow: var(--shadow-glow);
}
.skill-icon {
  width: 50px; height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.18), rgba(96, 165, 250, 0.18));
  color: var(--accent);
  margin-bottom: 16px;
  transition: transform 0.3s;
}
.skill-card:hover .skill-icon {
  transform: rotate(-6deg) scale(1.08);
}
.skill-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-2);
  color: var(--text-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover {
  background: rgba(110, 231, 183, 0.1);
  color: var(--accent);
  border-color: rgba(110, 231, 183, 0.4);
}

/* Skill bars */
.skill-bars {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 50px;
}
.skill-bar .sb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 500;
}
.skill-bar .sb-pct {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 13px;
}
.sb-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sb-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.4);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
  z-index: 2;
}
.project-card:hover {
  border-color: var(--border-2);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.project-card:hover::after { transform: scaleX(1); }

.project-card-highlight {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(167, 139, 250, 0.08) 100%);
  border-color: rgba(167, 139, 250, 0.25);
}
.project-card.featured {
  grid-column: span 2;
}
.project-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(600px circle at 90% 10%, rgba(167, 139, 250, 0.12), transparent 50%),
    radial-gradient(400px circle at 10% 90%, rgba(110, 231, 183, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.project-card.featured > * { position: relative; z-index: 1; }
@media (max-width: 820px) {
  .project-card.featured { grid-column: span 1; }
}

/* Project action buttons */
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.project-btn:hover {
  background: rgba(110, 231, 183, 0.08);
  color: var(--accent);
  border-color: rgba(110, 231, 183, 0.4);
  transform: translateY(-2px);
}
.project-btn-primary {
  background: var(--grad);
  color: #061018;
  border-color: transparent;
  box-shadow: 0 6px 20px -8px rgba(110, 231, 183, 0.5);
}
.project-btn-primary:hover {
  color: #061018;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(110, 231, 183, 0.6);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(110, 231, 183, 0.12);
  color: var(--accent);
  transition: transform 0.3s;
}
.project-card:hover .project-icon {
  transform: rotate(-8deg) scale(1.1);
}
.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}
.project-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14.5px;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.project-stack span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.08);
  color: var(--accent-2);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ---------- Contact ---------- */
.contact { padding: 110px 0; }
.contact-inner { max-width: 960px; margin: 0 auto; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s, transform 0.25s, background 0.25s, box-shadow 0.25s;
  position: relative;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  background: var(--surface-2);
  box-shadow: var(--shadow-glow);
}
.contact-card .cc-main {
  color: var(--accent);
  margin-bottom: 10px;
  transition: transform 0.3s;
}
.contact-card:hover .cc-main { transform: scale(1.15) rotate(-4deg); }
.cc-label {
  color: var(--text-mute);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.cc-value {
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
  color: var(--text);
}

/* Action row for copy/link cards */
.cc-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.cc-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.cc-action:hover {
  background: rgba(110, 231, 183, 0.1);
  color: var(--accent);
  border-color: rgba(110, 231, 183, 0.4);
  transform: translateY(-1px);
}
.cc-action.copied {
  background: rgba(52, 211, 153, 0.15);
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.5);
}
.cc-action svg { flex-shrink: 0; }

/* "as-link" cards keep arrow indicator */
.cc-as-link .cc-go {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.2s, gap 0.2s;
}
.cc-as-link:hover .cc-go {
  color: var(--accent);
  gap: 10px;
}
.cc-as-link .cc-go svg { transition: transform 0.25s; }
.cc-as-link:hover .cc-go svg { transform: translate(2px, -2px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(16, 23, 43, 0.95);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 999px;
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7), 0 0 30px -6px rgba(52, 211, 153, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 80;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-mute);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer p { margin: 0; }
.built { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.social-links {
  display: flex;
  gap: 10px;
}
.social-links a {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  background: rgba(110, 231, 183, 0.08);
}

/* ---------- To-top button ---------- */
.to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(16, 23, 43, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
  z-index: 60;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}
.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Disable static tilt when dynamic JS takes over */
.code-window.tilt-live {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- Konami / Party mode ---------- */
body.party {
  animation: partyHue 6s linear;
}
@keyframes partyHue {
  0%   { filter: hue-rotate(0deg); }
  50%  { filter: hue-rotate(180deg); }
  100% { filter: hue-rotate(0deg); }
}
.emoji-rain {
  position: fixed;
  top: -40px;
  font-size: 28px;
  pointer-events: none;
  z-index: 90;
  animation: emojiFall linear forwards;
  user-select: none;
}
@keyframes emojiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0.8; }
}
.konami-badge {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  padding: 18px 32px;
  background: linear-gradient(135deg, #f472b6, #a78bfa, #60a5fa);
  border-radius: 16px;
  color: #0a0e1a;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.05em;
  box-shadow: 0 30px 80px -10px rgba(167, 139, 250, 0.6);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}
.konami-badge.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .about-grid { grid-template-columns: 1fr; }
  .code-window { max-width: 100%; transform: none; }
  .skill-bars { grid-template-columns: 1fr; gap: 22px; }
  .hero-float-badge { display: none; }
  .scroll-hint { display: none; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 16, 32, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: flex; }
  .lang-toggle { margin-left: auto; margin-right: 10px; padding: 5px 10px; }
  .hero { padding: 60px 0; }
  .section { padding: 70px 0; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .tl-head { flex-direction: column; gap: 4px; }
  .footer-inner { justify-content: center; text-align: center; }
  .to-top { bottom: 18px; right: 18px; width: 42px; height: 42px; }
}
