/* =====================================================
   TANVIR ISLAM - CUSTOM PORTFOLIO STYLES
   Modern digital portfolio with green/indigo accents
   ===================================================== */

/* ---------- CSS Variables & Global ---------- */
:root {
  --accent-green: #10b981;
  --accent-green-light: #34d399;
  --accent-green-dark: #059669;
  --accent-indigo: #4f46e5;
  --accent-indigo-light: #818cf8;
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(148, 163, 184, 0.1);
  --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-indigo: 0 0 20px rgba(79, 70, 229, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode glass-border should be slightly darker */
body.light {
  --glass-border: rgba(100, 116, 139, 0.15);
  --glass-bg: rgba(241, 245, 249, 0.6);
  --glow-green: 0 0 20px rgba(79, 70, 229, 0.3);
}

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

html { scroll-behavior: smooth; }

/* ---------- CORE THEMING: body must explicitly use CSS vars ---------- */
html, body {
  background-color: var(--background-color) !important;
  color: var(--text-color) !important;
}

/* Smooth theme transition for all elements */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Force dark mode on ALL direct body children (mirrors theme.css .light > *) */
body.dark > * {
  background-color: transparent !important;
  color: var(--text-color) !important;
}

/* Sub-page containers must inherit theme */
#content,
#list-page,
#gallery-page,
#single,
.container {
  background-color: transparent !important;
  color: var(--text-color);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  overflow-x: hidden;
}

/* Force consistent font everywhere */
*, *::before, *::after {
  font-family: inherit;
}

.navbar, .navbar *, .nav-link, .navbar-brand, .navbar-text,
header *, footer *, section *, .card *, .btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

code, pre, .mono, kbd, samp {
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

/* Remove extra spacing between sections */
section { margin: 0 !important; }
section + section { margin-top: 0 !important; }

/* Ensure all cards/panels use CSS vars properly */
.card {
  background-color: var(--secondary-color) !important;
  color: var(--text-color) !important;
  border-color: var(--glass-border) !important;
}

/* ---------- Custom Scrollbar ---------- */
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: var(--background-color); }
body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* ---------- Selection Color ---------- */
::selection {
  background: var(--primary-color);
  color: #fff;
}

/* =====================================================
   NAVBAR - Always sticky glassmorphism style
   ===================================================== */
header#profileHeader {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--glass-bg) !important;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid var(--glass-border);
  width: 100%;
}

body.light header#profileHeader {
  background: rgba(241, 245, 249, 0.85) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

header#profileHeader.showHeaderOnTop {
  background: rgba(15, 23, 42, 0.92) !important;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

body.light header#profileHeader.showHeaderOnTop {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.08) !important;
}

header .navbar {
  padding: 0.2rem 0 !important;
  min-height: auto !important;
}

header .navbar .container-fluid {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

header .pt-3 {
  padding-top: 0.3rem !important;
}

/* Brand logo styling */
.navbar-brand {
  font-weight: 800 !important;
  font-size: 1.2rem !important;
  letter-spacing: -0.02em;
  position: relative;
  padding-top: 0.15rem !important;
  padding-bottom: 0.15rem !important;
}

.navbar-brand .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.75rem;
  margin-right: 6px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-green-light)) !important;
  color: #fff !important;
  box-shadow: var(--glow-green);
}

body.light .navbar-brand .brand-icon {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-indigo-light)) !important;
  box-shadow: var(--glow-indigo);
}

/* Nav links - use CSS variables for auto theme switching */
header .navbar .navbar-nav .nav-link {
  font-weight: 500;
  font-size: 0.82rem !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 6px;
  transition: var(--transition-smooth);
  position: relative;
  color: var(--text-color) !important;
  opacity: 0.9;
}

header .navbar .navbar-nav .nav-link:hover {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--primary-color) !important;
  opacity: 1;
}

body.light header .navbar .navbar-nav .nav-link:hover {
  background: rgba(79, 70, 229, 0.1) !important;
  color: var(--accent-indigo) !important;
}

.navbar-text {
  font-size: 14px !important;
}

