/* ====================================================================
   Modern Glassmorphism & Rose Palette Custom Styles
   Portfolio: เอกรัตน์ เป็นสุข (Aekarat Pensuk) - ICT Sripatum University
   ==================================================================== */

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

:root {
  --primary-rose: #f43f5e;
  --primary-pink: #ec4899;
  --rose-glow: rgba(244, 63, 94, 0.35);
  --glass-bg-dark: rgba(15, 23, 42, 0.72);
  --glass-border-dark: rgba(244, 63, 94, 0.18);
  --glass-bg-light: rgba(255, 255, 255, 0.88);
  --glass-border-light: rgba(244, 63, 94, 0.25);
}

* {
  font-family: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scroll-behavior: smooth;
}

/* Glassmorphism utility classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(244, 63, 94, 0.18);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light .glass-panel {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(244, 63, 94, 0.25) !important;
  box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.glass-panel-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 14px 40px -8px rgba(244, 63, 94, 0.28);
}

.glass-nav-active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.24) 0%, rgba(236, 72, 153, 0.16) 100%);
  border-left: 4px solid #f43f5e;
  color: #fda4af !important;
  font-weight: 600;
}

.light .glass-nav-active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18) 0%, rgba(236, 72, 153, 0.1) 100%) !important;
  border-left: 4px solid #e11d48 !important;
  color: #be123c !important;
  font-weight: 700 !important;
}

/* Ambient glow spheres */
.bg-mesh-dark {
  background-color: #0b0f19;
  background-image: 
    radial-gradient(at 0% 0%, rgba(244, 63, 94, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.14) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(225, 29, 72, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(136, 19, 55, 0.2) 0px, transparent 50%);
  background-attachment: fixed;
}

.bg-mesh-light {
  background-color: #fff1f2;
  background-image: 
    radial-gradient(at 0% 0%, rgba(254, 205, 211, 0.7) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(251, 207, 232, 0.6) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(254, 226, 226, 0.7) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(255, 228, 230, 0.6) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Text Gradients */
.text-gradient-rose {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.light .text-gradient-rose {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #9f1239 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ====================================================================
   LIGHT MODE CONTRAST OVERRIDES (Fixes invisible / washed out text)
   ==================================================================== */
.light {
  color: #0f172a !important;
}

.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
  color: #0f172a !important;
}

.light .profile-name {
  color: #0f172a !important;
}

.light .profile-title {
  color: #be123c !important;
}

.light .text-white,
.light .text-slate-100,
.light .text-slate-200 {
  color: #0f172a !important;
}

.light .text-slate-300 {
  color: #334155 !important;
}

.light .text-slate-400 {
  color: #475569 !important;
}

.light #hero-bio {
  color: #334155 !important;
}

.light .sidebar-nav-link {
  color: #475569 !important;
}

.light .sidebar-nav-link:hover {
  color: #e11d48 !important;
  background-color: rgba(244, 63, 94, 0.1) !important;
}

.light .profile-email,
.light .profile-phone {
  color: #0f172a !important;
}

.light .bg-slate-900\/60,
.light .bg-slate-900\/40,
.light .bg-slate-800\/80,
.light .bg-slate-800 {
  background-color: rgba(255, 241, 242, 0.8) !important;
  color: #0f172a !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}

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

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

.light ::-webkit-scrollbar-track {
  background: #ffe4e6;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f43f5e, #ec4899);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #be123c;
}

/* Modal Animations */
.modal-overlay {
  transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
}

.modal-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-in-out;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-overlay.hidden .modal-content {
  transform: scale(0.95) translateY(12px);
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1) translateY(0);
}

/* Toast Container */
#toast-container {
  z-index: 9999;
}

.toast {
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.3);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.toast-hiding {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
}

/* Profile Avatar Glow Animation */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.45);
  }
  50% {
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.7);
  }
}

.avatar-glow {
  animation: pulseGlow 3.5s infinite ease-in-out;
}

/* Timeline Vertical Line */
.timeline-stem {
  position: absolute;
  left: 20px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #f43f5e 0%, rgba(244, 63, 94, 0.2) 100%);
}

/* Skill Progress Bars */
.skill-bar-fill {
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
