/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #060b14;
  --bg-secondary: #0a1120;
  --bg-card: #0d1628;
  --bg-card-hover: #111e35;
  --accent: #00d4ff;
  --accent-2: #0ea5e9;
  --accent-light: #67e8f9;
  --accent-glow: rgba(0, 212, 255, 0.18);
  --text-primary: #e2eaf4;
  --text-secondary: #7a9bbf;
  --text-muted: #3d5a7a;
  --border: rgba(0, 212, 255, 0.12);
  --border-hover: rgba(0, 212, 255, 0.4);
  --gradient: linear-gradient(135deg, #00d4ff, #0ea5e9, #3b82f6);
  --gradient-2: linear-gradient(135deg, #00d4ff, #06b6d4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 8px 32px rgba(0, 212, 255, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-code: 'Fira Code', monospace;
}

/* ===== LIGHT THEME VARIABLES ===== */
body.light-theme {
  --bg-primary: #f0f4f8;
  --bg-secondary: #e2eaf4;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f8fc;
  --accent: #0284c7;
  --accent-2: #0ea5e9;
  --accent-light: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: rgba(2, 132, 199, 0.18);
  --border-hover: rgba(2, 132, 199, 0.5);
  --gradient: linear-gradient(135deg, #0284c7, #0ea5e9, #3b82f6);
  --gradient-2: linear-gradient(135deg, #0284c7, #06b6d4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 8px 32px rgba(2, 132, 199, 0.18);
}

body.light-theme::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
}

body.light-theme .navbar.scrolled {
  background: rgba(240, 244, 248, 0.9);
}

body.light-theme #particles-canvas { opacity: 0.4; }

/* LeetCode section light theme fixes */
body.light-theme .leetcode {
  background: linear-gradient(180deg, rgba(226, 234, 244, 0.95), rgba(240, 244, 248, 0.98));
}
body.light-theme .leetcode-stat strong,
body.light-theme .leetcode-accent-card strong {
  color: var(--text-primary);
}
body.light-theme .leetcode-rank-box strong {
  color: var(--accent);
}
body.light-theme .leetcode-stat-label {
  color: var(--accent);
}
body.light-theme .leetcode-accent-card p {
  color: var(--text-secondary);
}
body.light-theme .viewer-chip {
  background: rgba(255, 255, 255, 0.9);
}
body.light-theme .viewer-chip strong {
  color: var(--text-primary);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== AURORA BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(0, 212, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(59, 130, 246, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(14, 165, 233, 0.04) 0%, transparent 70%);
  animation: auroraShift 18s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes auroraShift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  33%  { transform: translate(3%, 2%) rotate(2deg); }
  66%  { transform: translate(-2%, 3%) rotate(-1deg); }
  100% { transform: translate(2%, -2%) rotate(1deg); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5%;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 5%;
  box-shadow: var(--shadow);
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  font-family: var(--font-main);
  white-space: nowrap;
}
.nav-logo .dot { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.btn-resume {
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-resume:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-resume-2 {
  border-color: var(--accent-2);
  color: var(--accent-2);
  margin-left: 0.4rem;
}
.btn-resume-2:hover {
  background: var(--accent-2);
  color: #fff;
}
.btn-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-right: 0.4rem;
  flex-shrink: 0;
}
.btn-theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,212,255, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ===== SECTION COMMONS ===== */
.section { padding: 6rem 0; position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.highlight { color: var(--accent); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 0 5%;
  text-align: center;
}
.hero-content { max-width: 700px; }
.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.8s ease both;
}
.hero-name {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
  animation: fadeInDown 0.8s 0.1s ease both;
}
.hero-role {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-family: var(--font-code);
  animation: fadeInDown 0.8s 0.2s ease both;
}
#typewriter-role { color: var(--accent-light); }
.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  animation: fadeInDown 0.8s 0.3s ease both;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s 0.4s ease both;
}
.hero-viewers {
  display: flex;
  justify-content: center;
  margin-bottom: 1.4rem;
  animation: fadeInDown 0.8s 0.45s ease both;
}
.viewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  background: rgba(13, 22, 40, 0.86);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.viewer-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  font-size: 0.85rem;
}
.viewer-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.viewer-chip strong {
  display: inline-block;
  color: var(--text-primary);
  font-size: 1rem;
  min-width: 1.5rem;
  text-align: right;
}
.hero-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeInDown 0.8s 0.5s ease both;
}
.hero-socials a {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  background: rgba(0, 212, 255, 0.08);
  transition: var(--transition);
}
.hero-socials a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.scroll-down a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--transition);
}
.scroll-down a:hover { color: var(--accent); }

