:root {
    --font-primary: 'Jost', sans-serif;
    --transition-speed: 0.4s;
    --nav-height: 60px;
}
:root.dark-theme {
    --color-text: #e9e9f0;
    --color-background: #030717;
    --color-section-background: rgba(29, 24, 69, 0.75);
    --color-primary: #4d9fff;
    --color-secondary: #a777ff;
    --color-border: rgba(77, 159, 255, 0.3);
    --color-footer-background: rgba(3, 7, 23, 0.7);
    --color-shadow: rgba(0,0,0,0.4);
    --moon-color: rgba(167, 119, 255, 0.7);
    --star-color: rgba(255, 255, 255, 0.6);
    --nav-background: rgba(3, 7, 23, 0.9);
}
:root.light-theme {
    --color-text: #1c1c2e;
    --color-background: #e4e9f0;
    --color-section-background: rgba(255, 255, 255, 0.8);
    --color-primary: #007bff;
    --color-secondary: #8a5af5;
    --color-border: #c8cde0;
    --color-footer-background: #d8dbe5;
    --color-shadow: rgba(0,0,0,0.1);
    --moon-color: rgba(138, 90, 245, 0.7);
    --star-color: rgba(28, 28, 46, 0.6);
    --nav-background: rgba(228, 230, 240, 0.9);
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
    font-family:var(--font-primary);
    overflow-x:hidden;
    background-color:var(--color-background);
    color:var(--color-text);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    display: flex; flex-direction: column; min-height: 100vh;
    padding-top: var(--nav-height);
}
main.page-content-wrapper { flex-grow: 1; position: relative; z-index: 1; }
img, video { max-width:100%; height:auto; display:block; }
.parallax {
    position:fixed; top:0; left:0; width:100%; height:100%;
    background:url('https://onelovedao.org/wp-content/uploads/2024/10/Residency-BG.jpg') no-repeat center center fixed;
    background-size:cover; z-index:-3; filter: blur(4px) brightness(0.4);
}
#star-canvas, #moon-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
#star-canvas { z-index: -2; }
#moon-canvas { z-index: -1; }
#hero-section {
    width: 100%;
    background-color: rgba(0,0,0,0.2);
    border-bottom:3px solid var(--color-primary);
    z-index:0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    position: relative;
    padding: 60px 20px;
}
#hero-section .hero-content { position: relative; z-index: 2; padding: 10px 0; width: 100%; }
#hero-section h1 { font-size: 2.8rem; color: var(--color-primary); margin-bottom: 5px; font-weight: 700; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }
#hero-section h2 { font-size: 1.2rem; margin-bottom: 20px; font-weight: 400; text-shadow: 0 2px 4px rgba(0,0,0,0.7); }
#hero-section h2 .curator-name { font-weight: 600; color: var(--color-text); }
.hero-video-container { display: flex; justify-content: center; align-items: center; gap: 20px; width: 100%; }
.hero-video-wrapper {
    position: relative; width: 100%; max-width: min(50vw, 550px);
    box-shadow: 0 0 20px rgba(77, 159, 255, 0.3);
    border: 1px solid var(--color-border);
    border-radius: 8px; overflow: hidden; background-color: #000;
}
.hero-video-wrapper video { display: block; width: 100%; }
nav {
    position: fixed; top: 0px; width: 100%;
    background: var(--nav-background);
    padding: 0px 20px;
    z-index: 2000;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed), padding var(--transition-speed);
}
nav.scrolled { background: var(--color-background); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5); }
:root.light-theme nav.scrolled { background: var(--color-background); }
nav .logo { font-size: 1.8rem; font-weight: 700; color: var(--color-text); text-decoration: none; }
nav .menu { display: flex; align-items: center; gap: 20px; }
nav .menu a, nav .dropdown-toggle { color: var(--color-text); text-decoration: none; font-size: 1rem; font-weight: 500; transition: color var(--transition-speed); }
nav .menu a:hover, nav .dropdown-toggle:hover { color: var(--color-primary); }
nav .dropdown { position: relative; }
nav .dropdown-toggle { display: flex; align-items: center; cursor: pointer; }
nav .dropdown-toggle i { margin-left: 5px; transition: transform var(--transition-speed); }
nav .dropdown.open .dropdown-toggle i { transform: rotate(180deg); }
nav .dropdown-menu {
    position: absolute; top: 100%; left: 0;
    background: var(--nav-background); border-radius: 5px;
    overflow: hidden; display: none; flex-direction: column;
    min-width: 200px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
nav .dropdown.open .dropdown-menu { display: flex; opacity: 1; visibility: visible; }
nav .dropdown-menu a { padding: 10px 15px; font-size: 0.95rem; }
nav .dropdown-menu a:hover { background-color: var(--color-primary); color: #fff; }
.theme-toggle { margin-left: 20px; display: flex; align-items: center; }
.theme-toggle input[type='checkbox'] { display: none; }
.theme-toggle label {
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    width: 50px; height: 25px; background-color: rgba(0,0,0,0.4);
    border-radius: 25px; position: relative; transition: background-color var(--transition-speed);
}
.theme-toggle label::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 19px; height: 19px; background-color: var(--color-text);
    border-radius: 50%; transition: transform var(--transition-speed), background-color var(--transition-speed);
}
.dark-theme .theme-toggle input[type='checkbox']:checked + label,
.light-theme .theme-toggle input[type='checkbox']:not(:checked) + label { background-color: var(--color-primary); }
.dark-theme .theme-toggle input[type='checkbox']:checked + label::after,
.light-theme .theme-toggle input[type='checkbox']:not(:checked) + label::after { transform: translateX(25px); }
.theme-toggle label i { position: absolute; font-size: 12px; color: #f1c40f; }
.theme-toggle label .fa-moon { left: 5px; }
.theme-toggle label .fa-sun { right: 5px; }
.hamburger { display: none; flex-direction: column; justify-content: space-between; width: 25px; height: 20px; cursor: pointer; z-index: 2001; }
.hamburger div { width: 100%; height: 3px; background-color: var(--color-text); transition: transform var(--transition-speed), opacity var(--transition-speed); }
.hamburger.open div:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open div:nth-child(2) { opacity: 0; }
.hamburger.open div:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.gallery-intro { padding: 50px 20px; text-align: center; max-width: 900px; margin: 40px auto; background-color: var(--color-section-background); border-radius: 10px; box-shadow: 0 6px 12px var(--color-shadow); }
.gallery-intro h3 { font-size: 2rem; font-weight: 400; margin-bottom: 0; line-height: 1.5; color: var(--color-text); text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.gallery-intro h3 span { color: var(--color-primary); font-weight: 700; }
#gallery { padding: 40px 20px 60px; max-width: 1200px; margin: 0 auto; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.gallery-item {
    background: var(--color-section-background); border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    display: flex; flex-direction: column;
    border: 1px solid var(--color-border);
}
.gallery-item:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 12px 24px rgba(0,0,0,0.6); }
.gallery-item .image-container {
    width: 100%; height: auto;
    background-color: #111;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-top-left-radius: 9px; border-top-right-radius: 9px;
}
.gallery-item img { width: 100%; height: auto; object-fit: contain; transition: transform 0.4s ease-out, opacity 0.4s; opacity: 0.95; }
.gallery-item:hover img { transform: scale(1.05); opacity: 1; }
.gallery-item .video-container {
    width: 100%; height: auto; background-color: #000;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-top-left-radius: 9px; border-top-right-radius: 9px;
}
.gallery-item video { width: 100%; height: 100%; object-fit: contain; }
.gallery-item-caption { padding: 15px; text-align: center; margin-top: auto; }
.gallery-item-caption .artist-name { font-size: 1.2rem; font-weight: 600; color: var(--color-primary); margin: 0 0 5px; }
.gallery-item-caption .artwork-title { font-size: 1rem; font-style: italic; color: var(--color-text); }
footer { text-align:center; padding:20px; background-color:var(--color-footer-background); color:var(--color-text); box-shadow:0 -2px 4px var(--color-shadow); border-radius:8px 8px 0 0; position:relative; z-index:10; width:100%; margin-top: auto; }
footer p { margin:0; font-size:1rem; }
footer .social-links { margin-bottom:10px; }
footer .social-links a { margin:0 8px; font-size:1.2rem; color:var(--color-text); transition:color var(--transition-speed); }
footer .social-links a:hover { color:var(--color-primary); }

@media (max-width: 768px) {
    nav { padding: 15px 20px; }
    .hamburger { display: flex; }
    nav .menu {
        position: fixed; top: var(--nav-height); right: 0;
        height: calc(100vh - var(--nav-height)); width: 250px;
        background: var(--nav-background); flex-direction: column;
        align-items: flex-start; padding-top: 20px;
        transform: translateX(100%); transition: transform var(--transition-speed);
        gap: 0; overflow-y: auto;
    }
    nav .menu.open { transform: translateX(0); }
    nav .menu a, nav .menu .dropdown-toggle { padding: 15px 20px; width: 100%; font-size: 1.1rem; }
    nav .dropdown-menu { position: static; box-shadow: none; width: 100%; background: rgba(0,0,0,0.2); }
    nav .dropdown.open .dropdown-menu { display: flex; }
    nav .dropdown-menu a { padding-left: 30px; font-size: 1rem; }
}