/* =====================================================================
   idacode.my.id - Modern Dual Mode Portfolio Stylesheet
   Typography: Helvetica Neue / Helvetica, Arial, sans-serif
   Theme Support: Dark & Light Mode
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- ROOT VARIABLES --- */
:root,
html.dark {
  --font-sans: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark Mode Palette */
  --bg-primary: #060911;
  --bg-secondary: #0b1120;
  --bg-card: rgba(13, 19, 33, 0.72);
  --bg-card-hover: rgba(18, 26, 44, 0.85);
  --border-subtle: rgba(51, 65, 85, 0.55);
  --border-card: rgba(51, 65, 85, 0.6);
  --border-focus: rgba(6, 182, 212, 0.45);
  --accent-cyan: #22d3ee;
  --accent-cyan-glow: rgba(34, 211, 238, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --navbar-bg: rgba(6, 9, 17, 0.85);
  --navbar-border: rgba(30, 41, 59, 0.8);
  --pill-bg: rgba(15, 23, 42, 0.7);
  --pill-border: rgba(51, 65, 85, 0.8);
  --pill-text: #94a3b8;
}

/* Light Mode Variables */
html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: rgba(6, 182, 212, 0.6);
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --navbar-bg: rgba(255, 255, 255, 0.88);
  --navbar-border: rgba(226, 232, 240, 0.9);
  --pill-bg: rgba(241, 245, 249, 0.92);
  --pill-border: #cbd5e1;
  --pill-text: #475569;
}

/* --- BASE & TYPOGRAPHY --- */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, p, span, a, button, input, textarea {
  font-family: var(--font-sans);
}

code, .font-mono {
  font-family: var(--font-mono);
}

/* Custom modern thin scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
html.light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Ambient Subtle Grain / Noise Overlay */
.noise-overlay {
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
}
html.light .noise-overlay {
  background-image: radial-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 0);
}

/* Glow Radial Effect */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 550px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(6, 182, 212, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
html.light .ambient-glow-top {
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(14, 165, 233, 0.09), transparent 70%);
}

.ambient-glow-section {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.05), transparent 70%);
  pointer-events: none;
}
html.light .ambient-glow-section {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.04), transparent 70%);
}

/* Glass Card */
.glass-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.08);
}
html.light .glass-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.12);
}

/* Clean pill active states */
.filter-btn {
  transition: all 0.25s ease;
}
.filter-btn.active {
  background-color: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
html.light .filter-btn.active {
  background-color: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.5);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.15);
}

/* Modal Animations */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.96) translateY(12px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.modal-backdrop.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Pulse indicator */
@keyframes calm-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.15);
  }
}
.pulse-dot {
  animation: calm-pulse 2.8s infinite ease-in-out;
}

/* Custom selection */
::selection {
  background: rgba(6, 182, 212, 0.25);
  color: #ffffff;
}
html.light ::selection {
  background: rgba(2, 132, 199, 0.2);
  color: #0f172a;
}

