/* =========================================
   HARIKARTHIK A — PORTFOLIO (MAHADEVAN STYLE)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Bebas+Neue&display=swap');

/* ── TOKENS ── */
:root {
  --cream:        #ffffff;
  --cream-dark:   #f8fafc;
  --ink:          #0f172a;
  --ink-soft:     #1e293b;
  --text:         #334155;
  --muted:        #64748b;
  --blue:         #6366f1;
  --blue-light:   #eef2ff;
  --green:        #16a34a;
  --green-light:  #f0fdf4;
  --purple:       #7c3aed;
  --white:        #ffffff;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.12);
  --radius:       20px;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --font-body:    'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
}

/* ── DARK THEME TOKENS ── */
[data-theme="dark"] {
  --cream:        #0f172a;
  --cream-dark:   #1e293b;
  --ink:          #f1f5f9;
  --ink-soft:     #e2e8f0;
  --text:         #94a3b8;
  --muted:        #64748b;
  --white:        #1e293b;
  --border:       rgba(255,255,255,0.08);
  --blue-light:   rgba(99,102,241,0.15);
  --green-light:  rgba(22,163,74,0.12);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 10px 30px rgba(0,0,0,0.45);
  --shadow-lg:    0 25px 50px rgba(0,0,0,0.6);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}
body.loading { overflow: hidden; }
a { text-decoration: none; color: inherit; transition: .25s var(--ease); }
img { max-width: 100%; display: block; }

/* ── CONTAINER ── */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ── PRELOADER ── */
#preloader {
  position: fixed; inset: 0; background: var(--cream); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.loader-ring {
  width: 42px; height: 42px; border: 3px solid var(--cream-dark);
  border-top-color: var(--ink); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCROLL ANIMATIONS ── */
.fade-in-up { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────
   NAVBAR
───────────────────────────────────────── */
.nav-wrapper {
  position: fixed; top: 20px; left: 0; right: 0;
  display: flex; justify-content: center;
  z-index: 1000; padding: 0 20px;
}

.navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 100px;
  padding: 8px 8px 8px 8px;
  display: flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 820px; width: 100%;
  justify-content: center;
}

[data-theme="dark"] .navbar {
  background: rgba(24,24,24,0.88);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* Dark mode toggle button */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.95rem; color: var(--ink);
  transition: all .25s var(--ease);
  flex-shrink: 0; margin-left: 4px;
}
.theme-toggle:hover { background: var(--border); transform: rotate(20deg); }

/* Sun icon in dark mode, moon in light */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  font-size: 0.88rem; font-weight: 600;
  color: var(--muted); padding: 7px 14px;
  border-radius: 100px;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--cream); }

.nav-resume-btn {
  background: var(--ink) !important; color: #fff !important;
  padding: 8px 18px !important; border-radius: 100px !important;
  font-size: 0.85rem !important;
  display: flex; align-items: center; gap: 6px;
}
.nav-resume-btn:hover { background: #333 !important; transform: translateY(-1px); }

.menu-toggle {
  display: none; background: none; border: none;
  font-size: 1.3rem; color: var(--ink); cursor: pointer;
  padding: 8px 12px; border-radius: 50%;
}

@media (max-width: 768px) {
  /* Handled in full mobile block below */
}


/* ─────────────────────────────────────────
   HERO — MAHADEVAN STYLE
   (massive name, atmospheric bg, photo between lines)
───────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 100px;
}

/* ── HERO BACKGROUND SYSTEM ── */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

/* Layer 1: slow colour-shifting base gradient */
.hero-bg-sky {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #c8b89a 0%, #d6c9a8 25%, #e4dcc4 50%, #ede6d2 75%, #f5f0e8 100%);
  background-size: 300% 300%;
  animation: skyShift 18s ease-in-out infinite alternate;
}
@keyframes skyShift {
  0%   { background-position: 0% 0%;   }
  33%  { background-position: 100% 30%; }
  66%  { background-position: 60% 80%;  }
  100% { background-position: 20% 100%;}
}

/* Layer 2: large drifting colour orbs */
.hero-bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.6;
  will-change: transform;
}
.orb-1 {
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.25) 0%, transparent 70%);
  top: -5%; left: -10%;
  animation: orbFloat1 20s ease-in-out infinite alternate;
}
.orb-2 {
  width: 550px; height: 350px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.2) 0%, transparent 70%);
  top: 5%; right: -8%;
  animation: orbFloat2 24s ease-in-out infinite alternate;
}
.orb-3 {
  width: 650px; height: 300px;
  background: radial-gradient(ellipse, rgba(167,139,250,0.15) 0%, transparent 70%);
  bottom: 10%; left: 15%;
  animation: orbFloat3 28s ease-in-out infinite alternate;
}
/* Extra accent orb — blue/purple tint for depth */
.orb-4 {
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,120,200,0.18) 0%, transparent 70%);
  top: 30%; right: 20%;
  animation: orbFloat1 32s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat1 {
  0%   { transform: translate(0px,   0px)  scale(1);    }
  33%  { transform: translate(40px, -25px) scale(1.05); }
  66%  { transform: translate(-20px, 30px) scale(0.97); }
  100% { transform: translate(30px,  40px) scale(1.08); }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0px,   0px)  scale(1);    }
  33%  { transform: translate(-35px, 20px) scale(1.06); }
  66%  { transform: translate(25px, -35px) scale(0.95); }
  100% { transform: translate(-15px, 15px) scale(1.03); }
}
@keyframes orbFloat3 {
  0%   { transform: translate(0px,   0px)  scale(1);    }
  50%  { transform: translate(50px, -20px) scale(1.07); }
  100% { transform: translate(-30px, 25px) scale(0.96); }
}

