/* ==========================================================================
   MODERN PORTFOLIO STYLESHEET
   Features: CSS Custom Properties, Dark/Light Mode, Glassmorphism,
   Fluid Typography, Micro-interactions & Smooth Responsive Layouts
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Theme Variables
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Dark Mode (Default) */
  --bg-primary: #030712;
  --bg-secondary: #070d24;
  --bg-tertiary: #0e1738;
  --bg-card: rgba(8, 14, 38, 0.78);
  --bg-card-hover: rgba(16, 26, 64, 0.88);
  --bg-glass: rgba(8, 14, 38, 0.68);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 0, 137, 0.65);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Accent Gradients */
  --accent-primary: #2563eb;       /* Royal Blue */
  --brand-navy: #000089;
  --accent-secondary: #1d4ed8;     /* Deep Royal Blue */
  --accent-cyan: #38bdf8;          /* Bright Sky Blue */
  --accent-emerald: #10b981;       /* Emerald */
  --accent-gradient: linear-gradient(135deg, #000089 0%, #1d4ed8 50%, #38bdf8 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(0, 0, 137, 0.35), rgba(29, 78, 216, 0.18));
  --accent-glow: rgba(0, 0, 137, 0.5);
  
  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(0, 0, 137, 0.45);
  
  /* Layout & Geometry */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Motion */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(0, 0, 137, 0.5);
  
  --accent-primary: #000089;
  --accent-secondary: #1d4ed8;
  --accent-cyan: #0284c7;
  --accent-gradient: linear-gradient(135deg, #000089 0%, #1e40af 60%, #0284c7 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(0, 0, 137, 0.12), rgba(30, 64, 175, 0.08));
  --accent-glow: rgba(0, 0, 137, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(0, 0, 137, 0.25);
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  position: relative;
  min-height: 100vh;
}

/* Background Canvas & Ambient Orbs */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-orb-1 {
  width: 500px;
  height: 500px;
  background: var(--brand-navy);
  top: -100px;
  right: -100px;
}

.ambient-orb-2 {
  width: 450px;
  height: 450px;
  background: var(--accent-cyan);
  bottom: 10%;
  left: -150px;
  animation-duration: 22s;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   3. Typography & Utility Classes
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding-block: 6rem;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  background: var(--accent-gradient-subtle);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hover);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 137, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 137, 0.55);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   4. Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', Courier, monospace;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 137, 0.4);
}
@font-face {
  font-family: 'Drupadi';
  src: url('../assets/fonts/Drupadi-Regular.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.brand-name {
  font-family: 'Sora', 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}


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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding-block: 0.25rem;
  transition: color var(--transition-fast);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

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

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

.nav-desktop-cta {
  display: inline-flex;
}

.nav-mobile-cta {
  display: none;
}

/* Backdrop Overlay for Mobile Menu */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: rotate(15deg);
}

.theme-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.mobile-toggle:hover {
  background-color: var(--bg-card);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
  position: relative;
}

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

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent-emerald);
  opacity: 0.5;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero-greeting {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-typing-wrapper {
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.typed-text {
  color: var(--text-primary);
  border-right: 2px solid var(--accent-primary);
  padding-right: 4px;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { border-color: var(--accent-primary); }
  50% { border-color: transparent; }
}

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

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

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

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

.social-link:hover {
  color: #fff;
  background: var(--brand-navy);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 137, 0.4);
}

.social-icon {
  width: 20px;
  height: 20px;
}

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

.hero-code-card {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  animation: codeCardGlow 4s ease-in-out infinite alternate;
}

.hero-code-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.12), transparent);
  pointer-events: none;
  animation: codeScan 4.5s ease-in-out infinite;
}

@keyframes codeCardGlow {
  from { box-shadow: var(--shadow-lg), 0 0 18px rgba(56, 189, 248, 0.08); }
  to { box-shadow: var(--shadow-lg), 0 0 30px rgba(56, 189, 248, 0.22); }
}

