/* ==========================================================================
   SPYTHER — PORTFOLIO DESIGN SYSTEM STYLESHEET
   Clean Neutral Dark Palette, Fluid Glassmorphism & Pixel-Perfect Typography
   ========================================================================== */

:root {
  --glass-bg-light: rgba(255, 255, 255, 0.72);
  --glass-border-light: rgba(255, 255, 255, 0.85);
  --glass-bg-dark: rgba(21, 22, 26, 0.82);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-dark: 0 14px 40px rgba(0, 0, 0, 0.55);
  --blur-amount: blur(40px) saturate(190%);
  --brand-blue: #0A84FF;
  --apple-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --apple-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Base resets & smooth scrolling */
html {
  background-color: #F2F2F7;
  height: 100%;
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

html.dark {
  background-color: #000000;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
  overscroll-behavior: none;
  background-color: transparent;
  transition: background-color 0.35s ease;
}

/* Robust Material Symbols Icon Alignment */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
  -moz-osx-font-smoothing: grayscale !important;
  font-feature-settings: 'liga' !important;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

/* Custom Selection */
::selection {
  background: rgba(10, 132, 255, 0.3);
  color: inherit;
}

/* Dynamic iOS-style Mesh Gradient Background matching maheshar.cyou exactly */
.mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: radial-gradient(at 0% 0%, hsla(210,100%,74%,1) 0px, transparent 50%),
              radial-gradient(at 100% 0%, hsla(280,100%,74%,1) 0px, transparent 50%),
              radial-gradient(at 100% 100%, hsla(340,100%,74%,1) 0px, transparent 50%),
              radial-gradient(at 0% 100%, hsla(160,100%,74%,1) 0px, transparent 50%);
  filter: blur(80px);
  opacity: 0.4;
  animation: meshMove 15s ease-in-out infinite alternate;
}

.dark .mesh-bg {
  background: radial-gradient(at 0% 0%, hsla(210,100%,40%,1) 0px, transparent 50%),
              radial-gradient(at 100% 0%, hsla(280,100%,40%,1) 0px, transparent 50%),
              radial-gradient(at 100% 100%, hsla(340,100%,40%,1) 0px, transparent 50%),
              radial-gradient(at 0% 100%, hsla(160,100%,40%,1) 0px, transparent 50%);
  opacity: 0.3;
}

@keyframes meshMove {
  0% { transform: scale(1); }
  50% { transform: scale(1.1) translate(2%, 2%); }
  100% { transform: scale(1) translate(-2%, -2%); }
}

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg-light);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--glass-shadow);
  border-radius: 28px;
  position: relative;
  transition: all 0.35s var(--apple-spring);
}

.dark .glass-panel {
  background: var(--glass-bg-dark);
  border: 1px solid var(--glass-border-dark);
  box-shadow: var(--glass-shadow-dark);
}

/* Glass Navigation Bar */
.glass-nav {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 8px 14px;
  transition: all 0.35s var(--apple-spring);
}

.dark .glass-nav {
  background: rgba(22, 23, 27, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* BRAND LOGO: Clean typography without outline or box */
.brand-logo,
.brand-logo:hover,
.brand-logo:focus,
.brand-logo:active,
.brand-logo.active {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Buttons */
.btn-primary {
  background-color: #0A84FF;
  color: #FFFFFF;
  border-radius: 999px;
  font-weight: 600;
  padding: 13px 26px;
  transition: all 0.3s var(--apple-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.3);
  cursor: pointer;
}

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

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.45);
}

.btn-outline {
  background: var(--glass-bg-light);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  color: #1C1C1E;
  border: 1px solid var(--glass-border-light);
  border-radius: 999px;
  font-weight: 600;
  padding: 13px 26px;
  transition: all 0.3s var(--apple-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.dark .btn-outline {
  background: var(--glass-bg-dark);
  color: #FFFFFF;
  border-color: var(--glass-border-dark);
}

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

.btn-outline:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.85);
}

.dark .btn-outline:hover {
  background: rgba(35, 36, 42, 0.85);
}

/* Card Hover */
.card-hover {
  transition: transform 0.35s var(--apple-spring), box-shadow 0.35s var(--apple-spring);
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.dark .card-hover:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

/* Typography tweaks */
h1, h2, h3, h4, .font-logo {
  letter-spacing: -0.02em;
}

/* Desktop Nav active state */
.nav-pill.active {
  background: rgba(10, 132, 255, 0.12);
  color: #0A84FF !important;
  border-radius: 999px;
}

.dark .nav-pill.active {
  background: rgba(10, 132, 255, 0.22);
  color: #0A84FF !important;
  border-radius: 999px;
}

/* Mobile Nav active state */
@media (max-width: 767px) {
  .nav-pill.active {
    background: transparent !important;
    border-radius: 0;
    color: #0A84FF !important;
  }
  .dark .nav-pill.active {
    background: transparent !important;
    border-radius: 0;
    color: #0A84FF !important;
  }
}

/* ==========================================
   PROJECT CATEGORY FILTERS (Instant Blue, Zero Grey)
   ========================================== */
.project-filter-btn {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.05);
  color: #4B5563;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dark .project-filter-btn {
  background-color: rgba(255, 255, 255, 0.06);
  color: #D1D5DB;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-filter-btn:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.09);
  color: #111827;
}

.dark .project-filter-btn:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* Active State: 100% Solid Blue, NEVER GREY on click, hover, active, or focus */
.project-filter-btn.active,
.project-filter-btn.active:hover,
.project-filter-btn.active:focus,
.project-filter-btn.active:active,
.dark .project-filter-btn.active,
.dark .project-filter-btn.active:hover,
.dark .project-filter-btn.active:focus,
.dark .project-filter-btn.active:active {
  background-color: #0A84FF !important;
  color: #FFFFFF !important;
  border-color: #0A84FF !important;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.42) !important;
}

.project-filter-btn:active {
  transform: scale(0.96);
}

/* ==========================================
   SPOTLIGHT MODAL (Clean, Solid, Bug-Free)
   ========================================== */
.spotlight-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  background-color: rgba(242, 242, 247, 0.98);
  z-index: 100;
}

.dark .spotlight-backdrop {
  background-color: rgba(14, 15, 18, 0.98);
}

@media (min-width: 640px) {
  .spotlight-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
  }
  .dark .spotlight-backdrop {
    background-color: rgba(0, 0, 0, 0.78);
  }
}

.spotlight-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.spotlight-modal-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
  transform: scale(0.97) translateY(-8px);
  transition: transform 0.22s var(--apple-bounce);
}

.dark .spotlight-modal-card {
  background-color: #16171B;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75);
}

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

.spotlight-item {
  transition: background-color 0.15s ease;
}

.spotlight-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark .spotlight-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

/* ==========================================
   PROJECT DETAIL SHEET MODAL (Responsive Mobile + Desktop)
   ========================================== */
.sheet-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  background-color: rgba(0, 0, 0, 0.72);
  z-index: 100;
}

.sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.sheet-content-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s var(--apple-spring), opacity 0.3s ease;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.sheet-content-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.dark .sheet-content-card {
  background-color: #16171B;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75);
}

.sheet-backdrop.open .sheet-content-card {
  transform: translateY(0) scale(1);
}

/* Modal Open Body Lock & Bottom Nav Fade */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

body.modal-open #mobile-bottom-nav {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(50px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

/* Global No Scrollbar Utility */
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Toast Notification */
#toast-pill.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Custom Scrollbar for page */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
  border-radius: 999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.18);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 132, 255, 0.6);
}
