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

:root {
  --color-sage: #9dc183;
  --color-sage-rgb: 157, 193, 131;
  --color-tea: #d0f0c0;
  --color-tea-rgb: 208, 240, 192;
  
  --bg-deep: #070b08;
  --bg-surface: #0e1511;
  --bg-surface-elevated: #141f19;
  
  --text-main: #f4f8f5;
  --text-muted: #9aa8a0;
  --text-dim: #6d7b73;
  
  --glass-bg: rgba(15, 23, 18, 0.72);
  --glass-bg-hover: rgba(23, 35, 28, 0.9);
  --glass-border: rgba(208, 240, 192, 0.16);
  --glass-border-hover: rgba(208, 240, 192, 0.42);
  --glass-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 20px -5px rgba(157, 193, 131, 0.12);
  --glass-glow: rgba(157, 193, 131, 0.22);
}

/* Light Theme Variables */
html.light-theme, body.light-theme {
  --bg-deep: #f3f7f3;
  --bg-surface: #e9f0ea;
  --bg-surface-elevated: #dfead0;
  
  --text-main: #0c150f;
  --text-muted: #3d4f43;
  --text-dim: #5c7063;
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-bg-hover: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(157, 193, 131, 0.35);
  --glass-border-hover: rgba(157, 193, 131, 0.65);
  --glass-shadow: 0 16px 36px -10px rgba(30, 60, 40, 0.08), 0 0 20px -5px rgba(157, 193, 131, 0.18);
  --glass-glow: rgba(157, 193, 131, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-text-size-adjust: 100%;
}

/* Heading font */
h1, h2, h3, h4, .font-heading {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* Brand Logo Image with theme auto invert */
.brand-logo-img {
  transition: filter 0.3s ease, transform 0.3s ease;
}

body.light-theme .brand-logo-img,
html.light-theme .brand-logo-img {
  filter: invert(1) brightness(0.12);
}

/* Glassmorphism primitives */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1.5rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px 0 rgba(157, 193, 131, 0.2);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4), 0 0 20px -4px var(--glass-glow);
}

