:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --accent: #00d4ff;
    --text: #ffffff;
    --bg-blur: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('./background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

nav {
    width: 280px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(var(--bg-blur));
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    z-index: 10;
}

nav h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    color: var(--accent);
    opacity: 0.8;
}

nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 8px 0;
    padding: 12px 15px;
    border-radius: 12px;
    transition: 0.3s all;
    cursor: pointer;
    font-weight: 500;
}

nav a:hover,
nav a.active-link {
    background: var(--glass-bg);
    color: var(--text);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

main {
    flex-grow: 1;
    padding: 5vh 5vw;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem;
    max-width: 900px;
    width: 100%;
    height: fit-content;
    margin: 0 auto 20px auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* THE FIX: Raster Grid Style */
.grid-raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.sub-card {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

p {
    line-height: 1.8;
    margin-bottom: 1.2rem;
}


ul {
    margin-left: 20px;
}

/* Food Gallery */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.food-item {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    height: 200px;
    transition: transform 0.3s;
}

.food-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.food-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#my-popup {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 15px;
    max-width: 320px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto;
    }

    nav {
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        position: sticky;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    nav h2 {
        display: none;
    }

    main {
        padding: 1.5rem;
    }

    .grid-raster {
        grid-template-columns: 1fr;
    }

    .research-image-container {
        margin-top: 2rem;
        border-radius: 15px;
        overflow: hidden;
        border: 1px solid var(--glass-border);
        background: rgba(0, 0, 0, 0.2);
        position: relative;
    }

    .research-image-container img {
        width: 100%;
        height: auto;
        display: block;
        opacity: 0.9;
        transition: opacity 0.3s ease;
    }

    .research-image-container:hover img {
        opacity: 1;
    }
}