@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-en: 'Plus Jakarta Sans', sans-serif;
  --font-th: 'Prompt', sans-serif;
}

body {
  font-family: var(--font-en), var(--font-th);
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* Cyber Glows & Glassmorphism */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.12);
}

.glow-cyan {
  box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.35);
}

.glow-blue {
  box-shadow: 0 0 25px -5px rgba(59, 130, 246, 0.35);
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #22d3ee 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   LIGHT MODE: ULTRA-CRISP HIGH-CONTRAST TYPOGRAPHY & CARDS
   ========================================================= */
html.light body {
  background-color: #f8fafc !important; /* slate-50 */
  color: #0f172a !important;            /* slate-900 */
}

/* Sidebar & Header in Light Mode */
html.light #sidebar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-right-color: #e2e8f0 !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

html.light #sidebar .border-b,
html.light #sidebar .border-t {
  border-color: #e2e8f0 !important;
}

html.light #top-bar {
  background-color: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

/* Glass Panels & Tech Cards in Light Mode */
html.light .glass-panel {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #cbd5e1 !important; /* slate-300 */
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

html.light .tech-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 14px 30px -10px rgba(2, 132, 199, 0.18) !important;
}

/* Headings & Text Clarity in Light Mode */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light .text-white,
html.light .text-slate-100 {
  color: #0f172a !important; /* Deepest slate-900 for ultra-sharp readability */
}

html.light .text-slate-200,
html.light .text-slate-300 {
  color: #334155 !important; /* slate-700: high-contrast dark text */
}

html.light .text-slate-400 {
  color: #475569 !important; /* slate-600: crisp secondary text, not faded */
}

html.light .text-slate-500 {
  color: #64748b !important; /* slate-500 */
}

html.light .text-cyber-sky {
  color: #0284c7 !important; /* High contrast vibrant ocean blue in light mode */
}

/* Sidebar Nav Links in Light Mode */
html.light .nav-link {
  color: #334155 !important;
}

html.light .nav-link:hover {
  background-color: #f1f5f9 !important;
  color: #0284c7 !important;
}

html.light .nav-link.active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.12) 0%, rgba(2, 132, 199, 0.02) 100%) !important;
  border-left: 3px solid #0284c7 !important;
  color: #0284c7 !important;
  font-weight: 700 !important;
}

/* Dark utility background overrides in Light Mode */
html.light .bg-slate-950,
html.light .bg-navy-950 {
  background-color: #ffffff !important;
}

html.light .bg-slate-900,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/60 {
  background-color: #f1f5f9 !important; /* slate-100 */
  border-color: #cbd5e1 !important;
}

html.light .bg-slate-800,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/90 {
  background-color: #e2e8f0 !important; /* slate-200 */
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-800\/50,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/60 {
  border-color: #e2e8f0 !important;
}

/* Timeline vertical line & dots in Light Mode */
html.light .border-l-2.border-slate-800 {
  border-color: #cbd5e1 !important;
}

html.light .relative.group .bg-navy-950 {
  background-color: #ffffff !important;
}

/* Filter buttons in Light Mode */
html.light .filter-btn:not(.bg-cyber-sky) {
  background-color: #ffffff !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light .filter-btn:not(.bg-cyber-sky):hover {
  background-color: #f1f5f9 !important;
  color: #0284c7 !important;
}

html.light .filter-btn.bg-cyber-sky {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

/* Modals in Light Mode */
html.light .modal-content {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  color: #0f172a !important;
}

html.light .modal-content input,
html.light .modal-content select,
html.light .modal-content textarea {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .modal-content input:focus,
html.light .modal-content select:focus,
html.light .modal-content textarea:focus {
  border-color: #0284c7 !important;
  background-color: #ffffff !important;
}

html.light .modal-content label {
  color: #1e293b !important;
}

/* Top bar controls in Light Mode */
html.light #theme-toggle {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

html.light #theme-toggle:hover {
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

html.light #lang-btn-th.bg-cyber-sky,
html.light #lang-btn-en.bg-cyber-sky {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

html.light #lang-btn-th:not(.bg-cyber-sky),
html.light #lang-btn-en:not(.bg-cyber-sky) {
  color: #475569 !important;
}

html.light #lang-btn-th:not(.bg-cyber-sky):hover,
html.light #lang-btn-en:not(.bg-cyber-sky):hover {
  color: #0f172a !important;
}

/* Footer & small tags in Light Mode */
html.light footer {
  border-top-color: #e2e8f0 !important;
}

html.light footer p {
  color: #475569 !important;
}

/* Toast notification in Light Mode */
html.light #toast-container > div {
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.15);
}

/* Modal Animation */
.modal-backdrop {
  animation: fadeIn 0.2s ease-out forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Card Hover Effects */
.tech-card {
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 14px 32px -10px rgba(6, 182, 212, 0.22);
}

/* Sidebar active indicator */
.nav-link.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0.03) 100%);
  border-left: 3px solid #38bdf8;
  color: #38bdf8 !important;
  font-weight: 600;
}

/* Print Styles */
@media print {
  #sidebar, #top-bar, .no-print {
    display: none !important;
  }
  main {
    margin-left: 0 !important;
    padding: 0 !important;
  }
}