/* Project card image zoom */
.project-card .img-zoom {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .img-zoom {
  transform: scale(1.03);
}

/* Toast Notification */
#toast {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Theme Toggle Icons */
html.dark .sun-icon {
  display: block;
}
html.dark .moon-icon {
  display: none;
}
html.light .sun-icon {
  display: none;
}
html.light .moon-icon {
  display: block;
}

/* --- KEAHLIAN / TECH STACK TYPOGRAPHY & PILLS --- */
.skill-card-title {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.skill-card-desc {
  font-family: var(--font-sans);
  line-height: 1.5;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem; /* 13px - comfortable, readable size */
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-pill:hover {
  transform: translateY(-1px);
}

/* Dark Mode Pills */
.skill-pill-cyan {
  background-color: rgba(15, 23, 42, 0.85);
  color: #67e8f9;
  border-color: rgba(51, 65, 85, 0.8);
}
.skill-pill-cyan:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.skill-pill-blue {
  background-color: rgba(15, 23, 42, 0.85);
  color: #93c5fd;
  border-color: rgba(51, 65, 85, 0.8);
}
.skill-pill-blue:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.skill-pill-purple {
  background-color: rgba(15, 23, 42, 0.85);
  color: #d8b4fe;
  border-color: rgba(51, 65, 85, 0.8);
}
.skill-pill-purple:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.skill-pill-teal {
  background-color: rgba(15, 23, 42, 0.85);
  color: #5eead4;
  border-color: rgba(51, 65, 85, 0.8);
}
.skill-pill-teal:hover {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.15);
}

/* Navbar Scrolled State */
#main-navbar.navbar-scrolled {
  background-color: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--navbar-border) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

/* =====================================================================
   LIGHT MODE OVERRIDES & ADAPTATIONS
   ===================================================================== */
html.light body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Headings & High Contrast Text */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light .text-white,
html.light .text-slate-100 {
  color: #0f172a !important;
}

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

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

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

/* Borders & Separators */
html.light .border-slate-800,
html.light .border-slate-800\/60,
html.light .border-slate-800\/70,
html.light .border-slate-800\/80,
html.light .border-slate-800\/90,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/60 {
  border-color: #e2e8f0 !important;
}

/* Section divider borders */
html.light section[id] {
  border-color: #e2e8f0 !important;
}

/* Background surfaces */
html.light .bg-slate-950,
html.light .bg-slate-950\/80,
html.light .bg-slate-950\/90,
html.light .bg-slate-950\/95 {
  background-color: #ffffff !important;
}

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

/* Navbar */
html.light #main-navbar.navbar-scrolled {
  background-color: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--navbar-border) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
}

html.light #main-navbar nav {
  background-color: var(--pill-bg) !important;
  border-color: var(--pill-border) !important;
}

html.light .desktop-nav-link {
  color: var(--pill-text) !important;
}
html.light .desktop-nav-link:hover,
html.light .desktop-nav-link.text-cyan-400 {
  color: #0284c7 !important;
}

html.light .theme-toggle-btn {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light .theme-toggle-btn:hover {
  background-color: #e2e8f0 !important;
  color: #0284c7 !important;
}

html.light #mobile-menu {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #e2e8f0 !important;
}
html.light .mobile-nav-link {
  color: #334155 !important;
}
html.light .mobile-nav-link:hover {
  background-color: #f1f5f9 !important;
  color: #0284c7 !important;
}

/* Hero Headline Gradient */
html.light .hero-name-gradient {
  background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0284c7 100%) !important;
}

/* Hero Action Buttons */
html.light a[href*="CV-Ida"],
html.light a[href="https://github.com/idaferiani1915"]:not(#kontak a) {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}
html.light a[href*="CV-Ida"]:hover,
html.light a[href="https://github.com/idaferiani1915"]:not(#kontak a):hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0284c7 !important;
}

/* Filter Buttons Container */
html.light .filter-btn {
  color: #64748b !important;
}
html.light .filter-btn:hover {
  color: #0f172a !important;
}

/* Badges & Pills */
html.light .bg-cyan-950\/70,
html.light .bg-cyan-950\/80 {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

html.light .bg-blue-950\/70 {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html.light .text-cyan-300,
html.light .text-cyan-400 {
  color: #0284c7 !important;
}

/* Keahlian & Tech Stack Light Mode Styling */
html.light .skill-card-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light .skill-card-desc {
  color: #475569 !important; /* Soft Slate - high readability, gentle on eyes */
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

html.light .skill-pill {
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.light .skill-pill-cyan {
  background-color: #f0f9ff !important;
  color: #0369a1 !important; /* Ocean Cyan - clear contrast */
  border-color: #bae6fd !important;
}
html.light .skill-pill-cyan:hover {
  background-color: #e0f2fe !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

html.light .skill-pill-blue {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important; /* Royal Blue - high contrast */
  border-color: #bfdbfe !important;
}
html.light .skill-pill-blue:hover {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.15);
}

html.light .skill-pill-purple {
  background-color: #faf5ff !important;
  color: #6b21a8 !important; /* Deep Purple - high contrast */
  border-color: #e9d5ff !important;
}
html.light .skill-pill-purple:hover {
  background-color: #f3e8ff !important;
  border-color: #d8b4fe !important;
  box-shadow: 0 2px 8px rgba(107, 33, 168, 0.15);
}

html.light .skill-pill-teal {
  background-color: #f0fdfa !important;
  color: #0f766e !important; /* Deep Emerald/Teal - high contrast */
  border-color: #99f6e4 !important;
}
html.light .skill-pill-teal:hover {
  background-color: #ccfbf1 !important;
  border-color: #5eead4 !important;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.15);
}

/* Card Icons in Keahlian (Light Mode) */
html.light #keahlian .text-cyan-400 {
  color: #0284c7 !important;
}
html.light #keahlian .bg-cyan-500\/10 {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
}

html.light #keahlian .text-blue-400 {
  color: #1d4ed8 !important;
}
html.light #keahlian .bg-blue-500\/10 {
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
}

html.light #keahlian .text-purple-400 {
  color: #7e22ce !important;
}
html.light #keahlian .bg-purple-500\/10 {
  background-color: #faf5ff !important;
  border-color: #e9d5ff !important;
}