.glass-pill {
  background: rgba(208, 240, 192, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.glass-pill:hover, .glass-pill.active {
  background: rgba(157, 193, 131, 0.22);
  border-color: var(--color-tea);
  color: var(--color-tea);
}

/* Background Glowing Orbs */
.ambient-glow-1 {
  position: fixed;
  top: -15%;
  left: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(157, 193, 131, 0.07) 0%, rgba(157, 193, 131, 0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-glow-2 {
  position: fixed;
  bottom: 10%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(208, 240, 192, 0.05) 0%, rgba(208, 240, 192, 0) 70%);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

.ambient-glow-3 {
  position: fixed;
  top: 45%;
  left: 40%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(157, 193, 131, 0.04) 0%, rgba(157, 193, 131, 0) 70%);
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

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

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

/* Subtle grid overlay */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(208, 240, 192, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(208, 240, 192, 0.035) 1px, transparent 1px);
}

/* Button & interactive effects */
.btn-primary {
  background: linear-gradient(135deg, var(--color-tea) 0%, var(--color-sage) 100%);
  color: #0c140e !important;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.85rem 1.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 24px -6px rgba(157, 193, 131, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px -4px rgba(208, 240, 192, 0.55);
  color: #060b07 !important;
}

.btn-secondary {
  background: rgba(208, 240, 192, 0.07);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.85rem 1.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(208, 240, 192, 0.15);
  border-color: var(--color-tea);
  color: var(--color-tea);
  transform: translateY(-2px);
}

/* Bento Card Micro-border Refinement */
.glass-panel::before {
  content: none;
}

/* Gradient Text */
.text-gradient-sage {
  background: linear-gradient(135deg, #ffffff 15%, var(--color-tea) 65%, var(--color-sage) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-green {
  background: linear-gradient(135deg, var(--color-tea) 0%, var(--color-sage) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Bento Specific Badge - Architectural Monospace Label */
.bento-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  background: rgba(208, 240, 192, 0.06);
  color: var(--color-tea);
  border: 1px solid rgba(208, 240, 192, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Range input styling for interactive cost estimator */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: rgba(208, 240, 192, 0.15);
  outline: none;
  transition: 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-tea);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(157, 193, 131, 0.8);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(157, 193, 131, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 193, 131, 0.45);
}

/* Modal transition */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Marquee / Infinite Ticker for brands/skills */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 2rem;
  animation: marquee 25s linear infinite;
}

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

/* ==========================================================================
   LIGHT THEME COMPLETE OVERRIDES (FIX BUG MODE SIANG/MALAM)
   ========================================================================== */
body.light-theme,
html.light-theme body,
html.light-theme {
  background-color: #f3f7f3 !important;
  color: #0e1711 !important;
}

/* Heading text in light theme */
:is(html.light-theme, body.light-theme) h1,
:is(html.light-theme, body.light-theme) h2,
:is(html.light-theme, body.light-theme) h3,
:is(html.light-theme, body.light-theme) h4,
:is(html.light-theme, body.light-theme) .text-white {
  color: #0b140e !important;
}

/* Text-gradient-sage in light theme */
:is(html.light-theme, body.light-theme) .text-gradient-sage {
  background: linear-gradient(135deg, #1b3d22 10%, #3d683f 50%, #689255 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

:is(html.light-theme, body.light-theme) .text-gradient-green {
  background: linear-gradient(135deg, #2a5a32 0%, #4f8047 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Body & secondary text */
:is(html.light-theme, body.light-theme) p,
:is(html.light-theme, body.light-theme) .text-slate-300,
:is(html.light-theme, body.light-theme) .text-slate-200,
:is(html.light-theme, body.light-theme) .text-slate-100 {
  color: #24362b !important;
}

:is(html.light-theme, body.light-theme) .text-slate-400,
:is(html.light-theme, body.light-theme) .text-slate-500 {
  color: #3b5042 !important;
}

/* Form labels across the website */
:is(html.light-theme, body.light-theme) label,
:is(html.light-theme, body.light-theme) label.text-slate-300,
:is(html.light-theme, body.light-theme) label.text-slate-400 {
  color: #09130c !important;
  font-weight: 700 !important;
}

/* Panels and Cards in light mode */
:is(html.light-theme, body.light-theme) .glass-panel,
:is(html.light-theme, body.light-theme) .glass-card {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(157, 193, 131, 0.4) !important;
  box-shadow: 0 12px 32px -8px rgba(30, 50, 35, 0.08), 0 0 16px -2px rgba(157, 193, 131, 0.18) !important;
}

:is(html.light-theme, body.light-theme) .glass-panel:hover,
:is(html.light-theme, body.light-theme) .glass-card:hover {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(157, 193, 131, 0.65) !important;
  box-shadow: 0 16px 36px -6px rgba(30, 50, 35, 0.12), 0 0 20px -2px rgba(157, 193, 131, 0.25) !important;
}

/* Navbar in light mode */
:is(html.light-theme, body.light-theme) nav.glass-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(157, 193, 131, 0.45) !important;
  box-shadow: 0 10px 30px rgba(0, 35, 15, 0.08) !important;
}

:is(html.light-theme, body.light-theme) .nav-link {
  color: #334439 !important;
}

:is(html.light-theme, body.light-theme) .nav-link:hover,
:is(html.light-theme, body.light-theme) .nav-link.active-page {
  color: #2b5527 !important;
  font-weight: 700 !important;
}

/* Bento Badges & Pills */
:is(html.light-theme, body.light-theme) .bento-badge {
  background: rgba(30, 60, 35, 0.06) !important;
  color: #173b1f !important;
  border-color: rgba(30, 60, 35, 0.22) !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) .glass-pill {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #1b3022 !important;
  border-color: rgba(157, 193, 131, 0.45) !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) .glass-pill:hover,
:is(html.light-theme, body.light-theme) .glass-pill.active {
  background: #9dc183 !important;
  color: #070b08 !important;
  border-color: #84ab6b !important;
}

/* Secondary Button */
:is(html.light-theme, body.light-theme) .btn-secondary {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #142419 !important;
  border-color: rgba(157, 193, 131, 0.5) !important;
}

:is(html.light-theme, body.light-theme) .btn-secondary:hover {
  background: rgba(208, 240, 192, 0.5) !important;
  border-color: #9dc183 !important;
  color: #09130c !important;
}

/* Borders and Backgrounds */
:is(html.light-theme, body.light-theme) .border-white\/10,
:is(html.light-theme, body.light-theme) .border-white\/20,
:is(html.light-theme, body.light-theme) .border-white\/5 {
  border-color: rgba(157, 193, 131, 0.3) !important;
}

:is(html.light-theme, body.light-theme) .bg-white\/5,
:is(html.light-theme, body.light-theme) .bg-white\/10 {
  background-color: rgba(157, 193, 131, 0.12) !important;
}

/* Numbers / Prices */
:is(html.light-theme, body.light-theme) .text-\[\#d0f0c0\],
:is(html.light-theme, body.light-theme) .text-tea {
  color: #1a441e !important;
}

:is(html.light-theme, body.light-theme) .text-\[\#9dc183\],
:is(html.light-theme, body.light-theme) .text-sage {
  color: #275929 !important;
}

/* Universal Form Controls in Light Mode */
:is(html.light-theme, body.light-theme) select,
:is(html.light-theme, body.light-theme) input[type="text"],
:is(html.light-theme, body.light-theme) input[type="password"],
:is(html.light-theme, body.light-theme) input[type="email"],
:is(html.light-theme, body.light-theme) input[type="tel"],
:is(html.light-theme, body.light-theme) input[type="number"],
:is(html.light-theme, body.light-theme) input[type="url"],
:is(html.light-theme, body.light-theme) textarea {
  background-color: #ffffff !important;
  color: #09130c !important;
  border: 1.5px solid rgba(132, 171, 107, 0.5) !important;
}

:is(html.light-theme, body.light-theme) select:focus,
:is(html.light-theme, body.light-theme) input[type="text"]:focus,
:is(html.light-theme, body.light-theme) input[type="password"]:focus,
:is(html.light-theme, body.light-theme) input[type="email"]:focus,
:is(html.light-theme, body.light-theme) input[type="tel"]:focus,
:is(html.light-theme, body.light-theme) input[type="number"]:focus,
:is(html.light-theme, body.light-theme) input[type="url"]:focus,
:is(html.light-theme, body.light-theme) textarea:focus {
  border-color: #2f6128 !important;
  box-shadow: 0 0 0 3px rgba(157, 193, 131, 0.3) !important;
  outline: none !important;
}

:is(html.light-theme, body.light-theme) select option {
  background-color: #ffffff !important;
  color: #09130c !important;
}

:is(html.light-theme, body.light-theme) input::placeholder,
:is(html.light-theme, body.light-theme) textarea::placeholder {
  color: #63786a !important;
}

/* Grid Pattern in Light Mode */
:is(html.light-theme, body.light-theme) .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(157, 193, 131, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(157, 193, 131, 0.12) 1px, transparent 1px) !important;
}

/* Ambient glow subtle opacity */
:is(html.light-theme, body.light-theme) .ambient-glow-1,
:is(html.light-theme, body.light-theme) .ambient-glow-2,
:is(html.light-theme, body.light-theme) .ambient-glow-3 {
  opacity: 0.55 !important;
}

/* Footer in Light Mode */
:is(html.light-theme, body.light-theme) footer {
  background-color: rgba(235, 244, 236, 0.96) !important;
  border-top-color: rgba(157, 193, 131, 0.3) !important;
  color: #3f5245 !important;
}

/* Modal in Light Mode */
:is(html.light-theme, body.light-theme) .modal-overlay {
  background-color: rgba(10, 20, 15, 0.6) !important;
}

:is(html.light-theme, body.light-theme) .modal-content {
  background-color: #ffffff !important;
  border-color: rgba(157, 193, 131, 0.5) !important;
  box-shadow: 0 25px 50px -12px rgba(20, 40, 25, 0.25) !important;
}

:is(html.light-theme, body.light-theme) #modal-desc {
  color: #24362b !important;
}

/* ==========================================================================
   ADMIN LOGIN PANEL SPECIFIC LIGHT THEME OVERRIDES (CRISP & HIGH CONTRAST)
   ========================================================================== */

:is(html.light-theme, body.light-theme) #login-view .glass-panel {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1.5px solid rgba(132, 171, 107, 0.55) !important;
  box-shadow: 0 25px 60px -15px rgba(25, 45, 30, 0.16), 0 0 30px rgba(157, 193, 131, 0.25) !important;
}

:is(html.light-theme, body.light-theme) #login-view .bento-badge {
  background: rgba(157, 193, 131, 0.25) !important;
  color: #173b1f !important;
  border: 1.5px solid rgba(132, 171, 107, 0.6) !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #login-view .bento-badge span.admin-badge-dot,
:is(html.light-theme, body.light-theme) #login-view .bento-badge span.bg-\[\#9dc183\] {
  background-color: #275929 !important;
}

:is(html.light-theme, body.light-theme) #login-view p,
:is(html.light-theme, body.light-theme) #login-view .admin-login-subtitle,
:is(html.light-theme, body.light-theme) #login-view .text-slate-400 {
  color: #24362b !important;
  font-weight: 500 !important;
}

:is(html.light-theme, body.light-theme) #login-view label,
:is(html.light-theme, body.light-theme) #login-view .admin-form-label,
:is(html.light-theme, body.light-theme) #login-view .text-slate-300 {
  color: #09130c !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #login-view input,
:is(html.light-theme, body.light-theme) #login-view .admin-input {
  background-color: #f7faf7 !important;
  border: 1.5px solid rgba(132, 171, 107, 0.5) !important;
  color: #07120a !important;
  font-weight: 600 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

:is(html.light-theme, body.light-theme) #login-view input:focus,
:is(html.light-theme, body.light-theme) #login-view .admin-input:focus {
  background-color: #ffffff !important;
  border-color: #275929 !important;
  box-shadow: 0 0 0 3px rgba(157, 193, 131, 0.3) !important;
  outline: none !important;
}

:is(html.light-theme, body.light-theme) #login-view input::placeholder {
  color: #63786a !important;
  font-weight: 400 !important;
}

:is(html.light-theme, body.light-theme) #login-view .admin-input-icon,
:is(html.light-theme, body.light-theme) #login-view .relative .absolute svg {
  color: #314a38 !important;
}

:is(html.light-theme, body.light-theme) #login-view .admin-pass-toggle {
  color: #314a38 !important;
}