/* Layer 3: canvas for floating particles (JS driven) */
#heroParticles {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
}

/* Layer 4: subtle vignette to focus the eye on text */
.hero-bg-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%,
    transparent 40%,
    rgba(248,250,252,0.3) 75%,
    rgba(248,250,252,0.6) 100%
  );
}

/* Layer 5: grain texture for organic feel */
.hero-bg-noise {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  animation: grainShift 0.5s steps(1) infinite;
}
@keyframes grainShift {
  0%  { transform: translate(0,   0);  }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(2px,  1px); }
  100%{ transform: translate(-1px, 2px); }
}

/* Dark mode hero bg */
[data-theme="dark"] .hero-bg-sky {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  background-size: 300% 300%;
}
[data-theme="dark"] .orb-1 { background: radial-gradient(ellipse, rgba(99,102,241,0.3) 0%, transparent 70%); }
[data-theme="dark"] .orb-2 { background: radial-gradient(ellipse, rgba(139,92,246,0.25) 0%, transparent 70%); }
[data-theme="dark"] .orb-3 { background: radial-gradient(ellipse, rgba(167,139,250,0.2) 0%, transparent 70%); }
[data-theme="dark"] .orb-4 { background: radial-gradient(ellipse, rgba(99,102,241,0.15) 0%, transparent 70%); }
[data-theme="dark"] .hero-bg-vignette {
  background: radial-gradient(ellipse at 50% 40%,
    transparent 40%,
    rgba(15,23,42,0.3) 75%,
    rgba(15,23,42,0.7) 100%
  );
}

/* Social row (top, Mahadevan style) */
.hero-social-row {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: 40px;
  padding: 40px 0 20px;
}
.hero-social-row a {
  font-size: 0.9rem; font-weight: 600;
  color: var(--ink-soft); opacity: 0.7;
  display: flex; align-items: center; gap: 6px;
  transition: opacity .2s, transform .2s;
}
.hero-social-row a:hover { opacity: 1; transform: translateY(-2px); }
.hero-social-row a i { font-size: 0.7rem; }

/* The name block — the centrepiece */
.hero-name-block {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.hero-big-name {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 13rem);
  line-height: 0.92;
  color: var(--ink);
  letter-spacing: -1px;
  text-align: center;
  width: 100%;
  user-select: none;
}


/* Footer row below the name */
.hero-footer-row {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
  padding: 40px 20px 80px;
  text-align: center;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(26,26,26,0.65); font-weight: 500;
  max-width: 520px; line-height: 1.7;
}

.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--ink); color: #fff;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,0.7); color: var(--ink);
  border: 1px solid rgba(0,0,0,0.12);
  padding: 14px 28px; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem;
  backdrop-filter: blur(8px);
  transition: all .2s;
}
.btn-ghost:hover {
  background: #fff; transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.btn-text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.95rem; color: var(--blue);
  margin-top: 8px;
}
.btn-text-link:hover { gap: 10px; }

/* ─────────────────────────────────────────
   SHARED SECTION STYLES
───────────────────────────────────────── */
.section-header { margin-bottom: 56px; }
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.1;
  margin-top: 8px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  padding: 4px 12px; border-radius: 100px;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────
   ABOUT SECTION (warm cream)
───────────────────────────────────────── */
.about-section {
  background: #f8fafc;
  padding: 110px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.about-text { max-width: 520px; }

.about-heading {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.15;
  margin-bottom: 24px;
}
.about-heading em { font-style: normal; color: var(--blue); }

.about-text p {
  font-size: 1rem; color: #555; line-height: 1.8; margin-bottom: 18px;
}
.about-text strong { color: var(--ink); }

/* Trait cards grid */
.about-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trait-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.trait-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.trait-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.trait-card strong { display: block; font-size: 0.9rem; color: var(--ink); margin-bottom: 3px; }
.trait-card span { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-text { max-width: 100%; }
}
@media (max-width: 500px) {
  .about-traits { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   SKILLS — Exact Mahadevan Layout
───────────────────────────────────────── */
.skills-section {
  background: var(--cream);
  padding: 80px 0 70px;
  overflow: hidden;
}

/* Left-aligned heading block like Mahadevan */
.skills-heading-block { margin-bottom: 48px; }

.skills-main-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 10px;
}

.skills-blue-line {
  width: 48px; height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin-bottom: 20px;
}

.skills-subtitle {
  font-size: 0.95rem; color: var(--muted);
  line-height: 1.75; max-width: 600px;
  text-align: center; margin: 0 auto;
}

/* Scroll outer — full width, edge fade */
.skills-scroll-outer {
  width: 100%;
  overflow: hidden;
  padding: 16px 0 20px;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

/* Moving track */
.skills-scroll-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  padding: 10px 0;
  animation: skillsScroll 15s linear infinite;
}
.skills-scroll-track.paused { animation-play-state: paused; }
@keyframes skillsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Each icon + label — no border, no card, bare icon */
.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  opacity: 1;
  user-select: none;
  min-width: 72px;
}

.skill-icon-item img {
  width: 62px; height: 62px;
  object-fit: contain;
  transition: transform 0.3s var(--ease), filter 0.3s;
  display: block;
}

.skill-icon-item span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.25s, font-weight 0.25s;
  text-align: center;
}