html.light #keahlian .text-teal-400 {
  color: #0f766e !important;
}
html.light #keahlian .bg-teal-500\/10 {
  background-color: #f0fdfa !important;
  border-color: #99f6e4 !important;
}

/* Support legacy/other badge color classes in light mode */
html.light .text-blue-300 {
  color: #1d4ed8 !important;
}
html.light .text-purple-300 {
  color: #7e22ce !important;
}
html.light .text-teal-300 {
  color: #0f766e !important;
}

/* Cards & Project items */
html.light .project-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html.light .project-card:hover {
  border-color: rgba(2, 132, 199, 0.4) !important;
}

html.light .project-card .bg-slate-950 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

html.light .project-card h3 {
  color: #0f172a !important;
}
html.light .project-card:hover h3 {
  color: #0284c7 !important;
}

html.light .project-card p {
  color: #475569 !important;
}

html.light .project-card .bg-slate-800\/80,
html.light .project-card .bg-slate-800\/50,
html.light .bg-slate-800 {
  background-color: #f1f5f9 !important;
  color: #0369a1 !important;
  border-color: #e2e8f0 !important;
}

/* Timeline */
html.light .border-l {
  border-color: #cbd5e1 !important;
}
html.light .group-hover\:scale-125 {
  border-color: #0284c7 !important;
}

/* Contact Section & Footer */
html.light #kontak .glass-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important;
}

html.light #kontak .bg-slate-900,
html.light #kontak a {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light #kontak a:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

/* Modal */
html.light #project-modal {
  background-color: rgba(15, 23, 42, 0.5) !important;
}

html.light #project-modal .modal-content {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15) !important;
}

html.light #modal-close-btn {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}
html.light #modal-close-btn:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html.light #project-modal .aspect-\[21\/9\] {
  background-color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

html.light #project-modal .aspect-\[21\/9\] h2 {
  color: #ffffff !important;
}

html.light #project-modal .aspect-\[21\/9\] p {
  color: #cbd5e1 !important;
}

html.light #project-modal .p-5.rounded-xl {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light #drawer-theme-label {
  background-color: #e2e8f0 !important;
  color: #0369a1 !important;
}

html.light #project-modal button[onclick="closeProjectModal()"] {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}
html.light #project-modal button[onclick="closeProjectModal()"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Image Overlays & Contrast Preservation */
html.light .aspect-\[4\/5\] p.text-white {
  color: #ffffff !important;
}
html.light .aspect-\[4\/5\] p.text-cyan-400 {
  color: #22d3ee !important;
}
html.light .aspect-\[4\/3\] span {
  color: #f8fafc !important;
}
html.light a.bg-cyan-500 {
  color: #082f49 !important;
}

/* Toast Notification in Light Mode */
html.light #toast {
  background-color: #ffffff !important;
  color: #0369a1 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.25) !important;
}
