/* ── Theme Variables ── */
:root {
    --bg-primary:    #0a0f1e;
    --bg-secondary:  #060a16;
    --bg-card:       rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --bg-nav:        rgba(10,15,30,0.85);
    --text-main:     #e2e8f0;
    --text-muted:    rgba(226,232,240,0.30);
    --text-soft:     rgba(226,232,240,0.50);
    --border-color:  rgba(255,255,255,0.06);
    --border-hover:  rgba(245,158,11,0.20);
    --scrollbar-track: #0a0f1e;
    --particle-color: '255,255,255';
    --noise-opacity: 0.015;
    --glass-bg:      rgba(10,15,30,0.70);
    --footer-bg:     #060a16;
    --footer-border: rgba(255,255,255,0.05);
    --marquee-text:  rgba(255,255,255,0.15);
    --section-accent-bg: rgba(255,255,255,0.05);
}
html.light-theme {
    --bg-primary:    #f1f5f9;
    --bg-secondary:  #e2e8f0;
    --bg-card:       rgba(255,255,255,0.85);
    --bg-card-hover: rgba(255,255,255,1);
    --bg-nav:        rgba(248,250,252,0.90);
    --text-main:     #0f172a;
    --text-muted:    rgba(15,23,42,0.70);
    --text-soft:     rgba(15,23,42,0.80);
    --border-color:  rgba(15,23,42,0.08);
    --border-hover:  rgba(245,158,11,0.35);
    --scrollbar-track: #e2e8f0;
    --particle-color: '30,41,59';
    --noise-opacity: 0.008;
    --glass-bg:      rgba(248,250,252,0.80);
    --footer-bg:     #0a0f1e;
    --footer-border: rgba(255,255,255,0.07);
    --marquee-text:  rgba(255,255,255,0.25);
    --section-accent-bg: rgba(15,23,42,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { transition: background-color 0.4s ease, color 0.4s ease; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden; scroll-behavior: smooth;
    background: var(--bg-primary);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #f59e0b, #3b82f6); border-radius: 10px; }

/* Glass Effect */
.glass { background: var(--glass-bg); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}
html.light-theme .glass-card {
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
html.light-theme .glass-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

/* Gradient text */
.gradient-text { background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-text-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa, #93c5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Glow effects */
.glow-gold { box-shadow: 0 0 30px rgba(245, 158, 11, 0.15), 0 0 60px rgba(245, 158, 11, 0.05); }
.glow-blue { box-shadow: 0 0 30px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.05); }
.text-glow { text-shadow: 0 0 30px rgba(245, 158, 11, 0.3); }

/* Animated gradient border */
.gradient-border { position: relative; }
.gradient-border::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), transparent, rgba(59, 130, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* 3D card tilt */
.tilt-card { transition: transform 0.3s ease; transform-style: preserve-3d; }

/* Particle canvas */
#particles-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Marquee */
.marquee-track { display: flex; gap: 3rem; animation: ticker 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

/* Nav morphed on scroll */
.nav-morphed {
    background: var(--bg-nav) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom-color: var(--border-color) !important;
}

/* Nav text adapt */
html.light-theme .nav-link { color: rgba(15,23,42,0.55) !important; }
html.light-theme .nav-link:hover { color: #0f172a !important; background: rgba(15,23,42,0.05) !important; }
html.light-theme #nav-logo .text-white { color: #0f172a !important; }
html.light-theme #nav-logo .text-white\/30 { color: rgba(15,23,42,0.40) !important; }
html.light-theme .hamburger span { background: #0f172a; }

/* btn-outline light adaptation */
html.light-theme .btn-outline {
    border-color: rgba(15,23,42,0.15);
    color: rgba(15,23,42,0.65);
}
html.light-theme .btn-outline:hover {
    border-color: rgba(245,158,11,0.5);
    background: rgba(245,158,11,0.06);
    color: #92400e;
}

/* Noise texture overlay */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Smooth button effect */
.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    opacity: 0; transition: opacity 0.4s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(245, 158, 11, 0.3); }
.btn-primary span { position: relative; z-index: 1; }

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-outline:hover { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.05); transform: translateY(-2px); }

/* Theme toggle button */
#theme-toggle {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all 0.3s;
    color: var(--text-muted);
}
#theme-toggle:hover {
    border-color: var(--border-hover);
    color: #f59e0b;
    transform: rotate(15deg) scale(1.1);
}
/* Logo switching per theme */
/* Dark mode (default): show logo-dark, hide logo-light */
.logo-dark  { display: block; }
.logo-light { display: none;  }
/* Light mode: show logo-light (for light bg), hide logo-dark */
html.light-theme .logo-dark  { display: none;  }
html.light-theme .logo-light { display: block; }

/* Sun icon — shown in dark mode */
#icon-sun  { display: block; }
#icon-moon { display: none; }
html.light-theme #icon-sun  { display: none; }
html.light-theme #icon-moon { display: block; }

/* Hamburger menu */
.hamburger span { display: block; width: 24px; height: 2px; background: white; transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu { transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-menu.active { transform: translateX(0); }
html.light-theme .mobile-menu { background: rgba(241,245,249,0.97) !important; }
html.light-theme .mobile-menu a { color: #0f172a !important; }

/* Footer — always navy in BOTH modes */
html.light-theme #site-footer {
    background-color: #0a0f1e !important;
    border-top-color: rgba(255,255,255,0.07) !important;
}

/* Light-mode text overrides for Tailwind hardcoded classes */
html.light-theme .text-white        { color: #0f172a !important; }
/* Keep footer text white in light mode (footer stays dark navy) */
html.light-theme footer .text-white,
html.light-theme footer .text-white\/30,
html.light-theme footer .text-white\/15,
html.light-theme footer .text-white\/25,
html.light-theme footer .text-white\/40,
html.light-theme footer .text-white\/50,
html.light-theme footer .text-white\/10 { color: inherit !important; }
html.light-theme footer { color: rgba(255,255,255,0.5); }
/* Body text: maps semi-transparent whites to dark readable colors */
html.light-theme .text-white\/70  { color: rgba(15,23,42,0.90) !important; }
html.light-theme .text-white\/60  { color: rgba(15,23,42,0.85) !important; }
html.light-theme .text-white\/50  { color: rgba(15,23,42,0.80) !important; }
html.light-theme .text-white\/40  { color: rgba(15,23,42,0.75) !important; }
html.light-theme .text-white\/35  { color: rgba(15,23,42,0.70) !important; }
html.light-theme .text-white\/30  { color: rgba(15,23,42,0.65) !important; }
html.light-theme .text-white\/25  { color: rgba(15,23,42,0.60) !important; }
html.light-theme .text-white\/20  { color: rgba(15,23,42,0.55) !important; }
html.light-theme .text-white\/15  { color: rgba(15,23,42,0.45) !important; }
html.light-theme .text-white\/10  { color: rgba(15,23,42,0.35) !important; }
html.light-theme .border-white\/5  { border-color: rgba(15,23,42,0.07) !important; }
html.light-theme .border-white\/10 { border-color: rgba(15,23,42,0.10) !important; }
html.light-theme .bg-white\/5  { background-color: rgba(15,23,42,0.04) !important; }
html.light-theme .bg-white\/10 { background-color: rgba(15,23,42,0.07) !important; }
html.light-theme .bg-white\/20 { background-color: rgba(15,23,42,0.10) !important; }
html.light-theme .bg-navy,
html.light-theme .bg-\[\#060a16\],
html.light-theme .bg-\[\#0a0f1e\],
html.light-theme .bg-\[\#0b0e11\] { background-color: var(--bg-secondary) !important; }
html.light-theme .bg-navy\/80 { background-color: rgba(241,245,249,0.80) !important; }
html.light-theme .bg-navy\/95 { background-color: rgba(241,245,249,0.97) !important; }
html.light-theme .text-slate-500 { color: rgba(15,23,42,0.60) !important; }
html.light-theme .text-slate-300 { color: rgba(15,23,42,0.80) !important; }
html.light-theme .text-slate-400 { color: rgba(15,23,42,0.70) !important; }
/* Contact form inputs — adaptive theme */
.form-input-field {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e2e8f0;
}
.form-input-field::placeholder { color: rgba(255,255,255,0.2); }
.form-input-field:focus {
    border-color: rgba(245,158,11,0.4);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.08);
    outline: none;
}
html.light-theme .form-input-field {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.15);
    color: #0f172a;
}
html.light-theme .form-input-field::placeholder { color: rgba(15,23,42,0.40); }
html.light-theme .form-input-field:focus {
    border-color: rgba(245,158,11,0.5);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

/* Contact form — light mode */
html.light-theme input[type="text"],
html.light-theme input[type="email"],
html.light-theme select,
html.light-theme textarea {
    background-color: #ffffff !important;
    border-color: rgba(15,23,42,0.15) !important;
    color: #0f172a !important;
}
html.light-theme input::placeholder,
html.light-theme textarea::placeholder {
    color: rgba(15,23,42,0.35) !important;
}
html.light-theme select option {
    background: #ffffff;
    color: #0f172a;
}
html.light-theme input:focus,
html.light-theme select:focus,
html.light-theme textarea:focus {
    border-color: rgba(245,158,11,0.5) !important;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.10) !important;
}
/* Keep gold/electric accents unchanged */

/* Home — project slideshow */
@keyframes slideshow {
    0%, 20% { transform: translateX(0%); }
    25%, 45% { transform: translateX(-25%); }
    50%, 70% { transform: translateX(-50%); }
    75%, 95% { transform: translateX(-75%); }
    100% { transform: translateX(0%); }
}
.slideshow-track {
    display: flex;
    width: 400%;
    height: 100%;
    animation: slideshow 16s cubic-bezier(0.85, 0, 0.15, 1) infinite;
}
.slideshow-track img {
    width: 25%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}
