@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Dynamic Theme Variables */
:root {
  /* Default: OLED White Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9fb;
  --bg-tertiary: #f4f4f7;
  --text-primary: #000000;
  --text-secondary: #51525a;
  --text-muted: #86868b;
  --accent: #000000;
  --accent-rgb: 0, 0, 0;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glow-color: rgba(0, 0, 0, 0.02);
  --aurora-opacity: 0.04;
}

/* OLED Dark Mode overrides */
.dark {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0c;
  --bg-tertiary: #121215;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #86868b;
  --accent: #ffffff;
  --accent-rgb: 255, 255, 255;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --card-bg: rgba(10, 10, 12, 0.7);
  --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glow-color: rgba(255, 255, 255, 0.02);
  --aurora-opacity: 0.15;
}

/* Aurora Mode overrides */
.theme-aurora {
  --bg-primary: #f0f4f8;
  --bg-secondary: #e2ecf5;
  --bg-tertiary: #d4e2f0;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-rgb: 37, 99, 235;
  --border-color: rgba(37, 99, 235, 0.12);
  --border-hover: rgba(37, 99, 235, 0.24);
  --card-bg: rgba(255, 255, 255, 0.5);
  --card-shadow: 0 10px 40px rgba(37, 99, 235, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glow-color: rgba(37, 99, 235, 0.05);
  --aurora-opacity: 0.45;
}

/* Custom Base resets */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.5s cubic-bezier(0.25, 1, 0.5, 1), color 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Aurora background mesh */
.aurora-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--aurora-opacity);
  transition: opacity 0.5s ease;
}

.aurora-blob {
  position: absolute;
  filter: blur(140px);
  border-radius: 50%;
  mix-blend-mode: multiply;
  animation: float-aurora 25s infinite alternate ease-in-out;
}

.blob-indigo {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.5) 0%, transparent 70%);
  width: 60vw;
  height: 60vh;
  top: -10%;
  left: -10%;
}

.blob-cyan {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, transparent 70%);
  width: 50vw;
  height: 50vh;
  bottom: 20%;
  right: -5%;
  animation-delay: -5s;
}

.blob-pink {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.4) 0%, transparent 70%);
  width: 55vw;
  height: 55vh;
  top: 30%;
  left: 30%;
  animation-delay: -10s;
}

/* Sepia Blue Logo Filters */
.logo-blue {
  filter: invert(24%) sepia(91%) saturate(2971%) hue-rotate(211deg) brightness(96%) contrast(106%) !important;
}

.dark .logo-blue {
  filter: invert(61%) sepia(80%) saturate(600%) hue-rotate(185deg) brightness(95%) contrast(98%) !important;
}

.theme-aurora .logo-blue {
  filter: invert(30%) sepia(85%) saturate(1500%) hue-rotate(200deg) brightness(90%) contrast(100%) !important;
}

@keyframes float-aurora {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(5%, 10%) scale(1.1) rotate(120deg); }
  66% { transform: translate(-10%, -5%) scale(0.9) rotate(240deg); }
  100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

/* Center containers */
.container {
  margin-left: auto;
  margin-right: auto;
}

/* Glassmorphism */
.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

/* Modern Claymorphism style */
.claymorphism {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 
    var(--card-shadow),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(0, 0, 0, 0.05);
}

.dark .claymorphism {
  box-shadow: 
    var(--card-shadow),
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -2px 6px rgba(0, 0, 0, 0.3);
}

/* Subtle Modern Skeuomorphism */
.skeuomorphic-button {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .skeuomorphic-button {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.skeuomorphic-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Subtle Neumorphic styling for Tags */
.neumorphic-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 
    3px 3px 6px rgba(0, 0, 0, 0.02),
    -3px -3px 6px rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.dark .neumorphic-tag {
  box-shadow: 
    3px 3px 6px rgba(0, 0, 0, 0.3),
    -3px -3px 6px rgba(255, 255, 255, 0.02);
}

/* Image Shimmer Loading Effect */
.shimmer {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer-anim 1.5s infinite;
}

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

/* Custom Parallax container */
.parallax-item {
  transform: translateY(var(--parallax-y, 0px));
  transition: transform 0.1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hide scrollbars but keep functionality */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Status Integration Bar / Dynamic Island */
.dynamic-island-morph {
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Stepper progress transitions */
.step-dot {
  transition: all 0.3s ease;
}

/* Click-to-open dropdown class */
.dropdown-menu-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) scale(1) !important;
}

/* For projects menu aligning properly when opened */
header .relative .dropdown-menu-open.absolute {
  transform: translate(0, 0) scale(1) !important;
}

/* Premium Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  width: 100%;
}
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.form-control:focus {
  border-color: var(--accent);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Button style adjustments for forms */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.08);
  filter: brightness(1.05);
}

/* Micro-interactions & Visual Polish */
.logo-blue {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo-blue:hover {
  transform: scale(1.04) rotate(-1deg);
}

/* Smooth Bento Cards Hover Lift */
.claymorphism {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.claymorphism:hover {
  transform: translateY(-5px) scale(1.004);
  border-color: var(--border-hover);
  box-shadow: 
    var(--card-shadow),
    0 24px 48px rgba(0, 0, 0, 0.04),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 6px rgba(0, 0, 0, 0.05);
}
.dark .claymorphism:hover {
  box-shadow: 
    var(--card-shadow),
    0 24px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -2px 6px rgba(0, 0, 0, 0.35);
}

/* Header Links Hover Indicator */
header a:not(.skeuomorphic-button):not(.dropdown-trigger), 
header button:not(#mobile-menu-trigger):not(#close-bottom-sheet) {
  position: relative;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
header a:not(.skeuomorphic-button):not(.dropdown-trigger):not(.group)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
}
header a:not(.skeuomorphic-button):not(.dropdown-trigger):not(.group):hover::after {
  width: 14px;
}

/* Stepper Onboarding Card spacing and shadow details */
#onboarding-form {
  padding: 1rem 0;
}

/* Locked Research Modal & Transitions */
#research-lock-modal {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#research-lock-modal.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

#research-lock-modal:not(.opacity-0) {
  opacity: 1;
  pointer-events: auto;
}

#research-lock-modal > div {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#research-lock-modal.opacity-0 > div {
  transform: scale(0.95);
}

#research-lock-modal:not(.opacity-0) > div {
  transform: scale(1);
}

/* Responsive adjustments for mobile navigation and layout */
@media (max-width: 1023px) {
  header.fixed {
    top: 0.75rem !important; /* Move header closer to top on mobile to avoid notch/island conflicts */
  }

  header nav {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  /* Reduce gap in action area on mobile to save space */
  header nav .flex.items-center.gap-4 {
    gap: 0.5rem !important;
  }
}

@media (max-width: 480px) {
  /* Scale down logo on small mobile screens */
  header nav img.logo-blue {
    height: 1.75rem !important; /* 28px height instead of 40px */
  }

  /* Make theme switcher more compact to prevent layout wrapping */
  header nav .flex.items-center.bg-secondary {
    padding: 0.125rem !important;
  }

  header nav .flex.items-center.bg-secondary button {
    padding: 0.25rem !important;
  }

  header nav .flex.items-center.bg-secondary button svg {
    width: 0.75rem !important;
    height: 0.75rem !important;
  }

  /* Mobile menu adjustments for vertical scrolling flow */
  #mobile-bottom-sheet div.p-6 {
    padding: 1.25rem !important;
  }

  #mobile-bottom-sheet h3 {
    font-size: 1rem !important;
  }
}