@keyframes codeScan {
  0%, 12% { transform: translateY(-40%); opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(720%); opacity: 0; }
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-color);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.code-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.code-line {
  display: block;
  opacity: 0;
  transform: translateX(-8px);
  animation: codeLineIn 0.45s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.15s; }
.code-line:nth-child(2) { animation-delay: 0.28s; }
.code-line:nth-child(3) { animation-delay: 0.41s; }
.code-line:nth-child(4) { animation-delay: 0.54s; }
.code-line:nth-child(5) { animation-delay: 0.67s; }
.code-line:nth-child(6) { animation-delay: 0.80s; }
.code-line:nth-child(7) { animation-delay: 0.93s; }
.code-line:nth-child(8) { animation-delay: 1.06s; }
.code-line:nth-child(9) { animation-delay: 1.19s; }
.code-line:nth-child(10) { animation-delay: 1.32s; }
.code-line:nth-child(11) { animation-delay: 1.45s; }

.code-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 5px;
  vertical-align: -2px;
  background: var(--accent-cyan);
  animation: blinkCursor 0.8s steps(1) infinite;
}

@keyframes codeLineIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.token-keyword { color: #f43f5e; }
.token-variable { color: #38bdf8; }
.token-string { color: #a3e635; }
.token-property { color: #c084fc; }
.token-number { color: #fb923c; }
.token-comment { color: #64748b; font-style: italic; }

.floating-stat-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(16px);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: floatCard 6s ease-in-out infinite alternate;
}

@keyframes floatCard {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.floating-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.floating-badge-val {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.1;
}

.floating-badge-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-column {
  display: flex;
  justify-content: center;
  position: relative;
}

.about-photo-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.about-photo-glow {
  position: absolute;
  inset: -15px;
  background: var(--accent-gradient);
  border-radius: calc(var(--radius-lg) + 8px);
  filter: blur(25px);
  opacity: 0.35;
  z-index: 0;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

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

.about-photo-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
}

.about-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-photo-frame:hover .about-photo-img {
  transform: scale(1.03);
}

.about-photo-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.about-photo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.about-floating-card {
  position: absolute;
  bottom: -18px;
  right: -15px;
  z-index: 3;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: floatCard 6s ease-in-out infinite alternate;
}

.about-floating-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.about-interests-group {
  margin: 1.75rem 0 2rem;
}

.about-interests-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-interests-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.interest-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.interest-pill:hover {
  background: var(--brand-navy);
  color: #fff;
  transform: translateY(-2px);
}

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

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

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
  display: block;
}

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

/* Services / What I Do */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.service-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-hover);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   7. Skills Section
   -------------------------------------------------------------------------- */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.skill-category-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-category-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.skill-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  cursor: default;
  user-select: none;
}

.skill-pill:hover {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 137, 0.25);
}

.skill-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  width: 22px;
  height: 22px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.skill-logo i {
  font-size: 1.25rem;
  line-height: 1;
}

.skill-logo svg,
.skill-logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.skill-pill:hover .skill-logo {
  transform: scale(1.18);
}

.skill-logo .devicon-nextjs-plain,
.skill-logo .devicon-express-original,
.skill-logo .devicon-github-original,
.skill-logo .devicon-vercel-original {
  color: var(--text-primary);
}

.skill-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-navy);
}

/* --------------------------------------------------------------------------
   8. Projects Section
   -------------------------------------------------------------------------- */
.projects-filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

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

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-btn.active {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 137, 0.4);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.55);
  outline: 2px solid rgba(56, 189, 248, 0.3);
  outline-offset: 5px;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08), 0 18px 40px rgba(0, 0, 0, 0.32);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), outline-color var(--transition-normal);
}

.project-card:hover {
  border-color: rgba(56, 189, 248, 0.85);
  outline-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14), 0 22px 48px rgba(0, 0, 0, 0.42);
}

.project-thumbnail {
  position: relative;
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumbnail-title {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-align: center;
  padding: 1rem;
  user-select: none;
}

.project-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-thumbnail-overlay {
  opacity: 1;
}

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

.project-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.project-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.project-action-link:hover {
  color: var(--accent-primary);
}

.project-details-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0;
}

