/* =========================================================
   DESIGN TOKENS & RESET
   ========================================================= */
:root {
  --bg:             #04040f;
  --bg-2:           #07071a;
  --bg-3:           #0b0b24;
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-2:      rgba(255, 255, 255, 0.07);
  --surface-3:      rgba(255, 255, 255, 0.11);
  --border:         rgba(255, 255, 255, 0.07);
  --border-2:       rgba(255, 255, 255, 0.13);
  --accent:         #8b5cf6;
  --accent-dark:    #6d28d9;
  --accent-2:       #0ea5e9;
  --accent-3:       #f472b6;
  --accent-glow:    rgba(139, 92, 246, 0.5);
  --accent-2-glow:  rgba(14, 165, 233, 0.4);
  --text:           #f8fafc;
  --text-muted:     #94a3b8;
  --text-dim:       #475569;
  --success:        #10b981;
  --radius:         14px;
  --radius-lg:      22px;
  --radius-xl:      32px;
  --shadow:         0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:      0 12px 60px rgba(0, 0, 0, 0.7);
  --shadow-xl:      0 24px 80px rgba(0, 0, 0, 0.85);
  --nav-h:          72px;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --delay:          0ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Premium scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 4px;
}
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: #f8fafc;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 10%  5%,  rgba(139, 92, 246, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%,  rgba(14, 165, 233, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 40%,  rgba(244, 114, 182, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 25% 75%,  rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, button { font-family: inherit; font-size: inherit; }
textarea { resize: vertical; }

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s, transform 0.15s;
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(139, 92, 246, 0.55);
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.3s;
}

.cursor-ring.hovered {
  width: 52px; height: 52px;
  border-color: var(--accent-2);
  background: rgba(14, 165, 233, 0.06);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 110px; }

.gradient-text {
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  position: relative;
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Mouse-follow glow */
.glass-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(300px circle at var(--mouse-x) var(--mouse-y),
    rgba(139, 92, 246, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}
.glass-card:hover::before { opacity: 1; }

/* Gradient border on hover */
.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.55),
    rgba(14, 165, 233, 0.25),
    rgba(139, 92, 246, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.glass-card:hover::after { opacity: 1; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
}

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: btn-gradient-shift 4s ease infinite;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover::after { left: 160%; }

@keyframes btn-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text);
}
.btn-outline::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.btn-outline:hover {
  color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.2);
}
.btn-outline:hover::before { opacity: 1; }

.btn-light {
  background: rgba(255, 255, 255, 0.93);
  color: #0a0a18;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.btn-light:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-outline-light {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.14);
  border-color: #fff;
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* =========================================================
   SECTION HEADER
   ========================================================= */
.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 100px;
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 18px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.8;
}

/* =========================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================= */
.animate-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-fade-up.visible,
.animate-fade-left.visible,
.animate-fade-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

.animate-flip-up {
  opacity: 0;
  transform: perspective(600px) rotateX(20deg) translateY(30px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-flip-up.visible {
  opacity: 1;
  transform: perspective(600px) rotateX(0deg) translateY(0);
}

.animate-scale-up {
  opacity: 0;
  transform: scale(0.88) translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-scale-up.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.animate-chip {
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-chip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(4, 4, 15, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-right: auto;
  white-space: nowrap;
}

.logo-bracket {
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: transform 0.3s;
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

.nav-resume { margin-left: 8px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}

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

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.65;
  will-change: transform;
}

.orb-1 {
  width: 750px; height: 750px;
  background: radial-gradient(circle,
    rgba(139, 92, 246, 0.75),
    rgba(109, 40, 217, 0.35) 50%,
    transparent 70%);
  top: -260px; left: -200px;
  animation: float-1 14s ease-in-out infinite;
}

.orb-2 {
  width: 650px; height: 650px;
  background: radial-gradient(circle,
    rgba(14, 165, 233, 0.65),
    rgba(6, 182, 212, 0.28) 50%,
    transparent 70%);
  bottom: -180px; right: -160px;
  animation: float-2 18s ease-in-out infinite;
}

.orb-3 {
  width: 550px; height: 550px;
  background: radial-gradient(circle,
    rgba(244, 114, 182, 0.5),
    rgba(168, 85, 247, 0.22) 50%,
    transparent 70%);
  top: 50%; left: 58%;
  transform: translate(-50%, -50%);
  animation: float-3 22s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, 40px) scale(1.05); }
  66%       { transform: translate(-30px, 70px) scale(0.97); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-50px, -40px) scale(1.06); }
  66%       { transform: translate(30px, -70px) scale(0.95); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -50%) scale(1.15) rotate(30deg); }
}

