/* css/theme-styles.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    font-family: 'Inter', sans-serif; 
    color: #E0E0E0; 
    background-color: #000000; 
    margin: 0;
    overflow-x: hidden; 
}
/* Optional: Prevent body scroll when mobile nav is open */
/* body.overflow-hidden-nav-open { overflow: hidden; } */


#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* The canvas always covers the container, even between resize events
   (mobile URL-bar collapse changes innerHeight before the renderer catches up) */
#background-container canvas {
    width: 100% !important;
    height: 100% !important;
}

#page-wrapper {
    position: relative; 
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%; 
}

header.site-header {
    background-color: rgba(3, 12, 24, 0.92);
    border-bottom: 2px solid rgba(216, 181, 106, 0.55);
}

#portrait {
    border-color: #d8b56a !important;
}

#headname {
    font-family: 'Lilita One', 'Arial Black', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff4d8;
    text-shadow: 2px 2px 0 #061220;
}

/* Navigation Bar specific styles */
/* The .navbar class is on the <nav> element */
/* The #main-navigation-menu is the <ul> or its wrapper div */

/* Styles for the mobile menu button (hamburger) */
/* The button itself is styled with Tailwind classes in the HTML:
   <button id="mobile-menu-button" type="button" class="md:hidden p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="main-navigation-menu" aria-expanded="false">
   We can add base styles here if needed, but Tailwind handles most of it.
*/
#mobile-menu-button {
    /* Example: if you weren't using Tailwind for this specific button's display */
    /* display: block; */ /* Shown by default */
}
/* @media (min-width: 768px) { /* Corresponds to Tailwind's 'md' breakpoint */
/* #mobile-menu-button { */
/* display: none; /* Hidden on medium and up */
/* } */
/* } */


/* Styles for the navigation menu itself when it's a dropdown */
/* The #main-navigation-menu will have Tailwind's 'hidden md:flex' */
/* When it's open on mobile (not hidden by JS), these styles apply */
@media (max-width: 767px) { /* Tailwind's 'md' breakpoint is 768px. This applies to screens smaller than md. */
    #main-navigation-menu.hidden { /* Ensure it's hidden if JS hasn't run or if toggled by JS */
        display: none;
    }
    #main-navigation-menu:not(.hidden) { /* Styles for when it's open on mobile */
        display: block; /* Or flex if you want flex properties for the container */
        position: absolute;
        top: 100%; /* Position below the header (assuming header is its relative parent or positioned) */
        left: 0;
        right: 0;
        background-color: rgba(10, 20, 30, 0.98); /* Same as header, but more opaque for dropdown */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        z-index: 40; /* Ensure it's above other content but below sticky header if header z-index is higher */
    }
    #main-navigation-menu ul {
        flex-direction: column;
        align-items: center; /* Center items in dropdown */
    }
    #main-navigation-menu ul li {
        width: 100%;
        text-align: center;
    }
    #main-navigation-menu ul li a {
        display: block; /* Make links take full width */
        padding: 0.75rem 1rem; /* Adjust padding for dropdown items */
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Separator lines */
    }
    #main-navigation-menu ul li:last-child a {
        border-bottom: none;
    }
}


main.site-main { 
    flex-grow: 1; 
    padding-top: 2rem;   
    padding-bottom: 2rem; 
    padding-left: 1rem;  
    padding-right: 1rem;  
    max-width: 1200px; 
    margin-left: auto;
    margin-right: auto; 
    width: 100%;
}

/* Content wrapper: a dialog box — flat, square, double sand-gold frame */
.content-card-wrapper {
    background: rgba(3, 12, 24, 0.88);
    border: 2px solid #d8b56a;
    outline: 1px solid rgba(216, 181, 106, 0.38);
    outline-offset: 4px;
    border-radius: 0;
    padding: 2rem;
    box-shadow: 8px 8px 0 rgba(2, 8, 16, 0.6);
}

.navbar a {
    text-decoration: none;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(220, 236, 255, 0.72);
    padding: 0.5rem 0.9rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.navbar a:hover,
.navbar a.active {
    color: #ffd36a;
    border-bottom-color: #ffd36a;
}

footer.site-footer {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    background-color: rgba(3, 12, 24, 0.7);
    border-top: 2px solid rgba(216, 181, 106, 0.3);
}
footer.site-footer address a:hover {
    color: #38bdf8; 
}

.skip-main {
    position: absolute; 
    left: -9999px; 
    top: auto;
    width: 1px; 
    height: 1px; 
    overflow: hidden;
}
.skip-main:focus {
    left: auto; 
    top: auto; 
    width: auto; 
    height: auto;
    overflow: auto; 
    padding: 0.5em; 
    background-color: #00aaff;
    color: white; 
    z-index: 1000; 
    border-radius: 0.25rem;
}

#landing-foreground-content {
    position: absolute;
    top: 25%; 
    left: 50%;
    transform: translate(-50%, -50%); 
    text-align: center;
    z-index: 1;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    width: 90%; 
    max-width: 500px; 
}
#landing-foreground-content #icon-placeholder {
    width: 100px;
    height: 100px;
    background-color: #333;
    border: 2px solid #555;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3em;
}
#landing-foreground-content #icon-placeholder::before {
    content: "RB";
    color: #fff;
}
#landing-foreground-content #name {
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
#landing-foreground-content #title-text {
    font-size: 1.1em;
    font-weight: 200;
    color: #cccccc;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}
