/* ==========================================================================
   RAHUL GUPTA - PORTFOLIO DESIGN SYSTEM
   Modern, Sleek, Futuristic Dark Theme with Glassmorphism & Micro-animations
   ========================================================================== */

:root {
  /* Colors */
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(22, 33, 59, 0.88);
  --bg-card-solid: #0d1527;
  --bg-glass: rgba(255, 255, 255, 0.04);

  --border-light: rgba(255, 255, 255, 0.09);
  --border-accent: rgba(0, 240, 255, 0.35);
  --border-glow: rgba(139, 92, 246, 0.4);

  --accent-cyan: #00f0ff;
  --accent-cyan-rgb: 0, 240, 255;
  --accent-purple: #8b5cf6;
  --accent-purple-rgb: 139, 92, 246;
  --accent-pink: #ec4899;
  --accent-green: #10b981;

  --gradient-primary: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-cyan-purple: linear-gradient(135deg, #00f0ff 0%, #7c3aed 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(0, 240, 255, 0.15) 0%, transparent 70%);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8292a8;
  --text-accent: #38bdf8;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(0, 240, 255, 0.22);
  --shadow-glow-purple: 0 0 35px rgba(139, 92, 246, 0.25);

  /* Layout & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-secondary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Light FX */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  animation: floatOrb 22s infinite alternate ease-in-out;
}

.glow-orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #00f0ff, #3b82f6);
  top: -150px;
  right: -100px;
}

.glow-orb-2 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #8b5cf6, #ec4899);
  bottom: 10%;
  left: -200px;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}

.glow-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #00d4ff, #10b981);
  top: 45%;
  right: 15%;
  opacity: 0.15;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, 40px) scale(1.08);
  }

  100% {
    transform: translate(-40px, 80px) scale(0.95);
  }
}

/* Mouse Follower Glow (Desktop) */
.mouse-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  margin-top: -240px;
  margin-left: -240px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(139, 92, 246, 0.03) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
  will-change: transform;
}

/* Layout Utilities */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

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

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(7, 10, 18, 0.92);
  border-bottom-color: rgba(0, 240, 255, 0.15);
  box-shadow: var(--shadow-md);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-cyan-purple);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
}

.logo-text span {
  color: var(--accent-cyan);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-fast);
  border-radius: var(--radius-full);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-cyan-purple);
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
  transition: var(--transition-smooth);
}

.btn-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.45);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Hero Section */
#hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 3.5rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #34d399;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.hero-title .name-highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-role-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent-cyan);
  font-weight: 600;
}

.hero-role-wrapper .role-prefix {
  color: var(--accent-purple);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #070a12;
  background: var(--accent-cyan);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  color: #fff;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

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

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

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

.avatar-wrapper {
  position: relative;
  width: min(380px, 90vw);
  aspect-ratio: 1 / 1.08;
  z-index: 2;
}

.avatar-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 36px;
  background: var(--gradient-primary);
  filter: blur(20px);
  opacity: 0.55;
  animation: pulseGlow 6s infinite alternate ease-in-out;
  z-index: 0;
}

@keyframes pulseGlow {
  0% {
    opacity: 0.45;
    transform: scale(0.98);
  }

  100% {
    opacity: 0.75;
    transform: scale(1.02);
  }
}

.avatar-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: contrast(1.04) brightness(1.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-card:hover .avatar-img {
  transform: scale(1.04);
}

/* Floating Tech Chips */
.floating-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(13, 21, 39, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  animation: floatChip 5s infinite alternate ease-in-out;
}

.chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
}

.chip-1 {
  top: 10%;
  left: -20px;
  animation-delay: 0s;
}

.chip-2 {
  bottom: 12%;
  right: -25px;
  animation-delay: 1.5s;
}

.chip-3 {
  bottom: -15px;
  left: 15%;
  animation-delay: 3s;
}

@keyframes floatChip {
  0% {
    transform: translateY(0);
  }

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

/* Metrics Bar */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
}

