/* ====================================================================
   Sameer Shaik Portfolio - Full UI/UX Revamp
   Theme: Premium Dark | Space Grotesk + DM Sans
==================================================================== */

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  --primary-bg: #F8FAFC;
  --secondary-bg: #FFFFFF;
  --card-bg: rgba(255, 255, 255, 0.7);
  --accent-1: #6366F1;
  --accent-2: #8B5CF6;
  --accent-3: #06B6D4;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #06B6D4 100%);
  --accent-gradient-alt: linear-gradient(135deg, #06B6D4 0%, #6366F1 100%);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-color: rgba(99, 102, 241, 0.15);
  --border-subtle: #E2E8F0;
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --section-padding: 6rem 0;
  --container-width: 1200px;
  --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(99, 102, 241, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(99, 102, 241, 0.15), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-blur: blur(20px);
}

[data-theme="dark"] {
  /* Carbon Black Theme */
  --primary-bg: #000000;
  /* Pure black */
  --secondary-bg: #0a0a0a;
  /* Near black - subtle elevation */
  --card-bg: rgba(10, 10, 10, 0.85);
  /* Elevated carbon cards */
  --text-primary: #ffffff;
  /* Pure white - max contrast */
  --text-secondary: #e5e5e5;
  /* Neutral 200 - readable secondary */
  --text-muted: #a3a3a3;
  /* Neutral 400 - muted text */
  --border-color: rgba(31, 31, 31, 0.8);
  /* Subtle borders */
  --border-subtle: #1f1f1f;
  --success-color: #4ade80;
  /* Green 400 */
  --warning-color: #fbbf24;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(96, 165, 250, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(96, 165, 250, 0.1);
  --shadow-glow: 0 0 40px rgba(96, 165, 250, 0.2);
  --glass-bg: rgba(0, 0, 0, 0.85);
  --glass-border: rgba(31, 31, 31, 0.9);
  /* Override accent gradient to use blue/sky/green for dark mode */
  --accent-1: #60a5fa;
  /* Blue 400 */
  --accent-2: #38bdf8;
  /* Sky 400 */
  --accent-3: #4ade80;
  /* Green 400 */
  --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #4ade80 100%);
  --accent-gradient-alt: linear-gradient(135deg, #4ade80 0%, #60a5fa 100%);
}

/* ─── Reset & Base ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── Scroll Progress ────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ─── Custom Cursor ──────────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent-1);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, opacity 0.3s;
}

.cursor-follower {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s, opacity 0.3s;
}

@media (hover: none) {

  .cursor-dot,
  .cursor-follower {
    display: none;
  }
}

/* ─── Utilities ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-padding);
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4rem;
  gap: 0.25rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.btn-block {
  width: 100%;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.logo-accent {
  color: var(--accent-2);
}

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

.nav-list {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero Section ───────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-drift 12s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.15);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.1);
  bottom: -50px;
  left: -100px;
  animation-delay: 4s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(139, 92, 246, 0.12);
  top: 40%;
  left: 40%;
  animation-delay: 8s;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-height: 2.2rem;
  overflow: visible;
  white-space: nowrap;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-1);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
  border-radius: 1px;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: ring-spin linear infinite;
}

.ring-1 {
  inset: -12px;
  border-top-color: var(--accent-1);
  border-right-color: var(--accent-1);
  animation-duration: 6s;
}

.ring-2 {
  inset: -24px;
  border-bottom-color: var(--accent-2);
  border-left-color: var(--accent-2);
  animation-duration: 10s;
  animation-direction: reverse;
}

.ring-3 {
  inset: -38px;
  border-top-color: rgba(6, 182, 212, 0.4);
  border-right-color: rgba(6, 182, 212, 0.4);
  animation-duration: 15s;
}

.hero-photo-placeholder {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.initials {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
}

.floating-badge {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

.badge-1 {
  top: 5%;
  left: -30px;
  animation-delay: 0s;
}

.badge-2 {
  bottom: 10%;
  right: -30px;
  animation-delay: 2s;
}

.badge-3 {
  top: 55%;
  left: -40px;
  animation-delay: 4s;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce-scroll 2.5s ease-in-out infinite;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-1);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

/* ─── About Section ──────────────────────────────────────────────── */
.about-section {
  background: var(--secondary-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-1);
}

.stat-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Skills Section ─────────────────────────────────────────────── */
.skills-section {
  background: var(--primary-bg);
}

.skills-category {
  margin-bottom: 3.5rem;
}

.category-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent-gradient);
  border-radius: 2px;
}

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

.skill-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-1);
}