/* Flask — needs colour treatment */
.flask-icon { filter: grayscale(1) brightness(0.3); }
[data-theme="dark"] .flask-icon { filter: grayscale(1) brightness(2); }

/* Hover */
.skill-icon-item:hover { transform: translateY(-5px); }
.skill-icon-item:hover img { transform: scale(1.1); }
.skill-icon-item:hover span { color: var(--ink); font-weight: 600; }

/* Active — clicked & highlighted */
.skill-icon-item.active img {
  transform: scale(1.2);
  filter: drop-shadow(0 6px 14px rgba(37,99,235,0.3));
}
.skill-icon-item.active .flask-icon {
  filter: brightness(0) saturate(1) invert(30%) sepia(80%) saturate(600%)
          hue-rotate(205deg) drop-shadow(0 6px 14px rgba(37,99,235,0.3));
}
[data-theme="dark"] .skill-icon-item.active .flask-icon {
  filter: brightness(0) invert(1) drop-shadow(0 6px 14px rgba(96,165,250,0.5));
}
.skill-icon-item.active span { color: var(--blue); font-weight: 700; }

/* Dim others when one is active */
.skills-scroll-track.has-active .skill-icon-item:not(.active) {
  opacity: 0.25;
  transform: scale(0.92);
}

/* Hint text */
.skills-hint {
  text-align: center;
  margin-top: 28px;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

[data-theme="dark"] .skills-section { background: #0d0d0d; }

/* ─────────────────────────────────────────
   EDUCATION
───────────────────────────────────────── */
.edu-section {
  background: var(--cream);
  padding: 110px 0;
}

.edu-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.edu-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.edu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.edu-card--main { border-top: 3px solid var(--blue); }

.edu-card-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
}
.edu-icon {
  width: 48px; height: 48px; background: var(--blue-light);
  color: var(--blue); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.edu-icon--green { background: var(--green-light); color: var(--green); }

.edu-badge {
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
  background: var(--cream); border-radius: 100px;
  padding: 4px 12px; border: 1px solid var(--border);
}

.edu-card h3 { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.edu-school { font-size: 0.9rem; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
.edu-location { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 18px; }

.edu-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.edu-pills span {
  font-size: 0.78rem; font-weight: 600; color: var(--ink);
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 100px; padding: 4px 12px;
}

@media (max-width: 760px) {
  .edu-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-section {
  background: #f8fafc;
  padding: 120px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.contact-inner { text-align: center; max-width: 620px; margin: 0 auto; }

.contact-section .eyebrow {
  background: rgba(37,99,235,0.1); color: var(--blue);
}

.contact-heading {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.15;
  margin: 12px 0 20px;
}
.contact-heading em { font-style: normal; color: var(--blue); }

.contact-sub { color: var(--muted); font-size: 1rem; margin-bottom: 40px; line-height: 1.7; }

.contact-actions { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }

.contact-section .btn-primary {
  background: var(--ink); color: #fff;
  padding: 16px 32px;
}
.contact-section .btn-primary:hover { background: #222; color: #fff; }

.contact-socials { display: flex; gap: 12px; }
.contact-socials a {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--white); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; border: 1.5px solid var(--border);
  transition: all .2s;
}
.contact-socials a:hover {
  background: var(--ink); color: #fff; border-color: var(--ink);
  transform: translateY(-3px);
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#main-footer {
  background: #020617;
  padding: 48px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 40px; flex-wrap: wrap; gap: 24px;
}

.footer-logo { font-family: var(--font-display); font-size: 1.8rem; color: #fff; letter-spacing: 1px; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.35); margin-top: 4px; }

.footer-nav { list-style: none; display: flex; gap: 32px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.4); }
.footer-nav a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: rgba(255,255,255,0.25);
  flex-wrap: wrap; gap: 12px;
}

/* ─────────────────────────────────────────
   EXPERIENCE PAGE (SHARED)
───────────────────────────────────────── */
.experience-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}
.roles-sidebar {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; gap: 12px;
}
.role-tab {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
  cursor: pointer; display: flex; gap: 14px; align-items: center;
  transition: all .4s var(--ease);
}
.role-tab:hover { transform: translateX(8px); border-color: var(--blue); }
.role-tab.active {
  background: var(--blue-light); border: 2px solid var(--blue);
  box-shadow: 0 8px 24px rgba(37,99,235,0.1);
}
.role-title { font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.company-name { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.role-panel {
  display: none; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  animation: panelIn .5s var(--ease) forwards;
}
.role-panel.active { display: block; }
@keyframes panelIn {
  from { opacity:0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity:1; transform: translateY(0);    filter: blur(0); }
}

@media (max-width: 960px) {
  .experience-layout { grid-template-columns: 1fr; }
  .roles-sidebar {
    flex-direction: row; overflow-x: auto;
    position: static; padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }
  .role-tab { min-width: 260px; flex-shrink: 0; scroll-snap-align: start; }
}

/* ─────────────────────────────────────────
   PROJECTS PAGE (SHARED)
───────────────────────────────────────── */
.filter-wrapper { display: flex; justify-content: center; margin-bottom: 56px; }
.filter-list {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
  padding: 7px; border-radius: 100px; border: 1px solid var(--border);
  display: inline-flex; gap: 6px; box-shadow: var(--shadow-sm);
}
.pill {
  padding: 10px 24px; border-radius: 100px; font-size: 0.88rem;
  font-weight: 700; cursor: pointer; border: none;
  background: transparent; color: var(--muted);
  transition: all .3s var(--ease);
}
.pill.active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 32px;
}
.visual-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .4s var(--ease);
  display: flex; flex-direction: column;
}
.visual-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.card-visual {
  height: 200px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
  position: relative;
}
.card-visual i { font-size: 4rem; color: var(--blue); transition: all .4s var(--ease); }
.visual-card:hover .card-visual i { transform: scale(1.2) rotate(-8deg); color: var(--purple); }
.card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }

/* ─────────────────────────────────────────
   ACHIEVEMENTS PAGE (SHARED)
───────────────────────────────────────── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}
.achievement-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all .35s var(--ease);
}
.achievement-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.ach-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* ─────────────────────────────────────────
   MODAL
───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,11,16,0.9); backdrop-filter: blur(10px);
  z-index: 10001; display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-content { width: 90%; max-width: 860px; border-radius: 24px; overflow: hidden; background: #000; }

/* ─────────────────────────────────────────
   DARK MODE SECTION OVERRIDES
───────────────────────────────────────── */
[data-theme="dark"] .hero-bg-sky {
  background: linear-gradient(180deg,
    #1a1410 0%, #1e1812 20%, #121212 55%, #0d0d0d 100%
  );
}
[data-theme="dark"] .orb-1 { background: radial-gradient(ellipse, #3d2e1e 0%, transparent 70%); }
[data-theme="dark"] .orb-2 { background: radial-gradient(ellipse, #1e2d1e 0%, transparent 70%); }
[data-theme="dark"] .orb-3 { background: radial-gradient(ellipse, #1a2230 0%, transparent 70%); }

[data-theme="dark"] .hero-big-name { color: var(--ink); }
[data-theme="dark"] .hero-social-row a { color: var(--ink-soft); }
[data-theme="dark"] .hero-tagline { color: rgba(240,236,228,0.5); }

/* ── SECTIONS ── */
[data-theme="dark"] .about-section,
[data-theme="dark"] .edu-section,
[data-theme="dark"] .contact-page,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .certs-section { background: #0f172a; }

[data-theme="dark"] .skills-section,
[data-theme="dark"] .exp-section,
[data-theme="dark"] .projects-section,
[data-theme="dark"] .awards-section { background: #1e293b; }

[data-theme="dark"] .page-hero::before { color: rgba(255,255,255,0.025); }

/* ── CARDS ── */
[data-theme="dark"] .trait-card,
[data-theme="dark"] .edu-card,
[data-theme="dark"] .award-card,
[data-theme="dark"] .cert-card,
[data-theme="dark"] .role-tab,
[data-theme="dark"] .role-panel,
[data-theme="dark"] .visual-card,
[data-theme="dark"] .social-btn,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .skill-chip { background: #1a1a1a; border-color: rgba(255,255,255,0.08); }

[data-theme="dark"] .edu-badge,
[data-theme="dark"] .edu-pills span,
[data-theme="dark"] .card-tag,
[data-theme="dark"] .mini-tag,
[data-theme="dark"] .tab-date,
[data-theme="dark"] .skills-wrap { background: #242424; border-color: rgba(255,255,255,0.07); color: #aaa; }

[data-theme="dark"] .card-visual { background: #222 !important; }

/* ── BUTTONS — the main fix ── */

/* btn-primary (dark bg, white text in light) → flip to cream bg, dark text */
[data-theme="dark"] .btn-primary {
  background: #6366f1;
  color: #ffffff !important;
}
[data-theme="dark"] .btn-primary:hover {
  background: #4f46e5;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

/* btn-ghost (white bg, dark text in light) → dark translucent */
[data-theme="dark"] .btn-ghost {
  background: rgba(255,255,255,0.07);
  color: #f0ece4;
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .btn-ghost:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}


/* Contact section dark mode */
[data-theme="dark"] .contact-section {
  background: #0f172a;
  border-top-color: rgba(255,255,255,0.05);
}
[data-theme="dark"] .contact-section .eyebrow { background: rgba(37,99,235,0.18); color: #60a5fa; }
[data-theme="dark"] .contact-heading { color: #f0ece4; }
[data-theme="dark"] .contact-heading em { color: #60a5fa; }
[data-theme="dark"] .contact-sub { color: rgba(240,236,228,0.45); }
[data-theme="dark"] .contact-section .btn-primary { background: #f0ece4; color: #0d0d0d !important; }
[data-theme="dark"] .contact-section .btn-primary:hover { background: #fff; }
[data-theme="dark"] .contact-socials a { background: #1a1a1a; color: #f0ece4; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .contact-socials a:hover { background: #f0ece4; color: #0d0d0d; border-color: #f0ece4; }

/* nav Resume button */
[data-theme="dark"] .nav-resume-btn {
  background: #6366f1 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .nav-resume-btn:hover { background: #4f46e5 !important; }

/* card-link buttons on project cards */
[data-theme="dark"] .card-link {
  color: #f0ece4;
  border-color: rgba(255,255,255,0.15);
  background: transparent;
}
[data-theme="dark"] .card-link:hover {
  background: #f0ece4;
  color: #0d0d0d;
  border-color: #f0ece4;
}
[data-theme="dark"] .card-link.demo {
  background: #f0ece4;
  color: #0d0d0d;
  border-color: #f0ece4;
}
[data-theme="dark"] .card-link.demo:hover { background: #fff; }
[data-theme="dark"] .card-link.wip { color: #555; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .card-link.wip:hover { background: transparent; color: #555; }

/* social link buttons on contact page */
[data-theme="dark"] .social-btn { color: #f0ece4; }
[data-theme="dark"] .social-btn:hover { border-color: rgba(255,255,255,0.25); }

/* form submit button */
[data-theme="dark"] .form-submit {
  background: #f0ece4;
  color: #0d0d0d;
}
[data-theme="dark"] .form-submit:hover { background: #fff; }

/* ── FILTER PILLS ── */
[data-theme="dark"] .filter-list { background: rgba(26,26,26,0.9); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .pill { color: #777; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .pill:hover { border-color: rgba(255,255,255,0.25); color: #f0ece4; }
[data-theme="dark"] .pill.active { background: #f0ece4; color: #0d0d0d; border-color: #f0ece4; }

/* ── FORM FIELDS ── */
[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea {
  background: #1e1e1e; color: #f0ece4;
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .form-field input::placeholder,
[data-theme="dark"] .form-field textarea::placeholder { color: #555; }
[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field textarea:focus { background: #222; border-color: var(--blue); }

/* ── MISC ── */
[data-theme="dark"] .role-tab.active { background: rgba(37,99,235,0.15); border-color: var(--blue); }
[data-theme="dark"] .panel-logo-row { border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .contrib-item { background: #222; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .about-heading em { color: #60a5fa; }
[data-theme="dark"] .eyebrow { background: rgba(37,99,235,0.18); color: #60a5fa; }

[data-theme="dark"] #main-footer { background: #020617; }
[data-theme="dark"] .stats-strip { background: #0f172a; }

/* ─────────────────────────────────────────
   RESPONSIVE CLEANUP
───────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-big-name { font-size: clamp(4rem, 18vw, 5.5rem); }
  .hero-social-row { gap: 20px; }
  .hero-footer-row { padding-bottom: 50px; }
  .about-section, .edu-section { padding: 70px 0; }
  .contact-section { padding: 80px 0; }
}

/* ─────────────────────────────────────────
   MARQUEE — dual row directions
───────────────────────────────────────── */
.marquee-left  { animation: marqueeScrollLeft  30s linear infinite; }
.marquee-right { animation: marqueeScrollRight 30s linear infinite; }
@keyframes marqueeScrollLeft  { from { transform: translateX(0);    } to { transform: translateX(-50%); } }
@keyframes marqueeScrollRight { from { transform: translateX(-50%); } to { transform: translateX(0);    } }
.marquee-track:hover { animation-play-state: paused; }

.section-sub { color: var(--muted); font-size: 1rem; margin-top: 8px; max-width: 520px; line-height: 1.7; }

/* ─────────────────────────────────────────
   6. SMOOTH PAGE TRANSITIONS
───────────────────────────────────────── */
body {
  animation: pageFadeIn 0.5s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page exit overlay */
.page-transition-overlay {
  position: fixed; inset: 0;
  background: var(--cream);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.page-transition-overlay.active { opacity: 1; }

/* ─────────────────────────────────────────
   9. GITHUB ACTIVITY SECTION
───────────────────────────────────────── */
.github-section {
  background: var(--cream);
  padding: 80px 0;
}

.github-activity-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Contribution graph */
.github-activity-card > img {
  width: 100%; max-width: 820px;
  border-radius: 10px; display: block;
}

/* Stats grid */
.gh-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; width: 100%; max-width: 820px;
}
.gh-stat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.gh-stat-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.gh-stat-body { display: flex; flex-direction: column; gap: 2px; }
.gh-stat-label { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.gh-stat-value { font-size: 0.95rem; font-weight: 800; color: var(--ink); }

/* Language pills */
.gh-lang-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gh-lang-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 700;
  background: var(--white); border: 1.5px solid var(--border); color: var(--ink);
}
.gh-lang-pill::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  background: var(--c); flex-shrink: 0;
}

[data-theme="dark"] .github-section { background: #0f172a; }
[data-theme="dark"] .github-activity-card { background: #1a1a1a; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .gh-stat-card { background: #222; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .gh-lang-pill { background: #1a1a1a; border-color: rgba(255,255,255,0.08); color: #f0ece4; }

/* ─────────────────────────────────────────
   12. PROJECT CARD HOVER PREVIEW
───────────────────────────────────────── */
.visual-card { position: relative; }

.card-preview-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(4px);
  border-radius: 24px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 5;
}
.visual-card:hover .card-preview-overlay { opacity: 1; }

.preview-screenshot {
  width: 85%; border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  object-fit: cover; height: 140px;
  background: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.preview-screenshot img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 8px;
}
.preview-screenshot-placeholder {
  width: 85%; height: 140px; border-radius: 10px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  color: rgba(255,255,255,0.5); font-size: 0.8rem; font-weight: 600;
}
.preview-screenshot-placeholder i { font-size: 1.8rem; opacity: 0.4; }

.preview-action-row {
  display: flex; gap: 10px;
}
.preview-btn {
  padding: 8px 18px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; transition: all 0.2s;
}
.preview-btn-primary { background: #fff; color: #0d0d0d; }
.preview-btn-primary:hover { background: #f0ece4; transform: translateY(-2px); }
.preview-btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.preview-btn-ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* ─────────────────────────────────────────
   15. RESUME BUTTON PULSE ANIMATION
───────────────────────────────────────── */
.nav-resume-btn {
  position: relative;
  animation: resumePulseGlow 3s ease-in-out infinite;
}

@keyframes resumePulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0.0); }
  50%       { box-shadow: 0 0 0 6px rgba(0,0,0,0.08), 0 0 16px rgba(0,0,0,0.1); }
}

[data-theme="dark"] .nav-resume-btn {
  animation: resumePulseGlowDark 3s ease-in-out infinite;
}
@keyframes resumePulseGlowDark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,236,228,0.0); }
  50%       { box-shadow: 0 0 0 6px rgba(240,236,228,0.08), 0 0 16px rgba(240,236,228,0.12); }
}

/* Download CV button in hero also pulses */
.btn-ghost.resume-pulse {
  animation: resumePulseGlow 3s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   DARK MODE — new feature overrides
───────────────────────────────────────── */
[data-theme="dark"] .github-section { background: #0f172a; }
[data-theme="dark"] .page-transition-overlay { background: #0d0d0d; }


/* ═════════════════════════════════════════════
   MOBILE RESPONSIVE — Full overhaul
   Target: 360px–768px screens
═════════════════════════════════════════════ */

/* ── NAVBAR MOBILE — definitive ── */
@media (max-width: 768px) {
  .nav-wrapper { top: 12px; padding: 0 12px; }

  .navbar {
    padding: 8px 14px;
    max-width: 100%;
    border-radius: 100px;
    justify-content: space-between;
    gap: 8px;
  }

  /* nav-links hidden by default, shown on open */
  .nav-links {
    display: none;
    position: fixed;
    top: 70px; left: 12px; right: 12px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    flex-direction: column;
    padding: 14px;
    gap: 4px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.14);
    z-index: 9999;
  }
  [data-theme="dark"] .nav-links {
    background: rgba(22,22,22,0.98);
    border-color: rgba(255,255,255,0.08);
  }
  .nav-links.open { display: flex; }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--cream);
    color: var(--ink);
  }
  [data-theme="dark"] .nav-links a:hover,
  [data-theme="dark"] .nav-links a.active {
    background: rgba(255,255,255,0.07);
    color: #f0ece4;
  }

  .nav-resume-btn {
    width: 100% !important;
    justify-content: center !important;
    border-radius: 12px !important;
    margin-top: 6px;
  }

  /* hamburger visible, theme toggle visible — side by side */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    background: none; border: none;
    font-size: 1.15rem; color: var(--ink);
    cursor: pointer; order: 2;
  }
  .theme-toggle {
    order: 1;
    margin-left: 0;
    width: 34px; height: 34px;
  }
}

/* ── HERO MOBILE ── */
@media (max-width: 768px) {
  .hero-section { padding-top: 80px; min-height: 100svh; }

  .hero-social-row {
    gap: 16px;
    padding: 24px 16px 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-social-row a { font-size: 0.82rem; }

  .hero-big-name {
    font-size: clamp(3.2rem, 16vw, 5rem);
    text-align: center;
    padding: 0 12px;
  }

  .hero-footer-row {
    padding: 20px 16px 48px;
    gap: 16px;
  }
  .hero-tagline { font-size: 0.92rem; padding: 0 8px; }

  .hero-cta-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .btn-primary, .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

/* ── ABOUT MOBILE ── */
@media (max-width: 768px) {
  .about-section { padding: 60px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-text { max-width: 100%; }
  .about-heading { font-size: 1.8rem; }
  .about-traits { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trait-card { padding: 14px; gap: 10px; }
  .trait-icon { width: 36px; height: 36px; font-size: 0.95rem; }
  .trait-card strong { font-size: 0.82rem; }
  .trait-card span { font-size: 0.72rem; }
}
@media (max-width: 380px) {
  .about-traits { grid-template-columns: 1fr; }
}

/* ── SKILLS MOBILE ── */
@media (max-width: 768px) {
  .skills-section { padding: 60px 0; }
  .skills-heading-block { padding: 0 20px; margin-bottom: 28px; }
  .skills-main-title { font-size: 1.4rem; }
  .skills-subtitle { font-size: 0.88rem; }
  .skill-icon-item { min-width: 60px; }
  .skill-icon-item img { width: 48px; height: 48px; }
  .skill-icon-item span { font-size: 0.72rem; }
  .skills-scroll-outer { margin-top: 32px; }
  .skills-hint { font-size: 0.7rem; margin-top: 16px; }
}

/* ── EDUCATION MOBILE ── */
@media (max-width: 768px) {
  .edu-section { padding: 60px 0; }
  .edu-grid { grid-template-columns: 1fr; gap: 16px; }
  .edu-card { padding: 24px; }
  .edu-card h3 { font-size: 1rem; }
  .edu-pills { flex-wrap: wrap; gap: 6px; }
}

/* ── GITHUB SECTION MOBILE ── */
@media (max-width: 768px) {
  .github-section { padding: 60px 0; }
  .github-activity-card { padding: 20px 16px; gap: 16px; }
  .gh-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gh-stat-card { padding: 12px 14px; gap: 10px; }
  .gh-stat-value { font-size: 0.85rem; }
  .gh-stat-label { font-size: 0.62rem; }
  .gh-lang-row { gap: 8px; }
  .gh-lang-pill { font-size: 0.72rem; padding: 5px 12px; }
}

/* ── CONTACT SECTION MOBILE ── */
@media (max-width: 768px) {
  .contact-section { padding: 60px 0; }
  .contact-heading { font-size: 1.9rem; }
  .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-section .btn-primary { width: 100%; justify-content: center; }
  .contact-socials { justify-content: center; }
}

/* ── FOOTER MOBILE ── */
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-nav { justify-content: center; gap: 16px; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 6px; }
}

/* ── PAGE HERO (inner pages) MOBILE ── */
@media (max-width: 768px) {
  .page-hero { padding: 120px 0 48px; }
  .page-hero-label { font-size: clamp(2.8rem, 14vw, 4rem); }
  .page-hero-sub { font-size: 0.92rem; }
  .page-hero::before { font-size: clamp(4rem, 20vw, 8rem); }
}

/* ── PROJECTS MOBILE ── */
@media (max-width: 768px) {
  .projects-section { padding: 48px 0 64px; }
  .filter-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .filter-pills { flex-wrap: wrap; gap: 6px; }
  .pill { padding: 7px 14px; font-size: 0.78rem; }
  .visual-grid { grid-template-columns: 1fr; gap: 20px; }
  .visual-card.featured { grid-column: span 1; flex-direction: column; }
  .card-body { padding: 18px; }
  .card-footer { padding: 12px 18px; }
  .card-visual { height: 180px; }
}

/* ── EXPERIENCE MOBILE ── */
@media (max-width: 768px) {
  .exp-section { padding: 48px 0 64px; }
  .exp-layout { grid-template-columns: 1fr; gap: 24px; }
  .timeline-sidebar { position: static; }
  .timeline-list {
    flex-direction: row;
    overflow-x: auto;
    display: flex;
    padding-bottom: 8px;
    gap: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .timeline-list::before { display: none; }
  .timeline-item { min-width: 240px; flex-shrink: 0; padding: 0; scroll-snap-align: start; }
  .timeline-item::before { display: none; }
  .tl-card { padding: 14px; }
  .tl-logo { width: 36px; height: 36px; }
  .tl-logo-text { font-size: 0.85rem; }
  .tl-company { font-size: 0.72rem; }
  .panel-body { padding: 20px; }
  .panel-title { font-size: 1.4rem; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-number { font-size: 1.5rem; }
  .metric-label { font-size: 0.68rem; }
  .skills-wrap { gap: 6px; }
  .skill-badge { font-size: 0.75rem; padding: 5px 10px; }
  .role-panel { border-radius: 16px; }
}

/* ── ACHIEVEMENTS MOBILE ── */
@media (max-width: 768px) {
  .ach-section { padding: 48px 0; }
  .awards-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .award-card { padding: 18px; }
  .award-card h3 { font-size: 0.88rem; }
  .award-card p { font-size: 0.78rem; }
  .cert-cards-grid { grid-template-columns: 1fr; gap: 18px; }
  .credly-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .badge-card { padding: 16px 12px; }
  .badge-logo { width: 52px; height: 52px; font-size: 1.3rem; }
  .badge-name { font-size: 0.75rem; }
}
@media (max-width: 400px) {
  .awards-grid { grid-template-columns: 1fr; }
  .credly-grid { grid-template-columns: 1fr 1fr; }
}

/* ── CONTACT PAGE MOBILE ── */
@media (max-width: 768px) {
  .contact-page { padding: 120px 0 60px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .social-btn { flex: 1 1 100%; }
  .contact-form-card { padding: 22px 18px; }
}

/* ── STATS STRIP MOBILE ── */
@media (max-width: 768px) {
  .stats-strip { padding: 36px 0; }
  .stats-inner { gap: 24px; }
  .stat-number { font-size: 2.2rem; }
  .stat-label { font-size: 0.65rem; }
}

/* ── SECTION TITLES MOBILE ── */
@media (max-width: 768px) {
  .section-title { font-size: 1.8rem; }
  .section-header { margin-bottom: 36px; }
  .container { padding: 0 16px; }
}

/* ── PREVENT HORIZONTAL OVERFLOW ── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  * { box-sizing: border-box; }
  img { max-width: 100%; }
}



/* ═════════════════════════════════════════════
   MAHADEVAN-STYLE TRAIT CARDS & EDUCATION
═════════════════════════════════════════════ */

/* ── TRAIT CARDS — Image 2 Style ── */
.about-traits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.trait-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform .3s var(--ease), box-shadow .3s;
  box-shadow: var(--shadow-sm);
}
.trait-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* First card — gradient highlight like Mahadevan */
/* .trait-card--highlight handled by .active */

.trait-icon-mh {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #f97316; /* Mahadevan orange */
}

.trait-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.trait-card span {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Explore My Work button — Mahadevan gradient */
.btn-explore-work {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .3s var(--ease), box-shadow .3s;
  box-shadow: 0 8px 24px rgba(249,115,22,0.3);
}
.btn-explore-work:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(249,115,22,0.4);
  color: #fff;
}

/* Remove old trait-card icon styles */
.trait-icon { display: none; }

/* Dark mode trait cards */
[data-theme="dark"] .trait-card { background: #1e293b; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .trait-card.active { background: linear-gradient(135deg, rgba(254,249,195,0.08) 0%, rgba(252,231,243,0.08) 100%); }

/* Mobile trait cards */
@media (max-width: 900px) { .about-traits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .about-traits { grid-template-columns: repeat(2, 1fr); gap: 10px; } .trait-card { padding: 16px 12px; } }

/* ── EDUCATION CARDS — Image 1 Style ── */
.edu-grid-mh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.edu-card-mh {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edu-card-mh:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.edu-card-mh-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 4px;
}

.edu-icon-mh {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.edu-card-mh h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}

.edu-date-mh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

.edu-college-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
  line-height: 1.4;
}
.edu-college-name:hover { text-decoration: underline; }

.edu-location-mh {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.edu-desc-mh {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}

.edu-overview-mh {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}
.edu-overview-mh strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.edu-overview-mh ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
.edu-overview-mh ul li {
  font-size: 0.82rem;
  color: #6366f1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.5;
}
.edu-overview-mh ul li::before {
  content: '•';
  color: #6366f1;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

.edu-courses-mh strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.edu-courses-mh p {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}

/* Dark mode education */
[data-theme="dark"] .edu-card-mh { background: #1e293b; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .edu-overview-mh { background: #0f172a; }

/* Mobile education */
@media (max-width: 768px) {
  .edu-grid-mh { grid-template-columns: 1fr; gap: 16px; }
  .edu-card-mh { padding: 20px; }
}


/* Trait card — glow on HOVER only */
.trait-card:hover {
  background: linear-gradient(135deg, #fef9c3 0%, #fce7f3 100%);
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(249,115,22,0.18);
  transform: translateY(-4px) scale(1.03);
}
.trait-card:hover .trait-icon-mh { color: #f97316; }
.trait-card:hover strong { color: #1e293b; }

/* Remove active state — no longer needed */
.trait-card.active {
  background: var(--white);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transform: none;
}

[data-theme="dark"] .trait-card:hover {
  background: linear-gradient(135deg, rgba(254,249,195,0.08) 0%, rgba(252,231,243,0.08) 100%);
}

/* ── EXPERIENCE PANEL SCROLLBAR (Image 2) ── */
.role-details {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  border-radius: 20px;
}
.role-details::-webkit-scrollbar { width: 5px; }
.role-details::-webkit-scrollbar-track { background: transparent; }
.role-details::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.role-details::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

[data-theme="dark"] .role-details {
  scrollbar-color: #334155 transparent;
}
[data-theme="dark"] .role-details::-webkit-scrollbar-thumb { background: #334155; }
[data-theme="dark"] .role-details::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ─────────────────────────────────────────
   DARK MODE CONTRAST & VISIBILITY FIXES
───────────────────────────────────────── */

/* 1. Ensure trait cards have distinct background and border in dark mode */
[data-theme="dark"] .trait-card {
  background: #182232 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 2. Fix Card Title Text Visibility (e.g., "Multi-Agent AI", "Computer Vision") */
[data-theme="dark"] .trait-card strong {
  color: #f8fafc !important; /* Bright high-contrast white/slate */
  font-weight: 700;
  opacity: 1 !important;
}

/* 3. Fix Subtitle Text Visibility (e.g., "LangGraph, LangChain, ReAct") */
[data-theme="dark"] .trait-card span {
  color: #94a3b8 !important; /* Crisp, readable light gray */
  opacity: 1 !important;
}

/* 4. Fix Trait Icon Colors and Visibility */
[data-theme="dark"] .trait-icon-mh {
  color: #fb923c !important; /* Bright, glowing orange for high contrast */
  filter: drop-shadow(0 2px 8px rgba(251, 146, 60, 0.3));
}

/* 5. High-contrast Dark Mode Hover Effect */
[data-theme="dark"] .trait-card:hover {
  background: linear-gradient(135deg, #1e293b 0%, #2a374e 100%) !important;
  border-color: #fb923c !important;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 15px rgba(251, 146, 60, 0.2);
}

[data-theme="dark"] .trait-card:hover strong {
  color: #ffffff !important;
}

[data-theme="dark"] .trait-card:hover span {
  color: #cbd5e1 !important;
}

/* 6. Fix for SVG / Flask / Image-based icons inside dark theme */
[data-theme="dark"] .skill-icon-item img,
[data-theme="dark"] .edu-icon-mh,
[data-theme="dark"] .trait-icon-mh svg {
  filter: brightness(1.2) contrast(1.1);
}