.metric-item {
  text-align: center;
  border-right: 1px solid var(--border-light);
}

.metric-item:last-child {
  border-right: none;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-text {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
}

.highlight-box {
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.highlight-box:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

.highlight-icon {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.highlight-box h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.highlight-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Experience Section */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
}

.timeline-card {
  position: relative;
  margin-left: 55px;
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(14px);
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.timeline-dot {
  position: absolute;
  left: -43px;
  top: 28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

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

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.timeline-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeline-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.timeline-body li {
  position: relative;
  padding-left: 1.4rem;
}

.timeline-body li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 1rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

/* Skills Section */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(14px);
  transition: var(--transition-smooth);
}

.skill-category-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-purple);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.category-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 700;
}

.skills-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.skill-pill:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-2px);
}

/* Projects Section & Filter Tabs */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
  background: var(--accent-cyan);
  color: #070a12;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

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

/* Modern Project Card */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: var(--transition-smooth);
  position: relative;
}

.project-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 240, 255, 0.15);
}

.project-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1527;
  overflow: hidden;
}

.project-img {
  padding: 13px;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-badge-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  z-index: 2;
}

.project-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.8rem;
  gap: 1rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-accent);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Demo Credentials Box */
.demo-creds-box {
  background: rgba(0, 240, 255, 0.04);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.demo-creds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--accent-cyan);
}

.copy-creds-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  transition: color var(--transition-fast);
}

.copy-creds-btn:hover {
  color: var(--accent-cyan);
}

.demo-creds-content {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Card Action Buttons */
.project-actions {
  display: flex;
  gap: 0.8rem;
  padding-top: 0.5rem;
}

.btn-card-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-cyan);
  color: #070a12;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-card-primary:hover {
  background: #fff;
}

.btn-card-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-card-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-case-study {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-case-study:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-purple);
  color: #fff;
}

/* Project Detail Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal {
  position: relative;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: min(940px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.2rem;
}

.modal-backdrop.open .project-modal {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

/* Modal Screenshot Carousel */
.modal-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050811;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-light);
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #060a14;
  transition: opacity 0.25s ease;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 5;
}

.carousel-control:hover {
  background: var(--accent-cyan);
  color: #070a12;
  border-color: var(--accent-cyan);
}

.carousel-control.prev {
  left: 14px;
}

.carousel-control.next {
  right: 14px;
}

.carousel-counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  max-width: 60%;
  overflow-x: auto;
  padding: 4px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background: var(--accent-cyan);
  transform: scale(1.3);
}

.modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-project-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-project-subtitle {
  font-size: 1rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.modal-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.4rem 0 0.6rem;
}

.modal-text {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.75;
}

.modal-highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.modal-highlights-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.modal-highlights-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
}

.modal-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
}

.contact-cards-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-card-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.contact-card-item:hover {
  border-color: var(--accent-cyan);
  transform: translateX(6px);
  background: var(--bg-card-hover);
}

