/* Fonts */
@font-face {
    font-family: 'PP Editorial New';
    src: url('type/PPEditorialNew-Italic.woff2') format('woff2'),
        url('type/PPEditorialNew-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'PP Editorial New';
    src: url('type/PPEditorialNew-Regular.woff2') format('woff2'),
        url('type/PPEditorialNew-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Editorial New';
    src: url('type/PPEditorialNew-BoldItalic.woff2') format('woff2'),
        url('type/PPEditorialNew-BoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}
        
@font-face {
    font-family: 'PP Editorial New';
    src: url('type/PPEditorialNew-Bold.woff2') format('woff2'),
        url('type/PPEditorialNew-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Migra';
    src: url('type/PPMigra-Extrabold.woff2') format('woff2'),
    url('type/PPMigra-Extrabold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Migra';
    src: url('type/PPMigraItalic-ExtraboldItalic.woff2') format('woff2'),
        url('type/PPMigraItalic-ExtraboldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PP Editorial New';
}

body {
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

.project-description a {
    color: #000;
    text-decoration: none;
    position: relative;
}

.project-description a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #000;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.project-description a:hover::after {
    transform: translateY(2px);
}

/* Menu styles */
.menu {
    width: 250px;
    padding: 2.5rem 2rem;
    background-color: #fff;
}

.project-list {
    list-style: none;
    position: sticky;
    top: 2.5rem;
}

.project-list li {
    margin-bottom: 1rem;
}

.project-list a {
    text-decoration: none;
    color: #555;
    font-size: 1rem;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.project-list a:hover, .project-list a.active {
    color: #000;
    background-color: #f5f5f5;
}

/* Content styles */
.content {
    flex: 1;
    padding: 2.5rem;
    background-color: #fff;
}

.project {
    display: none;
}

.project.active {
    display: block;
}

.project h3 {
    font-family: 'PP Migra';
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
	line-height: 1;
}

.project-description {
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 600px;
}

/* Featured image styles */
.featured-image {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 2px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Video styles */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 2rem 0;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 450px;
    border: none;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    color: #333;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design - ONLY modify the menu on mobile */
@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .menu {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
        background-color: #fff;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99;
    }

    .menu.open {
        max-height: 100vh;
        padding: 4rem 1rem 1rem 1rem;
        overflow-y: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-btn {
        display: block;
    }

    .content {
        padding-top: 4rem;
    }
}

/* Specific mobile gallery fixes */
@media screen and (max-width: 768px) {
    /* Force two-column layout on mobile */
    .gallery {
        display: grid;
        grid-template-columns: 49% 49% !important; /* Fixed width columns with a tiny gap */
        grid-column-gap: 2%;
        grid-row-gap: 10px;
        margin-top: 2rem;
    }
    
    /* Remove any conflicting styles */
    .gallery-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important; /* Remove margin to avoid spacing issues */
    }
    
    /* Make sure images fill their containers */
    .gallery-item img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* iOS specific fixes (iPhone) */
@supports (-webkit-touch-callout: none) {
    /* iOS specific styles here */
    @media screen and (max-width: 768px) {
        .gallery {
            display: flex !important;
            flex-wrap: wrap !important;
            justify-content: space-between !important;
        }
        
        .gallery-item {
            flex: 0 0 48% !important; /* Slightly less than 50% to account for spacing */
            margin-bottom: 10px !important;
        }
    }
}

/* Dark mode detection and styling */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .container {
        background-color: #121212;
    }
    
    .menu {
        background-color: #121212;
    }
    
    .content {
        background-color: #121212;
    }
    
    .project-list a {
        color: #b0b0b0;
    }
    
    .project-list a:hover, .project-list a.active {
        color: #ffffff;
        background-color: #2d2d2d;
    }
    
    .project h3 {
        color: #ffffff;
    }
    
    .project-description {
        color: #d0d0d0;
    }
    
    .project-description a {
        color: #ffffff;
    }
    
    .project-description a::after {
        background-color: #ffffff;
    }
    
    .mobile-menu-btn {
        color: #e0e0e0;
        background-color: rgba(40, 40, 40, 0.9);
    }
    
    /* Add a subtle border to gallery items in dark mode for better visibility */
    .gallery-item {
        border: 1px solid #333;
    }
    
    /* Adjust video container in dark mode */
    .video-container {
        background-color: #000;
    }
}

/* Optional: Transition for smoother theme switching if user changes their preference while on the page */
body, .container, .menu, .content, .project-list a, .project h3, 
.project-description, .mobile-menu-btn, .gallery-item {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.gallery-item.video-thumbnail {
    position: relative;
}