/* Navbar search */
#search {
  border-radius: 8px !important;
  padding: 0.3rem 0.8rem !important;
  font-size: 0.8rem !important;
  height: 32px !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

#search:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

body.light #search:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* Mobile nav is now handled in the dropdown/mobile section below */

/* =====================================================
   HERO SECTION
   ===================================================== */
#hero {
  min-height: auto;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 20px !important;
  padding-bottom: 1.5rem !important;
}

#hero .py-5 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

body.light #hero::before {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

#hero .subtitle {
  font-size: 1rem !important;
  color: var(--primary-color) !important;
  opacity: 1 !important;
  font-weight: 500;
  letter-spacing: 0.05em;
}

#hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

#hero h2 {
  font-size: clamp(1rem, 3vw, 1.4rem) !important;
  opacity: 0.7 !important;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

#hero p {
  max-width: 560px;
  opacity: 0.85 !important;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 0.5rem !important;
}

#hero .hero-content strong {
  color: var(--primary-color) !important;
}

/* Hero image */
#hero .image img {
  border-radius: 50% !important;
  border: 3px solid var(--primary-color) !important;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.2), 0 20px 60px rgba(0, 0, 0, 0.3) !important;
  padding: 4px !important;
  transition: var(--transition-smooth);
  max-width: 280px;
}

body.light #hero .image img {
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.15), 0 20px 60px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--accent-indigo) !important;
}

#hero .image img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.3), 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* Hero buttons */
#hero a.btn {
  margin-top: 1.5rem !important;
  padding: 0.65rem 1.5rem !important;
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--primary-color) !important;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

#hero a.btn:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--glow-green);
}

body.light #hero a.btn:hover {
  box-shadow: var(--glow-indigo);
}

#hero a.btn.social-icon {
  margin-top: 1.5rem !important;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-size: 1rem;
}

#hero a.btn.social-icon:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
  transform: translateY(-3px) scale(1.05);
}

/* Hero bottom SVG - hide for cleaner look */
#hero .hero-bottom-svg { display: none !important; }

/* =====================================================
   ABOUT SECTION
   ===================================================== */
#about {
  padding: 4rem 0 3rem !important;
}

#about h3 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-bottom: 1.5rem;
}

#about .image img {
  border-radius: 16px !important;
  border: 3px solid var(--primary-color) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
}

#about .image img:hover {
  transform: scale(1.02);
}

#about .content {
  font-size: 0.95rem !important;
  line-height: 1.8 !important;
}

#about .content strong {
  color: var(--primary-color) !important;
}

#about ul {
  grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  gap: 6px 12px !important;
}

#about ul li {
  background: var(--secondary-background-color) !important;
  padding: 6px 12px 6px 24px !important;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

#about ul li:hover {
  transform: translateX(4px);
  background: rgba(16, 185, 129, 0.1) !important;
}

body.light #about ul li:hover {
  background: rgba(79, 70, 229, 0.08) !important;
}

/* =====================================================
   SKILLS SECTION (custom)
   ===================================================== */
#skills {
  padding: 3rem 0 !important;
}

#skills h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  background: var(--secondary-color) !important;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}

body.light .skill-card:hover {
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1);
}

.skill-card i {
  font-size: 2rem;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem;
  display: block;
}

.skill-card .skill-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-color);
}

.skill-card .skill-level {
  width: 100%;
  height: 3px;
  background: var(--secondary-background-color);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.skill-card .skill-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-green-light));
  border-radius: 2px;
  transition: width 1.5s ease-out;
}

body.light .skill-card .skill-level-fill {
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-indigo-light));
}

/* =====================================================
   GITHUB REPOS SECTION
   ===================================================== */
#github-repos {
  padding: 3rem 0 !important;
}

#github-repos h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 0.3rem;
}

#github-repos .section-subtitle {
  text-align: center;
  color: var(--text-secondary-color);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.github-stats-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.github-stat {
  text-align: center;
  padding: 0.8rem 1.5rem;
  background: var(--secondary-color);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  min-width: 120px;
  transition: var(--transition-smooth);
}

.github-stat:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.github-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
}