:is(html.light-theme, body.light-theme) #login-view .admin-pass-toggle:hover {
  color: #09130c !important;
}

:is(html.light-theme, body.light-theme) #login-view #login-error-alert {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1.5px solid rgba(220, 38, 38, 0.45) !important;
  color: #991b1b !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) #login-view #login-error-alert svg {
  color: #dc2626 !important;
}

:is(html.light-theme, body.light-theme) #login-view .btn-primary {
  background: linear-gradient(135deg, #c3eab0 0%, #90b874 100%) !important;
  color: #061109 !important;
  border: 1px solid rgba(100, 140, 80, 0.3) !important;
  box-shadow: 0 10px 24px -4px rgba(120, 160, 95, 0.5) !important;
  font-weight: 800 !important;
}

:is(html.light-theme, body.light-theme) #login-view .btn-primary:hover {
  background: linear-gradient(135deg, #b2e49c 0%, #7fab62 100%) !important;
  box-shadow: 0 14px 28px -4px rgba(100, 150, 75, 0.6) !important;
  transform: translateY(-2px);
}

:is(html.light-theme, body.light-theme) #login-view .admin-back-wrapper {
  border-top-color: rgba(157, 193, 131, 0.3) !important;
}

:is(html.light-theme, body.light-theme) #login-view .admin-back-link,
:is(html.light-theme, body.light-theme) #login-view a[href="index.html"] {
  color: #244b21 !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #login-view .admin-back-link:hover,
