/* ======================================== */
/* 🌬️ GLOBAL RESET AND BASE STYLES */
/* ======================================== */

:root {
    --primary-color: #1a1a1a; /* Dark background */
    --secondary-color: #ffffff; /* Text color */
    --accent-color: #007aff; /* Hover/active blue - Think Apple */
    --footer-gray: #333333; /* The required footer color */
    --transition-speed: 0.5s;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    min-height: 100vh; /* Ensure body fills the viewport */
    display: flex;
    flex-direction: column; /* Stack header/main/footer */
}


.nav-bar {
    position: sticky; /* Keeps it visible during scrolling if body is long */
    top: 0;
    z-index: 100; /* Keep it above other content */
    background: rgba(26, 26, 26, 0.95);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 67px; /* Spacing between tabs */

    transform: translateY(-100%); /* Initial hide */
    transition: transform var(--transition-speed) ease-in-out;
}

body:hover .nav-bar {
    transform: translateY(0); /* Drop into view when body/window is active */
}


.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent; /* Placeholder for active state */
    transition: all var(--transition-speed) ease;
}

.tab:hover {
    color: var(--accent-color);
}

.tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--accent-color); /* Highlight the currently selected page */
}


main {
    flex-grow: 1; /* Allows main to consume all available vertical space */
    padding: 40px 5%; /* Padding around content */
    max-width: 1200px;
    margin: 0 auto; /* Center the content */
}

.page-content {
    /* Default visibility is controlled by JS/CSS classes */
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.hidden {
    display: none; /* Better tab switching */
}

h1 {
    font-size: 2.5em;
    margin-bottom: 0.3em;
}

p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ======================================== */
/* 🖼️ WEBGL/GRAPHICS PLACEHOLDERS */
/* ======================================== */

.webgl-placeholder {
    background: #2b2b2b; /* Dark neutral background for visualizations */
    min-height: 400px; /* Give the canvas breathing room */
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #888;
}

/* Specific class for when the page is successfully running a demo */
.webgl-active {
    cursor: crosshair; /* Indicates interactivity to the user */
}


/* ======================================== */
/* ⬇️ FOOTER STYLES */
/* The required gray footer */
/* ======================================== */

.site-footer {
    background-color: var(--footer-gray); /* The required gray */
    color: #bbb;
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9em;
    margin-top: auto; /* Push the footer to the absolute bottom of the page */
}


/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .nav-bar {
        /* On mobile, stack the tabs vertically if needed, or keep them side-by-side but smaller */
        gap: 10px;
        padding: 5px 0;
    }

    .tab {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    h1 {
        font-size: 2em;
    }
}