/* --------------------------------------------------------------------------
   9. Experience & Timeline Section
   -------------------------------------------------------------------------- */
.timeline-container {
  max-width: 800px;
  margin-inline: auto;
  position: relative;
  padding-left: 2.5rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 137, 0.4);
}

.timeline-marker::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-navy);
}

.timeline-content {
  padding: 1.75rem;
}

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

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-gradient-subtle);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
}

.timeline-company {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.timeline-achievements {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.timeline-achievements li {
  margin-bottom: 0.4rem;
}

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

.contact-info-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-intro h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.contact-intro p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-method-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.method-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-hover);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.method-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.3rem;
  display: inline-flex;
  transition: color var(--transition-fast);
}

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

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

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

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 137, 0.2);
  background: var(--bg-card);
}

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

/* --------------------------------------------------------------------------
   11. Modal & Toast
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: auto;
}

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

.toast-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-emerald);
}

/* --------------------------------------------------------------------------
   12. Footer & Back To Top
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-color);
  padding-block: 3.5rem 2rem;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

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

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 137, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 137, 0.6);
}

/* --------------------------------------------------------------------------
   13. Comprehensive Responsive Media Queries (Desktop, Tablet, Mobile)
   -------------------------------------------------------------------------- */

/* Tablet & Smaller Laptops (<= 992px) */
@media (max-width: 992px) {
  .hero-section {
    min-height: auto;
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 4rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

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

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

  .hero-cta-group {
    justify-content: center;
  }

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

  .hero-visual {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }

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

  .about-image-column {
    justify-content: center;
  }

  .about-text {
    text-align: left;
  }

  .about-interests-pills {
    justify-content: flex-start;
  }

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

  .floating-stat-badge {
    bottom: -10px;
    right: 15px;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
  }
}

/* Tablets, Large Phones & Mobile Navigation (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  /* Prevent background scrolling when mobile nav is open */
  body.nav-open {
    overflow: hidden;
  }

  .section {
    padding-block: 4.5rem 3.5rem;
  }

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

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

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

  /* Ambient Orbs */
  .ambient-orb {
    filter: blur(80px);
    opacity: 0.18;
  }
  .ambient-orb-1 {
    width: 280px;
    height: 280px;
  }
  .ambient-orb-2 {
    width: 250px;
    height: 250px;
  }

  /* Header & Mobile Drawer */
  .nav-desktop-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0.5rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    z-index: 999;
  }

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

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--accent-gradient-subtle);
    border-color: var(--border-hover);
    color: var(--accent-primary);
  }

  .nav-link::after {
    display: none;
  }

  .nav-mobile-cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: 0.75rem;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

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

  .project-body {
    padding: 1.5rem;
  }

  /* Form Layout */
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Footer Layout */
  .footer {
    padding-block: 3rem 1.75rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.75rem;
  }

  .footer-links {
    justify-content: center;
    gap: 1.25rem;
  }

  /* Timeline */
  .timeline-container {
    padding-left: 2rem;
  }

  .timeline-marker {
    left: -2rem;
    width: 22px;
    height: 22px;
  }

  .timeline-marker::after {
    width: 8px;
    height: 8px;
  }

  .timeline-container::before {
    left: 9px;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  /* Cards Padding */
  .contact-info-card,
  .contact-form-card {
    padding: 2rem;
  }

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

  /* Modal Dialog */
  .modal-card {
    padding: 1.75rem;
    border-radius: var(--radius-md);
  }

  .modal-close-btn {
    top: 1rem;
    right: 1rem;
  }
}

