/* 
 * Modern Cyan Glassmorphism Custom Styles
 * Mr. Navapon Madmai - SPU ICT Portfolio
 */

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

:root {
  --color-cyan-glow: rgba(6, 182, 212, 0.25);
  --color-cyan-border: rgba(6, 182, 212, 0.3);
  --color-glass-bg: rgba(255, 255, 255, 0.75);
  --color-glass-card: rgba(255, 255, 255, 0.85);
  --color-glass-border: rgba(255, 255, 255, 0.6);
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
}

.dark {
  --color-cyan-glow: rgba(6, 182, 212, 0.22);
  --color-cyan-border: rgba(34, 211, 238, 0.25);
  --color-glass-bg: rgba(15, 23, 42, 0.65);
  --color-glass-card: rgba(15, 23, 42, 0.75);
  --color-glass-border: rgba(255, 255, 255, 0.08);
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
}

body {
  font-family: 'Plus Jakarta Sans', 'Kanit', sans-serif;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-code {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism primitives */
.glass-panel {
  background: var(--color-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.dark .glass-panel {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.glass-card {
  background: var(--color-glass-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .glass-card {
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.35);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 16px 32px -4px rgba(6, 182, 212, 0.18);
}

.dark .glass-card:hover {
  box-shadow: 0 16px 36px -4px rgba(6, 182, 212, 0.22);
}

/* Cyan glows & highlights */
.cyan-glow {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.cyan-glow-lg {
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.4);
}

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

.dark .text-gradient-cyan {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ambient Background Blobs */
.ambient-blob-1 {
  position: fixed;
  top: -10%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-blob-2 {
  position: fixed;
  bottom: 10%;
  left: 20%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.04) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

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

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -50px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.92); }
}

/* Left Sidebar Navigation Styles */
.nav-link {
  position: relative;
  transition: all 0.25s ease;
}

.nav-link.active {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  font-weight: 600;
  border-color: rgba(6, 182, 212, 0.6);
}

.dark .nav-link.active {
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.7);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 3px;
  background: #06b6d4;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #06b6d4;
}

/* Timeline Components */
.timeline-stem {
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #06b6d4 0%, rgba(6, 182, 212, 0.15) 100%);
}

.timeline-dot {
  position: absolute;
  left: 10px;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #06b6d4;
  border: 3px solid #0f172a;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7);
  z-index: 2;
}

.light .timeline-dot {
  border: 3px solid #ffffff;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.7);
}

/* Toast Container & Animations */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast-item.hide {
  animation: toastSlideOut 0.3s ease forwards;
}

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

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Modals */
.modal-overlay {
  transition: opacity 0.25s ease-out;
}

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

/* PDF Embedded Viewer Container */
.pdf-viewer-frame {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Progress bar animation */
@keyframes progressFill {
  from { width: 0; }
}

.skill-bar-fill {
  animation: progressFill 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Button Pulse */
.btn-pulse {
  position: relative;
  overflow: hidden;
}

.btn-pulse::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.3s;
}

.btn-pulse:active::after {
  transform: translate(-50%, -50%) scale(2);
  opacity: 1;
  transition: 0s;
}
