/* ============================================
   George Mejia — Custom Styles
   Bold editorial · Midnight blue + Mint
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(52, 212, 168, 0.3);
    color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030812;
}
::-webkit-scrollbar-thumb {
    background: rgba(52, 212, 168, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 212, 168, 0.5);
}

/* --- Navbar --- */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(3, 8, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Menu Tabs --- */
.menu-tab {
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    color: #0f2b4c;
    background: #34d4a8;
    box-shadow: 0 0 20px rgba(52, 212, 168, 0.3);
}

.menu-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-content {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-content.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-image {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-image.revealed {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fallback: ensure content is visible without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal-content,
    .reveal-image {
        opacity: 1;
        transform: none;
    }
}

/* --- Hover effects for cards --- */
.bg-white\/5 {
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.bg-white\/5:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

/* --- Image hover --- */
.col-span-2 row-span-2 img,
.reveal-image img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-image:hover img {
    transform: scale(1.03);
}

/* --- Button focus styles --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #34d4a8;
    outline-offset: 2px;
}

/* --- Print styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal-content,
    .reveal-image {
        opacity: 1 !important;
        transform: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