.github-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .repos-grid {
    grid-template-columns: 1fr;
  }
}

.repo-card {
  background: var(--secondary-color) !important;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.2rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
}

.repo-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.repo-card .repo-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color) !important;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.repo-card .repo-name i {
  font-size: 0.85rem;
}

.repo-card .repo-desc {
  font-size: 0.85rem;
  color: var(--text-secondary-color);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 0.8rem;
}

.repo-card .repo-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary-color);
  flex-wrap: wrap;
}

.repo-card .repo-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.repo-card .repo-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.repos-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary-color);
}

.repos-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* =====================================================
   CODING STATS / COMPETITIVE PROGRAMMING DASHBOARD
   Extraordinary glassmorphic cards with platform branding
   ===================================================== */

/* ── Section container ── */
#coding-stats {
  padding: 4rem 0 !important;
  position: relative;
  overflow: hidden;
}

/* subtle background glow */
#coding-stats::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 70%);
  pointer-events: none;
}
body.light #coding-stats::before {
  background: radial-gradient(circle, rgba(79,70,229,0.05) 0%, transparent 70%);
}

/* ── Section Header ── */
.cp-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.cp-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cp-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-green-light));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}
body.light .cp-icon-badge {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-indigo-light));
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.cp-title {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: var(--text-color) !important;
  margin: 0 !important;
  line-height: 1.2;
}

.cp-subtitle {
  font-size: 0.85rem;
  color: var(--secondary-text-color);
  margin: 0;
  font-weight: 400;
}

/* ── Aggregate Bar ── */
.cp-aggregate-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0.8rem 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.cp-agg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.cp-agg-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cp-agg-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-text-color);
  font-weight: 600;
}

.cp-agg-divider {
  width: 1px;
  height: 30px;
  background: var(--glass-border);
}

/* ── Cards Grid ── */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 920px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .cp-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .cp-aggregate-bar {
    padding: 0.6rem 1.2rem;
    gap: 1rem;
  }
}

/* ── Card Base ── */
.cp-card {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s cubic-bezier(0.4,0,0.2,1);
  animation: cpCardEnter 0.5s cubic-bezier(0.16,1,0.3,1) both;
  opacity: 0;
}

@keyframes cpCardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* ── Card Accent Bar (top gradient stripe) ── */
.cp-card__accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.cp-card:hover .cp-card__accent { opacity: 1; }

