/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Root variables adapted for dark theme */
:root {
    --color-primary: #cccccc; /* lighter grey for primary accent, adjust as desired */
    --color-secondary: #999999; /* secondary accent */
    --color-tertiary: #555555; /* tertiary background / accents */
    --color-background: #1e1e1e; /* dark background for overall theme */
    --color-accent: #e9734d; /* accent color (muted) */
    --color-grey: #333; /* grey for borders/shadows */
    
    --text-primary: #f0f0f0; /* light text for primary readability */
    --text-secondary: #bbbbbb; /* secondary text */
    --text-light: #f0f0f0; /* same for light text */
    
    --size: 15px;
    --mask-size: 20px;
    --bubble-color-1: rgba(85, 85, 85, 0.15);
    --bubble-color-2: rgba(102, 102, 102, 0.15);
    --bubble-color-3: rgba(150, 150, 150, 0.15);
    
    --transition-elastic: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --z-header: 1000;
    --z-modal: 1100;
    --z-overlay: 1050;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Titillium Web', sans-serif;
    line-height: 1.5;
    background-color: var(--color-background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-align: left;
}

/* Links Styling for dark theme */
body a {
    color: var(--text-primary);
    text-decoration: none;
}
body a:visited {
    color: var(--text-secondary);
}

/* Footer nav styles - no background, dark text */
#footer-nav a {
    padding: 8px 16px;
    color: var(--text-light);
    border-radius: 4px;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}
#footer-nav a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Animated Background Bubbles - keep same style for a subtle animated background, maybe darker colors */
.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* Example darker bubbles */
.bubble:nth-child(1) {
    width: 300px;
    height: 300px;
    background: var(--bubble-color-1);
    top: 10%;
    left: 20%;
    animation: elasticBubble1 15s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
.bubble:nth-child(2) {
    width: 250px;
    height: 250px;
    background: var(--bubble-color-2);
    top: 60%;
    left: 70%;
    animation: elasticBubble2 18s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite 2s;
}
.bubble:nth-child(3) {
    width: 200px;
    height: 200px;
    background: var(--bubble-color-3);
    top: 40%;
    left: 30%;
    animation: elasticBubble3 20s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite 1s;
}
/* ... other bubbles unchanged ... */

/* Header styles - darker background and text */
header {
    height: 60px;
    background-color: var(--color-tertiary);
    color: var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: var(--z-header);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* home link style remains same but color is already primary, which is light */
.home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}
.nav-logo {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}
.nav-logo:hover {
    transform: scale(1.1);
}
.home-link:hover {
    opacity: 0.8;
}

/* Right section in header for login, menus, etc */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: fixed;
    top: 0;
    right: 0;
    padding: 15px;
    z-index: 999;
}
.login-button {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: transparent; /* optional: or a dark neutral tone */
    border: 1px solid var(--text-light);
    transition: var(--transition-smooth);
}
.login-button:hover {
    background-color: var(--color-tertiary);
    transform: translateY(-1px);
}

/* Hamburger menu - same style, add color adjustments if needed */
.hamburger {
    display: block;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 44px;
    height: 44px;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    margin: 4px auto;
    background-color: var(--color-primary);
    transition: transform 0.3s ease-in-out;
}

/* active hamburger icon transforms */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Navigation panel - dark background, contrast text, etc. */
.main-nav {
    position: fixed;
    top: 60px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 60px);
    background-color: var(--color-tertiary);
    color: var(--text-primary);
    transition: var(--transition-elastic);
    z-index: var(--z-overlay);
    padding: 20px 0;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--color-grey);
}
.main-nav.active {
    right: 0;
}
.main-nav a {
    display: block;
    padding: 15px 25px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateX(50px);
}
.main-nav a:hover {
    background-color: var(--color-secondary);
    color: var(--text-primary);
    padding-left: 35px;
}
.main-nav.active a {
    opacity: 1;
    transform: translateX(0);
}
.main-nav a:nth-child(1) { transition-delay: 0.1s; }
.main-nav a:nth-child(2) { transition-delay: 0.2s; }
.main-nav a:nth-child(3) { transition-delay: 0.3s; }

