/* ================== Root Variables ================== */
:root {
  /* Dark Theme Colors - Structured system */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1c1c1c;
  --text-primary: #f5f5f5;
  --text-secondary: #b3b3b3;
  /* Skills page dominant colors */
  --accent-primary: #0bd3ff;
  --accent-cyan: #0bd3ff;
  --accent-purple: #6c63ff;
  --accent-teal: #19d1c8;
  --border-subtle: #2a2a2a;
  
  /* Color Alternatives - Professional palette */
  --accent-blue: #0bd3ff;
  --accent-emerald: #10b981;
  
  /* Legacy support - map to new system */
  --bg: var(--bg-primary);
  --panel: var(--bg-secondary);
  --muted: var(--text-secondary);
  --text: var(--text-primary);
  --accent: var(--accent-primary);
  --accent-secondary: #0bd3ff;
  --accent-dark: #0891b2;
  --glass: rgba(255,255,255,0.04);
  --radius: 12px;
  --transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light {
  /* Light Theme Colors */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f1f1;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  /* Skills page dominant colors (adjusted for light mode) */
  --accent-primary: #0891b2;
  --accent-cyan: #0891b2;
  --accent-purple: #6c63ff;
  --accent-teal: #14b8a6;
  --border-subtle: #dddddd;
  
  /* Color Alternatives - Professional palette (adjusted for light mode) */
  --accent-blue: #0891b2;
  --accent-emerald: #059669;
  
  /* Legacy support */
  --bg: var(--bg-primary);
  --panel: var(--bg-secondary);
  --muted: var(--text-secondary);
  --text: var(--text-primary);
  --accent: var(--accent-primary);
  --accent-secondary: #0891b2;
  --accent-dark: #0e7490;
  --glass: rgba(0,0,0,0.03);
}

/* ================== Global Styles ================== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
svg,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.6rem);
}

/* ================== Header / Navigation ================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.site-header:not(:hover) {
  opacity: 0.98;
}

.nav-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}

.brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand .accent {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent-primary);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
}

.nav a.active::after {
  transform: translateX(-50%) scaleX(1);
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
  height: 3px;
}

.nav a:active {
  transform: translateY(0);
}

.contact-cta {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.4rem 0.8rem;
}

.icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: 6px;
}

.icon-btn:hover {
  color: var(--accent);
  background: var(--glass);
  transform: scale(1.1);
}

.menu-btn {
  display: none;
}

/* ================== Mobile Navigation ================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  padding: 2rem;
  z-index: 40;
  background: linear-gradient(180deg, rgba(3,7,12,0.95), rgba(3,7,12,0.98));
  transform: translateY(-100%);
  transition: transform 0.35s;
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateY(0);
}

.close-nav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  font-size: 2rem;
  color: var(--text);
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 3rem;
}

.mobile-links a {
  color: var(--text);
  font-size: 1.25rem;
  text-decoration: none;
  padding: 0.35rem 0;
}

/* ================== Hero Section ================== */
.hero {
  padding: 5rem 0;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  position: relative;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.4rem;
  align-items: center;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  margin: 0;
}

.lead {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  margin-top: 0.6rem;
}

.bio {
  color: var(--muted);
  margin-top: 1rem;
}

.hero-cta {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  transform: scale(1);
  will-change: transform;
}

.btn.primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 211, 255, 0.25);
}

.btn.primary:hover,
.btn.primary:focus {
  background: var(--accent-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(11, 211, 255, 0.35);
}

.btn.primary:active {
  transform: translateY(0) scale(1);
}

.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn.ghost:hover,
.btn.ghost:focus {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}

.btn.ghost:active {
  transform: translateY(0) scale(1);
}

/* Hero Card / Avatar */
.hero-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 550px;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  transform: scale(0.98);
  transition: var(--transition);
  will-change: transform;
}

.hero-card:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ✅ UPDATED IMAGE CONTAINER */
.hero-image-wrapper {
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}

.profile-img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

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

/* Stats in Hero Card */
.card-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 0;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}

.card-stats div {
  text-align: center;
}

.card-stats strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stats div:hover strong {
  color: var(--accent-primary);
}