.skill-card:hover::after {
  opacity: 0.05;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

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

/* ─── Experience Section ─────────────────────────────────────────── */
.experience-section {
  background: var(--secondary-bg);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-3));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 70px;
}

.timeline-dot {
  position: absolute;
  left: 15px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--accent-gradient);
  border-radius: 50%;
  border: 3px solid var(--secondary-bg);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.timeline-content {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.timeline-content:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-1);
}

.timeline-company-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.company-logo-stub {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.role-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.company-name {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.duration-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-1);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  white-space: nowrap;
}

.timeline-location {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 1rem;
}

.timeline-desc ul {
  list-style: none;
}

.timeline-desc li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeline-desc li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-1);
  font-size: 0.75rem;
  top: 0.15rem;
}

/* ─── Projects Section ───────────────────────────────────────────── */
.projects-section {
  background: var(--primary-bg);
}

.projects-filter {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  backdrop-filter: var(--glass-blur);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.project-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transform-style: preserve-3d;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-1);
}

.project-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-preview-img {
  transform: scale(1.06);
}

.project-preview-gradient {
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-preview-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.project-preview-icon {
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.project-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.project-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-achievements {
  margin-bottom: 1.5rem;
  flex: 1;
}

.achievement-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-icon {
  color: var(--success-color);
  min-width: 16px;
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.project-actions {
  margin-top: auto;
}

.btn-card {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-card:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.05);
}

/* ─── Education Section ──────────────────────────────────────────── */
.education-section {
  background: var(--secondary-bg);
}

.education-timeline {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.edu-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px 0 0 2px;
}

.edu-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-1);
}

.edu-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.edu-details h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.degree {
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.edu-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.edu-meta span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cgpa-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ─── Research Section ───────────────────────────────────────────── */
.research-section {
  background: var(--primary-bg);
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.col-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
}

.col-title svg {
  color: var(--accent-1);
}

.research-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.research-card:hover {
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.research-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.research-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.2);
}

/* ─── Certifications ─────────────────────────────────────────────── */
.certifications-section {
  background: var(--secondary-bg);
}

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

.cert-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.cert-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.cert-card>* {
  position: relative;
  z-index: 1;
}

.cert-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-1);
}

.cert-card:hover::after {
  opacity: 0.06;
}

.cert-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.cert-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.cert-issuer {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Contact Section ────────────────────────────────────────────── */
.contact-section {
  background: var(--secondary-bg);
  position: relative;
  overflow: hidden;
}

.contact-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb-c1 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.08);
  top: -100px;
  right: 0;
  filter: blur(80px);
  border-radius: 50%;
  position: absolute;
}

.orb-c2 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.06);
  bottom: 0;
  left: -50px;
  filter: blur(60px);
  border-radius: 50%;
  position: absolute;
}

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

.contact-section .section-title {
  color: var(--text-primary);
}

.contact-section .section-subtitle {
  color: var(--text-muted);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
}

/* Floating label form */
.contact-form {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}

.form-group {
  position: relative;
  margin-bottom: 1.75rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--primary-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
  position: absolute;
  left: 1rem;
  top: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
  pointer-events: none;
  background: transparent;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
  top: 0.2rem;
  font-size: 0.72rem;
  color: var(--accent-1);
  font-weight: 600;
}

textarea.form-input {
  padding-top: 1.5rem;
  resize: vertical;
  min-height: 120px;
}

.error-msg {
  color: #EF4444;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.form-status {
  margin-top: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--accent-1);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.contact-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.contact-details h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.contact-details a,
.contact-details p {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-details a:hover {
  color: var(--accent-1);
}

.contact-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: var(--primary-bg);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.footer-left p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

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

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

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

.back-to-top {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 1rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  position: relative;
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: #EF4444;
  color: #fff;
  border-color: #EF4444;
}

.modal-body {
  padding: 2.5rem;
}

/* ─── Animations & Keyframes ─────────────────────────────────────── */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-18px) rotate(1deg);
  }
}

@keyframes orb-drift {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.7;
  }
}