/* platform brand gradients */
.cp-card--codeforces .cp-card__accent { background: linear-gradient(90deg, #1890ff, #36cfc9); }
.cp-card--leetcode   .cp-card__accent { background: linear-gradient(90deg, #ffa116, #ff6b6b); }
.cp-card--atcoder    .cp-card__accent { background: linear-gradient(90deg, #7c7c7c, #b0b0b0); }
.cp-card--codechef   .cp-card__accent { background: linear-gradient(90deg, #5b4638, #c4813d); }

/* ── Skeleton Loaders ── */
.cp-skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--glass-border) 25%, transparent 50%, var(--glass-border) 75%);
  background-size: 200% 100%;
  animation: cpShimmer 1.5s infinite;
  border-radius: 4px;
  opacity: 0.5;
}
.cp-skeleton--sm { width: 48px; height: 22px; }
.cp-skeleton--xs { width: 36px; height: 16px; }

@keyframes cpShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Card Header ── */
.cp-card__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cp-card__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.1rem;
}

/* platform-specific logo colors */
.cp-logo--cf { background: linear-gradient(135deg, #1890ff, #0050b3); }
.cp-logo--lc { background: linear-gradient(135deg, #ffa116, #e67e00); }
.cp-logo--ac { background: linear-gradient(135deg, #555, #333); }
body.light .cp-logo--ac { background: linear-gradient(135deg, #999, #666); }
.cp-logo--cc { background: linear-gradient(135deg, #c4813d, #5b4638); }

.cp-card__title-area {
  flex: 1;
  min-width: 0;
}

.cp-card__name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.2;
}

.cp-card__handle {
  font-size: 0.75rem;
  color: var(--primary-color);
  text-decoration: none !important;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.cp-card__handle:hover { opacity: 1; }

.cp-card__link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-text-color);
  font-size: 0.75rem;
  text-decoration: none !important;
  background: var(--secondary-background-color);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.cp-card__link:hover {
  background: var(--primary-color);
  color: #fff !important;
}

/* ── Rating Badge ── */
.cp-card__rating-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: var(--secondary-background-color);
  border-left: 3px solid var(--glass-border);
  margin-bottom: 1rem;
  transition: border-left-color 0.4s ease;
}

.cp-rating-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cp-rating-label {
  font-size: 0.78rem;
  color: var(--secondary-text-color);
  font-weight: 500;
  text-transform: capitalize;
}

/* ── Stats Row ── */
.cp-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.cp-card__stats--compact {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0.6rem;
}

.cp-stat {
  text-align: center;
  padding: 0.55rem 0.3rem;
  background: var(--secondary-background-color);
  border-radius: 8px;
  transition: background 0.2s;
}
.cp-stat:hover {
  background: rgba(16, 185, 129, 0.08);
}
body.light .cp-stat:hover {
  background: rgba(79, 70, 229, 0.06);
}

.cp-stat__value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.cp-stat__label {
  display: block;
  font-size: 0.62rem;
  color: var(--secondary-text-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* ═══════════════════════════════════════════════
   LEETCODE — Donut Ring + Difficulty Breakdown
   ═══════════════════════════════════════════════ */
.cp-card__lc-summary {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 0.7rem;
}

.cp-lc-ring-wrap {
  flex-shrink: 0;
}

.cp-lc-ring {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
}

.cp-lc-ring__arc {
  transition: stroke-dasharray 1s cubic-bezier(0.4,0,0.2,1), stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1);
}

.cp-lc-ring--easy { stroke: #00b8a3; }
.cp-lc-ring--med  { stroke: #ffc01e; }
.cp-lc-ring--hard { stroke: #ef4743; }

.cp-lc-ring__num {
  font-size: 1.6rem;
  font-weight: 800;
  fill: var(--text-color);
  /* unrotate text so it's readable */
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}

.cp-lc-ring__lbl {
  font-size: 0.6rem;
  fill: var(--secondary-text-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}

/* Difficulty Breakdown list */
.cp-lc-breakdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cp-lc-row {
  display: grid;
  grid-template-columns: 8px auto 30px 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.82rem;
}

.cp-lc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.cp-lc-row--easy .cp-lc-dot { background: #00b8a3; }
.cp-lc-row--med  .cp-lc-dot { background: #ffc01e; }
.cp-lc-row--hard .cp-lc-dot { background: #ef4743; }

.cp-lc-diff {
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.78rem;
}

.cp-lc-count {
  font-weight: 800;
  color: var(--text-color);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.cp-lc-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--glass-border);
  overflow: hidden;
}

.cp-lc-bar__fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-lc-row--easy .cp-lc-bar__fill { background: #00b8a3; }
.cp-lc-row--med  .cp-lc-bar__fill { background: #ffc01e; }
.cp-lc-row--hard .cp-lc-bar__fill { background: #ef4743; }

/* ── Error state ── */
.cp-card--error {
  opacity: 0.65;
}

/* ── Responsive fine-tuning ── */
@media (max-width: 480px) {
  .cp-title { font-size: 1.4rem !important; }
  .cp-agg-num { font-size: 1.2rem; }
  .cp-card { padding: 1.1rem 1.2rem; }
  .cp-card__lc-summary { flex-direction: column; align-items: stretch; }
  .cp-lc-ring-wrap { display: flex; justify-content: center; }
  .cp-card__stats { grid-template-columns: repeat(3, 1fr); }
  .cp-aggregate-bar { flex-wrap: wrap; justify-content: center; }
}

/* =====================================================
   EDUCATION SECTION - Compact timeline
   ===================================================== */
#education {
  padding: 3rem 0 !important;
}

#education .container > h3 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-bottom: 1rem;
}

#education .card {
  border-radius: 12px !important;
  border: 1px solid var(--glass-border) !important;
  transition: var(--transition-smooth);
  box-shadow: none !important;
}

#education .card:hover {
  border-color: var(--primary-color) !important;
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

#education .card .card-body {
  padding: 1rem 1.2rem !important;
  border-radius: 12px !important;
}

#education .card .card-title {
  font-size: 0.95rem !important;
  font-weight: 700;
}

#education .row.align-items-center {
  margin-bottom: 0.5rem !important;
}

#education .py-5 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
#education .mb-4 { margin-bottom: 0.6rem !important; }

/* =====================================================
   PROJECTS SECTION
   ===================================================== */
#projects {
  padding: 3rem 0 !important;
}

#projects h3 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-bottom: 1.5rem;
}

#projects .card {
  border-radius: 14px !important;
  border: 1px solid var(--glass-border) !important;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: none !important;
}

#projects .card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
}

#projects .card .card-img-top {
  height: 180px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

#projects .card:hover .card-img-top {
  transform: scale(1.05);
}

#projects .card .card-head {
  overflow: hidden;
}

#projects .card .badge {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

body.light #projects .card .badge {
  background: rgba(79, 70, 229, 0.1) !important;
  color: var(--accent-indigo) !important;
  border-color: rgba(79, 70, 229, 0.2);
}

#projects .card-title {
  font-weight: 700 !important;
  font-size: 1.05rem;
}

#projects .card-text {
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.85;
}

#projects .card-footer {
  border-top: 1px solid var(--glass-border) !important;
  background: transparent !important;
}

#projects .card-footer a {
  color: var(--text-secondary-color) !important;
  transition: var(--transition-smooth);
}

#projects .card-footer a:hover {
  color: var(--primary-color) !important;
  transform: scale(1.15);
}

#projects .card-footer .btn {
  border-radius: 8px !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border: 1px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  transition: var(--transition-smooth);
}

#projects .card-footer .btn:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
}

/* =====================================================
   ACHIEVEMENTS SECTION
   ===================================================== */
#achievements {
  padding: 3rem 0 !important;
}

#achievements h3 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-bottom: 1.5rem;
}

