/* Color Variables for Light & Dark Mode */
:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --header-bg: rgba(255, 255, 255, 0.95);
    --nav-link: #000000;
    --nav-hover: #888888;
    --grid-bg: #f4f4f4;
    --grid-text: #666666;
    --border-color: #000000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-primary: #f4f4f4;
        --text-secondary: #bbbbbb;
        --header-bg: rgba(18, 18, 18, 0.95);
        --nav-link: #ffffff;
        --nav-hover: #aaaaaa;
        --grid-bg: #1e1e1e;
        --grid-text: #999999;
        --border-color: #ffffff;
    }
}

/* General Reset & Typography */
* { box-sizing: border-box; }
body { 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    color: var(--text-primary); 
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Minimalist Sticky Header */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 4rem; 
    position: sticky; 
    top: 0; 
    background: var(--header-bg); 
    backdrop-filter: blur(5px);
    z-index: 100; 
    transition: background-color 0.3s ease;
}
.logo { 
    font-size: 1.2rem; 
    font-weight: 700; 
    text-decoration: none; 
    color: var(--nav-link); 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
}
nav { 
    display: flex; 
    gap: 2rem; 
}
nav a { 
    text-decoration: none; 
    color: var(--nav-link); 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    font-weight: 500; 
    transition: color 0.3s ease, border-color 0.3s ease;
}
nav a:hover { color: var(--nav-hover); }
nav a.active { 
    color: var(--nav-hover); 
    border-bottom: 1px solid var(--nav-hover); 
    padding-bottom: 2px;
}

/* Hero Video Section */
.hero-container {
    position: relative;
    width: 100%;
    height: 70vh; 
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: -1;
}

.hero-text {
    text-align: center;
    color: #ffffff;
    z-index: 1;
    padding: 0 2rem;
}

.hero-text h1 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Styling */
section { 
    padding: 5rem 4rem; 
    min-height: 70vh;
}
h2 { 
    text-transform: uppercase; 
    font-size: 1.8rem; 
    font-weight: 400; 
    margin-bottom: 2rem; 
    letter-spacing: 1px;
}

/* Grid Layout for Photos/Videos */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 1.5rem; 
}
.grid-item { 
    background: var(--grid-bg); 
    aspect-ratio: 3 / 2; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: var(--grid-text); 
    font-size: 1rem; 
    text-transform: uppercase;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.grid-item:hover { transform: scale(0.98); }
.grid-description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

/* About Section */
.about-content { 
    display: flex; 
    gap: 4rem; 
    align-items: center; 
}
.about-text { 
    flex: 1; 
    line-height: 1.8; 
    font-size: 1.1rem; 
    font-weight: 300;
}
.about-image { 
    flex: 1; 
    background: var(--grid-bg); 
    height: 500px; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grid-text);
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* About Page Portrait Image */
.portrait-bg {
    background-image: url('images/portrait.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Contact Section */
.contact-content {
    font-size: 1.2rem;
    line-height: 2;
    font-weight: 300;
}
.contact-content a {
    color: var(--nav-link);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}
.contact-content a:hover {
    color: var(--nav-hover);
    border-bottom: 1px solid var(--nav-hover);
}

/* Social Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0 0 0;
}

.social-links a {
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--nav-hover);
    transform: translateY(-2px); 
}

/* Footer */
footer { 
    text-align: center; 
    padding: 3rem; 
    font-size: 0.8rem; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
footer a {
    text-decoration: none; 
    color: var(--nav-link); 
    font-weight: 500;
    transition: color 0.3s ease;
}
footer a:hover {
    color: var(--nav-hover);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header { padding: 1.5rem; flex-direction: column; gap: 1rem; }
    section { padding: 3rem 1.5rem; }
    .about-content { flex-direction: column; }
    .grid-item { height: 300px; }
    
    /* Hero Adjustments */
    .hero-container { height: 50vh; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { font-size: 1rem; }

    /* Adjust the about image box for smaller screens */
    .about-image { 
        flex: none; 
        min-height: 400px; 
        width: 100%; 
        background-color: transparent; 
    }

    /* Stop cropping the image on mobile */
    .portrait-bg {
        background-size: contain;
        background-position: top center;
    }
}

/* Image Grid Handling & Hover Overlay */
.grid-item.with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    border: none;
}

.grid-item.with-bg .overlay-text {
    background: rgba(0, 0, 0, 0.6); 
    color: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 1rem;
}

.grid-item.with-bg:hover .overlay-text {
    opacity: 1;
}

/* --- Hamburger Icon Styling (Hidden on Desktop) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1000;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--nav-link);
    transition: all 0.3s ease;
}

/* Mobile Responsiveness & Menu */
@media (max-width: 768px) {
    /* Keep Logo and Hamburger on the same line */
    header { 
        padding: 1.5rem; 
        flex-direction: row; 
        justify-content: space-between;
    }
    
    /* Show Hamburger Menu */
    .menu-toggle {
        display: flex;
    }

    /* Convert Nav Links into a Dropdown */
    nav {
        position: absolute;
        top: 100%; /* Drops it right below the header */
        left: 0;
        width: 100%;
        background: var(--header-bg);
        backdrop-filter: blur(5px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        
        /* Hide it by sliding it up and fading it out */
        transform: translateY(-150%);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
        z-index: 99;
    }

    /* Activated state triggered by JavaScript */
    nav.active {
        transform: translateY(0);
        opacity: 1;
    }

    /* Animate the Hamburger to an 'X' when open */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* General Mobile Layout Adjustments */
    section { padding: 3rem 1.5rem; }
    .about-content { flex-direction: column; }
    
    /* 1. Fix the Hero Video height on mobile */
    .hero-container { 
        height: 35vh; /* Shorter banner so it crops less of the sides */
    }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { font-size: 1rem; }

    /* 2. Fix the Grid Videos to stay cinematic and not crop */
    .grid-item { 
        height: auto; /* Removes the rigid 300px height */
        aspect-ratio: 16 / 9; /* Perfect horizontal video ratio */
    }

    .about-image { 
        flex: none; 
        min-height: 400px; 
        width: 100%; 
        background-color: transparent; 
    }
    .portrait-bg {
        background-size: contain;
        background-position: top center;
    }
}