/* ==========================================================================
   Modern Glassmorphism Design System - Portfolio of Thanadon Somjit
   Accent: Electric Indigo & Cyber Cyan / Aurora Glow
   ========================================================================== */

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

:root {
  --font-sans: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Primary Cyber Tech Palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4338ca;
  --cyan-accent: #06b6d4;
  --cyan-light: #22d3ee;
  --violet-accent: #8b5cf6;
  --emerald-accent: #10b981;
  
  /* Light Mode Glassmorphism */
  --bg-gradient: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 40%, #e0f2fe 100%);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-card: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-subtle: rgba(148, 163, 184, 0.2);
  --glass-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glow-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
  --sidebar-bg: rgba(255, 255, 255, 0.82);
  --modal-overlay: rgba(15, 23, 42, 0.4);
}

.dark {
  /* Dark Mode Ultra Cyber Glassmorphism */
  --bg-gradient: radial-gradient(circle at 15% 15%, #0f172a 0%, #030712 50%, #020617 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.68);
  --glass-card: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.15);
  --glow-shadow: 0 0 35px rgba(99, 102, 241, 0.4);
  --sidebar-bg: rgba(11, 17, 32, 0.85);
  --modal-overlay: rgba(2, 6, 23, 0.75);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.1);
}
.dark ::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.4);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--cyan-accent));
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--violet-accent), var(--primary-light));
}

/* Ambient Animated Blobs in Background */
.ambient-glow-1 {
  position: fixed;
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-glow-2 {
  position: fixed;
  bottom: 5%;
  right: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.ambient-glow-3 {
  position: fixed;
  top: 50%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(75px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 15s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 35px) scale(0.95); }
}

/* Glassmorphism Surface Utility */
.glass-panel {
  background: var(--glass-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-subtle {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-subtle);
}

.glass-card-interactive {
  position: relative;
  overflow: hidden;
}

.glass-card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.8), rgba(6, 182, 212, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card-interactive:hover::before {
  opacity: 1;
}

.glass-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-shadow);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Timeline Custom Connectors */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -29px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 12px #6366f1;
  border: 2px solid #ffffff;
}

.dark .timeline-item::before {
  border: 2px solid #0f172a;
}

/* Smooth Navigation Active Pill */
.nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12));
  border-left: 3px solid #6366f1;
  color: #6366f1;
  font-weight: 600;
}

.dark .nav-link.active {
  color: #38bdf8;
  border-left: 3px solid #38bdf8;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.18));
}

/* Toast Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeOutDown {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
}

.toast-enter {
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-leave {
  animation: fadeOutDown 0.25s ease-in forwards;
}

/* Modal Fade Animation */
.modal-backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes modalZoom {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-content-animated {
  animation: modalZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulse badge */
.status-pulsing-dot {
  position: relative;
}
.status-pulsing-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: inherit;
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.9; }
  80%, 100% { transform: scale(2.4); opacity: 0; }
}
