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

@property --grad-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* Backgrounds */
  --bg:        #0a0e1a;
  --bg-2:      #0f1525;
  --bg-3:      #141b30;
  --bg-card:   #111827;

  /* Borders */
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(99,102,241,0.4);

  /* Accent colours */
  --accent:    #6366f1;
  --accent-2:  #8b5cf6;
  --accent-g:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --cyan:      #06b6d4;
  --green:     #10b981;

  /* Text */
  --text:   #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;

  /* Typography */
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Shape */
  --radius:    12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.5);

  /* Nav height — used for scroll-margin */
  --nav-h: 68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.has-cursor * { cursor: none !important; }

::selection { background: rgba(99,102,241,0.35); color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--accent-g); border-radius: 3px; }

/* ============================================================
   PAGE LOADER
   ============================================================ */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.8s cubic-bezier(0.76,0,0.24,1), opacity 0.5s ease;
}
#page-loader.hide { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.loader-inner { text-align: center; position: relative; z-index: 1; }

.loader-logo-text {
  font-size: 80px; font-weight: 900; letter-spacing: -4px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #06b6d4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: block;
  opacity: 0; transform: scale(0.7) translateY(20px);
  animation: loaderLogoIn 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}
.loader-subtitle {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  letter-spacing: 0.25em; text-transform: uppercase;
  margin-top: 6px; margin-bottom: 32px;
  opacity: 0; animation: loaderFadeIn 0.4s ease 0.5s both;
}
.loader-progress-wrap {
  width: 220px; height: 2px; background: rgba(255,255,255,0.06);
  border-radius: 1px; overflow: hidden; margin: 0 auto;
  opacity: 0; animation: loaderFadeIn 0.3s ease 0.6s both;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
  border-radius: 1px;
  transition: width 1.1s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(99,102,241,0.8);
}
.loader-corner {
  position: absolute; width: 20px; height: 20px;
  border-color: rgba(99,102,241,0.3); border-style: solid;
  opacity: 0; animation: loaderFadeIn 0.4s ease 0.3s both;
}
.loader-corner.tl { top: 40px; left: 40px; border-width: 1px 0 0 1px; }
.loader-corner.tr { top: 40px; right: 40px; border-width: 1px 1px 0 0; }
.loader-corner.bl { bottom: 40px; left: 40px; border-width: 0 0 1px 1px; }
.loader-corner.br { bottom: 40px; right: 40px; border-width: 0 1px 1px 0; }

@keyframes loaderLogoIn {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes loaderFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#progress-bar {
  position: fixed; top: 0; left: 0; z-index: 9998;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
  box-shadow: 0 0 10px rgba(99,102,241,0.6);
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); pointer-events: none; z-index: 10000;
  will-change: transform; margin: -4px 0 0 -4px;
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease,
              opacity 0.25s ease, margin 0.25s ease;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(99,102,241,0.5);
  pointer-events: none; z-index: 10000;
  will-change: transform; margin: -19px 0 0 -19px;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease,
              opacity 0.3s ease, margin 0.3s ease;
}
.cursor-dot.hover  { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent-2); }
.cursor-ring.hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: rgba(139,92,246,0.7); }
.cursor-dot.hidden-cursor, .cursor-ring.hidden-cursor { opacity: 0; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.dot { color: var(--accent); }
.hidden { display: none !important; }

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Buttons — transition on specific properties to avoid shimmer conflict */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: none;
  text-decoration: none; font-family: var(--font);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, border-color 0.25s ease,
              color 0.25s ease;
  position: relative; overflow: hidden;
}
/* Shimmer sweep on hover */
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.45s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(110%) skewX(-12deg); }

.btn-primary {
  background: var(--accent-g);
  color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(99,102,241,0.6);
}
.btn-ghost {
  background: transparent; color: var(--text); border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(99,102,241,0.08); transform: translateY(-3px);
}
.btn-full { width: 100%; justify-content: center; }
.btn svg  { width: 16px; height: 16px; flex-shrink: 0; }

/* Focus ring for accessibility */
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
  padding: clamp(72px, 8vw, 110px) 0;
}

/* Offset for fixed navbar on anchor scroll */
section[id] { scroll-margin-top: var(--nav-h); }