:is(html.light-theme, body.light-theme) #login-view a[href="index.html"]:hover {
  color: #122810 !important;
  text-decoration: underline !important;
}

:is(html.light-theme, body.light-theme) #login-theme-toggle {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px solid rgba(132, 171, 107, 0.5) !important;
  color: #1e3a24 !important;
}

:is(html.light-theme, body.light-theme) #login-theme-toggle svg {
  color: #264e2c !important;
}

/* ==========================================================================
   ADMIN DASHBOARD VIEW & MODALS LIGHT THEME STYLES
   ========================================================================== */

:is(html.light-theme, body.light-theme) #admin-dashboard-view header {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1.5px solid rgba(157, 193, 131, 0.35) !important;
  box-shadow: 0 8px 24px rgba(25, 45, 30, 0.06) !important;
}

:is(html.light-theme, body.light-theme) #admin-dashboard-view header span.bg-\[\#9dc183\]\/20 {
  background: rgba(157, 193, 131, 0.25) !important;
  color: #1a3c22 !important;
  border-color: rgba(132, 171, 107, 0.5) !important;
  font-weight: 800 !important;
}

:is(html.light-theme, body.light-theme) #firebase-sync-badge {
  background: rgba(157, 193, 131, 0.2) !important;
  color: #1a3c22 !important;
  border-color: rgba(132, 171, 107, 0.45) !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) #firebase-sync-text {
  color: #1a3c22 !important;
}