.contact-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-info-content h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.contact-info-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.copy-email-btn {
  margin-left: auto;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-email-btn:hover {
  background: var(--accent-cyan);
  color: #070a12;
  border-color: var(--accent-cyan);
}

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.contact-form-card h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-form-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(7, 10, 18, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  background: rgba(7, 10, 18, 0.9);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  background: rgba(5, 8, 15, 0.85);
  padding: 2.5rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

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

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand span {
  color: var(--accent-cyan);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

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

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

/* Active Development Banner */
.active-dev-banner {
  background: rgba(139, 92, 246, 0.1);
  border: 1px dashed rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.4rem 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dev-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dev-banner-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.dev-banner-label {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--accent-purple);
  font-weight: 600;
  text-transform: uppercase;
}

.dev-banner-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-top: 2px;
}

.dev-banner-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.dev-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .active-dev-banner {
    padding: 1rem 1.2rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .dev-banner-emoji {
    font-size: 1.4rem;
  }

  .dev-banner-label {
    font-size: 0.72rem;
  }

  .dev-banner-title {
    font-size: 0.95rem;
  }

  .dev-banner-status {
    font-size: 0.78rem;
    padding: 5px 12px;
  }
}

/* ==========================================================================
   HERO ENHANCEMENTS – Animated gradient border, typing cursor, staggered entry
   ========================================================================== */

/* Animated rotating gradient border on avatar card */
.avatar-card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 32px;
  background: conic-gradient(from 0deg, #00f0ff, #8b5cf6, #ec4899, #10b981, #00f0ff);
  z-index: -1;
  animation: rotateGradientBorder 5s linear infinite;
}

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

/* Typing cursor blink on the role line */
.hero-role-wrapper::after {
  content: '|';
  display: inline-block;
  color: var(--accent-cyan);
  font-weight: 300;
  animation: cursorBlink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Staggered fade-in for hero children */
.hero-content>* {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.7s ease forwards;
}

.hero-content>*:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-content>*:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-content>*:nth-child(3) {
  animation-delay: 0.35s;
}

.hero-content>*:nth-child(4) {
  animation-delay: 0.45s;
}

.hero-content>*:nth-child(5) {
  animation-delay: 0.55s;
}

.hero-content>*:nth-child(6) {
  animation-delay: 0.65s;
}

.hero-content>*:nth-child(7) {
  animation-delay: 0.75s;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-visual {
  animation: heroFadeIn 0.9s ease 0.3s forwards;
  opacity: 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS – Comprehensive mobile-first responsive design
   ========================================================================== */

/* ---- TABLET LANDSCAPE & BELOW (max-width: 1100px) ---- */
@media (max-width: 1100px) {
  .container {
    width: 94%;
  }

  .hero-grid {
    gap: 2.5rem;
  }

  .avatar-wrapper {
    width: min(320px, 80vw);
  }

  .floating-chip {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ---- TABLET PORTRAIT & BELOW (max-width: 992px) ---- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-content {
    align-items: center;
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-desc {
    margin-inline: auto;
  }

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

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

  .hero-role-wrapper {
    justify-content: center;
    flex-wrap: wrap;
  }

  .avatar-wrapper {
    width: min(280px, 70vw);
  }

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

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

  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .metric-item:nth-child(2) {
    border-right: none;
  }

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

  .project-filters {
    gap: 0.6rem;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.88rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }
}

/* ---- MOBILE LARGE & BELOW (max-width: 768px) ---- */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  /* -- Navigation full-screen overlay -- */
  nav {
    height: 68px;
  }

  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
    /* dynamic viewport for mobile browsers */
    background: rgba(7, 10, 18, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid var(--border-light);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    gap: 2rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    z-index: 99;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 10px 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-cta .btn-resume {
    display: none;
  }

  .nav-menu .btn-resume-mobile {
    display: block;
    margin-top: 1rem;
  }

  .nav-menu .btn-resume-mobile .btn-resume {
    display: inline-flex;
    font-size: 1rem;
    padding: 14px 30px;
  }

  /* -- Hero Mobile -- */
  #hero {
    min-height: auto;
    padding: 2rem 0 3rem;
  }

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

  .hero-role-wrapper {
    font-size: 0.95rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .avatar-wrapper {
    width: min(240px, 65vw);
  }

  .floating-chip {
    padding: 7px 12px;
    font-size: 0.75rem;
  }

  .chip-icon {
    width: 22px;
    height: 22px;
  }

  .chip-1 {
    left: -10px;
    top: 5%;
  }

  .chip-2 {
    right: -10px;
    bottom: 15%;
  }

  .chip-3 {
    left: 5%;
    bottom: -10px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 22px;
    font-size: 0.92rem;
    min-height: 48px;
    /* touch-friendly minimum */
  }

  .hero-actions {
    gap: 0.8rem;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  /* -- Metrics bar mobile -- */
  .metrics-bar {
    margin-top: 2.5rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    padding: 1.2rem;
  }

  .metric-number {
    font-size: 1.6rem;
  }

  .metric-label {
    font-size: 0.8rem;
  }

  /* -- Section general spacing -- */
  .section {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }

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

  .section-badge {
    font-size: 0.72rem;
    padding: 5px 12px;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  /* -- About -- */
  .about-text {
    font-size: 1rem;
  }

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

  .highlight-box {
    padding: 1.1rem;
  }

  .highlight-box h4 {
    font-size: 0.95rem;
  }

  .highlight-box p {
    font-size: 0.82rem;
  }

  /* -- Experience timeline -- */
  .timeline::before {
    left: 10px;
  }

  .timeline-card {
    margin-left: 35px;
    padding: 1.4rem;
  }

  .timeline-dot {
    left: -32px;
    width: 14px;
    height: 14px;
  }

  .timeline-header {
    flex-direction: column;
  }

  .timeline-role {
    font-size: 1.1rem;
  }

  .timeline-period {
    font-size: 0.78rem;
    align-self: flex-start;
  }

  /* -- Skills -- */
  .skills-categories {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .skill-category-card {
    padding: 1.4rem;
  }

  .skill-pill {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  /* -- Projects -- */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .project-filters {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .project-info {
    padding: 1.4rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-desc {
    font-size: 0.9rem;
  }

  .project-actions {
    gap: 0.6rem;
  }

  .btn-card-primary,
  .btn-card-secondary {
    min-height: 44px;
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  .btn-case-study {
    font-size: 0.82rem;
    min-height: 44px;
    padding: 10px;
  }

  .demo-creds-box {
    padding: 0.7rem 0.9rem;
    font-size: 0.78rem;
  }

  .demo-creds-content {
    font-size: 0.78rem;
    flex-direction: column;
    gap: 0.3rem;
  }

  /* -- Modal Full-screen mobile -- */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .project-modal {
    width: 100%;
    max-height: 95vh;
    max-height: 95dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.2rem;
    padding-top: 1rem;
  }

  .modal-project-title {
    font-size: 1.35rem;
  }

  .modal-project-subtitle {
    font-size: 0.9rem;
  }

  .modal-carousel {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
  }

  .carousel-control {
    width: 36px;
    height: 36px;
  }

  .carousel-control.prev {
    left: 8px;
  }

  .carousel-control.next {
    right: 8px;
  }

  .modal-close-btn {
    top: 0.8rem;
    right: 0.8rem;
    width: 36px;
    height: 36px;
  }

  .modal-section-title {
    font-size: 1.05rem;
    margin: 1rem 0 0.5rem;
  }

  .modal-text {
    font-size: 0.92rem;
  }

  .modal-highlights-list li {
    font-size: 0.88rem;
  }

  .modal-actions-bar {
    flex-direction: column;
    gap: 0.8rem;
  }

  .modal-actions-bar .btn-primary,
  .modal-actions-bar .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* -- Contact -- */
  .contact-form-card {
    padding: 1.8rem;
  }

  .contact-form-card h3 {
    font-size: 1.25rem;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 1rem;
    /* prevents iOS zoom on focus */
  }

  .contact-card-item {
    padding: 1.1rem;
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .contact-icon-box {
    width: 44px;
    height: 44px;
  }

  .contact-info-content h4 {
    font-size: 0.95rem;
  }

  .contact-info-content p {
    font-size: 0.82rem;
  }

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

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* -- Toast mobile -- */
  .toast-notice {
    bottom: 16px;
    right: 16px;
    left: 16px;
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}

/* ---- MOBILE SMALL (max-width: 600px) ---- */
@media (max-width: 600px) {
  .hero-grid {
    gap: 2rem;
  }

  .status-pill {
    font-size: 0.78rem;
    padding: 6px 14px;
  }

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

  .hero-role-wrapper {
    font-size: 0.88rem;
    text-align: center;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .avatar-wrapper {
    width: min(220px, 58vw);
  }

  /* Stack hero buttons vertically */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: unset;
    width: 100%;
  }

  .hero-socials {
    gap: 0.8rem;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }
}

/* ---- MOBILE XS (max-width: 480px) ---- */
@media (max-width: 480px) {
  .container {
    width: 96%;
  }

  .metrics-bar {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0;
  }

  .metric-item {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.9rem 0;
  }

  .metric-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .metric-number {
    font-size: 1.4rem;
  }

  .metric-label {
    font-size: 0.78rem;
  }

  .floating-chip {
    display: none;
    /* hide on very small screens for cleaner look */
  }

  .project-actions {
    flex-direction: column;
  }

  .btn-card-primary,
  .btn-card-secondary {
    width: 100%;
    justify-content: center;
  }

  .timeline-body li {
    font-size: 0.88rem;
  }

  .tag-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .category-header {
    gap: 10px;
  }

  .category-icon {
    width: 38px;
    height: 38px;
  }

  .category-title {
    font-size: 1.05rem;
  }
}

/* ---- MOBILE XXS (max-width: 360px) ---- */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-role-wrapper {
    font-size: 0.82rem;
  }

  .avatar-wrapper {
    width: 190px;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .project-info {
    padding: 1.2rem;
  }

  .project-title {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Touch & Accessibility Utilities
   ========================================================================== */

/* Ensure minimum 44px touch targets on all interactive elements on mobile */
@media (pointer: coarse) {

  a,
  button,
  .btn-primary,
  .btn-secondary,
  .btn-card-primary,
  .btn-card-secondary,
  .btn-case-study,
  .filter-btn,
  .social-link,
  .copy-creds-btn,
  .copy-email-btn,
  .carousel-control,
  .modal-close-btn,
  .nav-link,
  .carousel-dot,
  .footer-links a {
    min-height: 44px;
    min-width: 44px;
  }

  .carousel-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    padding: 6px;
  }
}

/* Hide mouse follower on touch devices */
@media (hover: none) {
  .mouse-follower {
    display: none;
  }
}

/* Prevent horizontal scroll overflow on all viewports */
html,
body {
  overflow-x: hidden;
}

/* Safe area padding for notched devices */
@supports(padding: max(0px)) {
  .container {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  footer {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  .project-modal {
    padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

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

/* =========================================================
   HERO + NAVBAR UI FIX
   ========================================================= */

/* ---------- NAVBAR ---------- */

header {
  height: 80px;
}

header nav.container {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Keep menu naturally centered */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  margin-left: auto;
  margin-right: 1.5rem;
}

/* Desktop CV */
.nav-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-resume-desktop {
  white-space: nowrap;
}

/* Mobile-only CV must not exist on desktop */
.btn-resume-mobile {
  display: none;
}


/* =========================================================
   HERO DESKTOP
   ========================================================= */

#hero {
  min-height: calc(100vh - 80px);
  padding: 4rem 0 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: clamp(3rem, 6vw, 6rem);
}

/* Left side */
.hero-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
}

.status-pill {
  margin-bottom: 0.2rem;
}

.hero-title {
  max-width: 760px;
  margin: 0;
}

.hero-role-wrapper {
  width: 100%;
  min-height: 30px;
}

.hero-desc {
  max-width: 650px;
  margin: 0;
}

/* Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  min-height: 52px;
  justify-content: center;
}

/* Socials */
.hero-socials {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.35rem;
}


/* =========================================================
   HERO RIGHT / IMAGE
   ========================================================= */

.hero-visual {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-wrapper {
  width: min(400px, 100%);
  max-width: 400px;
  position: relative;
  margin: 0 auto;
}

/* Keep floating elements attached to image */
.floating-chip {
  z-index: 5;
  white-space: nowrap;
}

.chip-1 {
  left: -38px;
  top: 12%;
}

.chip-2 {
  right: -38px;
  bottom: 17%;
}

.chip-3 {
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  animation:
    floatChipCentered 5s infinite alternate ease-in-out;
}

@keyframes floatChipCentered {
  0% {
    transform: translate(-50%, 0);
  }

  100% {
    transform: translate(-50%, -12px);
  }
}


/* =========================================================
   METRICS
   ========================================================= */

.metrics-bar {
  margin-top: 4rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

  header nav.container {
    gap: 1rem;
  }

  .nav-menu {
    gap: 1.2rem;
    margin-right: 0.8rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    gap: 2.5rem;
  }

  .avatar-wrapper {
    width: min(340px, 100%);
  }

  .chip-1 {
    left: -20px;
  }

  .chip-2 {
    right: -20px;
  }
}


/* =========================================================
   TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 992px) {

  header {
    height: 72px;
  }

  header nav.container {
    height: 72px;
  }

  /* Mobile navbar */
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-shrink: 0;
  }

  .nav-menu .btn-resume-mobile {
    display: block;
    margin-top: 0.5rem;
  }

  /* Hero */
  #hero {
    min-height: auto;
    padding: 3.5rem 0 4rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  /* Image first */
  .hero-visual {
    order: 1;
  }

  /* Text second */
  .hero-content {
    order: 2;
    align-items: center;
  }

  .hero-title,
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-role-wrapper {
    justify-content: center;
  }

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

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

  .avatar-wrapper {
    width: min(320px, 65vw);
  }

  .chip-1 {
    left: -15px;
  }

  .chip-2 {
    right: -15px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  header {
    height: 68px;
  }

  header nav.container {
    height: 68px;
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo-badge {
    width: 38px;
    height: 38px;
  }

  /*
     Mobile menu remains an overlay.
     Only mobile CV is visible here.
  */
  .nav-cta {
    display: none;
  }

  .nav-menu .btn-resume-mobile {
    display: block;
  }

  /* Hero */
  #hero {
    padding: 2.5rem 0 3.5rem;
  }

  .hero-grid {
    gap: 2.5rem;
  }

  .hero-content {
    gap: 1.15rem;
  }

  .status-pill {
    max-width: 100%;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1.12;
  }

  .hero-role-wrapper {
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .hero-desc {
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-actions {
    width: 100%;
    justify-content: center;
    gap: 0.8rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: 0 1 auto;
  }

  .hero-socials {
    margin-top: 0.25rem;
  }

  .hero-visual {
    width: 100%;
  }

  .avatar-wrapper {
    width: min(280px, 70vw);
  }

  .floating-chip {
    font-size: 0.72rem;
    padding: 7px 11px;
  }

  .chip-icon {
    width: 22px;
    height: 22px;
  }

  .chip-1 {
    left: -12px;
    top: 8%;
  }

  .chip-2 {
    right: -12px;
    bottom: 14%;
  }

  .chip-3 {
    bottom: -18px;
  }

  .metrics-bar {
    margin-top: 3rem;
  }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

  #hero {
    padding-top: 2rem;
  }

  .hero-grid {
    gap: 2.2rem;
  }

  .avatar-wrapper {
    width: min(240px, 62vw);
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }

  .hero-role-wrapper {
    font-size: 0.86rem;
  }

  .hero-desc {
    font-size: 0.94rem;
  }

  /*
     Two buttons remain side-by-side where possible.
     They stack only when the screen is genuinely too narrow.
  */
  .hero-actions {
    flex-wrap: wrap;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: auto;
  }

  .social-link {
    width: 42px;
    height: 42px;
  }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

  .container {
    width: 92%;
  }

  .hero-grid {
    gap: 2rem;
  }

  .avatar-wrapper {
    width: 210px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-role-wrapper {
    font-size: 0.82rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }
}


/* =========================================================
   PREVENT HERO ELEMENTS FROM CAUSING HORIZONTAL OVERFLOW
   ========================================================= */

#hero,
.hero-grid,
.hero-content,
.hero-visual,
.avatar-wrapper {
  max-width: 100%;
  padding: 25px;
}

.hero-title,
.hero-desc {
  overflow-wrap: break-word;
}