#about    { background: var(--bg-2); }
#skills   { background: var(--bg); }
#projects { background: var(--bg-2); }
#education{ background: var(--bg); }
#contact  { background: var(--bg-2); }

.section-label {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  line-height: 1;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px;
}
.section-subtitle {
  font-size: 16px; color: var(--text-2);
  max-width: 600px; margin-bottom: 56px;
  line-height: 1.75;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--rd, 0s);
}
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.95) translateY(20px); }
.reveal-up.in-view, .reveal-left.in-view,
.reveal-right.in-view, .reveal-scale.in-view { opacity: 1; transform: none; }

/* Staggered fade-in */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1) var(--delay, 0ms),
              transform 0.65s cubic-bezier(0.16,1,0.3,1) var(--delay, 0ms);
}
.fade-in.visible { opacity: 1; transform: none; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s ease, border-bottom 0.4s ease;
}
#navbar.scrolled {
  background: rgba(10,14,26,0.9);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 24px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo {
  font-size: 22px; font-weight: 800; color: var(--text);
  text-decoration: none; letter-spacing: -0.5px;
  transition: color 0.2s ease;
}
.nav-logo:hover { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color 0.2s ease;
  position: relative; padding-bottom: 3px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
  border-radius: 1px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }

.nav-cta {
  background: var(--accent-g) !important;
  color: #fff !important; padding: 8px 20px;
  border-radius: 7px; font-weight: 600 !important;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.nav-cta:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(99,102,241,0.5) !important;
}
.nav-cta::after { display: none !important; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
  cursor: pointer;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}
.hamburger:hover span { background: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden; background: var(--bg);
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.5;
}
.hero-bg-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  pointer-events: none; z-index: 0;
}
.orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, transparent 70%);
  top: -250px; right: -150px;
  animation: orbDrift1 18s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.11) 0%, transparent 70%);
  bottom: -150px; left: -100px;
  animation: orbDrift2 22s ease-in-out infinite;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
  top: 40%; left: 30%;
  animation: orbDrift3 14s ease-in-out infinite;
}
@keyframes orbDrift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-30px) scale(1.08); }
  66%      { transform: translate(-25px,40px) scale(0.94); }
}
@keyframes orbDrift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  40%      { transform: translate(-30px,-50px) scale(1.05); }
  70%      { transform: translate(50px,20px) scale(0.96); }
}
@keyframes orbDrift3 {
  0%,100% { transform: translate(0,0) scale(1); opacity: 0.6; }
  50%      { transform: translate(20px,-30px) scale(1.15); opacity: 1; }
}

.hero-content {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 460px; gap: 64px;
  align-items: center; position: relative; z-index: 1;
}

/* Explicit flex layout for the left column */
.hero-left {
  display: flex; flex-direction: column; align-items: flex-start;
}

/* Hero entrance animations */
.h-enter { opacity: 0; transform: translateY(32px); }
body.loaded .h-enter {
  animation: heroEnter 0.8s cubic-bezier(0.16,1,0.3,1) var(--hd, 0s) both;
}
body.loaded .hero-code-card.h-enter {
  animation: heroEnterRight 0.9s cubic-bezier(0.16,1,0.3,1) var(--hd, 0s) both;
}
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; }
}
@keyframes heroEnterRight {
  from { opacity: 0; transform: translateX(48px) rotate(1deg); } to { opacity: 1; transform: none; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22);
  color: var(--green); padding: 6px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 500; margin-bottom: 24px;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 7px; height: 7px; background: var(--green); border-radius: 50%;
  animation: pulseGreen 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.hero-name {
  font-size: clamp(44px, 6vw, 80px); font-weight: 900;
  line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 18px;
}
.hero-title {
  font-family: var(--mono); font-size: 18px; color: var(--text-2);
  margin-bottom: 24px; min-height: 30px; letter-spacing: 0.01em;
}
.typed-cursor { color: var(--accent); animation: blink 0.9s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

.hero-summary {
  font-size: 16px; color: var(--text-2); line-height: 1.8;
  margin-bottom: 36px; max-width: 510px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 52px; flex-wrap: wrap; }

.hero-stats { display: flex; align-items: center; gap: 28px; }
.stat-num {
  display: block; font-size: 26px; font-weight: 800;
  background: var(--accent-g);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.2;
}
.stat-label { font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 2px; letter-spacing: 0.03em; }
.stat-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }

/* ============================================================
   CODE CARD
   ============================================================ */
.hero-code-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.04);
  animation: cardFloat 7s ease-in-out infinite;
}
/* Pause float on hover for better readability */
.hero-code-card:hover { animation-play-state: paused; }