/* ================== Features / Services ================== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  position: relative;
  transform: scale(0.98);
  opacity: 0.95;
}

.feature:nth-child(1) { border-left-color: var(--accent-primary); }
.feature:nth-child(2) { border-left-color: var(--accent-cyan); }
.feature:nth-child(3) { border-left-color: #4ecdc4; }
.feature:nth-child(4) { border-left-color: #ffe66d; }

.feature:hover,
.feature:focus-within {
  transform: translateX(2px) translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  background: var(--bg-tertiary);
  opacity: 1;
  border-color: var(--accent-primary);
}

.feature:active {
  transform: translateX(1px) translateY(-1px) scale(1.01);
}

.feature h3 {
  margin: 0 0 0.6rem 0;
}

/* ================== Projects ================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  transform: scale(1);
}

.section-header a:hover,
.section-header a:focus {
  color: var(--accent-primary);
  transform: scale(1.05) translateX(2px);
}

.projects-preview {
  padding: 5rem 0;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  display: flex;
  align-items: center;
}

.projects-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

/* Project Cards Grid - Horizontal Scroll */
.projects-preview {
  overflow-x: hidden;
}

.projects-preview .container {
  position: relative;
}

.projects-preview .project-grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2rem 0;
  margin-top: 2rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

.projects-preview .project-grid::-webkit-scrollbar {
  height: 8px;
}

.projects-preview .project-grid::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.projects-preview .project-grid::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.projects-preview .project-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