#achievements .card {
  border-radius: 12px !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: none !important;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

#achievements .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: var(--transition-smooth);
}

#achievements .card:hover::before { opacity: 1; }

#achievements .card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* =====================================================
   WHY HIRE ME SECTION
   ===================================================== */
#hire-me {
  padding: 3rem 0 !important;
}

#hire-me h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

.hire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hire-card {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.hire-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-green-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

body.light .hire-card::after {
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-indigo-light));
}

.hire-card:hover::after { transform: scaleX(1); }

.hire-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.hire-card .hire-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-color);
}

body.light .hire-card .hire-icon {
  background: rgba(79, 70, 229, 0.1);
}

.hire-card h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.hire-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary-color);
  margin: 0;
}

/* =====================================================
   CONTACT / GET IN TOUCH — Interactive Design
   ===================================================== */
#contact {
  padding: 4rem 0 !important;
  position: relative;
}

/* Section Header */
.contact-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-tag {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}
body.light .contact-tag {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.2);
  color: var(--accent-indigo);
}

.contact-title {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: var(--text-color) !important;
  margin-bottom: 0.6rem;
}

.contact-subtitle {
  color: var(--secondary-text-color);
  font-size: 0.9rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.contact-subtitle strong {
  color: var(--primary-color);
}

/* Grid: Form + Info */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Form Card ── */
.contact-form-card {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.8rem;
}

.contact-form-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.contact-form-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-green-light));
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
body.light .contact-form-icon {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-indigo-light));
}

.contact-form-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.contact-form-desc {
  font-size: 0.78rem;
  color: var(--secondary-text-color);
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 480px) {
  .form-row-2col { grid-template-columns: 1fr; }
}

.contact-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary-text-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.contact-field label i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--secondary-background-color);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-color);
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.6;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
body.light .contact-field input:focus,
body.light .contact-field textarea:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.8rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-green-light));
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  width: 100%;
  margin-top: 0.3rem;
}
body.light .contact-submit-btn {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-indigo-light));
}