@keyframes cardFloat {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  25%      { transform: translateY(-10px) rotate(0.4deg); }
  75%      { transform: translateY(-5px) rotate(-0.3deg); }
}
.code-card-header {
  background: var(--bg-3); padding: 12px 16px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid var(--border);
}
.code-card-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.code-card-title {
  font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-left: 6px;
}
.code-card-body {
  padding: 22px 24px; font-family: var(--mono); font-size: 13px;
  line-height: 1.75; white-space: pre; overflow-x: auto;
}
.code-card-footer {
  padding: 10px 16px; border-top: 1px solid var(--border); background: var(--bg-3);
}
.code-status {
  font-family: var(--mono); font-size: 11px; color: var(--green);
  display: flex; align-items: center; gap: 6px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  flex-shrink: 0; animation: pulseGreen 2s infinite;
}
.c-kw  { color: #c084fc; }
.c-cls { color: #67e8f9; }
.c-fn  { color: #a5f3fc; }
.c-var { color: #fde68a; }
.c-str { color: #86efac; }
.c-num { color: #fb923c; }
.c-br  { color: #94a3b8; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid; grid-template-columns: 1fr 340px; gap: 60px; align-items: start;
}
.about-text p {
  color: var(--text-2); font-size: 15.5px; line-height: 1.85; margin-bottom: 18px;
}
.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px;
}
.highlight-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text-2);
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.highlight-item:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(99,102,241,0.04);
}
.highlight-item svg {
  width: 15px; height: 15px; flex-shrink: 0; color: var(--green); margin-top: 1px;
}

/* Info cards in About */
.about-cards { display: flex; flex-direction: column; gap: 12px; }
.info-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.info-card:hover {
  border-color: var(--border-h);
  transform: translateX(5px);
  box-shadow: -3px 0 16px rgba(99,102,241,0.1);
}
.info-card-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: rgba(99,102,241,0.1); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}
.info-card:hover .info-card-icon { background: rgba(99,102,241,0.18); transform: scale(1.08); }
.info-card-icon svg { width: 18px; height: 18px; color: var(--accent); }

/* Explicit flex column so label stacks above value */
.info-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-card-label {
  font-size: 10px; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.info-card-value {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.accent-card { border-color: rgba(99,102,241,0.2); }
.accent-card .info-card-icon { background: var(--accent-g); }
.accent-card .info-card-icon svg { color: #fff; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px;
}
.skill-category {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.skill-category:hover {
  border-color: var(--border-h);
  box-shadow: 0 8px 32px rgba(99,102,241,0.1);
}
.skill-cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.skill-cat-icon {
  width: 42px; height: 42px; background: rgba(99,102,241,0.1); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, transform 0.5s ease;
}
.skill-category:hover .skill-cat-icon {
  background: rgba(99,102,241,0.2); transform: rotateY(180deg);
}
.skill-cat-icon svg { width: 19px; height: 19px; color: var(--accent); }
.skill-cat-header h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 4px 11px; border-radius: 5px; font-size: 12px;
  font-weight: 500; font-family: var(--mono);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-2);
  cursor: default;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  position: relative; overflow: hidden;
}
.tag::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%); transition: transform 0.5s ease;
  pointer-events: none;
}
.tag:hover::after { transform: translateX(100%); }
.tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.07); }
.tag-primary {
  background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.28); color: #a5b4fc;
}

/* Stagger delays */
.skill-category:nth-child(1) { --delay: 0ms; }
.skill-category:nth-child(2) { --delay: 80ms; }
.skill-category:nth-child(3) { --delay: 160ms; }
.skill-category:nth-child(4) { --delay: 240ms; }
.skill-category:nth-child(5) { --delay: 320ms; }
.skill-category:nth-child(6) { --delay: 400ms; }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px;
}
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  display: flex; flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.project-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}