.projects-preview .project-card {
  flex: 0 0 350px;
  min-width: 350px;
  scroll-snap-align: start;
  transform: translateX(100px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  position: relative;
}

.projects-preview .project-card.scroll-visible {
  transform: translateX(0);
  opacity: 1;
}

.projects-preview .project-card.scroll-visible:hover {
  transform: translateX(0) translateY(-8px) scale(1.03);
  z-index: 10;
}

/* Different styles for each project card on scroll */
.projects-preview .project-card:nth-child(1).scroll-visible {
  transform: translateX(0) rotateY(-2deg);
  box-shadow: 0 12px 40px rgba(11, 211, 255, 0.2);
}

.projects-preview .project-card:nth-child(2).scroll-visible {
  transform: translateX(0) rotateY(1deg);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.projects-preview .project-card:nth-child(3).scroll-visible {
  transform: translateX(0) rotateY(-1deg);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.2);
}

.projects-preview .project-card:nth-child(4).scroll-visible {
  transform: translateX(0) rotateY(2deg);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
}

.projects-preview .project-card:nth-child(5).scroll-visible {
  transform: translateX(0) rotateY(-1.5deg);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

/* ✅ UPDATED PROJECT CARD & IMAGE HANDLING */
.project-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  transform: scale(0.97);
  opacity: 0.92;
  will-change: transform;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(11, 211, 255, 0.15);
  border-color: var(--accent-primary);
  opacity: 1;
}

.project-card:active {
  transform: translateY(-2px) scale(1.01);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover img,
.project-card:focus-within img {
  transform: scale(1.05);
}

.project-card .project-content {
  padding: 1.25rem;
}

/* ================== Call to Action ================== */
.cta {
  padding: 4rem 0;
  min-height: 100vh;
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

/* ================== Skills Section ================== */
.skills-section {
  padding: 4rem 0;
}

.skills-section h1 {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  transform: scale(0.97);
  opacity: 0.93;
  will-change: transform;
}

.skill-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.skill-card:hover,
.skill-card:focus-within {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: var(--accent-primary);
  opacity: 1;
}

.skill-card:active {
  transform: translateY(-2px) scale(1.01);
}

/* ================== Longread Section ================== */
.longread {
  margin-top: 2rem;
  text-align: center;
}

.longread h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.longread p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ================== Footer ================== */
.site-footer {
  --footer-bg: #0f172a;
  --footer-surface: #1b2638;
  --footer-border: rgba(148, 163, 184, 0.18);
  position: relative;
  overflow: hidden;
  padding: 3.3rem 1rem 1.1rem;
  background:
    radial-gradient(900px 240px at 8% 0%, rgba(88, 166, 255, 0.14), transparent 62%),
    radial-gradient(860px 260px at 92% 100%, rgba(63, 185, 80, 0.12), transparent 66%),
    linear-gradient(180deg, var(--footer-bg) 0%, #0b1220 100%);
  color: var(--text-primary);
  border-top: 1px solid var(--footer-border);
}

.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  left: -5%;
  width: 110%;
  pointer-events: none;
  z-index: 0;
}

.site-footer::before {
  bottom: 0;
  height: 130px;
  opacity: 0.34;
  background:
    radial-gradient(120% 90px at 10% 100%, rgba(215, 58, 115, 0.52) 0%, transparent 62%),
    radial-gradient(120% 95px at 45% 100%, rgba(232, 122, 38, 0.4) 0%, transparent 62%),
    radial-gradient(120% 95px at 78% 100%, rgba(248, 186, 46, 0.36) 0%, transparent 64%),
    radial-gradient(120% 88px at 96% 100%, rgba(88, 166, 255, 0.28) 0%, transparent 64%);
  animation: footerWaveShift 14s ease-in-out infinite alternate;
}

.site-footer::after {
  bottom: 0;
  height: 96px;
  opacity: 0.22;
  background:
    radial-gradient(110% 80px at 16% 100%, rgba(188, 140, 255, 0.42) 0%, transparent 66%),
    radial-gradient(110% 80px at 58% 100%, rgba(45, 212, 191, 0.28) 0%, transparent 66%),
    radial-gradient(110% 80px at 90% 100%, rgba(248, 186, 46, 0.22) 0%, transparent 66%);
  animation: footerWaveShift 18s ease-in-out infinite alternate-reverse;
}

@keyframes footerWaveShift {
  0% {
    transform: translateX(-1.2%) translateY(0);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: translateX(0.8%) translateY(-2px);
    filter: hue-rotate(9deg);
  }
  100% {
    transform: translateX(2%) translateY(0);
    filter: hue-rotate(-6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer::before,
  .site-footer::after {
    animation: none;
  }
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(27, 38, 56, 0.72), rgba(13, 20, 36, 0.66));
  backdrop-filter: blur(6px);
}

.footer-grid h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #e6edf3;
}

.footer-grid a {
  color: #9fb0c8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #58a6ff;
}

.site-footer .footer-grid > div:last-child a {
  color: #dbe8ff;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(88, 166, 255, 0.14);
}

.site-footer .footer-grid > div:last-child a:focus-visible {
  outline: 2px solid rgba(88, 166, 255, 0.8);
  outline-offset: 3px;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
}

.copyright {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 1.15rem;
  font-size: 0.9rem;
  color: #8ea0b8;
}

/* ================== Uniform Section Surfaces ================== */
main {
  background:
    radial-gradient(1000px 520px at 14% -180px, rgba(59, 130, 246, 0.11), transparent 62%),
    radial-gradient(900px 420px at 88% 12%, rgba(16, 185, 129, 0.08), transparent 64%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 48%, #0c1424 100%);
}

main > section:not(#hero):not(.terminal-section):not(.contact-section):not(.about-interactive) {
  padding: clamp(3.2rem, 6vw, 5rem) 0;
  min-height: auto;
  background: transparent;
}

main > section:not(#hero):not(.terminal-section):not(.contact-section):not(.about-interactive) > .container {
  max-width: 1280px;
  padding: clamp(1.25rem, 2.1vw, 2rem);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.56));
  box-shadow: 0 16px 34px rgba(2, 8, 22, 0.24);
  backdrop-filter: blur(6px);
}

/* Keep the two-panel hero as the visual source of truth */
#hero .readme-hero {
  max-width: 1280px;
}

/* ================== Forms ================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
}

input, textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
  transform: scale(1);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(11, 211, 255, 0.1);
}

label {
  display: block;
  margin-top: 0.8rem;
  color: var(--muted);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.form-status {
  margin-top: 0.6rem;
  color: var(--muted);
}

/* ================== Scroll Reveal / Animations ================== */
/* ================== Scroll Reveal / Motion System ================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ================== Chips / Tags ================== */
.chip {
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  transform: scale(1);
}

.chip:hover,
.chip:focus {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.chip.active {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.05);
}

.chip:active {
  transform: scale(1.02);
}

/* ================== Responsive ================== */
@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-block;
  }

  .hero {
    min-height: auto;
    padding: 3.2rem 0;
  }

  .projects-preview,
  .cta,
  .skills-section {
    min-height: auto;
    padding: 3.25rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .card-stats {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* ✅ Responsive image scaling */
  .project-card img {
    height: 160px;
  }
  .hero-image-wrapper {
    min-height: 300px;
  }
  
  .profile-img {
    min-height: 300px;
  }
  
  .hero-card {
    min-height: 400px;
  }
  
  /* Adjust section heights on mobile */
  .hero {
    min-height: 100vh;
    padding: 3rem 0;
  }
  
  .intro {
    min-height: 100vh;
    padding: 4rem 0;
  }
  
  .projects-preview {
    min-height: 100vh;
    padding: 4rem 0;
  }
  
  .about-interactive {
    min-height: 100vh;
  }
  
  .cta {
    min-height: 100vh;
    padding: 3rem 0;
  }
  
  /* Horizontal scroll projects on mobile */
  .projects-preview .project-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
  
  /* Remove style variations on mobile for cleaner look */
  [data-reveal].style-variation-1,
  [data-reveal].style-variation-2,
  [data-reveal].style-variation-3,
  [data-reveal].style-variation-4 {
    border: none;
    padding: inherit;
    background: transparent;
  }
}

/* ================== Scroll Progress Indicator ================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-primary);
  z-index: 1000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(11, 211, 255, 0.5);
}

/* ================== Navigation Dots ================== */
.nav-dots {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
  transform: scale(1);
  opacity: 0.6;
}

.nav-dot:hover {
  transform: scale(1.3);
  opacity: 1;
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.nav-dot.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: scale(1.4);
  opacity: 1;
  box-shadow: 0 0 12px rgba(11, 211, 255, 0.4);
}

.nav-dot:active {
  transform: scale(1.2);
}

/* Hide navigation dots on mobile */
@media (max-width: 900px) {
  .nav-dots {
    display: none;
  }
}

/* ================== Enhanced Scroll Animations ================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible,
[data-reveal].scroll-styled {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Different style variations for sections on scroll */
[data-reveal].style-variation-1 {
  border: none;
  background: transparent;
}

[data-reveal].style-variation-2 {
  border: none;
  background: transparent;
}

[data-reveal].style-variation-3 {
  border: none;
  background: transparent;
}

[data-reveal].style-variation-4 {
  border: none;
  background: transparent;
}

/* Card animations */
.feature,
.cert-card,
[class*="project-card"] {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature.card-visible,
.cert-card.card-visible,
[class*="project-card"].card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .feature,
  .cert-card,
  [class*="project-card"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================== Command Palette ================== */
.command-palette {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.command-palette.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.command-palette-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.command-palette-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.2s ease;
}

.command-palette.open .command-palette-container {
  transform: translateY(0) scale(1);
}

.command-palette-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.command-palette-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.command-palette-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(11, 211, 255, 0.1);
}

.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.command-palette-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  transform: scale(1);
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: var(--bg-tertiary);
  transform: translateX(4px) scale(1.01);
}

.command-palette-item.selected {
  border-left: 3px solid var(--accent-primary);
}

.command-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.command-label {
  flex: 1;
  font-size: 0.95rem;
}

.command-palette-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.command-palette-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-secondary);
  gap: 1rem;
}

