/* Custom Design System for MG PHOTOGRAPHY */

:root {
    --bg-base: #0a0a0b;
    --bg-surface: #121214;
    --bg-surface-elevated: #1a1a1e;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-disabled: #4b5563;
    
    --accent: #d4af37; /* Subtle metallic gold */
    --accent-hover: #f3e5ab;
    --accent-rgb: 212, 175, 55;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --sidebar-width: 280px;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Base Reset & Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-elevated);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

/* Main Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ---------------------------------------------------- */
/* SIDEBAR / HEADER STYLING */
/* ---------------------------------------------------- */

.site-header {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    overflow-y: auto;
}

.header-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo-area {
    margin-bottom: 50px;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-initials {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    color: var(--accent);
    text-transform: uppercase;
}

.menu-toggle {
    display: none; /* Desktop only hidden */
}

/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    display: inline-block;
    padding: 6px 0;
    position: relative;
    text-transform: uppercase;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 40px;
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-link.active::after {
    width: 100%;
}

.sidebar-intro {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 25px;
}

.sidebar-contacts {
    display: flex;
    gap: 15px;
}

.contact-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-surface-elevated);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.contact-icon-link:hover {
    background-color: var(--accent);
    color: var(--bg-base);
    transform: translateY(-2px);
}

.contact-icon-link .icon {
    width: 18px;
    height: 18px;
}

/* ---------------------------------------------------- */
/* MAIN CONTENT / HERO */
/* ---------------------------------------------------- */

.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-base);
}

.gallery-hero {
    padding: 60px 50px 20px 50px;
}

.hero-text h1 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.hero-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------------------------------------------------- */
/* PHOTO GALLERY MASONRY */
/* ---------------------------------------------------- */

.gallery-section {
    padding: 30px 50px 60px 50px;
    flex-grow: 1;
}

.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.gallery-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Photo Cards */
.photo-card {
    background-color: var(--bg-surface);
    margin-bottom: 20px;
    break-inside: avoid;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateY(30px);
}

.photo-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.photo-img-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.photo-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-card:hover .photo-img-wrapper img {
    transform: scale(1.05);
}

/* Overlay Info */
.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0.2) 60%, rgba(10, 10, 11, 0) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay-cat {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 5px;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

.photo-overlay-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    transform: translateY(15px);
    transition: var(--transition-smooth);
    transition-delay: 0.05s;
}

.photo-card:hover .photo-overlay-cat,
.photo-card:hover .photo-overlay-title {
    transform: translateY(0);
}

/* ---------------------------------------------------- */
/* FOOTER STYLING */
/* ---------------------------------------------------- */

.site-footer {
    background-color: var(--bg-surface);
    padding: 60px 50px 30px 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1 1 300px;
}

.brand-col h2 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.footer-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 400px;
}

.contacts-col h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 20px;
}

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-list li {
    display: flex;
    font-size: 0.95rem;
}

.contact-label {
    width: 100px;
    color: var(--text-muted);
}

.contact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.contact-value.email-link:hover,
.contact-value.instagram-link:hover {
    color: var(--accent);
    padding-left: 3px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------------------------------------------------- */
/* LIGHTBOX MODAL */
/* ---------------------------------------------------- */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 6, 7, 0.93);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1010;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lightbox.active .lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Buttons */
.lightbox-btn {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 1020;
}

.lightbox-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.close-btn {
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
}

.prev-btn {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

.next-btn {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

.lightbox-btn svg {
    width: 24px;
    height: 24px;
}

/* Caption info */
.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: var(--text-primary);
}

.lightbox-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.lightbox-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    z-index: -1;
    display: none;
}

.lightbox-loader.active {
    display: block;
}

/* ---------------------------------------------------- */
/* RESPONSIVE DESIGN (MEDIA QUERIES) */
/* ---------------------------------------------------- */

@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    
    /* Sticky Top Header on Mobile */
    .site-header {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        left: 0;
        padding: 20px 30px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        background-color: rgba(18, 18, 20, 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: auto;
    }
    
    .logo-area {
        margin-bottom: 0;
    }
    
    .logo-initials {
        font-size: 1.8rem;
    }
    
    .logo-sub {
        font-size: 0.6rem;
    }
    
    /* Toggle button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        z-index: 200;
    }
    
    .menu-toggle .bar {
        height: 2px;
        width: 100%;
        background-color: var(--text-primary);
        border-radius: 2px;
        transition: var(--transition-fast);
    }
    
    /* Animated Close Hamburger */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Slide out Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--bg-surface);
        padding: 100px 40px 40px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 150;
        display: flex;
        flex-direction: column;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-links {
        gap: 25px;
        margin-bottom: auto;
    }
    
    .nav-link {
        font-size: 1.1rem;
    }
    
    .sidebar-intro {
        margin-top: 40px;
    }
    
    /* Adjust Main margins */
    .main-content {
        margin-left: 0;
    }
    
    .gallery-hero {
        padding: 40px 30px 10px 30px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .gallery-section {
        padding: 20px 30px 40px 30px;
    }
    
    /* Lightbox button sizing */
    .prev-btn, .next-btn {
        width: 50px;
        height: 50px;
    }
    
    .prev-btn { left: 15px; }
    .next-btn { right: 15px; }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
    
    .gallery-hero {
        padding: 30px 20px 5px 20px;
    }
    
    .gallery-section {
        padding: 15px 20px 30px 20px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .site-footer {
        padding: 40px 20px 20px 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .close-btn {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    /* For smaller screens, hide sidebar buttons and let users swipe */
    .prev-btn, .next-btn {
        display: none;
    }
}