/* Spinning gradient border on featured card */
.project-card.featured { isolation: isolate; border-color: transparent; }
.project-card.featured::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: var(--radius-lg);
  background: conic-gradient(from var(--grad-angle),
    #6366f1 0%, #8b5cf6 30%, #06b6d4 60%, #10b981 80%, #6366f1 100%);
  z-index: -1; animation: spinBorder 5s linear infinite;
}
@keyframes spinBorder { to { --grad-angle: 360deg; } }
.project-card.featured::after {
  content: ''; position: absolute; inset: 1px;
  border-radius: calc(var(--radius-lg) - 1px);
  background: var(--bg-card); z-index: -1;
}

.project-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.project-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  letter-spacing: 0.05em;
}
.featured-badge {
  background: rgba(99,102,241,0.15); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3);
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 10px rgba(99,102,241,0.35); }
}
.project-stack { display: flex; flex-wrap: wrap; gap: 5px; }
.project-stack span {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.04); color: var(--text-3); border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.project-card:hover .project-stack span { border-color: rgba(99,102,241,0.18); color: var(--text-2); }

.project-name {
  font-size: 19px; font-weight: 700; margin-bottom: 9px;
  color: var(--text); letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.project-card:hover .project-name { color: var(--accent); }

.project-desc {
  font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 16px;
}
.project-bullets { list-style: none; flex: 1; }
.project-bullets li {
  font-size: 13px; color: var(--text-2);
  padding: 6px 0 6px 18px; position: relative;
  border-top: 1px solid var(--border); line-height: 1.55;
}
.project-bullets li:first-child { border-top: none; }
.project-bullets li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.2s ease, background 0.2s ease;
}
.project-card:hover .project-bullets li::before {
  transform: scale(1.5);
  background: var(--accent-2);
}
.project-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.project-highlight {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: #fbbf24; font-weight: 600; letter-spacing: 0.02em;
}
.project-highlight svg { width: 13px; height: 13px; fill: #fbbf24; stroke: none; flex-shrink: 0; }

/* Stagger delays */
.project-card:nth-child(1)  { --delay: 0ms; }
.project-card:nth-child(2)  { --delay: 65ms; }
.project-card:nth-child(3)  { --delay: 130ms; }
.project-card:nth-child(4)  { --delay: 195ms; }
.project-card:nth-child(5)  { --delay: 260ms; }
.project-card:nth-child(6)  { --delay: 325ms; }
.project-card:nth-child(7)  { --delay: 390ms; }
.project-card:nth-child(8)  { --delay: 455ms; }
.project-card:nth-child(9)  { --delay: 520ms; }
.project-card:nth-child(10) { --delay: 585ms; }
.project-card:nth-child(11) { --delay: 650ms; }
.project-card:nth-child(12) { --delay: 715ms; }

/* ============================================================
   EDUCATION & CERTIFICATIONS
   ============================================================ */
.edu-certs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.edu-col-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.edu-col-title svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.edu-list { display: flex; flex-direction: column; gap: 12px; }
.edu-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.edu-item:hover {
  border-color: var(--border-h); transform: translateX(5px);
  box-shadow: -3px 0 16px rgba(99,102,241,0.1);
}
.edu-year {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--accent); background: rgba(99,102,241,0.1);
  padding: 3px 8px; border-radius: 4px; white-space: nowrap; height: fit-content;
  letter-spacing: 0.05em; flex-shrink: 0;
}
.edu-detail strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.edu-detail span { font-size: 12.5px; color: var(--text-3); }

.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.cert-item:hover {
  border-color: var(--border-h); transform: translateX(5px);
  box-shadow: -3px 0 14px rgba(99,102,241,0.08);
}
.cert-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(99,102,241,0.1); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent);
  transition: background 0.3s ease, transform 0.3s ease;
}
.cert-item:hover .cert-icon { background: rgba(99,102,241,0.18); transform: scale(1.08) rotate(4deg); }
.ai-icon { background: rgba(139,92,246,0.12); color: #c084fc; }
.cert-ai { border-color: rgba(139,92,246,0.2); }
.cert-detail strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 1px; }
.cert-detail span { font-size: 11.5px; color: var(--text-3); }

