/* ============================================
   George Brennan Portfolio — Minimal Styles
   ============================================ */

/* --- Light theme (default) --- */
:root {
    --bg: #fff;
    --bg-alt: #fafafa;
    --text: #111;
    --text-secondary: #555;
    --text-muted: #999;
    --border: #e0e0e0;
    --nav-bg: rgba(255,255,255,0.95);
    --lightbox-bg: rgba(0,0,0,0.9);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 60px;
    --section-padding: 80px;
}

/* --- Dark theme --- */
[data-theme="dark"] {
    --bg: #111;
    --bg-alt: #1a1a1a;
    --text: #eee;
    --text-secondary: #aaa;
    --text-muted: #666;
    --border: #2a2a2a;
    --nav-bg: rgba(17,17,17,0.95);
    --lightbox-bg: rgba(0,0,0,0.95);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
}

/* --- Nav --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-brand {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-brand:hover {
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text);
    text-decoration: none;
}
/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: var(--text);
}

.theme-icon { display: none; }
[data-theme="dark"] .theme-icon.sun { display: block; }
[data-theme="dark"] .theme-icon.moon { display: none; }
html:not([data-theme="dark"]) .theme-icon.sun { display: none; }
html:not([data-theme="dark"]) .theme-icon.moon { display: block; }

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-bar {
    width: 20px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
}

.menu-toggle.active .menu-bar:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.active .menu-bar:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--nav-bg);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-link {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.mobile-link:hover {
    color: var(--text);
    text-decoration: none;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.hero-logo {
    width: 100vw;
    max-width: none !important;
    display: block;
    height: auto;
}

/* Invert logo in dark mode so it stays visible */
[data-theme="dark"] .hero-logo {
    filter: invert(1);
}

/* --- Sections --- */
.section {
    padding: 80px 60px;
    border-top: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 40px;
    text-align: center;
}

/* --- Gallery --- */
.gallery-grid {
    columns: 4;
    column-gap: 12px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-name {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Loading */
.loading-indicator {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading-indicator.hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- About --- */
.about-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.about-content a {
    text-decoration: underline;
    color: var(--text);
}

/* --- Contact --- */
.contact-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    margin-bottom: 24px;
}

.contact-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.contact-link {
    font-size: 0.95rem;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.social-links a:hover {
    color: var(--text);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: var(--lightbox-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover { opacity: 0.7; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 200;
    cursor: pointer;
    padding: 16px;
}

.lightbox-nav:hover { opacity: 0.7; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* --- Footer --- */
.footer {
    padding: 32px 40px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: border-color 0.3s ease;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-links a:hover {
    color: var(--text);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .gallery-grid { columns: 3; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .nav-links { display: none; }
    .menu-toggle { display: flex; }
    .section { padding: 60px 20px; }
    .gallery-grid { columns: 2; column-gap: 8px; }
    .gallery-item { margin-bottom: 8px; }
    .footer { padding: 24px 20px; flex-direction: column; gap: 12px; text-align: center; }
    .hero { min-height: 50vh; }
}

@media (max-width: 480px) {
    .gallery-grid { columns: 1; }
}