.contact-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}
body.light .contact-submit-btn:hover {
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.25);
}

.contact-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.contact-submit-btn--success {
  background: #059669 !important;
}

/* Status messages */
.contact-status {
  margin-top: 0.8rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
}
.contact-status--ok {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.contact-status--err {
  background: rgba(239, 71, 67, 0.12);
  color: #ef4743;
  border: 1px solid rgba(239, 71, 67, 0.3);
}

/* ── Info Column ── */
.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: var(--transition-smooth);
  text-decoration: none !important;
  color: var(--text-color) !important;
}

a.contact-info-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}
.ci-email { background: linear-gradient(135deg, #10b981, #34d399); }
body.light .ci-email { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.ci-location { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.contact-info-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-text-color);
  font-weight: 600;
}

.contact-info-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-color);
}

.contact-info-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--primary-color);
  transition: transform 0.2s;
}
a.contact-info-card:hover .contact-info-arrow {
  transform: translateX(4px);
}

/* Social Links Grid */
.contact-socials-card {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.contact-socials-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-text-color);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.contact-socials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .contact-socials-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.3rem;
  border-radius: 10px;
  background: var(--secondary-background-color);
  color: var(--text-color) !important;
  text-decoration: none !important;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.contact-social-btn i {
  font-size: 1.1rem;
}

.contact-social-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.csb-github:hover  { color: #333 !important; }
body.dark .csb-github:hover { color: #f0f0f0 !important; }
.csb-linkedin:hover { color: #0a66c2 !important; }
.csb-twitter:hover { color: #1da1f2 !important; }
.csb-codeforces:hover { color: #1890ff !important; }
.csb-facebook:hover { color: #1877f2 !important; }
.csb-instagram:hover { color: #e4405f !important; }

/* Availability Badge */
.contact-availability {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-green);
}
body.light .contact-availability {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.2);
  color: var(--accent-indigo);
}

.ca-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
body.light .ca-dot {
  background: var(--accent-indigo);
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
}

footer .card {
  border-radius: 12px !important;
  border: 1px solid var(--glass-border) !important;
}

footer .card:hover {
  border-color: var(--primary-color) !important;
}

/* =====================================================
   SCROLL TO TOP BUTTON
   ===================================================== */
#scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

body.light #scroll-to-top {
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* =====================================================
   TYPING ANIMATION
   ===================================================== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--primary-color);
  margin-left: 2px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
}

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

/* =====================================================
   SECTION NUMBERS (decorative)
   ===================================================== */
section h3 {
  position: relative;
}

/* =====================================================
   PARTICLE CANVAS (background)
   ===================================================== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

/* =====================================================
   QUICK ACTIONS / EXPLORE MORE SECTION
   ===================================================== */
#quick-actions {
  padding: 3rem 0 !important;
}

.qa-wrapper {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.qa-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-green-light), var(--primary-color));
  background-size: 200% 100%;
  animation: qaGradient 4s ease infinite;
}
body.light .qa-wrapper::before {
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-indigo-light), var(--accent-indigo));
  background-size: 200% 100%;
}

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

.qa-text {
  flex: 1;
  min-width: 0;
}

.qa-heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0 0 0.3rem;
}

.qa-desc {
  font-size: 0.82rem;
  color: var(--secondary-text-color);
  margin: 0;
  line-height: 1.5;
}

.qa-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--transition-smooth);
  border: 1px solid var(--glass-border);
  background: var(--secondary-background-color);
  color: var(--text-color) !important;
  white-space: nowrap;
}