:is(html.light-theme, body.light-theme) #admin-dashboard-view header .text-slate-300 {
  color: #1b2e21 !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) #admin-logout-btn {
  color: #8a1f1f !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

:is(html.light-theme, body.light-theme) #admin-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #b91c1c !important;
  border-color: #ef4444 !important;
}

:is(html.light-theme, body.light-theme) #admin-empty-state h3 {
  color: #0b140e !important;
}

:is(html.light-theme, body.light-theme) #admin-empty-state p {
  color: #24362b !important;
}

:is(html.light-theme, body.light-theme) #admin-empty-state .bg-white\/5 {
  background-color: rgba(157, 193, 131, 0.15) !important;
  color: #275929 !important;
}

:is(html.light-theme, body.light-theme) #image-preview-wrapper {
  background-color: #f1f5f2 !important;
  border-color: rgba(157, 193, 131, 0.45) !important;
  color: #4b6051 !important;
}

:is(html.light-theme, body.light-theme) #admin-dashboard-view .glass-card {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px solid rgba(157, 193, 131, 0.35) !important;
}

:is(html.light-theme, body.light-theme) #admin-dashboard-view .glass-card:hover {
  background: #ffffff !important;
  border-color: rgba(132, 171, 107, 0.6) !important;
  box-shadow: 0 16px 36px -8px rgba(30, 50, 35, 0.12) !important;
}

:is(html.light-theme, body.light-theme) #admin-dashboard-view .glass-card span.text-slate-400 {
  color: #3b5042 !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #stat-total,
:is(html.light-theme, body.light-theme) #stat-social,
:is(html.light-theme, body.light-theme) #stat-graphic {
  color: #173b1d !important;
}

