/* Base reset and theme styling */
* {
  border-color: rgba(255, 255, 255, 0.08);
}

html {
  overflow-x: clip;
  max-width: 100vw;
}

body {
  background-color: #0d0e12;
  color: #e2e8f0;
  overflow-x: clip;
  max-width: 100vw;
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0e12;
}

::-webkit-scrollbar-thumb {
  background: #232731;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

/* Ambient glow accents */
.bg-radial-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12) 0%, rgba(13, 14, 18, 0) 70%);
}

/* Glassmorphism helpers */
.glass-nav {
  background: rgba(20, 22, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-pill {
  background: rgba(29, 31, 38, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-dark {
  background: #14161b;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.card-subcard {
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================================
   INFINITY ROTATING GLOWING BORDER ANIMATION
   ========================================================= */
@property --glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes rotate-glow-border {
  0% {
    --glow-angle: 0deg;
  }
  100% {
    --glow-angle: 360deg;
  }
}

.infinity-glow-border {
  position: relative;
}

.infinity-glow-border::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  padding: 1.5px !important;
  pointer-events: none !important;
  background: conic-gradient(
    from var(--glow-angle, 0deg),
    transparent 65%,
    #2563eb 85%,
    #38bdf8 95%,
    transparent 100%
  ) !important;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
  mask-composite: exclude !important;
  animation: rotate-glow-border 4s linear infinite !important;
  animation-play-state: running !important;
  transition: none !important;
  z-index: 5 !important;
}

/* Priority 2 — Alternating Spin Directions */
/* Odd direct siblings (:nth-child(odd)) or default: Clockwise */
.infinity-glow-border::before,
.infinity-glow-border:nth-child(odd)::before {
  animation-direction: normal !important;
}

/* Even direct siblings (:nth-child(even)): Counter-clockwise */
.infinity-glow-border:nth-child(even)::before {
  animation-direction: reverse !important;
}

/* Explicit alternating modifier classes */
.infinity-glow-border.glow-cw::before {
  animation-direction: normal !important;
}

.infinity-glow-border.glow-ccw::before {
  animation-direction: reverse !important;
}


.btn-pill-blue {
  background-color: #2563eb;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pill-blue:hover {
  background-color: #1d4ed8;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.45);
}

/* Hand waving animation */
@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  20%, 60% {
    transform: rotate(14deg);
  }
  40%, 80% {
    transform: rotate(-14deg);
  }
}

.animate-wave {
  animation: wave 2s infinite ease-in-out;
  display: inline-block;
  transform-origin: 70% 70%;
}

/* Smooth fadeIn animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Projects Internal Smooth Scroll Container */
.projects-scroll-container {
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

/* Chrome, Edge, Safari sleek scrollbar */
.projects-scroll-container::-webkit-scrollbar {
  width: 5px;
}

.projects-scroll-container::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.projects-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.projects-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.65);
}

/* Utility to completely hide scrollbars if desired */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Subtle floating/breathing optical animations for Bento cards */
@keyframes floatSubtleA {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3.5px);
  }
}

@keyframes floatSubtleB {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(3.5px);
  }
}

.floating-card-1 {
  animation: floatSubtleA 6s ease-in-out infinite;
  will-change: transform;
}

.floating-card-2 {
  animation: floatSubtleB 7.2s ease-in-out infinite 1s;
  will-change: transform;
}

.floating-card-3 {
  animation: floatSubtleA 6.6s ease-in-out infinite 2s;
  will-change: transform;
}

/* Sound wave dancing animation */
@keyframes soundBar1 {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}
@keyframes soundBar2 {
  0%, 100% { height: 12px; }
  50% { height: 5px; }
}
@keyframes soundBar3 {
  0%, 100% { height: 7px; }
  50% { height: 15px; }
}

.animate-sound-bar-1 {
  animation: soundBar1 0.8s ease-in-out infinite;
}
.animate-sound-bar-2 {
  animation: soundBar2 0.7s ease-in-out infinite 0.15s;
}
.animate-sound-bar-3 {
  animation: soundBar3 0.9s ease-in-out infinite 0.3s;
}

/* Accessibility: respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .floating-card-1,
  .floating-card-2,
  .floating-card-3 {
    animation: none !important;
  }
}

/* ===================================================
   3D-TILTED ORBITING SOLAR SYSTEM (SCALED-UP)
   =================================================== */

.solar-system-container {
  width: 1800px;
  height: 1800px;
  perspective: 1200px;
  perspective-origin: center center;
  opacity: 0.65;
  transition: opacity 0.4s ease, transform 0.3s ease;
  will-change: transform, opacity;
}

