/* --- Global Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #d1d5db;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Anchor smooth scroll (optional fallback) */
html {
    scroll-behavior: smooth;
}

/* --- Header & Navigation --- */
header {
    max-width: fit-content;
    max-height: fit-content;
    margin: 10px auto 0;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 999px;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    z-index: 100;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.nav-link,
.nav-link-mobile {
    text-decoration: none;
    color: #d1d5db;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link-mobile:hover {
    color: #fff;
}

/* --- Hamburger Menu --- */
.hamburger {
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    z-index: 110;
    display: none;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #d1d5db;
    position: absolute;
    transition: all 0.3s ease;
}
.hamburger-icon {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

.hamburger.active .hamburger-icon { background-color: transparent; }
.hamburger.active .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.hamburger.active .hamburger-icon::after { top: 0; transform: rotate(-45deg); }

/* New Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 90;

    background-color: rgba(45, 45, 45, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;

    padding: 0.5rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;

    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Style the links and icons */
.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav a i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: #d1d5db;
    display: flex;
}

/* --- Project Cards (Liquid Glass) --- */
.project-card {
    background-color: rgba(45, 45, 45, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}
.project-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s 0.5s;
    z-index: 120;
}
.modal.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.modal-content {
    background-color: #000;
    border-radius: 10px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.5s ease;
}
.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
}
.close-btn:hover {
    color: #fff;
}

/* --- Footer --- */
footer {
    margin-top: auto; /* pushes footer to bottom */
    text-align: center;
    padding: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* --- SPA Section Transitions --- */
main {
    position: relative;
    min-height: 100vh; /* Let it expand naturally if content is taller */
    overflow: visible; /* Allow sections to be scrollable */
}

.content-section {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh; /* so the section itself grows naturally */
    display: none;
    opacity: 0;
    pointer-events: none;
    padding: 2rem;
    box-sizing: border-box;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateY(20px);
    overflow: auto; /* Add this to ensure scrollability */
}

.content-section.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}


/* --- About Section Styling --- */
.about-section {
    position: relative;
    overflow: hidden;
    text-align: left;
}
.background-text {
    position: absolute;
    top: 50%;
    right: 0;
    font-size: 20vw;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.05);
    transform: translateY(-130%) translateX(-180%);
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .hamburger { display: block; }
}
@media (min-width: 769px) {
    .hamburger, .mobile-nav { display: none !important; }
}

/* Stagger Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-in {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards; /* Changed from 'backwards' to 'forwards' */
    opacity: 0;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px; /* Thickness of the scrollbar */
    background: linear-gradient(180deg, #ff6a00, #ffcc00);

}

::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.4); /* Track background */
    backdrop-filter: blur(8px);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(100, 100, 100, 0.8), rgba(255, 255, 255, 0.2));
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.6); /* Adds a "floating" effect */
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(160, 160, 160, 0.9), rgba(255, 255, 255, 0.4));
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 160, 160, 0.8) rgba(45, 45, 45, 0.4);
}

.letterboxd-icon .lb-circle-1,
.letterboxd-icon .lb-circle-2,
.letterboxd-icon .lb-circle-3 {
    transition: fill 0.2s;
}

.letterboxd-icon .lb-circle-1 { fill: #9CA3AF; }
.letterboxd-icon .lb-circle-2 { fill: #9CA3AF; }
.letterboxd-icon .lb-circle-3 { fill: #9CA3AF; }

.letterboxd-icon:hover .lb-circle-1 { fill: #FFA500; }   /* orange-400 */
.letterboxd-icon:hover .lb-circle-2 { fill: #5CE65C; }   /* green-400 */
.letterboxd-icon:hover .lb-circle-3 { fill: #8FD9FB; }   /* blue-400 */
