﻿/* ===== PERFORMANCE: images use webp + lazy loading, canvases GPU-accelerated ===== */
/* ===== COSMIC SPACE THEME ===== */
:root {
  --bg: #03020f;
  --bg2: #07051a;
  --card: rgba(255,255,255,0.04);
  --text: #e8eaff;
  --muted: #7070a0;
  --line: rgba(255,255,255,0.07);
  --blue: #4d7cff;
  --blue2: #7b9fff;
  --violet: #9b6bff;
  --violet2: #c49bff;
  --cyan: #4fc3f7;
  --star: #ffffff;
  --card-border: rgba(100,120,255,0.2);
  --neon-blue: 0 0 20px rgba(77,124,255,0.4), 0 0 50px rgba(77,124,255,0.15);
  --neon-violet: 0 0 20px rgba(155,107,255,0.4), 0 0 50px rgba(155,107,255,0.15);
  --neon-both: 0 0 20px rgba(77,124,255,0.3), 0 0 40px rgba(155,107,255,0.2);
  --shadow-3d: 0 8px 0 rgba(30,20,100,0.7), 0 14px 28px rgba(0,0,0,0.8);
  --shadow-card: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(100,120,255,0.1);
  --r: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Nebula background blobs */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 10% 15%, rgba(77,124,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 20%, rgba(155,107,255,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 600px 400px at 45% 75%, rgba(79,195,247,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 400px 300px at 70% 50%, rgba(155,107,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 300px 200px at 25% 60%, rgba(77,124,255,0.05) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
  animation: nebulaShift 15s ease-in-out infinite alternate;
}
@keyframes nebulaShift {
  0% { opacity: 0.7; transform: scale(1) translate(0, 0); }
  33% { opacity: 1; transform: scale(1.04) translate(-15px, -10px); }
  66% { opacity: 0.85; transform: scale(0.98) translate(10px, 15px); }
  100% { opacity: 0.9; transform: scale(1.02) translate(-5px, -20px); }
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue), var(--violet)); border-radius: 3px; }

/* ===== NAVBAR ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(3,2,15,0.82);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(100,120,255,0.15);
}
.header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--violet), var(--cyan), var(--blue), transparent);
  background-size: 200% 100%;
  animation: navShimmer 4s linear infinite;
}
@keyframes navShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }

.logo {
  font-weight: 800; font-size: 19px; letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--blue2), var(--violet2), var(--cyan));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: logoShimmer 3s linear infinite, logoPulse 2.5s ease-in-out infinite;
}
@keyframes logoShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(77,124,255,0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(155,107,255,0.7)) drop-shadow(0 0 32px rgba(77,124,255,0.4)); }
}
.dot { color: var(--cyan); }

.menu { display: flex; align-items: center; gap: 6px; }
.menu a {
  color: var(--muted); padding: 8px 14px; border-radius: 12px;
  font-weight: 500; font-size: 14px; transition: all 0.2s ease;
  border: 1px solid transparent; position: relative;
}
.menu a:hover { color: var(--text); background: rgba(77,124,255,0.08); border-color: rgba(77,124,255,0.2); }
.menu a.active { color: var(--blue2); background: rgba(77,124,255,0.1); border-color: rgba(77,124,255,0.3); }
.menu a::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; right: 50%; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  border-radius: 2px; box-shadow: 0 0 6px rgba(77,124,255,0.6);
  transition: left 0.25s ease, right 0.25s ease;
}
.menu a:hover::after { left: 14px; right: 14px; }
.menu a.active::after { left: 14px; right: 14px; }
.menu-btn {
  display: none; border: 1px solid rgba(77,124,255,0.25);
  background: rgba(77,124,255,0.08); color: var(--text);
  padding: 10px 14px; border-radius: 14px; font-weight: 700; cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--cyan));
  background-size: 200% auto;
  color: #fff; font-weight: 700; font-size: 14px;
  border: 0; cursor: pointer; position: relative; overflow: hidden;
  box-shadow: var(--shadow-3d), var(--neon-blue);
  transform: translateY(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-position 0.4s ease;
  animation: btnGradientShift 4s linear infinite;
}
@keyframes btnGradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 0 rgba(30,20,100,0.6), 0 20px 40px rgba(0,0,0,0.5), var(--neon-both);
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(30,20,100,0.8); }
.btn-sm { padding: 9px 18px; border-radius: 12px; font-size: 13px; }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(77,124,255,0.3);
  color: var(--text);
  box-shadow: 0 6px 0 rgba(0,0,0,0.5); animation: none;
}
.btn-ghost::before { display: none; }
.btn-ghost:hover {
  background: rgba(77,124,255,0.08); border-color: rgba(77,124,255,0.5); color: var(--blue2);
  box-shadow: 0 10px 0 rgba(0,0,0,0.4), var(--neon-blue);
}

.container { width: min(1100px, 92vw); margin: 0 auto; position: relative; z-index: 1; }

/* ===== HERO ===== */
.hero { padding: 68px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px; align-items: center; }

.badge {
  display: inline-flex; padding: 7px 14px;
  border: 1px solid rgba(77,124,255,0.3); border-radius: 999px;
  color: var(--cyan); background: rgba(79,195,247,0.06);
  font-weight: 600; font-size: 13px; margin: 0 0 14px;
  box-shadow: 0 0 14px rgba(79,195,247,0.1);
}

.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 3.8vw, 54px); line-height: 1.08; font-weight: 800; }
.grad {
  background: linear-gradient(135deg, #fff 20%, var(--blue2) 50%, var(--violet2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(77,124,255,0.5));
}

.hero-role-large {
  font-size: clamp(18px, 2.2vw, 30px); font-weight: 800;
  margin: 0 0 16px; min-height: 40px;
  background: linear-gradient(135deg, var(--violet2), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(155,107,255,0.4));
}
.hero-role-large .cursor {
  display: inline-block; width: 3px; height: 1em;
  background: var(--violet2); margin-left: 3px; vertical-align: middle;
  animation: blink 0.7s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }

.sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 20px; }