.solar-system-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(65deg) rotateZ(-12deg);
  will-change: transform;
}

/* Central Glowing Sun */
.sun-anchor {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateZ(12deg) rotateX(-65deg);
  width: 44px;
  height: 44px;
  z-index: 5;
}

.sun-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fef08a 25%, #f59e0b 60%, #ea580c 100%);
  box-shadow: 
    0 0 25px rgba(251, 191, 36, 1),
    0 0 65px rgba(249, 115, 22, 0.75),
    0 0 130px rgba(234, 88, 12, 0.45);
  animation: sunGlow 3.5s ease-in-out infinite alternate;
}

.sun-corona {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, rgba(249, 115, 22, 0.16) 45%, transparent 72%);
  animation: sunPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sunGlow {
  0% {
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.95), 0 0 65px rgba(249, 115, 22, 0.7), 0 0 120px rgba(234, 88, 12, 0.4);
  }
  100% {
    box-shadow: 0 0 35px rgba(251, 191, 36, 1), 0 0 85px rgba(249, 115, 22, 0.9), 0 0 160px rgba(234, 88, 12, 0.55);
  }
}

@keyframes sunPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
  }
}

/* Stationary Concentric Orbit Guide Tracks */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.08), inset 0 0 14px rgba(96, 165, 250, 0.04);
  pointer-events: none;
}

/* Orbit Track Diameters */
.orbit-mercury { width: 180px; height: 180px; }
.orbit-venus   { width: 290px; height: 290px; }
.orbit-earth   { width: 440px; height: 440px; }
.orbit-mars    { width: 620px; height: 620px; }
.orbit-jupiter { width: 890px; height: 890px; }
.orbit-saturn  { width: 1220px; height: 1220px; }
.orbit-uranus  { width: 1520px; height: 1520px; }
.orbit-neptune { width: 1800px; height: 1800px; }

/* ===================================================
   3D PLANET BODIES & DUAL-ROTATION ENGINE
   =================================================== */

.planet-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform, z-index;
  pointer-events: none;
}

/* Counter-tilt keeps planet faces upright toward the camera */
.planet-counter-tilt {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateZ(12deg) rotateX(-65deg);
  will-change: transform, filter, opacity;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Base Spherical Planet Container */
.planet-sphere {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Inner Axial Self-Rotating Surface Layer */
.planet-surface {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  border-radius: 50%;
  will-change: background-position;
}

/* Sun-Directional Dynamic Light & Shadow Crescent */
.planet-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--sun-lx, 35%) var(--sun-ly, 35%),
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(0, 0, 0, 0.4) 62%,
    rgba(0, 0, 0, 0.94) 100%
  );
  mix-blend-mode: multiply;
}

/* Cosmic Atmospheric Halo Glow */
.planet-glow {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
  opacity: var(--glow-opacity, 0.45);
  transition: opacity 0.25s ease;
}

/* Keyframes: Continuous Axial Self-Rotation */
@keyframes planetAxialSpin {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

@keyframes planetAxialSpinRetrograde {
  0% {
    background-position: 200% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* ---------------------------------------------------
   INDIVIDUAL PLANET TEXTURES & COLOR SCHEMES
   --------------------------------------------------- */

/* 1. Mercury (10px - Silvery-gray rocky terrain) */
.planet-mercury {
  width: 10px;
  height: 10px;
}
.planet-mercury .planet-surface {
  background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 25%, #64748b 50%, #475569 75%, #cbd5e1 100%);
  background-size: 200% 100%;
  animation: planetAxialSpin 6.5s linear infinite;
}
.planet-mercury .planet-glow {
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.75), 0 0 20px rgba(148, 163, 184, 0.35);
}

/* 2. Venus (14px - Shimmering golden sulfuric atmosphere with retrograde axial spin) */
.planet-venus {
  width: 14px;
  height: 14px;
}
.planet-venus .planet-surface {
  background: linear-gradient(90deg, #fef3c7 0%, #f59e0b 25%, #d97706 50%, #b45309 75%, #fef3c7 100%);
  background-size: 200% 100%;
  animation: planetAxialSpinRetrograde 9s linear infinite;
}
.planet-venus .planet-glow {
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85), 0 0 28px rgba(217, 119, 6, 0.45);
}

/* 3. Earth (17px - Blue Marble: azure oceans, emerald continents, white cloud wisps) */
.planet-earth {
  width: 17px;
  height: 17px;
}
.planet-earth .planet-surface {
  background: linear-gradient(
    90deg,
    #1d4ed8 0%,
    #34d399 15%,
    #2563eb 30%,
    #60a5fa 45%,
    #10b981 60%,
    #1e40af 80%,
    #34d399 92%,
    #1d4ed8 100%
  );
  background-size: 200% 100%;
  animation: planetAxialSpin 5s linear infinite;
}
.planet-earth .planet-glow {
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.9), 0 0 32px rgba(52, 211, 153, 0.45);
}

/* Earth Satellite Moon System */
.moon-orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
}
.moon-satellite-anchor {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}
.moon-sphere {
  position: absolute;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #cbd5e1 50%, #475569 100%);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

/* 4. Mars (13px - Rust-red iron oxide surface with polar ice shimmer) */
.planet-mars {
  width: 13px;
  height: 13px;
}
.planet-mars .planet-surface {
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 20%, #f87171 40%, #7f1d1d 60%, #dc2626 80%, #b91c1c 100%);
  background-size: 200% 100%;
  animation: planetAxialSpin 5.5s linear infinite;
}
.planet-mars .planet-glow {
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85), 0 0 28px rgba(185, 28, 28, 0.45);
}

