/* ============================================================
   kasumovic.net — Mobile overrides
   Loaded unconditionally; rules apply only at max-width: 800px
   Desktop CSS is never touched by this file.
   ============================================================ */

@media screen and (max-width: 800px) {

/* ----------------------------------------------------------
   1. Kill background video, set dark background
   ---------------------------------------------------------- */
video#bgvid {
    display: none !important;
}

body {
    background-color: #111 !important;
    overflow-x: hidden;
}

/* ----------------------------------------------------------
   2. Top bar: site name left, hamburger button right
   ---------------------------------------------------------- */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(0, 0, 0, 0.85);
    padding: 14px 16px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    text-shadow: none !important;
    color: white !important;
}

/* Hamburger button — injected by JS */
#mobile-menu-btn {
    display: block !important;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* ----------------------------------------------------------
   3. Sidebar nav — hidden by default, slides in as overlay
   ---------------------------------------------------------- */
footer {
    position: fixed !important;
    top: 0 !important;
    left: -260px !important;
    width: 240px !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.95) !important;
    overflow-y: auto;
    padding: 60px 20px 20px 20px !important;
    box-sizing: border-box !important;
    z-index: 999;
    transition: left 0.25s ease;
    color: white !important;
}

footer.mobile-open {
    left: 0 !important;
}

footer a, footer font {
    display: block;
    padding: 6px 0;
    font-size: 14px !important;
    color: white !important;
}

/* Close overlay when nav is open */
#mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

#mobile-nav-overlay.active {
    display: block;
}

/* ----------------------------------------------------------
   4. #links — project sub-nav (top of page)
   ---------------------------------------------------------- */
#links {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    padding: 12px 16px 8px 16px !important;
    margin-top: 52px; /* clear fixed nav bar */
    box-sizing: border-box;
    font-size: 13px !important;
    line-height: 2 !important;
    text-shadow: none !important;
    background: rgba(0,0,0,0.4);
}

/* ----------------------------------------------------------
   5. Main content areas — full width, scrollable
   ---------------------------------------------------------- */
#content,
#gallery-container,
#text-container,
#video-container,
#form-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 95% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto 20px auto !important;
    box-sizing: border-box;
    overflow: visible !important;
}

/* Pages with #links: add top margin to clear nav + links bar */
#gallery-container,
#text-container,
#video-container,
#form-container {
    margin-top: 10px !important;
}

/* Pages without #links (homepage): push content below fixed nav */
#content {
    margin-top: 60px !important;
    padding-bottom: 20px;
}

/* ----------------------------------------------------------
   6. news / bio_cv / publications — #main content area
   ---------------------------------------------------------- */
#main {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 95% !important;
    height: auto !important;
    margin: 60px auto 20px auto !important;
    box-sizing: border-box;
    padding: 16px !important;
    background-color: white !important;
    color: #000000 !important;
}

/* Override hard pixel widths on tables and cells */
#main table {
    width: 100% !important;
    table-layout: auto !important;
}

#main td,
#main th {
    width: auto !important;
}

#main img {
    max-width: 100% !important;
    height: auto !important;
}

/* ----------------------------------------------------------
   7. Grid layouts
   ---------------------------------------------------------- */
.grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

#pswp-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* ----------------------------------------------------------
   8. YouTube / Vimeo embed
   ---------------------------------------------------------- */
#video-container .yt-wrap {
    padding-bottom: 56.25%;
    position: relative;
    width: 100%;
}

#video-container .yt-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ----------------------------------------------------------
   9. Typography — prevent iOS auto-zoom on inputs
   ---------------------------------------------------------- */
input, textarea, select {
    font-size: 16px !important;
}

/* ----------------------------------------------------------
   10. humanLaboratory background image pages
   ---------------------------------------------------------- */
body::before {
    display: none;
}

} /* end @media screen and (max-width: 800px) */