.qa-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.qa-btn--blog:hover { color: var(--primary-color) !important; }
.qa-btn--gallery:hover { color: #f59e0b !important; }
.qa-btn--github:hover { color: #8b5cf6 !important; }
.qa-btn--cp:hover { color: #1890ff !important; }

@media (max-width: 768px) {
  .qa-wrapper {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1.2rem;
  }
  .qa-buttons { justify-content: center; }
}

@media (max-width: 480px) {
  .qa-buttons { flex-direction: column; width: 100%; }
  .qa-btn { justify-content: center; }
}

/* =====================================================
   RESPONSIVE FIXES — All devices
   ===================================================== */
/* Theme toggle button — use CSS vars */
button#theme-toggle {
  color: var(--text-color) !important;
  background: transparent !important;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

/* Navbar toggler visibility — use CSS vars */
.navbar-toggler svg {
  fill: var(--text-color) !important;
}

/* ── Large Desktops (1400px+) ── */
@media (min-width: 1400px) {
  .container { max-width: 1200px; }
}

/* ── Tablets & Small Desktops ── */
@media (max-width: 991px) {
  header .navbar .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ── Tablets Portrait (768px) ── */
@media (max-width: 768px) {
  #hero { min-height: auto; padding-top: 10px !important; padding-bottom: 1rem !important; }
  #hero h1 { font-size: 2.2rem !important; }
  #hero h2 { font-size: 1rem !important; }
  #hero .image img { max-width: 200px; }

  #about { padding: 3rem 0 2rem !important; }

  .skills-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.6rem; }
  .skill-card { padding: 0.8rem; }
  .skill-card i { font-size: 1.5rem; }

  .github-stats-bar { gap: 0.8rem; }
  .github-stat { min-width: 90px; padding: 0.6rem 1rem; }
  .github-stat .stat-value { font-size: 1.2rem; }
  .repos-grid { grid-template-columns: 1fr; }

  .coding-platforms { grid-template-columns: 1fr; }

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

  #education .card .card-body { padding: 0.8rem !important; }

  section { padding: 2rem 0 !important; }
  section h3 { font-size: 1.4rem !important; }

  /* Contact responsive */
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── Phone Landscape & Small Tablets (576px) ── */
@media (max-width: 576px) {
  .container { padding-left: 1rem !important; padding-right: 1rem !important; }
  #hero h1 { font-size: 1.8rem !important; }
  #hero .image img { max-width: 160px; }
  #hero a.btn { padding: 0.5rem 1.2rem !important; font-size: 0.82rem; }
  #hero a.btn.social-icon { width: 38px; height: 38px; }

  .blog-card-img-wrapper { height: 160px; }
}

/* ── Small Phones (480px) ── */
@media (max-width: 480px) {
  .github-stats-bar { gap: 0.5rem; }
  .github-stat { min-width: 70px; padding: 0.5rem 0.8rem; }

  #about ul { grid-template-columns: 1fr !important; }

  .contact-form-card { padding: 1.2rem; }
  .form-row-2col { grid-template-columns: 1fr; }
  .contact-socials-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Very small phones (360px) ── */
@media (max-width: 360px) {
  .navbar-brand { font-size: 1rem !important; }
  .brand-icon { width: 26px; height: 26px; font-size: 0.65rem; }
  #hero h1 { font-size: 1.5rem !important; }
  .cp-grid { gap: 0.8rem; }
  .cp-card { padding: 1rem; }
  .cp-aggregate-bar { padding: 0.5rem 0.8rem; gap: 0.6rem; }
  .cp-agg-num { font-size: 1rem; }
}

/* Remove language switcher */
.language-switcher,
#language-switcher,
.nav-item.language-switcher-li { display: none !important; }

/* Page transition */
#content {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   BLOG / LIST PAGES adjustments
   ===================================================== */
.list-group-item {
  border-radius: 10px !important;
  border: 1px solid var(--glass-border) !important;
  margin-bottom: 0.5rem;
  transition: var(--transition-smooth);
}

.list-group-item:hover {
  border-color: var(--primary-color) !important;
}

/* =====================================================
   AVAILABLE FOR HIRE BADGE
   ===================================================== */
.available-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  width: fit-content;
}

body.light .available-badge {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--accent-indigo);
}

.available-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s infinite;
}

body.light .available-badge .pulse-dot {
  background: var(--accent-indigo);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* =====================================================
   DROPDOWN MENU — both themes
   ===================================================== */
.dropdown-menu {
  background-color: var(--secondary-color) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(20px);
  padding: 0.5rem !important;
}

body.light .dropdown-menu {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

.dropdown-item {
  color: var(--text-color) !important;
  border-radius: 8px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.85rem !important;
  transition: var(--transition-smooth);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--secondary-background-color) !important;
  color: var(--primary-color) !important;
}

/* =====================================================
   MOBILE NAV — both themes
   ===================================================== */
@media (max-width: 991px) {
  .navbar-collapse {
    backdrop-filter: blur(20px);
    background: var(--secondary-color) !important;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--glass-border);
  }
}

/* =====================================================
   BLOG LIST PAGE
   ===================================================== */
.blog-page-header {
  padding-top: 1rem;
}

.blog-page-tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

body.light .blog-page-tag,
body.light .blog-page-tag {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.2);
  color: var(--accent-indigo);
}

.blog-page-title {
  font-size: clamp(2rem, 5vw, 3rem) !important;
  font-weight: 900 !important;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary-color);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Blog card */
.blog-card {
  background: var(--secondary-color) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: var(--transition-smooth);
  text-decoration: none !important;
  color: var(--text-color) !important;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
  color: var(--text-color) !important;
  text-decoration: none !important;
}

body.dark .blog-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35) !important;
}

