/* --- CSS Variables (Theming) --- */
:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-meta: #666666;
    --overlay-bg: rgba(0, 0, 0, 0.3);
    --btn-bg: #f5f5f5;
    --btn-text: #111111;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-primary: #f8f8f8;
    --text-meta: #aaaaaa;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --btn-bg: #2a2a2a;
    --btn-text: #f8f8f8;
}

/* --- Base & Typography --- */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2 {
    margin: 0;
    font-weight: 400;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1rem; color: var(--text-meta); }

/* --- Header & Navigation --- */
.portfolio-header {
    padding: 2rem;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
}

.branding { text-align: left; }

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
}

.filter-btn.active {
    outline: 2px solid var(--text-primary);
}

/* --- Masonry Gallery Grid --- */
.gallery-grid {
    column-count: 1;
    column-gap: 1rem;
    padding: 0 1rem 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 600px) { .gallery-grid { column-count: 2; } }
@media (min-width: 900px) { .gallery-grid { column-count: 3; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* --- Video Overlay --- */
.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.play-icon {
    color: #ffffff;
    font-size: 3rem !important;
    opacity: 0.9;
}

/* --- Glightbox Overrides --- */
.goverlay { background: rgba(0, 0, 0, 0.95); }
.gslide-desc {
    position: absolute !important;
    bottom: 0 !important;
    width: 100% !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 1.5rem !important;
    text-align: center;
}
.gdesc-title { font-family: 'Inter', sans-serif; font-size: 1.1rem; margin-bottom: 0.5rem; }
.gdesc-inner { font-family: 'Space Mono', monospace; font-size: 0.9rem; color: #cccccc; }

/* --- Centered Layouts (Passcode / Under Construction) --- */
.centered-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.auth-container, .message-container {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-form input {
    padding: 0.75rem;
    border: 1px solid var(--text-meta);
    background: transparent;
    color: var(--text-primary);
}

.auth-form button {
    padding: 0.75rem;
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.error-msg { color: #d9534f; font-size: 0.9rem; }