:is(html.light-theme, body.light-theme) #stat-branding,
:is(html.light-theme, body.light-theme) #stat-media {
  color: #25522b !important;
}

:is(html.light-theme, body.light-theme) #admin-search-input {
  background-color: #ffffff !important;
  border: 1.5px solid rgba(132, 171, 107, 0.45) !important;
  color: #0b140e !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) #admin-search-input::placeholder {
  color: #607567 !important;
  font-weight: 400 !important;
}

:is(html.light-theme, body.light-theme) #admin-category-filter {
  background-color: #ffffff !important;
  border: 1.5px solid rgba(132, 171, 107, 0.45) !important;
  color: #0b140e !important;
  font-weight: 600 !important;
}

:is(html.light-theme, body.light-theme) #admin-category-filter option {
  background-color: #ffffff !important;
  color: #0b140e !important;
}

:is(html.light-theme, body.light-theme) #admin-export-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1.5px solid rgba(132, 171, 107, 0.5) !important;
  color: #1b3d22 !important;
}

:is(html.light-theme, body.light-theme) #admin-reset-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1.5px solid rgba(217, 119, 6, 0.35) !important;
  color: #92400e !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .glass-panel {
  background: #ffffff !important;
  border: 1.5px solid rgba(157, 193, 131, 0.35) !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .glass-panel:hover {
  border-color: rgba(132, 171, 107, 0.65) !important;
  box-shadow: 0 16px 36px -8px rgba(30, 50, 35, 0.12) !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .p-5 p.text-slate-300 {
  color: #2d4034 !important;
  font-weight: 400 !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .text-slate-400 {
  color: #4b6051 !important;
  font-weight: 500 !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .bg-white\/5 {
  background-color: rgba(157, 193, 131, 0.1) !important;
  border-top-color: rgba(157, 193, 131, 0.25) !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .edit-project-btn {
  color: #1b4f21 !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #admin-projects-grid .delete-project-btn {
  color: #b91c1c !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #project-form-modal .modal-content {
  background: #ffffff !important;
  border: 1.5px solid rgba(132, 171, 107, 0.5) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2) !important;
}

:is(html.light-theme, body.light-theme) #modal-form-title {
  color: #0b140e !important;
}

:is(html.light-theme, body.light-theme) #project-crud-form label {
  color: #0b140e !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #project-crud-form input,
:is(html.light-theme, body.light-theme) #project-crud-form select,
:is(html.light-theme, body.light-theme) #project-crud-form textarea {
  background-color: #ffffff !important;
  border: 1.5px solid rgba(132, 171, 107, 0.45) !important;
  color: #0b140e !important;
  font-weight: 500 !important;
}

:is(html.light-theme, body.light-theme) #project-crud-form input:focus,
:is(html.light-theme, body.light-theme) #project-crud-form select:focus,
:is(html.light-theme, body.light-theme) #project-crud-form textarea:focus {
  border-color: #275929 !important;
  box-shadow: 0 0 0 3px rgba(157, 193, 131, 0.25) !important;
  outline: none !important;
}

:is(html.light-theme, body.light-theme) #project-crud-form input::placeholder,
:is(html.light-theme, body.light-theme) #project-crud-form textarea::placeholder {
  color: #6d8273 !important;
}

:is(html.light-theme, body.light-theme) #project-crud-form span.text-slate-400 {
  color: #3b5042 !important;
  font-weight: 500 !important;
}

:is(html.light-theme, body.light-theme) #close-form-modal-btn {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0c140e !important;
}

:is(html.light-theme, body.light-theme) #close-form-modal-btn:hover {
  background: rgba(0, 0, 0, 0.16) !important;
}

:is(html.light-theme, body.light-theme) #cancel-form-btn {
  background: rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(132, 171, 107, 0.4) !important;
  color: #24362b !important;
  font-weight: 700 !important;
}

:is(html.light-theme, body.light-theme) #delete-confirm-modal .modal-content {
  background: #ffffff !important;
  border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
}