/* 5. Jupiter (34px - Gas giant with atmospheric storm bands & rapid axial spin) */
.planet-jupiter {
  width: 34px;
  height: 34px;
}
.planet-jupiter .planet-surface {
  background: repeating-linear-gradient(
    180deg,
    #78350f 0px,
    #78350f 2px,
    #fed7aa 3px,
    #fed7aa 5px,
    #d97706 6px,
    #d97706 8px,
    #fbbf24 9px,
    #fbbf24 11px,
    #b45309 12px,
    #b45309 15px,
    #fde68a 16px,
    #fde68a 18px,
    #78350f 19px,
    #78350f 22px
  ), linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.15) 100%);
  background-size: 200% 100%;
  animation: planetAxialSpin 3.8s linear infinite;
}
.planet-jupiter .planet-glow {
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.85), 0 0 48px rgba(217, 119, 6, 0.45);
}

/* 6. Saturn (26px sphere with 3D tilted dual-concentric planetary ring disc) */
.planet-saturn {
  width: 26px;
  height: 26px;
}
.planet-saturn .planet-surface {
  background: repeating-linear-gradient(
    180deg,
    #713f12 0px,
    #ca8a04 2px,
    #fef08a 4px,
    #eab308 6px,
    #a16207 8px,
    #fde047 10px,
    #713f12 12px
  );
  background-size: 200% 100%;
  animation: planetAxialSpin 4.2s linear infinite;
}
.planet-saturn .planet-glow {
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.8), 0 0 36px rgba(202, 138, 4, 0.4);
}

.saturn-rings-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.saturn-ring-disc {
  width: 68px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    transparent 38%,
    rgba(254, 240, 138, 0.9) 42%,
    rgba(202, 138, 4, 0.75) 54%,
    transparent 56%,
    rgba(234, 179, 8, 0.7) 64%,
    rgba(254, 240, 138, 0.45) 70%,
    transparent 74%
  );
  transform: rotateX(68deg) rotateY(-18deg);
  box-shadow: 0 0 12px rgba(254, 240, 138, 0.4);
}

/* 7. Uranus (20px - Pale cyan ice giant with tilted delicate ring) */
.planet-uranus {
  width: 20px;
  height: 20px;
}
.planet-uranus .planet-surface {
  background: linear-gradient(90deg, #0e7490 0%, #22d3ee 25%, #a5f3fc 50%, #06b6d4 75%, #0e7490 100%);
  background-size: 200% 100%;
  animation: planetAxialSpin 6.2s linear infinite;
}
.planet-uranus .planet-glow {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.9), 0 0 40px rgba(14, 165, 233, 0.45);
}

.uranus-rings-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uranus-ring-disc {
  width: 38px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(165, 243, 252, 0.7);
  transform: rotateX(78deg) rotateZ(32deg);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

/* 8. Neptune (20px - Azure/ultramarine ice giant sweeping across outer margins) */
.planet-neptune {
  width: 20px;
  height: 20px;
}
.planet-neptune .planet-surface {
  background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 25%, #93c5fd 50%, #2563eb 75%, #1e3a8a 100%);
  background-size: 200% 100%;
  animation: planetAxialSpin 6.8s linear infinite;
}
.planet-neptune .planet-glow {
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.95), 0 0 44px rgba(37, 99, 235, 0.55);
}

/* Responsive Scaling across Screen Sizes */
@media (min-width: 1536px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.65;
  }
}

@media (max-width: 1535px) and (min-width: 1280px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.62;
  }
}

@media (max-width: 1279px) and (min-width: 1024px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(0.70);
    opacity: 0.58;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0.52;
  }
}