/* Stagger delays */
.cert-item:nth-child(1) { --delay: 0ms; }
.cert-item:nth-child(2) { --delay: 65ms; }
.cert-item:nth-child(3) { --delay: 130ms; }
.cert-item:nth-child(4) { --delay: 195ms; }
.cert-item:nth-child(5) { --delay: 260ms; }
.cert-item:nth-child(6) { --delay: 325ms; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }

.contact-info { display: flex; flex-direction: column; gap: 0; }
.contact-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--border);
  transition: transform 0.25s ease, padding-left 0.25s ease;
}
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: none; }
.contact-item:hover { transform: translateX(5px); }

.contact-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: rgba(99,102,241,0.08); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.contact-item:hover .contact-icon {
  background: rgba(99,102,241,0.15); border-color: var(--border-h); transform: scale(1.06);
}
.contact-icon svg { width: 18px; height: 18px; color: var(--accent); }

/* Label above value — polished typographic treatment */
.contact-item strong {
  display: block;
  font-size: 10px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 3px;
}
.contact-item p { font-size: 14px; color: var(--text-2); font-weight: 500; }

/* Contact form */
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: border-color 0.3s ease;
}
.contact-form:hover { border-color: rgba(99,102,241,0.18); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-of-type { margin-bottom: 20px; }

.form-group label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.form-group input, .form-group textarea {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 11px 14px; color: var(--text);
  font-family: var(--font); font-size: 14px; outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-3); }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: rgba(99,102,241,0.03);
}
.contact-form .btn-full {
  padding: 10px 24px;
  font-size: 14px;
}
.contact-form .btn-full svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.form-success {
  margin-top: 14px; padding: 13px 16px; border-radius: 8px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22);
  color: var(--green); font-size: 13.5px;
  display: flex; align-items: center; gap: 8px;
  animation: successIn 0.4s cubic-bezier(0.16,1,0.3,1);
}
@keyframes successIn {
  from { opacity: 0; transform: scale(0.96) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg); border-top: 1px solid var(--border); padding: 48px 24px;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; text-align: center;
}
.footer-left { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer-left .nav-logo { font-size: 20px; }
.footer-left p { font-size: 12px; color: var(--text-3); letter-spacing: 0.03em; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a {
  font-size: 13px; color: var(--text-3); text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 11px; color: var(--text-3); letter-spacing: 0.03em;
  padding-top: 4px; border-top: 1px solid var(--border); width: 100%;
}

/* ============================================================
   SCROLL-TO-TOP
   ============================================================ */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 46px; height: 46px;
  background: var(--accent-g); border: none; border-radius: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(99,102,241,0.45);
  opacity: 0; transform: translateY(20px) scale(0.85); pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease;
}
.scroll-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.scroll-top:hover {
  transform: translateY(-4px) scale(1.06) !important;
  box-shadow: 0 8px 28px rgba(99,102,241,0.6);
}
.scroll-top svg { width: 19px; height: 19px; color: #fff; }

/* ============================================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content       { grid-template-columns: 1fr; gap: 48px; }
  .hero-code-card     { max-width: 540px; }
  .about-grid         { grid-template-columns: 1fr; gap: 40px; }
  .about-highlights   { grid-template-columns: 1fr 1fr; }
  .contact-grid       { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,14,26,0.97); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border); padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,0.04); }
  .nav-links a { display: block; padding: 13px 24px; font-size: 15px; }
  .nav-links a::after { display: none; }
  .nav-cta { margin: 10px 20px; border-radius: 8px; text-align: center; }
  .hamburger { display: flex; }

  .hero-name   { letter-spacing: -0.02em; }
  .hero-stats  { flex-wrap: wrap; gap: 16px; }
  .hero-left   { align-items: flex-start; }

  .about-highlights   { grid-template-columns: 1fr; }
  .edu-certs-grid     { grid-template-columns: 1fr; }
  .projects-grid      { grid-template-columns: 1fr; }
  .skills-grid        { grid-template-columns: 1fr; }
  .contact-info       { gap: 0; }

  .contact-form { padding: 24px; }
  .form-row     { grid-template-columns: 1fr; }

  .cursor-dot, .cursor-ring { display: none; }
  .loader-corner            { display: none; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn          { justify-content: center; }
  .stat-num     { font-size: 22px; }
  .hero-stats   { gap: 12px; }
  .section-title { letter-spacing: -0.01em; }
}