/* Dot grid */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  padding-block: 80px;
  width: 100%;
}

.hero-content { max-width: 740px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6ee7b7;
  margin-bottom: 32px;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.1);
}

.pulse-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
  opacity: 0;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.hero-name {
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.0;
  background: linear-gradient(135deg, #f8fafc 15%, #c4b5fd 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.25));
}

.hero-typewriter {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700;
  min-height: 2.4em;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 2px;
}

#typewriterText {
  background: linear-gradient(90deg, #c4b5fd, #38bdf8, #f472b6, #c4b5fd);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-gradient-flow 4s linear infinite;
}

@keyframes text-gradient-flow {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.tw-cursor {
  animation: blink 1s step-end infinite;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 200;
}

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

.hero-bio {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.85;
  margin-bottom: 44px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-icon {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: var(--transition);
}

.social-icon svg { width: 18px; height: 18px; }

.social-icon:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.social-icon:hover svg {
  animation: icon-spin 0.4s ease;
}
@keyframes icon-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(15deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
  z-index: 1;
}

.scroll-indicator:hover { color: var(--text-muted); }

.scroll-arrow svg {
  width: 20px; height: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

/* About background animation */
.about-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.about-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0;
  animation: about-orb-fade 1.2s ease forwards;
}

.about-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  top: -100px; left: -150px;
  animation-name: about-float-1;
  animation-duration: 16s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  opacity: 0.45;
}

.about-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 70%);
  bottom: -80px; right: -100px;
  animation-name: about-float-2;
  animation-duration: 20s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  opacity: 0.4;
}

.about-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.25), transparent 70%);
  top: 50%; right: 25%;
  transform: translateY(-50%);
  animation-name: about-float-3;
  animation-duration: 24s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  opacity: 0.3;
}

@keyframes about-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, 30px) scale(1.06); }
  66%       { transform: translate(-20px, 50px) scale(0.96); }
}
@keyframes about-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-35px, -30px) scale(1.07); }
  70%       { transform: translate(25px, -50px) scale(0.95); }
}
@keyframes about-float-3 {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%       { transform: translateY(calc(-50% + 30px)) scale(1.1); }
}

/* Animated dot grid */
.about-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
  animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

.about .container { position: relative; z-index: 1; }

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

.about-visual { display: flex; flex-direction: column; gap: 32px; }