@keyframes bounce-scroll {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@keyframes scroll-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(12px);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ─── Scroll Reveal Animations ───────────────────────────────────── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-up-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.animate-fade-in {
  opacity: 0;
  animation: fade-in-only 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade-up-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-only {
  to {
    opacity: 1;
  }
}

.reveal-left,
.reveal-right,
.reveal-up,
.reveal-item {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-item {
  transform: translateY(25px);
  transition-delay: var(--stagger, 0s);
}

.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* ─── Media Queries ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-description {
    margin: 0 auto 2.5rem;
    max-width: 560px;
  }

  .hero-cta,
  .hero-socials {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-photo-wrapper {
    width: 260px;
    height: 260px;
  }

  .hero-photo-placeholder {
    width: 240px;
    height: 240px;
  }

  .badge-1 {
    left: 0;
  }

  .badge-2 {
    right: 0;
  }

  .badge-3 {
    left: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

/* ================================================================
   📱 MOBILE — 768px
   ================================================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 0;
  }

  /* ── Nav ── */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(80vw, 320px);
    height: 100dvh;
    background: var(--secondary-bg);
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1.5rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
    box-shadow: -10px 0 60px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  /* Backdrop overlay when menu open */
  .nav-menu::before {
    content: '';
    position: fixed;
    inset: 0;
    right: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu.active::before {
    right: min(80vw, 320px);
    opacity: 1;
    pointer-events: all;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 0.85rem 1rem;
    display: block;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .sm-hidden {
    display: none !important;
  }

  /* ── Hero ── */
  .hero-section {
    padding-top: 80px;
    min-height: 100dvh;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 1.5rem 0 3rem;
  }

  .hero-visual {
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-photo-wrapper {
    width: 200px;
    height: 200px;
  }

  .hero-photo-placeholder {
    width: 180px;
    height: 180px;
  }

  /* Badges: keep positioned around photo (looks great per design) */
  .floating-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    gap: 0.35rem;
  }

  .hero-name {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-tagline {
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    justify-content: center;
    white-space: nowrap;
    overflow: visible;
  }

  .hero-description {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  /* ── Stats ── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  /* ── Skills ── */
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .skill-card {
    padding: 1rem 0.75rem;
    font-size: 0.82rem;
  }

  .skill-icon {
    font-size: 1.6rem;
  }

  /* ── Projects ── */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }

  /* ── Timeline ── */
  .timeline::before {
    left: 14px;
  }

  .timeline-item {
    padding-left: 48px;
  }

  .timeline-dot {
    left: 5px;
    width: 18px;
    height: 18px;
  }

  .timeline-company-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* ── Education ── */
  .edu-card {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .edu-icon {
    font-size: 2rem;
  }

  /* ── Research ── */
  .research-grid {
    grid-template-columns: 1fr;
  }

  /* ── Certifications ── */
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* ── Contact ── */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .contact-info-cards {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  /* ── Footer ── */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links,
  .footer-right {
    justify-content: center;
  }

  /* ── Modal ── */
  .modal-container {
    width: 95vw;
    max-height: 90dvh;
    margin: 1rem;
    border-radius: var(--radius-md);
  }

  .modal-body {
    padding: 1.25rem;
  }

  /* ── Disable heavy effects on touch ── */
  .cursor-dot,
  .cursor-follower {
    display: none !important;
  }

  .floating-badge {
    animation: none !important;
    transform: none !important;
  }
}

/* ================================================================
   📱 SMALL MOBILE — 480px
   ================================================================ */
@media (max-width: 480px) {
  :root {
    --section-padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-name {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }

  /* Stats: single column on very small screens */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Skills: 2 columns */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Certs: 1 column */
  .certs-grid {
    grid-template-columns: 1fr;
  }

  /* Projects: 1 column */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-preview {
    height: 160px;
  }

  /* Research: 1 column */
  .research-grid {
    grid-template-columns: 1fr;
  }

  /* Buttons full-width */
  .hero-cta .btn {
    width: 100%;
    max-width: 100%;
  }

  /* Nav actions hidden on tiny screens */
  .nav-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  /* Timeline tighter */
  .timeline-item {
    padding-left: 40px;
  }

  /* Modal full-screen on tiny devices */
  .modal-container {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
}

/* ── Touch device: disable parallax & cursor ── */
@media (hover: none) {

  .cursor-dot,
  .cursor-follower {
    display: none !important;
  }

  /* Disable tilt & magnetic on touch */
  .project-card {
    transform: none !important;
  }

  /* Keep floating badges visible but static */
  .floating-badge {
    animation: none !important;
    transform: none !important;
  }

  /* Skill cards: no float animation on touch */
  .skill-card {
    animation: none !important;
  }
}

/* ================================================================
   ✨ EXTENDED ANIMATIONS BLOCK
   ================================================================ */

/* ─── 1. Page Load Body Fade-in ─────────────────────────────── */
@keyframes body-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body {
  animation: body-enter 0.6s ease forwards;
}

/* ─── 2. Hero animate-fade-up (staggered via --delay) ────────── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(32px);
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.animate-fade-in {
  opacity: 0;
  animation: fade-in-only 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-only {
  to {
    opacity: 1;
  }
}

/* ─── 3. Section Title (no shimmer — removed due to layout conflict) ── */
.section-title {
  position: relative;
}

/* ─── 4. Char-split reveal (JS adds .char-reveal to each char) ── */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) rotateX(-40deg);
  animation: char-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--char-delay, 0s);
}

@keyframes char-in {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* ─── 5. Spotlight sweep on cards ────────────────────────────── */
.project-card,
.skill-card,
.stat-card,
.cert-card,
.edu-card,
.timeline-content {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
}

.project-card::after,
.skill-card::after,
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 180px at var(--mx) var(--my),
      rgba(255, 255, 255, 0.06) 0%,
      transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: inherit;
}

.project-card:hover::after,
.skill-card:hover::after,
.stat-card:hover::after {
  opacity: 1;
}

/* ─── 6. Gradient border pulse on cards ──────────────────────── */
@keyframes border-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15), var(--shadow-md);
  }

  50% {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4), var(--shadow-lg);
  }
}

.project-card:hover {
  animation: border-pulse 2s ease-in-out infinite;
}

/* ─── 7. Floating wave on skill cards ────────────────────────── */
.skill-card:nth-child(odd) {
  animation: float-a 4s ease-in-out infinite;
}

.skill-card:nth-child(even) {
  animation: float-b 4.5s ease-in-out infinite;
}

@keyframes float-a {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes float-b {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-9px);
  }
}

/* Pause float on hover so tilt works cleanly */
.skill-card:hover {
  animation-play-state: paused;
}

/* ─── 8. Section blur-fade entrance ──────────────────────────── */
.reveal-left,
.reveal-right,
.reveal-up,
.reveal-item {
  filter: blur(4px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.revealed {
  opacity: 1 !important;
  transform: none !important;
  filter: blur(0) !important;
}

/* ─── 9. Ripple click effect on buttons ──────────────────────── */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-expand 0.55s linear;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

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

/* ─── 10. Magnetic button glow pulse ─────────────────────────── */
.btn-primary {
  transition: var(--transition), box-shadow 0.3s;
}

.btn-primary:hover {
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.15),
    0 0 24px rgba(99, 102, 241, 0.35),
    var(--shadow-lg);
}

/* ─── 11. Nav link animated underline ────────────────────────── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── 12. Social icon bounce on hover ────────────────────────── */
.social-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, border-color 0.3s;
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.12);
}

/* ─── 13. Typing cursor blink ────────────────────────────────── */
.cursor {
  display: inline-block;
  color: var(--accent-1);
  animation: cursor-blink 1s step-end infinite;
  font-weight: 300;
  margin-left: 2px;
}

@keyframes cursor-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ─── 14. Badge dot pulse ────────────────────────────────────── */
.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  position: relative;
}

.badge-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.4);
  animation: dot-ping 1.5s ease-out infinite;
}