/* Social icons */
.social-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.icon-link {
  width: 52px; height: 52px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(77,124,255,0.2);
  position: relative; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(77,124,255,0.08);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
}
.icon-link::after { display: none; }
.icon-link:hover {
  transform: translateY(-6px) scale(1.1);
  border-color: rgba(77,124,255,0.4);
  box-shadow: 0 14px 30px rgba(0,0,0,0.6), 0 0 15px rgba(77,124,255,0.3);
}
.icon-link img { width: 52px; height: 52px; object-fit: cover; border-radius: 17px; position: relative; z-index: 1; }

/* Hero card */
.hero-card {
  background: rgba(77,124,255,0.04);
  border: 1px solid rgba(77,124,255,0.18);
  border-radius: 28px; box-shadow: var(--shadow-card);
  overflow: hidden; position: relative; transition: transform 0.1s ease;
}
.hero-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--violet), var(--cyan), transparent);
}

.avatar-wrapper { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 20px 12px; }
.avatar {
  width: 100%; max-width: 320px; height: auto;
  border-radius: 16px; object-fit: cover; display: block;
  border: 2px solid rgba(77,124,255,0.25);
  box-shadow: 0 0 40px rgba(77,124,255,0.2), 0 10px 40px rgba(0,0,0,0.6);
}

.hero-card-body { padding: 10px 20px 24px; text-align: center; position: relative; z-index: 1; }
.hero-name {
  font-size: 24px; font-weight: 800; margin: 0 0 8px;
  background: linear-gradient(135deg, #fff, var(--blue2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-size: 14px; font-weight: 600; color: var(--violet2); min-height: 22px; }
.hero-role .cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--violet2); margin-left: 2px; vertical-align: middle;
  animation: blink 0.7s step-end infinite;
}