@media (max-width: 767px) and (min-width: 480px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(0.44);
    opacity: 0.48;
  }
}

@media (max-width: 479px) {
  .solar-system-container {
    transform: translate(-50%, -50%) scale(0.34);
    opacity: 0.44;
  }
}

@media (prefers-reduced-motion: reduce) {
  .planet-surface,
  .sun-corona,
  .sun-core {
    animation-play-state: paused !important;
  }
}

/* ===================================================
   FLOATING WHATSAPP CONTACT BUTTON
   =================================================== */

.whatsapp-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.3s ease;
  animation: whatsappGlowPulse 2.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
  will-change: transform, box-shadow;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.whatsapp-floating-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  transition: transform 0.3s ease;
  display: block;
}

.whatsapp-floating-btn:hover {
  transform: scale(1.08);
  background-color: #2ee06e;
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.75), 0 0 50px rgba(37, 211, 102, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.whatsapp-floating-btn:hover svg {
  transform: scale(1.06);
}

.whatsapp-floating-btn:active {
  transform: scale(0.96);
}

@keyframes whatsappGlowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65), 0 0 12px rgba(37, 211, 102, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);
  }
  60% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0), 0 0 22px rgba(37, 211, 102, 0.55), 0 6px 18px rgba(0, 0, 0, 0.35);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 0 12px rgba(37, 211, 102, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

/* Responsive Scaling: Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  .whatsapp-floating-btn {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-floating-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-floating-btn {
    animation: none !important;
  }
}

/* ===================================================
   STICKY PROFILE CARD SIDEBAR (DESKTOP)
   =================================================== */
@media (min-width: 1024px) {
  .sticky-profile-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 96px !important;
    align-self: flex-start !important;
    z-index: 30 !important;
  }
}

/* ===================================================
   MOBILE VIEWPORT PROFILE CARD ORDER (BOTTOM OF MAIN CONTENT)
   =================================================== */
@media (max-width: 767px) {
  .profile-sidebar-col {
    order: 2 !important;
  }
  .main-content-col {
    order: 1 !important;
  }
}

/* ===================================================
   PROFILE AVATAR CLEAN IMAGE RENDERING (NO HOVER EFFECT)
   =================================================== */
.profile-avatar-img {
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: none !important;
}

.profile-avatar-img:hover {
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

/* ===================================================
   TABLET RESPONSIVE REFINEMENTS (768px - 1023px)
   =================================================== */

/* 1. Header Compact Styling & Overflow Prevention */
@media (min-width: 768px) and (max-width: 1023px) {
  header .glass-nav {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
    gap: 0.5rem !important;
  }

  header nav {
    padding: 0.25rem 0.35rem !important;
    gap: 0.25rem !important;
  }

  header nav a {
    padding: 0.4rem 0.625rem !important;
    font-size: 0.8125rem !important; /* ~13px */
    gap: 0.35rem !important;
    white-space: nowrap !important;
  }

  header nav a i,
  header nav a svg {
    width: 0.875rem !important;
    height: 0.875rem !important;
  }
}

/* Narrow Tablets (768px - 920px): Hide "Let's Talk" button so logo and nav pill remain centered and overflow is avoided */
@media (min-width: 768px) and (max-width: 920px) {
  .header-cta-btn {
    display: none !important;
  }
}

/* Tablets (921px - 1023px): Show "Let's Talk" button cleanly */
@media (min-width: 921px) and (max-width: 1023px) {
  .header-cta-btn {
    display: inline-flex !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.8125rem !important;
    white-space: nowrap !important;
  }
}

/* 2. Profile Card 2-Column Balanced Horizontal Layout (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .profile-card-inner {
    display: grid !important;
    grid-template-columns: 270px 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 1.5rem !important;
    row-gap: 0.5rem !important;
    align-items: center !important;
  }

  .profile-card-inner > :nth-child(1),
  .profile-avatar-wrap {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 5 !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 270px !important;
    aspect-ratio: 4 / 4.3 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .profile-avatar-wrap img,
  .profile-card-inner > :nth-child(1) img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
  }

  .profile-card-inner > :nth-child(2) {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    margin-top: 0 !important;
  }

  .profile-card-inner > :nth-child(3) {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
    margin-top: 0 !important;
  }

  .profile-card-inner > :nth-child(4) {
    grid-column: 2 / 3 !important;
    grid-row: 3 / 4 !important;
    margin-top: 0.5rem !important;
  }

  .profile-card-inner > :nth-child(5) {
    grid-column: 2 / 3 !important;
    grid-row: 4 / 5 !important;
    margin-top: 0.5rem !important;
  }
}
