/* ================================================================
   FONTS — Bebas Neue + Poppins via Google Fonts in index.html
   ================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: #bde85e;
    overflow-x: hidden;
}
body::-webkit-scrollbar { display: none; }

/* ================================================================
   TOP NAVBAR — fixed, fades in after loading, always above everything
   ================================================================ */

#top-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2vw;
    z-index: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#top-nav.visible { opacity: 1; pointer-events: auto; }

#nav-logo { height: 85px; width: auto; object-fit: contain; display: block; }

.btn-nav {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    background: transparent;
    border: 2px solid #fff8dc;
    color: #fff8dc;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-nav:hover { background-color: #fff8dc; color: #396971; }

/* ================================================================
   INTRO VIEWPORT — fixed, z-index 100, contains loading + logo
   ================================================================ */

#main-viewport {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background-color: #bde85e;
}

#status-text {
    font-family: "Bebas Neue", sans-serif;
    font-size: 5rem;
    color: #ce63e0;
    z-index: 200;
}

#logo-container {
    position: absolute;
    width: 90vw; height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}
.logo-layer { position: absolute; max-width: 100%; max-height: 100%; object-fit: contain; }
#layer-eye  { z-index: 12; transform: scale(0.6); }
#layer-back { z-index: 11; filter: drop-shadow(-15px 15px 10px rgba(0,0,0,0.5)); }

/* Scroll spacer — drives the intro animation via page scroll */
#scroll-spacer { height: 1200vh; }

/* ================================================================
   MEDIA SECTION — fixed overlay, z-index 200, scrolls internally
   Sits above intro viewport. Starts invisible, fades in at sf>0.82
   ================================================================ */

#media-section {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: 200;
    background-color: #ce63e0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#media-section::-webkit-scrollbar { display: none; }

/* ── Title ───────────────────────────────────────────────────── */

#typewriter-text {
    font-family: "Bebas Neue", sans-serif;
    font-size: 6rem;
    text-align: center;
    line-height: 1.1;

    padding: 0 5vw 30px;

    white-space: nowrap;
    display: block;
    width: 100%;

    opacity: 1;
    transition: opacity 0.5s ease;
}

.color-dekho   { color: #fff8dc; }
.color-nazaria { color: #bde85e; }

/* ── Filter bar ──────────────────────────────────────────────── */

#filter-bar {
    top: 0;
    z-index: 400;
    width: 100%;
    padding: 16px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #ce63e0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
#filter-bar.show { opacity: 1; pointer-events: auto; }

.dropdown-wrapper { position: relative; }

.btn-main {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    background: transparent;
    border: 2px solid #fff8dc;
    color: #fff8dc;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}
.btn-main:hover, .btn-main.active { background-color: #fff8dc; color: #396971; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px); left: 0;
    background: #396971;
    border: 2px solid #fff8dc;
    border-radius: 8px;
    list-style: none;
    min-width: 220px;
    display: none;
    z-index: 500;
}
.menu-right { left: auto; right: 0; }

.dropdown-menu li {
    padding: 15px 20px;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    color: #fff8dc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dropdown-menu li:hover { background-color: #fff8dc; color: #396971; }
.filter-opt.selected    { background-color: #bde85e; color: #396971; }
.clear-btn { color: #ce63e0 !important; font-weight: 600 !important; justify-content: center !important; }
.clear-btn:hover { background-color: #ce63e0 !important; color: #fff8dc !important; }

/* Prevent page scroll when hovering submenu on desktop */
@media (min-width: 769px) {

    .submenu:hover {
        overscroll-behavior: contain;
    }

    .submenu {
        pointer-events: auto;
    }

}

/* Submenu — desktop flyout */
.submenu {
    display: none;
    position: absolute;
    top: -2px;
    right: 100%;
    background: #396971;
    border: 2px solid #fff8dc;
    border-radius: 8px;
    min-width: 240px;
    list-style: none;

    /* IMPORTANT */
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    z-index: 999;
}

/* Only open submenu on hover desktop */
.has-submenu:hover > .submenu {
    display: block;
}

/* Desktop submenu scrolling */
.submenu::-webkit-scrollbar {
    width: 8px;
}

.submenu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.submenu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}

.submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.45);
}

.submenu {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}
/* ── Masonry grid ────────────────────────────────────────────── */

#masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    padding: 20px 5vw 60px;
    align-items: start;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#masonry-grid.show { opacity: 1; }

.media-card {
    background-color: #fff8dc;
    border: 2px solid #fff8dc;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s;
}
.media-card:hover { transform: translateY(-4px); }

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}
.thumbnail-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-label {
    padding: 15px;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    border-top: 2px solid #fff8dc;
    cursor: pointer;
    color: #396971;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.card-label:hover { background-color: #ce63e0; color: #fff8dc; }

/* Google Drive / Docs tile */
.doc-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #4a7fa8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}
.doc-cover:hover { background-color: #3d6d94; }
.doc-cover-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff8dc; pointer-events: none; }
.doc-icon { font-size: 3rem; }
.doc-read-label { font-family: "Poppins", sans-serif; font-weight: 500; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Footer ──────────────────────────────────────────────────── */

#site-footer {
    background-color: #fff8dc;
    width: 100%;
    padding: 60px 5vw 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.footer-heading { font-family: "Bebas Neue", sans-serif; font-size: 2.4rem; color: #396971; letter-spacing: 0.04em; }
.footer-icons   { display: flex; gap: 24px; align-items: center; }
.footer-icon {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 2px solid #396971;
    color: #396971;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.footer-icon:hover { background-color: #ce63e0; border-color: #ce63e0; color: #fff8dc; }
.footer-credits {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-size: 0.68rem;
    color: #396971;
    text-align: center;
    line-height: 1.8;
    opacity: 0.65;
    padding-bottom: 10px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    #typewriter-text { font-size: 4rem; white-space: normal; }
}

@media (max-width: 768px) {
    #status-text { font-size: 2.2rem; width: 85vw; text-align: center; }
    #nav-logo    { height: 60px; }
    .btn-nav     { font-size: 0.8rem; padding: 6px 14px; }


    #filter-bar { padding: 12px 4vw; }
    .btn-main   { padding: 10px 15px; font-size: 0.9rem; }

    #masonry-grid { grid-template-columns: 1fr; padding: 16px 4vw 40px; }

    .submenu { display: none !important; }

    .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.25) transparent;
    }
    .dropdown-menu::-webkit-scrollbar { width: 8px; }
    .dropdown-menu::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
    .dropdown-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 4px; }
    .dropdown-menu::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.45); }

    .mobile-back-btn {
        font-weight: 600 !important;
        color: #bde85e !important;
        border-bottom: 2px solid rgba(255,255,255,0.15) !important;
        justify-content: flex-start !important;
        gap: 10px;
    }
    .mobile-back-btn:hover { background-color: #fff8dc !important; color: #396971 !important; }
}

/* ─────────────────────────────────────────────
   Background overlay
───────────────────────────────────────────── */

#bg-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100vh;

    pointer-events: none;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    opacity: 1;

    transition: opacity 0.8s ease;

    z-index: 0;
}

/* Desktop */
@media (min-width: 769px) {

    #bg-overlay {
        background-image: url('assets/images/bgoverlaydsk.png');
    }

}

/* Mobile + tablet */
@media (max-width: 768px) {

    #bg-overlay {
        background-image: url('assets/images/bgoverlayph.png');
    }

}