.kv { list-style: none; padding: 0; margin: 12px 0 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.kv li span { color: var(--muted); }
.kv li strong { color: var(--text); font-weight: 600; }

.contact-mini { display: flex; gap: 10px; margin-top: 16px; justify-content: center; }
.mini {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 14px;
  border: 1px solid rgba(77,124,255,0.25);
  background: rgba(77,124,255,0.07);
  color: var(--text); font-weight: 700; font-size: 13px;
  box-shadow: 0 5px 0 rgba(20,10,80,0.6);
  transition: all 0.2s ease;
}
.mini:hover { background: rgba(77,124,255,0.14); border-color: rgba(77,124,255,0.4); transform: translateY(-2px); box-shadow: 0 7px 0 rgba(20,10,80,0.5), var(--neon-blue); color: var(--blue2); }
.mini img { width: 22px; height: 22px; object-fit: contain; }

/* ===== SECTIONS ===== */
.section { padding: 64px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 0 0 8px; font-size: 34px; font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--blue2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head p { margin: 0; color: var(--muted); }

/* ===== CARDS ===== */
.card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(77,124,255,0.15);
  border-radius: calc(var(--r) + 4px);
  box-shadow: var(--shadow-card);
  padding: 22px; position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--violet), transparent);
}
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(77,124,255,0.05) 50%, transparent 100%);
  transform: translateX(-100%) skewX(-15deg); pointer-events: none;
}
.card:hover { transform: translateY(-4px) rotateX(2deg); box-shadow: 0 28px 70px rgba(0,0,0,0.7), var(--neon-blue); border-color: rgba(77,124,255,0.3); }
.card:hover::after { animation: shimmerSweep 0.7s ease forwards; }

/* ===== SKILLS ===== */
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flip { perspective: 1200px; height: 220px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s cubic-bezier(0.4,0.2,0.2,1); transform-style: preserve-3d; }
.flip:hover .flip-inner { transform: rotateY(180deg); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(77,124,255,0.15);
  border-radius: calc(var(--r) + 4px);
  box-shadow: var(--shadow-card);
  padding: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
}
.flip-front::before, .flip-back::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--violet), transparent);
}
.flip-front { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.flip-top { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flip-icon { font-size: 30px; }
.flip-front h3 { margin: 0; font-size: 17px; color: var(--text); }
.flip-back { transform: rotateY(180deg); display: flex; align-items: center; background: rgba(77,124,255,0.05); }
/* Side Skills card (Skills section) */
.flip.side-skill-card .flip-front {
  padding: 0;
}

.flip.side-skill-card .flip-back {
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(8, 6, 26, 0.98) 0%, rgba(20, 10, 40, 0.98) 100%);
}
.flip:hover .flip-front, .flip:hover .flip-back, .flip.is-flipped .flip-front, .flip.is-flipped .flip-back { border-color: rgba(77,124,255,0.3); box-shadow: 0 24px 60px rgba(0,0,0,0.7), var(--neon-blue); }
.tool-list { list-style: none; padding: 0; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(77,124,255,0.08); border: 1px solid rgba(77,124,255,0.2); font-size: 13px; font-weight: 600; color: var(--text); }
.tool-ico { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(77,124,255,0.15); }
.muted { color: var(--muted); }

/* ===== CTA CARD ===== */
.cta-card {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, rgba(77,124,255,0.08), rgba(155,107,255,0.06));
  border: 1px solid rgba(77,124,255,0.2);
  border-radius: calc(var(--r) + 8px);
  padding: 22px 26px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-card); transition: all 0.2s ease;
}
.cta-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), var(--violet), transparent); }
.cta-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(77,124,255,0.04) 50%, transparent 100%); transform: translateX(-100%) skewX(-15deg); pointer-events: none; }
.cta-card:hover { border-color: rgba(77,124,255,0.35); box-shadow: 0 12px 50px rgba(0,0,0,0.6), var(--neon-blue); }
.cta-card:hover::after { animation: shimmerSweep 0.7s ease forwards; }
.cta-card h3 { margin: 0 0 6px; color: var(--text); }
.cta-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.contact-card {
  display: flex; gap: 16px; align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(77,124,255,0.15);
  border-radius: calc(var(--r) + 4px);
  box-shadow: var(--shadow-card); padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative; overflow: hidden;
}
.contact-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.contact-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(77,124,255,0.04) 50%, transparent 100%); transform: translateX(-100%) skewX(-15deg); pointer-events: none; }
.contact-card:hover { transform: translateY(-4px); border-color: rgba(77,124,255,0.35); box-shadow: 0 20px 50px rgba(0,0,0,0.6), var(--neon-blue); }
.contact-card:hover::after { animation: shimmerSweep 0.7s ease forwards; }
.contact-card img { width: 46px; height: 46px; border-radius: 14px; object-fit: contain; background: rgba(255,255,255,0.08); padding: 7px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.contact-card h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.contact-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* ===== PAGE HERO ===== */
.page-hero { padding: 44px 0 10px; }
.page-hero h1 {
  margin: 0 0 10px; font-size: 44px; font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--blue2) 60%, var(--violet2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px rgba(77,124,255,0.3));
}

