/* ===== Custom Styles (Tailwind handles most styling) ===== */

/* Critical loading optimizations */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background-color: #050816; color: white; overflow-x: hidden; }

/* Glass Card Effect */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Light Mode */
.light body,
html.light body {
    background-color: #f8fafc;
    color: #0f172a;
}

html.light .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

html.light #navbar {
    border-color: rgba(0, 0, 0, 0.06);
}

html.light .nav-link,
html.light .mobile-link { color: #475569; }
html.light .nav-link:hover,
html.light .mobile-link:hover { color: #0891b2; }

html.light .hamburger-line { background: #0f172a; }

html.light #mobile-menu { background: rgba(248, 250, 252, 0.98); }

html.light .text-slate-300 { color: #334155 !important; }
html.light .text-slate-400 { color: #64748b !important; }
html.light .text-slate-500 { color: #94a3b8 !important; }
html.light .text-slate-600 { color: #94a3b8 !important; }
html.light .text-white { color: #0f172a !important; }

html.light section,
html.light footer {
    background: transparent;
}
html.light .bg-dark-800\/30 {
    background: rgba(241, 245, 249, 0.5);
}

html.light .theme-icon-dark { display: none !important; }
html.light .theme-icon-light { display: block !important; }

html.light #theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Typing cursor blink */
.typing-cursor {
    animation: blink 0.75s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Scroll reveal animation */
.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-el.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Nav link underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: width 0.3s ease;
    border-radius: 1px;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    color: #22d3ee;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(5, 8, 22, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
html.light .navbar-scrolled {
    background: rgba(248, 250, 252, 0.9) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Hamburger animation */
.hamburger-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.hamburger-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050816; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #3b82f6);
    border-radius: 4px;
}
html.light ::-webkit-scrollbar-track { background: #f1f5f9; }

/* Smooth transitions for theme switch */
*, *::before, *::after {
    transition-property: background-color, border-color, color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
/* Override: don't slow down interactive animations */
a, button, .group, img, .glass-card {
    transition-property: all;
}
