/* --- Global Styles & Variables --- */
:root {
    --primary-red: #8C0000;  /* Deep crimson */
    --secondary-red: #B20000; /* Lighter red for gradient center */
    --text-white: #FFFFFF;
    --text-grey: #CCCCCC;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.2);
    --glow-inset: rgba(255, 255, 255, 0.3);
}

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

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-white);
    background: radial-gradient(ellipse at center, var(--secondary-red), var(--primary-red));
    overflow: hidden; /* Prevents scrollbars from animations */
}

/* --- Animated Background Waves --- */
.background-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.background-waves::before,
.background-waves::after {
    content: '';
    position: absolute;
    left: 50%;
    min-width: 300vw;
    min-height: 300vw;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 45%;
    opacity: 0.5;
    filter: blur(5px);
    animation: wave-flow 20s linear infinite;
}

.background-waves::before {
    bottom: 15vh;
    transform: translateX(-50%);
    animation-duration: 25s;
}

.background-waves::after {
    bottom: 10vh;
    transform: translateX(-50%);
    opacity: 0.2;
    filter: blur(10px);
}

@keyframes wave-flow {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* --- Header & Navigation --- */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
}

.navbar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center; /* Center links as per image layout */
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-grey);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 101; /* Above nav menu on mobile */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-white);
    transition: all 0.3s ease-in-out;
}

/* --- Main Hero Section --- */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* --- 3D Model Container (The "Blob") --- */
#model-container {
    width: 60vmin;
    height: 60vmin;
    max-width: 600px;
    max-height: 600px;
    position: relative;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    box-shadow: 0 10px 30px var(--glass-shadow), inset 0 0 15px var(--glow-inset);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* Safari support */
    
    /* Blob shape animation */
    animation: morph-blob 5s ease-in-out infinite alternate;
}

#model-container canvas {
    display: block; /* Removes any default canvas spacing */
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit; /* Ensure canvas fits the blob shape */
}

@keyframes morph-blob {
    0% {
        border-radius: 45% 55% 60% 40% / 40% 50% 50% 60%;
    }
    50% {
        border-radius: 60% 40% 45% 55% / 50% 60% 40% 50%;
    }
    100% {
        border-radius: 45% 55% 60% 40% / 40% 50% 50% 60%;
    }
}

/* --- Footer --- */
.main-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-grey);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-separator {
    color: var(--text-grey);
    font-size: 0.7rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--text-grey);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--text-white);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
    .navbar {
        justify-content: flex-end; /* Push hamburger to the right */
    }

    .hamburger {
        display: block;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: rgba(100, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: right 0.4s ease-in-out;
        gap: 2rem;
    }

    .nav-menu.active {
        right: 0; /* Slide in */
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    /* Hamburger 'X' animation */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Adjust model container size on mobile */
    #model-container {
        width: 80vmin;
        height: 80vmin;
    }

    /* Adjust footer layout for small screens */
    .main-footer {
        padding: 1rem;
        gap: 1rem;
    }

    .footer-links {
        text-align: center;
    }
}