/* Mobile Devices (<= 576px) */
@media (max-width: 576px) {
  .container {
    padding-inline: 1rem;
  }

  .section {
    padding-block: 3.5rem 2.5rem;
  }

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

  .section-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
  }

  .section-title {
    font-size: clamp(1.65rem, 6.5vw, 2.15rem);
    margin-bottom: 0.75rem;
  }

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

  /* Hero Section */
  .hero-section {
    padding-top: calc(var(--header-height) + 1.25rem);
    padding-bottom: 3rem;
  }

  .status-badge {
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1.25rem;
  }

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

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.85rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    word-break: break-word;
  }

  .hero-typing-wrapper {
    font-size: 1.2rem;
    min-height: 1.8rem;
    margin-bottom: 1.25rem;
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.75rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.85rem;
    margin-bottom: 2rem;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-code-card {
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .code-header {
    padding: 0.75rem 1rem;
  }

  .code-body {
    padding: 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Dock floating stat badge gracefully on mobile without overflowing screen */
  .floating-stat-badge {
    position: static;
    margin: 1.25rem auto 0;
    width: fit-content;
    max-width: 100%;
    animation: none;
    transform: none;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  /* About Section */
  .about-photo-wrapper {
    max-width: 280px;
    margin-inline: auto;
  }

  .about-floating-card {
    position: absolute;
    bottom: -12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 0.65rem 0.95rem;
    animation: none;
  }

  .about-floating-icon {
    width: 32px;
    height: 32px;
  }

  .about-text p {
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
  }

  .about-interests-pills {
    gap: 0.45rem;
  }

  .interest-pill {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }

  .about-text > div:last-child {
    flex-direction: column;
    width: 100%;
  }

  .about-text > div:last-child .btn {
    width: 100%;
  }

  /* Skills Section */
  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .skill-category-card {
    padding: 1.25rem 1rem;
  }

  .skill-category-title {
    font-size: 1.1rem;
  }

  .skill-items-grid {
    gap: 0.5rem;
  }

  .skill-pill {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
  }

  /* Projects Section */
  .projects-filter-bar {
    gap: 0.45rem;
    margin-bottom: 2rem;
  }

  .filter-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
  }

  .project-thumbnail {
    height: 180px;
  }

  .project-body {
    padding: 1.25rem 1rem;
  }

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

  .project-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  .project-footer {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .project-action-link {
    font-size: 0.82rem;
  }

  /* Timeline */
  .timeline-container {
    padding-left: 1.75rem;
  }

  .timeline-marker {
    left: -1.75rem;
    width: 20px;
    height: 20px;
    top: 2px;
  }

  .timeline-marker::after {
    width: 6px;
    height: 6px;
  }

  .timeline-container::before {
    left: 8px;
  }

  .timeline-content {
    padding: 1.25rem 1rem;
  }

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

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

  .timeline-period {
    font-size: 0.78rem;
  }

  .timeline-company {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .timeline-desc {
    font-size: 0.88rem;
  }

  .timeline-achievements {
    font-size: 0.82rem;
    padding-left: 1.1rem;
  }

  /* Contact Section */
  .contact-info-card,
  .contact-form-card {
    padding: 1.5rem 1rem;
  }

  .contact-intro h3 {
    font-size: 1.35rem;
  }

  .contact-intro p {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .contact-methods {
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .method-icon {
    width: 42px;
    height: 42px;
  }

  .method-title {
    font-size: 0.8rem;
  }

  .method-value {
    font-size: 0.9rem;
  }

  /* Ensure inputs have at least 16px to prevent iOS Safari auto-zoom */
  .form-control {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  .contact-form button[type="submit"] {
    width: 100%;
  }

  /* Footer */
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Floating Back-To-Top and Toasts */
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }

  .toast-container {
    bottom: 1.25rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }

  /* Modal on Mobile */
  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-card {
    padding: 1.25rem 1rem;
    max-height: 90vh;
  }

  .modal-banner {
    height: 130px !important;
  }

  .modal-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

/* Small Screens / Compact Mobile (<= 380px) */
@media (max-width: 380px) {
  .brand-logo {
    font-size: 1.15rem;
    gap: 0.45rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .theme-toggle-btn {
    width: 38px;
    height: 38px;
  }

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

  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.76rem;
  }

  .about-photo-wrapper {
    max-width: 240px;
  }

  .project-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-details-btn {
    align-self: flex-start;
  }
}

.timeline-extra {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.timeline-extra-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-extra-org {
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
}

.timeline-extra-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.extra-role {
  font-weight: 600;
  font-size: 0.92rem;
}

.extra-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.timeline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  cursor: default;
  user-select: none;
}

.project-status-label {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  user-select: none;
  pointer-events: none;
}

.project-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  animation: statusPulse 1.6s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Used inside the modal (not over an image) */
.project-status-inline {
  position: static;
  margin-left: 0.6rem;
}
.timeline-group-title {
  max-width: 800px;
  margin: 3rem auto 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.timeline-group-title:first-of-type { margin-top: 0; }

/* Responsive safety: let grid/flex children shrink instead of forcing page overflow */
html, body { overflow-x: hidden; }
.hero-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }
.hero-typing-wrapper { flex-wrap: wrap; }
.typed-text { overflow-wrap: anywhere; }

/* ---- Mobile / tablet fixes ---- */
@media (max-width: 768px) {
  .mobile-toggle { flex-direction: column; flex-shrink: 0; }
  .brand-logo { min-width: 0; font-size: 1.1rem; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-actions { flex-shrink: 0; }
}
@media (max-width: 992px) {
  .hero-visual { flex-direction: column; align-items: center; }
  .hero-code-card { text-align: left; }
}
@media (max-width: 576px) {
  .brand-logo { font-size: 1rem; gap: 0.5rem; }
  .brand-icon { width: 32px; height: 32px; font-size: 1rem; }
  .code-body { white-space: pre; }
}
@media (max-width: 768px) {
  .mobile-toggle { gap: 5px; }
  .mobile-toggle .hamburger-line { margin: 0; }
}

/* ---- Intro / Preloader ---- */
.preloader { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary); clip-path: circle(200% at 50% 50%);
  transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1);
  animation: preloaderFallback 0.01s 12s forwards; }
.preloader::before { content: ''; position: absolute; left: 50%; top: 50%; width: 80vmax; height: 80vmax; margin: -40vmax 0 0 -40vmax;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 55%); animation: preGlow 3s ease-in-out infinite alternate; }
.preloader::after { content: ''; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 65%); mask-image: radial-gradient(circle at center, #000 0%, transparent 65%); }
.pre-open { clip-path: circle(0% at 50% 50%); pointer-events: none; }
@keyframes preloaderFallback { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes preGlow { from { transform: scale(0.85); opacity: 0.6; } to { transform: scale(1.1); opacity: 1; } }

.pre-stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 1.5rem;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.pre-exit .pre-name, .pre-exit .pre-role, .pre-exit .pre-percent { opacity: 0 !important; transform: translateY(-8px); transition: opacity 0.3s, transform 0.4s; }

/* logo with a circular progress ring */
.pre-logo { position: relative; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.6rem;
  opacity: 0; transform: scale(0.85); animation: preIn 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.pre-logo img { width: 64px; height: 64px; border-radius: 16px; display: block; box-shadow: 0 8px 40px rgba(37, 99, 235, 0.5); }
.pre-exit .pre-logo img { animation: prePulse 0.5s ease; }
.pre-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pre-ring circle { fill: none; stroke-width: 2; }
.pre-ring-track { stroke: rgba(148, 163, 184, 0.18); }
.pre-ring-fill { stroke: #38bdf8; stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: 289.03; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.7)); }

.pre-name { font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 700; letter-spacing: 0.02em; color: var(--text-primary);
  opacity: 0; transform: translateY(10px); animation: preUp 0.8s 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.pre-role { margin-top: 0.4rem; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted);
  opacity: 0; transform: translateY(10px); animation: preUp 0.8s 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.pre-percent { margin-top: 1.6rem; font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums;
  opacity: 0; animation: preFade 0.8s 0.9s ease forwards; }
.pre-percent span { color: var(--text-primary); }
body.is-loading { overflow: hidden; }

@keyframes preIn { to { opacity: 1; transform: scale(1); } }
@keyframes preUp { to { opacity: 1; transform: translateY(0); } }
@keyframes preFade { to { opacity: 1; } }
@keyframes prePulse { 50% { transform: scale(1.12); } }

/* ---- Page entrance after the intro ---- */
body.is-loading .navbar, body.is-loading .hero-content > *, body.is-loading .hero-visual { opacity: 0; }
.intro-ready .hero-section { animation: pageZoom 2s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes pageZoom { from { transform: scale(1.14); opacity: 0.4; } to { transform: none; opacity: 1; } }
.intro-ready .navbar { animation: navDrop 1s 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero-title { overflow: hidden; padding-bottom: 0.12em; margin-bottom: calc(1.25rem - 0.12em); }
.intro-ready .hero-content > .hero-title { animation: none; }
.intro-ready .hero-title .gradient-text { display: inline-block; animation: titleUp 1.2s 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.intro-ready .hero-content > * { animation: heroIn 1s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(0.6s + var(--i, 0) * 120ms); }
.intro-ready .hero-content > *:nth-child(1) { --i: 0; } .intro-ready .hero-content > *:nth-child(2) { --i: 1; }
.intro-ready .hero-content > *:nth-child(3) { --i: 2; } .intro-ready .hero-content > *:nth-child(4) { --i: 3; }
.intro-ready .hero-content > *:nth-child(5) { --i: 4; } .intro-ready .hero-content > *:nth-child(6) { --i: 5; }
.intro-ready .hero-content > *:nth-child(7) { --i: 6; } .intro-ready .hero-content > *:nth-child(8) { --i: 7; }
.intro-ready .hero-visual { animation: heroVisualIn 1.3s 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes titleUp { from { transform: translateY(110%); } to { transform: none; } }
@keyframes navDrop { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes heroIn { from { opacity: 0; transform: translateY(30px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes heroVisualIn { from { opacity: 0; transform: translateX(70px) scale(0.95); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .preloader *, .intro-ready *, .intro-ready { animation-duration: 0.01s !important; animation-delay: 0s !important; }
  .hero-code-card::after { display: none; }
  .code-line { opacity: 1; transform: none; }
}

/* ---- Logo image (replaces the "SF" text badge) ---- */
.brand-icon, .preloader-mark { overflow: hidden; padding: 0; background: none; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; }
.brand-icon img, .preloader-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preloader-mark { width: 60px; height: 60px; border-radius: 15px; }
@media (max-width: 768px) { .brand-icon { width: 32px; height: 32px; } }
@media (max-width: 576px) { .brand-icon { width: 30px; height: 30px; } }

/* ---- Simple cursor circle (js/cursor.js) ---- */
.cursor-follow { position: fixed; top: 0; left: 0; z-index: 10001; pointer-events: none; width: 28px; height: 28px; border-radius: 50%; opacity: 0;
  border: 1.5px solid rgba(56, 189, 248, 0.9); background: rgba(59, 130, 246, 0.12); box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  transition: opacity 0.3s, width 0.25s ease, height 0.25s ease, background 0.25s ease; will-change: transform; }
.cursor-follow.is-on { opacity: 1; }
.cursor-follow.is-hover { width: 52px; height: 52px; background: rgba(59, 130, 246, 0.2); }
.cursor-follow.is-down { width: 20px; height: 20px; }
@media (hover: none), (pointer: coarse) { .cursor-follow { display: none !important; } }

/* ---- Skills: two auto-scrolling rows ---- */
.skills-marquee { position: relative; overflow: hidden; padding: 0.75rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.skills-track { display: flex; width: max-content; align-items: stretch;
  animation: skillsLeft calc(var(--cards, 4) * 12s) linear infinite; will-change: transform; }
.skills-marquee.to-right .skills-track { animation-name: skillsRight; }
.skills-marquee:hover .skills-track { animation-play-state: paused; }
.skills-track .skill-category-card { flex: 0 0 auto; width: 360px; margin-right: 1.5rem; }
@keyframes skillsLeft  { from { transform: translateX(0); } to { transform: translateX(-33.3333%); } }
@keyframes skillsRight { from { transform: translateX(-33.3333%); } to { transform: translateX(0); } }
@media (max-width: 576px) { .skills-track .skill-category-card { width: 300px; padding: 1.5rem; } }
@media (prefers-reduced-motion: reduce) {
  .skills-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .skills-track { animation: none; }
}