/* ===== LEETCODE ===== */
.leetcode {
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.95), rgba(6, 11, 20, 0.98));
}
.leetcode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 980px;
  margin: 0 auto;
}
.leetcode-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.leetcode-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.leetcode-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--border);
}
.leetcode-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.leetcode-kicker {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.leetcode-logo {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 161, 22, 0.12);
  color: #ffa116;
  border: 1px solid rgba(255, 161, 22, 0.18);
  font-size: 0.85rem;
}
.leetcode-identity h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.leetcode-identity a {
  color: var(--accent-light);
  font-size: 0.92rem;
}
.leetcode-rank-box {
  min-width: 170px;
  text-align: center;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.leetcode-rank-box span,
.leetcode-meta-label,
.leetcode-stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.leetcode-rank-box strong {
  color: var(--accent-light);
  font-size: 1.8rem;
}
.leetcode-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.leetcode-stat,
.leetcode-accent-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition);
}
.leetcode-stat:hover,
.leetcode-accent-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}
.leetcode-stat strong,
.leetcode-accent-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.85rem;
  line-height: 1.15;
  color: var(--text-primary);
}
.leetcode-stat-label {
  color: var(--accent-light);
  font-size: 0.84rem;
  letter-spacing: 1.2px;
}
.leetcode-stat {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.leetcode-stat strong {
  color: var(--text-primary);
}
.leetcode-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.leetcode-accent-card p {
  margin-top: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== ABOUT ===== */
.about { background: var(--bg-secondary); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}
.image-frame {
  width: 300px; height: 340px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.image-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: -1;
  animation: rotate 4s linear infinite;
}
.image-placeholder {
  font-size: 5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}
.about-bio {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 0.8rem;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-4px);
}
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
}
.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-4px);
}
.category-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill {
  background: rgba(0,212,255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pill-icon { color: var(--accent); font-size: 0.82rem; }
.pill:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ===== EXPERIENCE ===== */
.experience { background: var(--bg-secondary); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-dot {
  position: absolute;
  left: -2.45rem;
  top: 1.2rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  border: 2px solid var(--bg-secondary);
}
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
}
.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateX(4px);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.job-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.company { font-size: 0.9rem; color: var(--accent); margin-top: 0.2rem; }
.date-badge {
  background: rgba(0,212,255, 0.1);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-family: var(--font-code);
  white-space: nowrap;
}
.job-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: rgba(0,212,255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: var(--font-code);
}

/* ===== EDUCATION ===== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  transition: var(--transition);
  min-height: 140px;
}
.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-4px);
}
.edu-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.edu-info { flex: 1; min-width: 0; }
.edu-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.edu-school {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.edu-detail {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: var(--font-code);
  line-height: 1.6;
}
@media (max-width: 900px) {
  .edu-grid { grid-template-columns: 1fr; }
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-6px);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.3rem;
}
.project-links { display: flex; gap: 0.8rem; }
.project-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--transition);
}
.project-links a:hover { color: var(--accent); transform: translateY(-2px); }
.project-title { font-size: 1.1rem; font-weight: 700; }
.project-desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ===== CERTIFICATIONS ===== */
.achievements { background: var(--bg-secondary); }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: var(--transition);
}
.cert-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-4px);
}
.cert-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; }
.cert-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.contact-items { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 2rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.contact-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}
.contact-item a, .contact-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.contact-item a:hover { color: var(--accent); }
.social-links { display: flex; gap: 1rem; }
.social-links a {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  background: rgba(0, 212, 255, 0.08);
  transition: var(--transition);
}
.social-links a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

/* ===== FORM ===== */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input.error,
.form-group textarea.error { border-color: #ff4d6d; }
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #ff4d6d;
  margin-top: 0.3rem;
  min-height: 1rem;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #1a3a2a; border: 1px solid #2ecc71; color: #2ecc71; }
.toast.error { background: #3a1a1a; border: 1px solid #ff4d6d; color: #ff4d6d; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-size: 1.4rem; font-weight: 800; font-family: var(--font-code); }
.footer-text { font-size: 0.85rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}
.footer-socials a:hover { color: var(--accent); transform: translateY(-2px); }
.back-to-top {
  position: absolute;
  right: 5%;
  bottom: 2rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: var(--shadow-accent);
}
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,212,255,0.4); }

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== KEYFRAMES ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .image-frame { width: 220px; height: 220px; }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.4s ease;
    border-left: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; }
  .hamburger { display: flex; z-index: 1000; }
  .btn-resume, .btn-resume-2, .btn-theme-toggle { display: none; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-viewers { margin-bottom: 1.4rem; }
  .viewer-chip { width: auto; max-width: none; justify-content: center; }
  .timeline { padding-left: 1.5rem; }
  .footer-content { flex-direction: column; text-align: center; }
  .back-to-top { position: static; margin: 1rem auto 0; }
  .leetcode-head,
  .leetcode-identity { flex-direction: column; text-align: center; }
  .leetcode-stats-grid,
  .leetcode-footer { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .contact-form-wrap { padding: 1.5rem; }
}

/* ===== RESUME PERMISSION MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 212, 255, 0.1);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.3rem;
}
.modal-close:hover { color: var(--accent); }
.modal-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-glow);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.modal-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.modal-box > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