@keyframes dot-ping {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ─── 15. Scroll indicator bounce ───────────────────────────── */
.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ─── 16. Timeline connector draw-in ────────────────────────── */
.timeline-item.revealed .timeline-dot {
  animation: dot-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dot-pop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* ─── 17. Stat card number count-up glow ────────────────────── */
.stat-card.revealed .stat-number {
  animation: number-glow 0.8s ease forwards;
}

@keyframes number-glow {
  0% {
    text-shadow: none;
  }

  50% {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  }

  100% {
    text-shadow: none;
  }
}

/* ─── 18. Gradient orb drift (hero background) ───────────────── */
.orb-1 {
  animation: orb-drift-a 18s ease-in-out infinite;
}

.orb-2 {
  animation: orb-drift-b 22s ease-in-out infinite;
}

.orb-3 {
  animation: orb-drift-c 26s ease-in-out infinite;
}

@keyframes orb-drift-a {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, -40px) scale(1.1);
  }

  66% {
    transform: translate(-40px, 60px) scale(0.95);
  }
}

@keyframes orb-drift-b {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-80px, 50px) scale(1.05);
  }

  66% {
    transform: translate(50px, -70px) scale(1.1);
  }
}

@keyframes orb-drift-c {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, 80px) scale(0.9);
  }
}

/* ─── 19. Photo ring spin variation ─────────────────────────── */
.ring-1 {
  animation: spin-cw 12s linear infinite;
}

.ring-2 {
  animation: spin-ccw 18s linear infinite;
}

.ring-3 {
  animation: spin-cw 24s linear infinite;
}

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

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

/* ─── 20. Reduced motion overrides ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}