/* ===== EDUCATION ===== */
.edu-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 22px; border: 1px solid rgba(77,124,255,0.15);
  border-radius: calc(var(--r) + 10px); box-shadow: var(--shadow-card);
  background: rgba(255,255,255,0.03); backdrop-filter: blur(14px);
  margin-bottom: 20px; position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.edu-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), var(--violet), transparent); }
.edu-card:hover { transform: translateY(-4px); box-shadow: 0 28px 70px rgba(0,0,0,0.7), var(--neon-blue); border-color: rgba(77,124,255,0.3); }
.edu-kicker { display: inline-flex; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(77,124,255,0.3); background: rgba(77,124,255,0.08); color: var(--cyan); font-weight: 700; font-size: 12px; margin: 0 0 10px; }
.edu-body h2 { margin: 0 0 10px; font-size: 20px; color: var(--text); }
.edu-meta p { margin: 10px 0 12px; color: var(--muted); font-size: 13px; }
.edu-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.stat { min-width: 110px; padding: 10px 14px; border-radius: 16px; border: 1px solid rgba(77,124,255,0.18); background: rgba(77,124,255,0.06); }
.stat span { display: block; color: var(--muted); font-size: 11px; }
.stat strong { display: block; font-size: 16px; color: var(--blue2); font-weight: 700; }
.edu-media { position: relative; border-radius: calc(var(--r) + 6px); overflow: hidden; border: 1px solid rgba(77,124,255,0.15); background: rgba(0,0,0,0.4); min-height: 300px; }
.edu-media .edu-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease, transform 0.35s ease; transform: scale(1.03); }
.edu-media .edu-img.active { opacity: 1; transform: scale(1); }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 14px; border: 1px solid rgba(77,124,255,0.3); background: rgba(3,2,15,0.8); backdrop-filter: blur(8px); color: var(--text); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; z-index: 2; }
.car-btn:hover { background: rgba(77,124,255,0.2); border-color: rgba(77,124,255,0.5); }
.car-btn.prev { left: 10px; }
.car-btn.next { right: 10px; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 8px; justify-content: center; z-index: 2; }
.car-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.2); cursor: pointer; transition: all 0.2s ease; }
.car-dots button.active { background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 0 8px rgba(77,124,255,0.6); width: 20px; }
.edu-media--video { display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 0; overflow: hidden; }
.edu-video { width: 100%; height: 100%; min-height: 300px; object-fit: cover; border-radius: calc(var(--r) + 6px); display: block; }
.edu-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; margin-right: 0.5rem; background: rgba(77,124,255,0.1); color: var(--blue2); border: 1px solid rgba(77,124,255,0.25); }