.avatar-wrap {
  position: relative;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin 6s linear infinite;
  opacity: 0.65;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar-photo {
  position: relative;
  z-index: 1;
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 0 0 8px var(--bg-2), 0 0 60px rgba(139, 92, 246, 0.3), var(--shadow-lg);
  display: block;
}

.avatar-badge {
  position: absolute;
  bottom: 8px; right: -24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6ee7b7;
  white-space: nowrap;
  z-index: 2;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.avatar-badge svg { width: 14px; height: 14px; stroke: #10b981; }

/* Stat cards */
.about-stats { display: flex; gap: 16px; flex-wrap: wrap; }

.stat-card {
  flex: 1; min-width: 90px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.15);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-plus {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  vertical-align: super;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* About text */
.about-text { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }

.about-subtitle {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.85;
}

.about-actions { margin-top: 8px; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 100% 50%, rgba(139, 92, 246, 0.07) 0%, transparent 55%);
}

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

.skill-card {
  padding: 36px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(139, 92, 246, 0.18), var(--shadow);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.skill-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.skill-icon svg { width: 20px; height: 20px; }

.skill-icon-violet { background: rgba(139,92,246,0.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.28); }
.skill-icon-blue   { background: rgba(14,165,233,0.12);  color: #7dd3fc; border: 1px solid rgba(14,165,233,0.25); }
.skill-icon-green  { background: rgba(16,185,129,0.1);   color: #6ee7b7; border: 1px solid rgba(16,185,129,0.22); }
.skill-icon-amber  { background: rgba(245,158,11,0.1);   color: #fde68a; border: 1px solid rgba(245,158,11,0.22); }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.chip-violet { background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.3); color: #c4b5fd; }
.chip-blue   { background: rgba(14,165,233,0.12);  border: 1px solid rgba(14,165,233,0.28); color: #7dd3fc; }
.chip-green  { background: rgba(16,185,129,0.1);   border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.chip-amber  { background: rgba(245,158,11,0.1);   border: 1px solid rgba(245,158,11,0.25); color: #fde68a; }

/* =========================================================
   PROJECTS
   ========================================================= */
.projects {
  background: var(--bg-2);
  background-image:
    radial-gradient(ellipse at 0% 50%, rgba(14, 165, 233, 0.06) 0%, transparent 55%);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 24px 70px rgba(139, 92, 246, 0.22), var(--shadow-lg);
}

.project-header {
  position: relative;
  height: 164px;
  background: var(--grad);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
}

.project-number {
  font-size: 4.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.14);
  line-height: 1;
  letter-spacing: -0.05em;
  transition: color 0.3s;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay { opacity: 1; }
.project-card:hover .project-number  { color: rgba(255,255,255,0.07); }

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.project-tag {
  padding: 4px 11px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4b5fd;
  letter-spacing: 0.01em;
}

.project-links {
  display: flex;
  gap: 20px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 4px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.project-link:hover { color: var(--accent-2); }

/* =========================================================
   RESUME CTA
   ========================================================= */
.resume-cta { background: var(--bg); }

.resume-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 80px 64px;
  background: linear-gradient(145deg, rgba(139,92,246,0.08), rgba(14,165,233,0.05), rgba(139,92,246,0.04));
  border: 1px solid rgba(139, 92, 246, 0.2);
  overflow: hidden;
  text-align: center;
}

.resume-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: linear-gradient(135deg,
    rgba(139,92,246,0.55),
    rgba(14,165,233,0.45),
    rgba(244,114,182,0.3),
    rgba(139,92,246,0.5));
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
  z-index: -1;
}

.resume-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 1px);
  background: linear-gradient(145deg, #07071e, #060615);
  z-index: 0;
}

.resume-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139,92,246,0.2), transparent);
  z-index: 1;
  pointer-events: none;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.resume-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.resume-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 600px;
}

.resume-desc {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.resume-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  background: var(--bg-2);
  background-image:
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.07) 0%, transparent 55%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact-info-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-items { display: flex; flex-direction: column; gap: 20px; margin-bottom: 36px; }

.contact-item { display: flex; align-items: flex-start; gap: 16px; }

.contact-item-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #c4b5fd;
  transition: background 0.3s, box-shadow 0.3s;
}

.contact-item:hover .contact-item-icon {
  background: rgba(139,92,246,0.18);
  box-shadow: 0 0 20px rgba(139,92,246,0.2);
}

.contact-item-icon svg { width: 18px; height: 18px; }

.contact-item-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 3px;
}

.contact-item-value {
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

a.contact-item-value:hover { color: var(--accent-2); }

.contact-socials { display: flex; gap: 12px; }

/* Contact Form */
.contact-form {
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(139,92,246,0.6);
  background: rgba(139,92,246,0.05);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-block: 40px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(139,92,246,0.5), rgba(14,165,233,0.4), transparent);
}

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

.footer-logo { font-size: 1.2rem; }

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 500;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px var(--accent-glow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px var(--accent-glow);
}

.back-to-top svg { width: 20px; height: 20px; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.28);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  color: #6ee7b7;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(16,185,129,0.15);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   RESPONSIVE — 768px
   ========================================================= */
@media (max-width: 768px) {
  :root { --nav-h: 62px; }

  .section { padding-block: 72px; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(4, 4, 15, 0.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 28px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.open { display: flex; }

  .nav-link { padding: 12px 16px; font-size: 1rem; }

  .nav-resume { display: none; }

  .hamburger { display: flex; }

  .hero-name { font-size: clamp(2.5rem, 10vw, 4rem); }

  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { align-items: center; }
  .avatar-badge { right: -8px; }

  .skills-grid { grid-template-columns: 1fr; }

  .projects-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  .form-row { grid-template-columns: 1fr; }

  .resume-card { padding: 48px 28px; }

  .footer-inner { flex-direction: column; text-align: center; }

  .about-grid { gap: 40px; }
}

/* =========================================================
   RESPONSIVE — 480px
   ========================================================= */
@media (max-width: 480px) {
  .container { padding-inline: 16px; }
  .hero-container { padding-inline: 16px; }
  .hero-badge { font-size: 0.78rem; padding: 6px 14px; }
  .hero-bio { font-size: 1rem; }
  .hero-socials { gap: 10px; }
  .section-title { font-size: 1.8rem; }
  .avatar-photo { width: 180px; height: 180px; }
  .avatar-ring { inset: -10px; }
  .skill-card { padding: 24px 20px; }
  .contact-form { padding: 24px 20px; }
  .resume-card { padding: 36px 20px; }
  .resume-actions { flex-direction: column; align-items: stretch; }
  .resume-actions .btn { justify-content: center; }
  .hero-cta .btn-lg { padding: 12px 24px; font-size: 0.95rem; }
  .scroll-indicator { display: none; }
}

/* =========================================================
   ENHANCED ANIMATIONS & HOVER EFFECTS
   ========================================================= */

/* 3D card tilt handled in JS — ensure transform-style */
.project-card, .skill-card { transform-style: preserve-3d; }

/* Chip pulse on hover */
.chip-violet:hover { background: rgba(139,92,246,0.25); box-shadow: 0 0 14px rgba(139,92,246,0.4); }
.chip-blue:hover   { background: rgba(14,165,233,0.22);  box-shadow: 0 0 14px rgba(14,165,233,0.35); }

/* Section title inline */
.section-title { position: relative; display: inline-block; }

/* =========================================================
   EXTRA ANIMATION CLASSES
   ========================================================= */

/* Scale up from slightly below */
.animate-scale-up {
  opacity: 0;
  transform: scale(0.88) translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-scale-up.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Flip up */
.animate-flip-up {
  opacity: 0;
  transform: perspective(600px) rotateX(20deg) translateY(30px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0ms);
}
.animate-flip-up.visible {
  opacity: 1;
  transform: perspective(600px) rotateX(0deg) translateY(0);
}

/* Chip stagger — applied by JS */
.chip.animate-chip {
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.4s ease var(--delay, 0ms),
              transform 0.4s ease var(--delay, 0ms);
}
.chip.animate-chip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Section shine sweep on header entry */
.section-header.visible .section-title::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-15deg);
  animation: title-shine 0.8s ease 0.3s forwards;
  pointer-events: none;
}
@keyframes title-shine {
  0%   { left: -60%; }
  100% { left: 120%; }
}

/* Contact item icon pop */
.contact-item.visible .contact-item-icon {
  animation: icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0ms) both;
}
@keyframes icon-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Footer link underline reveal */
.footer-links.visible a {
  position: relative;
}
.footer-links.visible a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}
.footer-links.visible a:hover::after { width: 100%; }