/* ================== Interactive Elements ================== */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.keyboard-navigation *:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Make all interactive elements more responsive */
[role="button"],
button,
a,
.card,
.feature,
.project-card {
  cursor: pointer;
  user-select: none;
}

[role="button"]:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ================== Global Responsive Hardening ================== */
@media (max-width: 1024px) {
  .container {
    width: min(100% - 2rem, 1100px);
    padding: 1rem;
  }

  .nav-grid {
    gap: 0.7rem;
  }
}

@media (max-width: 768px) {
  html,
  body {
    font-size: 15px;
  }

  .container {
    width: min(100% - 1.4rem, 1100px);
    padding: 0.85rem;
  }

  .section-header h1,
  .section-header h2 {
    line-height: 1.2;
  }

  .hero,
  .intro,
  .projects-preview,
  .about-interactive,
  .cta,
  .services,
  .why-choose,
  .terminal-section {
    min-height: auto !important;
    height: auto !important;
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  .hero-grid,
  .footer-grid,
  .contact-grid,
  .service-grid,
  .why-grid,
  .posts,
  .project-grid,
  .features {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .about-actions,
  .project-links,
  .filters,
  .socials,
  .cta-actions {
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .project-thumb,
  .post.card img {
    height: 170px !important;
  }

  .hero-image-wrapper,
  .profile-img,
  .hero-card {
    min-height: auto !important;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 1rem);
    padding: 0.75rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  .btn,
  .chip {
    min-height: 36px;
  }

  .project-thumb,
  .post.card img {
    height: 155px !important;
  }

  .mobile-nav .mobile-links a {
    padding: 0.75rem 0.85rem;
  }
}
