/* VARIABLES & GLOBALS */
:root {
    --font-heading: 'Space Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

html, body { 
    overflow-x: hidden !important; 
    max-width: 100vw; 
}

#body-container { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6, .display-1, .display-6, .font-monospace { font-family: var(--font-heading); }

section:not(#intro) { padding: 100px 0; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background-color: rgba(130, 130, 130, 0.4); 
    border-radius: 10px; 
    border: 3px solid transparent; 
    background-clip: content-box; 
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(130, 130, 130, 0.8); }

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

::selection { background: #000; color: #fff; }
[data-theme="dark"] ::selection { background: #fff; color: #000; }

/* UTILITIES */
.text-xxs { font-size: 0.65rem; }
.text-xs { font-size: 0.75rem; }
.tracking-wide { letter-spacing: 1px; }
.tracking-wider { letter-spacing: 2px; }
.lh-relaxed { line-height: 1.6; }
.max-w-320 { max-width: 320px; }
.max-w-400 { max-width: 400px; }
.max-w-85 { max-width: 85%; }
.h-25px { height: 25px; }
.square-box { aspect-ratio: 1/1; }
.ratio-16x9 { aspect-ratio: 16/9; }
.typing-header { min-height: 60px; }
.typing-header-sm { min-height: 48px; }
.badge-lh { line-height: 1.4 !important; }
.object-fit-cover { object-fit: cover; }

.transition-theme { transition: background-color 0.6s ease, color 0.6s ease; }
.transition-fade { transition: opacity 0.5s ease-in-out; }
.hover-opacity-100:hover { opacity: 1 !important; transition: opacity 0.3s ease; }

img.grayscale-filter { filter: grayscale(100%); transition: filter 0.3s ease-in-out; }
img.grayscale-filter:hover { filter: grayscale(0%); }

.lazy-image { opacity: 0; transition: opacity 1s ease-in-out; }
.lazy-image.loaded { opacity: 1; }
.lazy-video { background-color: #000; aspect-ratio: 16/9; display: block; width: 100%; }

/* NAVBAR & INTRO */
.intro-overlap-wrapper { display: grid; place-items: center; }
.intro-overlap-wrapper > * { grid-column: 1; grid-row: 1; }
#terminal-line { min-width: 320px; }

#main-nav { z-index: 1050; }
.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem !important;
    transition: all 0.4s ease;
}

#main-nav.nav-dark .glass-nav { background: rgba(18, 18, 18, 0.7); border: 1px solid rgba(255, 255, 255, 0.05); }
#main-nav.nav-dark .navbar-brand { color: white !important; }
#main-nav.nav-dark .navbar-toggler-icon { filter: invert(1); }

.nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    background: transparent !important; 
}

.nav-link::after {
    content: ''; position: absolute; bottom: 5px; left: 50%; width: 0; height: 1.5px;
    background: currentColor; transition: width 0.3s ease, left 0.3s ease; opacity: 0;
}

.nav-link:hover::after { width: 40%; left: 30%; opacity: 0.5; }
.nav-link.active-nav { font-weight: 600 !important; opacity: 1 !important; }
.nav-link.active-nav::after { width: 80%; left: 10%; opacity: 1; }

#main-nav.nav-dark .nav-link { color: rgba(255, 255, 255, 0.6) !important; }
#main-nav.nav-dark .nav-link.active-nav { color: #fff !important; }
#main-nav:not(.nav-dark) .nav-link { color: rgba(0, 0, 0, 0.6) !important; }
#main-nav:not(.nav-dark) .nav-link.active-nav { color: #000 !important; }

/* COMPONENT CARDS */
.ibex-card { background: linear-gradient(135deg, #121212 0%, #2a2a2a 100%); border: 1px solid #333; }
.ibex-bg-icon { bottom: -30px; right: -20px; font-size: 15rem; opacity: 0.08; z-index: 1; pointer-events: none; transition: transform 0.5s ease; }

.work-card {
    background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    border: 1px solid #333; border-radius: 1.2rem; transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.work-card:hover { box-shadow: 0 1rem 3rem rgba(0,0,0,0.1) !important; }
.glass-badge { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); }

.video-hero-card { background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,1) 100%); }
.video-item { background: #0a0a0a; border: 1px solid #2a2a2a; transition: transform 0.3s ease; }
.video-item:hover { transform: translateY(-5px); border-color: var(--bs-info) !important; }
lite-youtube { max-width: 100%; }

.music-hero-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.music-card { border: 1px solid rgba(255,255,255,0.05); transition: box-shadow 0.4s ease; }
.music-card:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.8); }

.design-card { background: #1a1a1a; cursor: crosshair; }
.design-info {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    z-index: 2; opacity: 0; transition: opacity 0.3s ease;
}
.design-card:hover .design-info { opacity: 1; }

.photo-card { overflow: hidden; background-color: #f0f0f0; }
.photo-card img { transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1) !important; will-change: transform; }
.photo-card:hover img { transform: scale(1.08); }
.photo-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent 70%, rgba(0,0,0,0.6));
    opacity: 0; transition: opacity 0.3s ease;
}
.photo-card:hover .photo-overlay { opacity: 1; }

/* MOBILE GRIDS & MEDIA QUERIES */
.mobile-scroll-track {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; scrollbar-width: none; 
    padding-bottom: 1rem; scroll-padding-left: 1rem; 
}
.mobile-scroll-track::-webkit-scrollbar { display: none; }
.scroll-snap-card { scroll-snap-align: start; }

@media (max-width: 768px) {
    .ibex-bg-icon { font-size: 10rem; opacity: 0.04; bottom: -20px; right: -10px; }
    .display-1 { font-size: 3.5rem; }
    .tilt-card { transform: none !important; }
    
    #terminal-container { font-size: 1.1rem !important; }
    #terminal-line { min-width: auto; }

    .mobile-scroll-track {
        padding-left: 1rem; padding-right: 1rem;
        margin-left: -1rem; margin-right: -1rem;
    }
}