.blog-card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.2) 100%);
}

.blog-card-body {
  padding: 1.2rem 1.2rem 0.8rem;
}

.blog-card-meta-top {
  margin-bottom: 0.5rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.light .blog-tag {
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-indigo);
}

.blog-card-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin-bottom: 0.5rem;
  color: var(--text-color) !important;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
  color: var(--primary-color) !important;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary-color);
  line-height: 1.6;
  margin: 0;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.2rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.75rem;
  color: var(--text-secondary-color);
  flex-wrap: wrap;
}

.blog-card-date,
.blog-card-readtime {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-card-arrow {
  color: var(--primary-color);
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.blog-card:hover .blog-card-arrow {
  transform: translateX(4px);
}

/* Blog pagination */
.blog-pagination .page-link {
  background: var(--secondary-color) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-color) !important;
  border-radius: 8px !important;
  margin: 0 3px;
  transition: var(--transition-smooth);
}

.blog-pagination .page-link:hover {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

.blog-pagination .page-item.active .page-link {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* =====================================================
   GALLERY PAGE
   ===================================================== */
.gallery-page-header {
  padding-top: 1rem;
}

.gallery-page-title {
  font-size: clamp(2rem, 5vw, 3rem) !important;
  font-weight: 900 !important;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary-color);
  max-width: 480px;
  margin: 0 auto 0.5rem;
  line-height: 1.7;
}

.gallery-content-body {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary-color);
  font-size: 0.95rem;
  line-height: 1.7;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

@media (max-width: 576px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
  aspect-ratio: 4/3;
  cursor: zoom-in;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

body.dark .gallery-item:hover {
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.8rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-empty {
  color: var(--text-secondary-color);
}

/* =====================================================
   SINGLE POST PAGE — color fixes
   ===================================================== */
#single .title h1 {
  font-weight: 900 !important;
  font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
  color: var(--text-color) !important;
}

#single #topScroll {
  background: var(--secondary-color) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--primary-color) !important;
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

#single #topScroll:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
}

.progress {
  height: 3px !important;
  background: var(--glass-border) !important;
}

.progress-bar {
  background: var(--primary-color) !important;
}

/* =====================================================
   GITHUB STREAK / ACTIVITY
   ===================================================== */
.github-activity-section {
  margin-bottom: 1.5rem;
}

.github-activity-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.github-cards-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.github-stat-img-card {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.github-stat-img-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.github-stat-img-card img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .github-cards-row { flex-direction: column; align-items: center; }
  .github-stat-img-card { max-width: 100%; }
}

/* Show all repos button */
.repos-show-all {
  text-align: center;
  margin-top: 1.5rem;
}

.repos-show-all button {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.repos-show-all button:hover {
  background: var(--primary-color);
  color: #fff;
}

.repo-card.hidden-repo {
  display: none;
}

/* Language stats bar */
.lang-stats-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.lang-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary-color);
  transition: var(--transition-smooth);
  cursor: default;
}

.lang-stat-pill:hover {
  border-color: var(--primary-color);
}

.lang-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