/* ===== FOOTER ===== */
.footer { padding: 20px 0 30px; border-top: 1px solid rgba(77,124,255,0.12); margin-top: 20px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.top { color: var(--muted); transition: color 0.2s ease; }
.top:hover { color: var(--blue2); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== LIGHTBOX ===== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 9999; }
.lightbox.open { display: flex; }
.lightbox-stage { max-width: min(1100px, 100%); max-height: 88vh; }
.lightbox-stage img, .lightbox-stage video { width: 100%; height: auto; max-height: 88vh; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,0.9), 0 0 40px rgba(77,124,255,0.2); }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(77,124,255,0.3); background: rgba(3,2,15,0.9); backdrop-filter: blur(10px); color: var(--text); font-size: 18px; cursor: pointer; transition: all 0.2s ease; }
.lightbox-close:hover { background: rgba(77,124,255,0.2); border-color: rgba(77,124,255,0.5); }
.zoomable { cursor: zoom-in; transition: transform 0.3s ease; }
.zoomable:hover { transform: scale(1.02); }

/* ===== SIDE SKILLS ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(3,2,15,0.82); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(77,124,255,0.15); }
.site-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), var(--violet), var(--cyan), var(--blue), transparent); background-size: 200% 100%; animation: navShimmer 4s linear infinite; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 0 10px rgba(77,124,255,0.6); }
.brand-text { font-weight: 800; font-size: 18px; background: linear-gradient(135deg, var(--blue2), var(--violet2), var(--cyan)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: logoShimmer 3s linear infinite, logoPulse 2.5s ease-in-out infinite; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 12px; font-size: 14px; transition: all 0.2s ease; border: 1px solid transparent; position: relative; }
.nav a:hover { color: var(--text); background: rgba(77,124,255,0.08); border-color: rgba(77,124,255,0.2); }
.nav a.active { color: var(--blue2); background: rgba(77,124,255,0.1); border-color: rgba(77,124,255,0.3); }
.nav a::after { content: ''; position: absolute; bottom: 4px; left: 50%; right: 50%; height: 2px; background: linear-gradient(90deg, var(--blue), var(--violet)); border-radius: 2px; transition: left 0.25s ease, right 0.25s ease; }
.nav a:hover::after { left: 14px; right: 14px; }
.nav a.active::after { left: 14px; right: 14px; }
.nav-toggle { display: none; border: 1px solid rgba(77,124,255,0.25); background: rgba(77,124,255,0.08); color: var(--text); padding: 8px 12px; border-radius: 12px; cursor: pointer; }

/* 3D Section titles */
.skill-section-title {
  font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; margin: 0 0 18px; display: inline-block;
  background: linear-gradient(135deg, #fff 20%, var(--blue2) 50%, var(--violet2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 8px rgba(77,124,255,0.4)) drop-shadow(0 0 20px rgba(155,107,255,0.2));
  transform: perspective(500px) rotateX(8deg); transform-origin: bottom left;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.skill-section-title:hover {
  transform: perspective(500px) rotateX(0deg) scale(1.02);
  filter: drop-shadow(0 6px 14px rgba(77,124,255,0.6)) drop-shadow(0 0 30px rgba(155,107,255,0.4));
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.chip {
  padding: 10px 20px; border-radius: 999px;
  background: rgba(77,124,255,0.08); border: 1px solid rgba(77,124,255,0.3);
  color: var(--blue2); font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 0 rgba(20,10,80,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: perspective(300px) rotateX(5deg); transform-origin: bottom center;
  transition: all 0.3s ease; cursor: default;
}
.chip:hover {
  background: rgba(77,124,255,0.15); border-color: rgba(77,124,255,0.6);
  box-shadow: 0 6px 0 rgba(20,10,80,0.4), 0 0 25px rgba(77,124,255,0.3), 0 0 50px rgba(155,107,255,0.15);
  transform: perspective(300px) rotateX(0deg) translateY(-3px); color: var(--blue2);
}

/* Skills */
.skills-stack { display: flex; flex-direction: column; gap: 24px; }
.card.soft { background: rgba(255,255,255,0.03); backdrop-filter: blur(14px); border: 1px solid rgba(77,124,255,0.15); }
.card.soft h2 { margin: 0 0 12px; font-size: 20px; background: linear-gradient(135deg, #fff, var(--blue2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.clean-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.clean-list li { color: var(--muted); font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.small { font-size: 13px; }

.tool-logos { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tool-logo-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: rgba(77,124,255,0.06); border: 1px solid rgba(77,124,255,0.18); box-shadow: 0 4px 0 rgba(0,0,0,0.5); transition: all 0.2s ease; }
.tool-logo-item:hover { background: rgba(77,124,255,0.12); border-color: rgba(77,124,255,0.35); transform: translateY(-3px); box-shadow: 0 7px 0 rgba(0,0,0,0.4), var(--neon-blue); }
.tool-logo-item img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.tool-logo-item span { font-weight: 700; font-size: 15px; color: var(--text); }

.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 720px) { .media-grid { grid-template-columns: 1fr; } }
.media { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid rgba(77,124,255,0.15); background: rgba(0,0,0,0.4); display: block; }
video.media { width: 100%; height: auto; display: block; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery-item { margin: 0; padding: 12px; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(77,124,255,0.12); box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.gallery-item:hover { transform: translateY(-6px) rotateX(4deg); border-color: rgba(77,124,255,0.35); box-shadow: 0 20px 50px rgba(0,0,0,0.6), var(--neon-blue); }
.gallery-item img { width: 100%; height: auto; border-radius: 14px; display: block; }
.gallery-item figcaption { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

.qr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .qr-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .qr-grid { grid-template-columns: repeat(2, 1fr); } }
.qr-item { padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(77,124,255,0.12); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.qr-item:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.6), var(--neon-blue); border-color: rgba(77,124,255,0.35); }
.qr-item img { width: 100%; border-radius: 10px; display: block; }
.qr-item p { margin: 8px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }

.site-footer { border-top: 1px solid rgba(77,124,255,0.12); padding: 20px 0; margin-top: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .edu-card { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .menu { display: none; position: absolute; right: 4vw; top: 64px; flex-direction: column; background: rgba(3,2,15,0.97); border: 1px solid rgba(77,124,255,0.25); border-radius: 18px; padding: 12px; min-width: 220px; box-shadow: 0 20px 50px rgba(0,0,0,0.8), var(--neon-blue); backdrop-filter: blur(20px); }
  .menu.open { display: flex; }
}
@media (max-width: 600px) { .skill-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .nav { display: none; position: absolute; right: 16px; top: 64px; flex-direction: column; align-items: flex-start; padding: 12px; background: rgba(3,2,15,0.97); border: 1px solid rgba(77,124,255,0.25); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.8); backdrop-filter: blur(20px); }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, .flip-inner, .reveal { transition: none !important; animation: none !important; }
}

/* ===== ALL ANIMATIONS ===== */

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: pageFadeIn 0.7s ease forwards; }

/* Hero stagger */
.hero-text .badge { opacity: 0; animation: pageFadeIn 0.6s ease 0.1s forwards; }
.hero-text h1 { opacity: 0; animation: pageFadeIn 0.6s ease 0.25s forwards; }
.hero-role-large { opacity: 0; animation: pageFadeIn 0.6s ease 0.4s forwards; }
.hero-text .sub { opacity: 0; animation: pageFadeIn 0.6s ease 0.55s forwards; }
.hero-text .hero-cta { opacity: 0; animation: pageFadeIn 0.6s ease 0.7s forwards; }
.hero-text .social-row { opacity: 0; animation: pageFadeIn 0.6s ease 0.85s forwards; }
.hero-card { opacity: 0; animation: pageFadeIn 0.7s ease 0.4s forwards; }

/* Floating social icons */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}
.social-row .icon-link:nth-child(1) { animation: float 3.2s ease-in-out 0s infinite; }
.social-row .icon-link:nth-child(2) { animation: float 3.2s ease-in-out 0.5s infinite; }
.social-row .icon-link:nth-child(3) { animation: float 3.2s ease-in-out 1s infinite; }
.social-row .icon-link:nth-child(4) { animation: float 3.2s ease-in-out 1.5s infinite; }
.social-row .icon-link:nth-child(5) { animation: float 3.2s ease-in-out 2s infinite; }
.social-row .icon-link:hover { animation: none; transform: translateY(-6px) scale(1.1); }

/* Shimmer */
@keyframes shimmerSweep {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

/* Button ripple */
@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}
.btn .ripple-effect {
  position: absolute; border-radius: 50%;
  width: 60px; height: 60px; margin-top: -30px; margin-left: -30px;
  background: rgba(255,255,255,0.25);
  animation: ripple 0.6s linear forwards; pointer-events: none;
}

/* Particle canvas */
#particles-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.7; will-change: transform; }
main, header, .header, .site-header { position: relative; z-index: 1; }

/* Twinkling stars canvas */
#stars-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; will-change: transform; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== SKILL CARD IMAGES ===== */
.skill-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  padding: 10px;
}

.skill-card-img-back {
  width: 90%;
  max-height: 60px;
  object-fit: contain;
}

.tool-img-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

/* MS Office back grid */
.tool-logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 8px;
  width: 100%;
}

.tool-logo-item-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.tool-logo-item-sm img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.tool-logo-item-sm span {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
}

/* AI Automation logos on flip back */
.ai-tool-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 10px;
}

/* ===== NEW SKILL CARD STYLES ===== */

/* NoSQL background image card */
.nosql-front {
  padding: 0 !important;
  overflow: hidden;
}
.skill-card-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r) + 2px);
  display: block;
}

