@keyframes fadeInNav {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav.sticky {
    animation: fadeInNav 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html {
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #FFFFFF;
    background-image: radial-gradient(#E5E7EB 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    color: #000;
    overflow-x: hidden;
    width: 100%;
}

/* General text spacing */
p {
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h3 {
    font-size: clamp(1.25rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #18181b;
}

/* Sleek Uppercase Headers */
h1, h2 {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 0.95;
    overflow-wrap: break-word;
}

h1.mixed-title {
    font-size: clamp(2.25rem, 10vw, 3rem);
    font-weight: 900;
    word-wrap: break-word;
}

h2.mixed-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    font-weight: 800;
    word-wrap: break-word;
}

@media (min-width: 1024px) {
    h1.mixed-title { font-size: 4rem; }
    h2.mixed-title { font-size: 4rem; }
    h3 { font-size: 3rem; }
}

.bento-card {
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 32px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

.mixed-title span {
    color: #9CA3AF; /* Grey */
    font-weight: 600;
    
}

/* Custom Wide Margins */
.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: clamp(1rem, 5%, 5rem);
    padding-right: clamp(1rem, 5%, 5rem);
}

/* Mobile Menu Redesign */
#mobile-menu {
    position: fixed;
    top: 72px; /* Adjusted height for mobile nav */
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    background: #FFFFFF;
    z-index: 40;
    display: flex; /* keep flex structure */
    flex-direction: column;
    padding: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-nav-link {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 1;
    transition: color 0.3s ease;
    display: block;
}

::selection {
    background-color: #FACC15;
    color: #000;
}

/* Modal animation */
#course-overlay.flex { display: flex; }
#detail-overlay.flex { display: flex; }

/* Custom Scrollbars */
#course-overlay::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f4f4f5;
    border-radius: 10px;
}
#course-overlay::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e4e4e7;
    border-radius: 10px;
}
#course-overlay::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 10px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: rgba(24, 24, 27, 0.9);
    backdrop-filter: blur(10px);
    color: #FACC15;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 200;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notification.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    nav .container-wide {
        padding-right: 1rem;
        padding-left: 1.5rem;
    }

    header, section, footer {
        overflow-x: hidden;
    }
}