:is(html.light-theme, body.light-theme) #delete-confirm-modal h3 {
  color: #0b140e !important;
}

:is(html.light-theme, body.light-theme) #delete-project-title {
  color: #2d4034 !important;
  font-weight: 500 !important;
}

:is(html.light-theme, body.light-theme) #admin-toast .glass-panel {
  background: #ffffff !important;
  color: #173b1d !important;
  border: 1.5px solid #84ab6b !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16) !important;
}

:is(html.light-theme, body.light-theme) #toast-message {
  color: #173b1d !important;
}

/* ==========================================================================
   IMAGE OVERLAYS & PORTFOLIO CARDS: PRESERVE CRISP WHITE TEXT IN LIGHT MODE
   Ensures titles, subtitles, and badges overlaid on photos never turn dark/invisible
   ========================================================================== */

/* Dark Scrim: ensure high-contrast background over any photo */
.card-media-overlay,
.portfolio-card .absolute.inset-0,
.glass-panel .relative > .absolute.inset-0,
.glass-card .relative > .absolute.inset-0 {
  background: linear-gradient(to top, rgba(5, 9, 6, 0.95) 0%, rgba(5, 9, 6, 0.72) 40%, rgba(5, 9, 6, 0.15) 75%, transparent 100%) !important;
}

/* Titles on image overlays MUST ALWAYS be bright white with clear text shadow */
body.light-theme .card-media-content h3,
body.light-theme .card-media-content h2,
body.light-theme .card-media-content .text-white,
body.light-theme .portfolio-card .absolute h3,
body.light-theme .portfolio-card .absolute h2,
body.light-theme .portfolio-card .absolute .text-white,
body.light-theme .glass-panel .relative .absolute h3,
body.light-theme .glass-panel .relative .absolute h2,
body.light-theme .glass-panel .relative .absolute .text-white,
body.light-theme .glass-card .relative .absolute h3,
body.light-theme .glass-card .relative .absolute h2,
body.light-theme .glass-card .relative .absolute .text-white,
body.light-theme .h-60 .absolute h3,
body.light-theme .h-60 .absolute .text-white,
body.light-theme .h-64 .absolute h3,
body.light-theme .h-64 .absolute .text-white,
body.light-theme .h-72 .absolute h3,
body.light-theme .h-72 .absolute .text-white,
body.light-theme .h-80 .absolute h3,
body.light-theme .h-80 .absolute .text-white,
body.light-theme .h-48 .absolute h3,
body.light-theme .h-48 .absolute .text-white {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 1px rgba(0, 0, 0, 0.9) !important;
}