#landing-foreground-content #links a {
    color: #dddddd;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.0em;
    font-weight: 300;
    transition: color 0.3s ease;
}
#landing-foreground-content #links a:hover {
    color: #00aaff;
}

/* Make Waves: the detonator box (a 3D prop drawn into the button) */
#tsunami-trigger-button {
    position: fixed;
    top: 10px;
    right: 14px;
    width: 76px;
    height: 84px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 100;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
#tsunami-trigger-button:hover,
#tsunami-trigger-button:focus-visible {
    opacity: 1;
}
/* Sky gear, like the clouds: it rides away with them once the dive begins,
   so it never hangs over a stop, the signpost or the depth gauge */
body.scrolled-past-clouds #tsunami-trigger-button,
body.is-underwater #tsunami-trigger-button,
body.camera-underwater #tsunami-trigger-button {
    opacity: 0;
    transform: translateY(-120px);
    pointer-events: none;
}
#tsunami-trigger-button:focus-visible {
    outline: 2px solid #ffd36a;
    outline-offset: 4px;
}
#tsunami-trigger-button .prop-stage {
    --stage-w: 76px;
    --stage-h: 84px;
}
/* Where the cloud row runs out to the right edge (phones, small tablets),
   the detonator waits just under it instead of behind the Resume cloud */
@media (max-width: 780px) {
    #tsunami-trigger-button {
        top: 122px;
    }
}
@media (max-width: 640px) {
    #tsunami-trigger-button {
        top: 98px;
    }
}
/* ...but on a phone on its side the clouds take their small size
   (css/ocean-dive.css) and, once the screen is wide enough, leave the
   corner free again */
@media (max-height: 540px) and (orientation: landscape) and (min-width: 600px) {
    #tsunami-trigger-button {
        top: 10px;
    }
}

/* Legacy timeline styles removed — now handled by bio-dive.css + ocean-dive.css */

/* Project Card Specific Styling from projects.html & gallery.html */
.project-card, .gallery-item {
    background-color: rgba(30, 41, 59, 0.8); 
    border: 1px solid rgba(71, 85, 105, 0.7); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover, .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.15), 0 6px 6px rgba(0, 170, 255, 0.1);
}
.project-card img.thumb, .gallery-item img {
    object-fit: cover; 
    border-bottom: 1px solid rgba(71, 85, 105, 0.7); 
}
.gallery-item img {
     border-bottom: none;
}
.gallery-item .caption {
    padding: 0.75rem; 
    text-align: center;
    font-size: 0.875rem; 
    color: #9CA3AF; 
    background-color: rgba(40, 51, 69, 0.8); 
    border-top: 1px solid rgba(71, 85, 105, 0.7);
}

/* Filter Buttons Styling from gallery.html */
.filter-controls button.mixitup-control-active { 
    background-color: rgba(0, 170, 255, 0.3) !important; 
    color: #E0E0E0 !important;
    border-color: rgba(0, 170, 255, 0.5) !important;
}

/* Styles for custom modal from projects.html */
.custom-modal {
    position: fixed; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.custom-modal.active {
    opacity: 1; visibility: visible; transition: opacity 0.3s ease;
}
.custom-modal-content {
    background-color: #1f2937; 
    color: #e5e7eb; 
    padding: 2rem; border-radius: 0.5rem; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    text-align: center; max-width: 90%; width: 400px;
}
.custom-modal-content button {
    background-color: #3b82f6; 
    color: white; padding: 0.5rem 1rem; border-radius: 0.375rem; 
    margin-top: 1rem; border: none; cursor: pointer;
    transition: background-color 0.2s;
}
.custom-modal-content button:hover {
    background-color: #2563eb; 
}

/* Styles for resume iframe from resume.html */
iframe.resume-iframe {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.25rem;
}

/* Prose styles for project detail pages */
.prose a { 
    color: #60a5fa; 
    text-decoration: underline;
}
.prose a:hover {
    color: #38bdf8; 
}

/* ===== The way back to the plain site =====
   The 3D world lives under /64/; every footer offers the surface. */
.ocean-footer .plain-link,
.site-footer .plain-link {
    margin: 0.35rem 0 0;
    font-size: 0.85em;
}

.ocean-footer .plain-link a,
.site-footer .plain-link a {
    color: inherit;
    opacity: 0.75;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ocean-footer .plain-link a:hover,
.site-footer .plain-link a:hover {
    opacity: 1;
}

/* ===== TXT: the way back to the plain site =====
   The plain site keeps a "64" in its bottom-right corner that opens this
   world; every page here answers with a "TXT" in the bottom-left (the right
   is the specimen jar's on Past), in the HUD's own voice. */
.txt-link {
    position: fixed;
    left: 0.9rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    font-family: var(--hud-font);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hud-gold);
    text-decoration: none;
    text-shadow:
        2px 2px 0 var(--hud-shadow),
        3px 3px 0 rgba(6, 18, 32, 0.45);
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.25s ease, color 0.2s ease;
}

.txt-link:hover,
.txt-link:focus-visible {
    color: var(--hud-ink);
    opacity: 1;
    transform: translateY(-2px) rotate(6deg);
}

@media print {
    .txt-link { display: none; }
}

/* room under the last line of every footer, so the TXT tag never sits on it */
.ocean-footer,
.site-footer {
    padding-bottom: 2.75rem;
}