/* SQL logos grid on back */
.sql-logo-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
}
.sql-logo-img {
  width: 100%;
  max-width: 160px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Larger tool logo for NoSQL back */
.tool-logo-img-lg {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
}

/* Larger tool logo for SQL back items */
.tool-list .tool-img-item img.tool-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
}

/* Bigger AI tool logos on back */
.ai-tool-logo-lg {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
}

/* ===== MASONRY GALLERY ===== */
.masonry-gallery {
  columns: 3;
  column-gap: 16px;
}
@media (max-width: 900px) { .masonry-gallery { columns: 2; } }
@media (max-width: 560px) { .masonry-gallery { columns: 1; } }

.masonry-item {
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(77,124,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: inline-block;
  width: 100%;
}
.masonry-item:hover {
  transform: translateY(-6px);
  border-color: rgba(77,124,255,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), var(--neon-blue);
}
.masonry-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.masonry-item figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.qr-section-card {
  background: linear-gradient(135deg, rgba(10,10,30,0.95) 0%, rgba(20,10,40,0.98) 100%);
  border: 1px solid rgba(155,107,255,0.25);
  border-radius: 20px;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.qr-section-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(155,107,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.qr-section-title {
  text-align: center;
  background: linear-gradient(90deg, #9b6bff, #4fc3f7, #9b6bff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 4s linear infinite;
  font-size: 1.6rem !important;
  margin-bottom: 8px !important;
}

.qr-section-sub {
  text-align: center;
  margin-bottom: 36px !important;
}

@keyframes shimmer-text {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.qr-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 16px 0;
}

.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-item p {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

/* Float animation */
@keyframes qr-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.qr-float {
  animation: qr-float 4s ease-in-out infinite;
}

/* Glow wrapper */
.qr-glow-wrap {
  position: relative;
  border-radius: 16px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(155,107,255,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-glow-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(155,107,255,0.5), rgba(79,195,247,0.5), rgba(155,107,255,0.5));
  background-size: 200% 200%;
  animation: glow-rotate 4s linear infinite;
  filter: blur(8px);
  z-index: -1;
  opacity: 0.7;
}

@keyframes glow-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.qr-glow-wrap img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.qr-glow-wrap:hover {
  transform: scale(1.06);
  box-shadow: 0 0 30px rgba(155,107,255,0.6), 0 0 60px rgba(79,195,247,0.3);
}