/* Content styles with dark backgrounds and neutral accents */
.content-wrapper {
    padding-top: 60px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}
.logo-section {
    height: 150px;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}
.logo-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 180deg at 50% 70%,
        hsl(0, 0%, 98%) 0deg,
        var(--color-accent) 72.0000010728836deg,
        hsl(0, 0%, 20%) 144.0000021457672deg,
        var(--color-primary) 216.00000858306885deg,
        var(--color-tertiary) 288.0000042915344deg,
        hsla(0,0%,98%,1) 1turn
    );
    mask: radial-gradient(circle at 50% 50%, white 1.5px, transparent 2px) 50% 50% / calc(var(--size) * 0.5) calc(var(--size) * 0.5),
         url("https://assets.codepen.io/605876/noise-mask.png") 256px 50% / 256px 256px;
    -webkit-mask: radial-gradient(circle at 50% 50%, white 1.5px, transparent 2px) 50% 50% / calc(var(--size) * 0.5) calc(var(--size) * 0.5),
         url("https://assets.codepen.io/605876/noise-mask.png") 256px 50% / 256px 256px;
    mask-composite: intersect;
    -webkit-mask-composite: intersect;
    animation: flicker 20s infinite linear;
}
.logo-section img {
    max-width: 200px;
    height: auto;
    position: relative;
    z-index: 1;
    /* optional: add a subtle filter if needed for better contrast */
    filter: brightness(0.9);
}

.content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Card styles with darker background and contrast text */
.card {
    background-color: var(--color-background);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--color-grey);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--color-secondary);
    background-color: var(--color-background);
    box-shadow: var(--shadow-lg);
}
.card h1 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: var(--color-primary);
    text-align: left;
}
.card p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-secondary);
}
.card img {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Modal styles for dark background */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.9); /* darker overlay */
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: #2e2e2e;
    border: 2px solid var(--color-primary);
    padding: 30px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.95);
    transition: var(--transition-elastic);
    box-shadow: var(--shadow-lg);
}
.modal.active .modal-content {
    transform: scale(1);
}

/* Gallery modal adjustments for dark theme */
.gallery-modal .modal-content {
    padding: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 20px;
}
.gallery-image-container {
    max-height: 90vh;
    max-width: 90vw;
    display: flex;
    justify-content: center;
    align-items: center;
}
.gallery-image-container img {
    max-height: 80vh;
    max-width: 80vw;
    object-fit: contain;
    border-radius: 8px;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Buttons - ensure contrast and dark background */
.nav-button {
    background-color: var(--color-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.nav-button:hover {
    background-color: var(--color-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.close-modal:hover {
    background-color: var(--color-tertiary);
    transform: scale(1.1);
}

/* Form Styles - dark backgrounds with contrasting labels and inputs */
.styled-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.styled-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-weight: 500;
}
.styled-form input,
.styled-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    background-color: #3a3a3a;
    color: var(--text-light);
}
.styled-form input:focus,
.styled-form textarea:focus {
    outline: none;
    border-color: #666; /* slightly lighter for focus */
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

/* Main action buttons */
.primary-button {
    background-color: var(--color-secondary);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.primary-button:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Retry button */
.retry-button {
    background-color: #444; /* darker blue/grayscale variant */
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.retry-button:hover {
    background-color: #555;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Footer styles in dark mode */
footer {
    background-color: #111; /* dark footer */
    color: var(--text-light);
    padding: 30px 20px;
    text-align: center;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Footer nav improved for dark theme */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.footer-nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: transparent; /* optional darker background */
    transition: var(--transition-smooth);
}
.footer-nav a:hover {
    background-color: #222; /* darker bg on hover */
    color: var(--text-light);
}

/* Misc animations, loading states, error messages, etc., no big change needed, but ensure contrast */
.loading-indicator {
    background-color: rgba(26, 20, 16, 0.9);
}
.error-message {
    background-color: #aa0000; /* dark red for errors */
    color: var(--text-light);
}
.noscript-warning {
    background-color: #222;
    color: var(--text-light);
}

/* Utility classes, media queries, etc., as needed */