/* Subtitle and descriptive text on image overlays */
body.light-theme .card-media-content p,
body.light-theme .card-media-content .text-slate-300,
body.light-theme .card-media-content .text-slate-200,
body.light-theme .portfolio-card .absolute p,
body.light-theme .portfolio-card .absolute .text-slate-300,
body.light-theme .portfolio-card .absolute .text-slate-200,
body.light-theme .glass-panel .relative .absolute p,
body.light-theme .glass-panel .relative .absolute .text-slate-300,
body.light-theme .glass-panel .relative .absolute .text-slate-200,
body.light-theme .glass-card .relative .absolute p,
body.light-theme .glass-card .relative .absolute .text-slate-300,
body.light-theme .glass-card .relative .absolute .text-slate-200,
body.light-theme .h-60 .absolute p,
body.light-theme .h-60 .absolute .text-slate-300,
body.light-theme .h-64 .absolute p,
body.light-theme .h-64 .absolute .text-slate-300,
body.light-theme .h-72 .absolute p,
body.light-theme .h-72 .absolute .text-slate-300,
body.light-theme .h-80 .absolute p,
body.light-theme .h-80 .absolute .text-slate-300,
body.light-theme .h-48 .absolute p,
body.light-theme .h-48 .absolute .text-slate-300 {
  color: #e6efe8 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

/* Category & Client highlights on image overlays */
body.light-theme .card-media-content .text-\[\#9dc183\],
body.light-theme .card-media-content .text-\[\#d0f0c0\],
body.light-theme .portfolio-card .absolute .text-\[\#9dc183\],
body.light-theme .portfolio-card .absolute .text-\[\#d0f0c0\],
body.light-theme .glass-panel .relative .absolute .text-\[\#9dc183\],
body.light-theme .glass-panel .relative .absolute .text-\[\#d0f0c0\],
body.light-theme .glass-card .relative .absolute .text-\[\#9dc183\],
body.light-theme .glass-card .relative .absolute .text-\[\#d0f0c0\] {
  color: #d0f0c0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

/* Bento Badges on image overlays MUST retain dark glass background & bright text */
body.light-theme .card-media-content .bento-badge,
body.light-theme .portfolio-card .absolute .bento-badge,
body.light-theme .glass-panel .relative .absolute .bento-badge,
body.light-theme .glass-card .relative .absolute .bento-badge,
body.light-theme .h-60 .absolute .bento-badge,
body.light-theme .h-64 .absolute .bento-badge,
body.light-theme .h-72 .absolute .bento-badge,
body.light-theme .h-80 .absolute .bento-badge,
body.light-theme .h-48 .absolute .bento-badge {
  background: rgba(0, 0, 0, 0.75) !important;
  color: #d0f0c0 !important;
  border-color: rgba(208, 240, 192, 0.45) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
  text-shadow: none !important;
}

/* Tags on image overlays */
body.light-theme .portfolio-card .absolute span[class*="bg-white\/10"],
body.light-theme .portfolio-card .absolute span[class*="bg-black\/"] {
  background: rgba(0, 0, 0, 0.65) !important;
  color: #e6efe8 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  text-shadow: none !important;
}

/* Hover effect on titles inside image cards */
body.light-theme .portfolio-card:hover h3,
body.light-theme .glass-panel:hover .relative .absolute h3 {
  color: #d0f0c0 !important;
}

/* ==========================================================================
   MOBILE FIT-TO-SCREEN & RESPONSIVE CORE RULES
   ========================================================================== */

/* Universal media element containment */
img, video, iframe, canvas {
  max-width: 100%;
  height: auto;
}

/* Text and container overflow protection */
p, h1, h2, h3, h4, h5, h6, span, a, label {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Marquee width safety */
.marquee-container {
  width: 100%;
  max-width: 100%;
}

/* Mobile glowing blob containment (tablet & mobile) */
@media (max-width: 768px) {
  .ambient-glow-1 {
    width: 280px !important;
    height: 280px !important;
    left: -15% !important;
    top: -5% !important;
    filter: blur(60px) !important;
  }

  .ambient-glow-2 {
    width: 300px !important;
    height: 300px !important;
    right: -15% !important;
    bottom: 5% !important;
    filter: blur(70px) !important;
  }

  .ambient-glow-3 {
    display: none !important;
  }
}

/* Mobile screen optimization (<640px) */
@media (max-width: 640px) {
  /* Prevent horizontal scroll under all conditions */
  html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  /* Compact glass panels and cards for mobile */
  .glass-panel {
    border-radius: 1.25rem;
  }

  .glass-card {
    border-radius: 1rem;
  }

  /* Responsive buttons */
  .btn-primary, 
  .btn-secondary {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.85rem !important;
    line-height: 1.25rem !important;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Responsive Modals on Mobile */
  .modal-overlay {
    padding: 0.75rem !important;
  }

  .modal-content {
    max-height: 88vh !important;
    border-radius: 1.25rem !important;
  }

  /* Mobile floating WhatsApp button adjustments */
  .fixed.bottom-6.right-6 {
    bottom: 1rem !important;
    right: 1rem !important;
    padding: 0.75rem !important;
  }
}