/* ─────────────────────────────────────────────
   Footer background image
───────────────────────────────────────────── */

footer {
    position: relative;
    overflow: hidden;
}

/* Footer image layer */
footer::before {

    content: '';

    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: contain;

    pointer-events: none;

    opacity: 1;

    z-index: 0;
}

/* Desktop */
@media (min-width: 769px) {

    footer::before {
        background-image: url('assets/images/footerdsk.png');
    }

}

/* Mobile + tablet */
@media (max-width: 768px) {

    footer::before {
        background-image: url('assets/images/footerph.png');
    }

}

/* Keep footer content above image */
footer > * {
    position: relative;
    z-index: 1;
}

/* ─────────────────────────────────────────────
   Eyes image
───────────────────────────────────────────── */

#eyes-image {

    display: block;

    width: 7%;

    min-width: 70px;
    max-width: 150px;

    margin:
        95px auto 2px;

    opacity: 0;

    transition: opacity 0.5s ease;

    pointer-events: none;
}

@media (max-width: 768px) {

    #eyes-image {

        width: 18%;

        min-width: 55px;

        margin:
            20px auto 8px;
    }

}

@media (max-width: 768px) {

    #eyes-image {

        width: 18%;

        min-width: 55px;

        margin:
            90px auto 0;
    }

    #typewriter-text {

        padding: 1vh 5vw 20px;
    }

}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */

#site-footer {

    position: relative;

    overflow: hidden;

    background-color: #fff8dc;

    width: 100%;

    padding: 80px 5vw 140px;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 24px;
}

/* Footer background image */
#site-footer::before {

    content: '';

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    background-repeat: no-repeat;

    background-position: bottom center;

    pointer-events: none;

    z-index: 0;
}

/* Desktop */
@media (min-width: 769px) {

    #site-footer::before {

        background-image: url('assets/images/footerdsk.png');

        background-size: cover;
    }

}

/* Mobile */
@media (max-width: 768px) {

    #site-footer {

        padding: 60px 6vw 120px;
    }

    #site-footer::before {

        background-image: url('assets/images/footerph.png');

        background-size: cover;
    }

}

/* Keep content above bg image */
#site-footer > * {

    position: relative;

    z-index: 1;
}