/* Using system font Avenir Next Ultra Light */

body {
    background-color: #000;
    color: #fff;
    font-family: "Arial", sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background: #222;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    /* Center the menu items */
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

.main-content {
    text-align: left;
    padding: 50px 0;
    margin-top: 70px;
    /* Add space for the fixed header */
}

.header-container {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo {
    grid-column: 1;
    height: 50px;
    display: flex;
    align-items: center;
}

.header-logo-text {
    font-family: 'Avenir Next', sans-serif;
    font-weight: 200;
    /* Ultra Light */
    font-size: 24px;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    grid-column: 3;
    justify-self: end;
    cursor: pointer;
    z-index: 1000;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    transition: all 0.3s ease;
}

.hamburger-icon.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

nav.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: #222;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}

nav.nav-menu.open {
    right: 0;
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

.home-opening-image {
    background: #111;
    line-height: 0;
    text-align: center;
}

.home-opening-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85svh;
    object-fit: contain;
    margin: 0 auto;
}

.home-page > header {
    position: sticky;
    width: auto;
}

.home-page > .main-content {
    margin-top: 0;
}

.home-page .photo-button {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 10px 22px;
}

.home-page .about-button-container {
    justify-content: center;
    max-width: 1000px;
    margin: 1rem auto 3rem;
    padding: 0 20px;
}

.selected-work-heading h2 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.selected-work-heading p {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.home-page .selected-work-heading + .carousel-container {
    margin-top: 2rem;
}

.selected-work-heading .text-section {
    margin-bottom: 0;
}

.selected-work-heading + .carousel-container .carousel-image {
    object-position: center top;
}

.home-page .carousel-container {
    height: auto;
}

.home-page .carousel-content {
    display: grid;
    height: auto;
}

.home-page .carousel-image {
    position: relative;
    grid-area: 1 / 1;
    height: auto;
    max-height: 85vh;
}

.home-page .carousel-container + .photo-button-container {
    margin-top: 1rem;
}

.experiments-section {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 20px;
}

.home-page .community-carousel {
    height: min(65vh, 600px);
    padding: 0 40px;
}

.home-page .community-carousel .carousel-content,
.home-page .community-carousel .carousel-image {
    height: 100%;
    min-height: 0;
}

.home-page .community-carousel .carousel-image {
    object-fit: contain;
    object-position: center top;
}

.experiments-carousel .experiment-tile img,
.experiments-carousel .experiment-tile video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.carousel-image:not(.active) {
    pointer-events: none;
}

.experiments-grid {
    display: grid;
    /* Match the photo (1000 × 666) and video (16:9) heights without cropping. */
    grid-template-columns: minmax(0, 125fr) minmax(0, 148fr);
    gap: 1.5rem;
    margin-top: 1.25rem;
    align-items: end;
}

.experiment-tile {
    margin: 0;
    min-width: 0;
}

.experiment-tile-featured {
    grid-column: 1 / -1;
}

.experiment-tile img,
.experiment-tile video {
    display: block;
    width: 100%;
    height: auto;
}

.experiment-tile figcaption {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #aaa;
}

.experiments-credit {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #aaa;
    text-align: right;
}

@media (max-width: 600px) {
    .experiments-grid {
        grid-template-columns: 1fr;
    }
}

.hero-row {
    align-items: left;
    margin: 40px auto 20px;
    max-width: 1000px;
    padding: 0 20px;
    text-align: left;
}

.hero-heading-text {
    font-family: 'Avenir Next', sans-serif;
    font-weight: 200;
    /* Ultra Light */
    font-size: 5rem;
    letter-spacing: 6px;
    color: #fff;
    display: block;
    max-width: 90%;
    margin-bottom: 3rem;
}

.layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 1rem;
}

.logo-section {
    max-width: 300px;
    height: auto;
    margin-bottom: 1rem;
}

.text-section {
    max-width: 100%;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.news-section {
    max-width: 600px;
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 6rem;
}

.portrait-section img {
    border-radius: 50%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
    margin-top: 1rem;
}

.clean-list {
    list-style-type: none;
    padding: 0;
}

.clean-list li {
    margin-bottom: 1.5rem;
}

.content-image {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 2rem auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive fallback */
@media (max-width: 768px) {
    .home-intro > .portrait-section {
        margin-bottom: 0;
    }

    .layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .left-section,
    .portrait-section {
        width: 100%;
        margin-bottom: 2rem;
        /* space between stacked elements */
    }
    
    .news-section {
        margin-left: 0;
        max-width: 100%;
    }
    
    .hero-heading-text {
        font-size: 3.5rem;
        letter-spacing: 4px;
        max-width: 100%;
    }
    
    .carousel-container {
        height: 50vh;
        padding: 0 30px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero-heading-text {
        font-size: 2.5rem;
        letter-spacing: 2px;
        margin-bottom: 1.5rem;
    }
    
    .text-section {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .carousel-container {
        height: 40vh;
        padding: 0 15px;
    }
    
    .carousel-button {
        width: 30px;
        height: 30px;
    }
    
    .header-container {
        grid-template-columns: 150px 1fr 50px;
        padding: 0 10px;
    }
    
    .header-logo-text {
        font-size: 18px;
    }
    
    .photo-button-container {
        text-align: center;
    }
    
    .photo-button {
        width: 100%;
        max-width: 280px;
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    
    .clean-list li {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Improve touch targets for mobile */
.nav-menu ul li a {
    padding: 8px 0;
    display: block;
}

.hamburger-icon {
    width: 25px;
    height: 18px;
    padding: 5px;
}

.hamburger-icon span {
    height: 2px;
}

.carousel-button {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.carousel-button:hover,
.carousel-button:focus {
    opacity: 1;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

footer a {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
}

footer a:hover {
    opacity: 1;
}

/* Button Styling */
.photo-button-container {
    display: flex;
    justify-content: center;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* About button spacing; alignment is shared with the photography button. */
.about-button-container {
    display: flex;
    justify-content: center;
    max-width: 1000px;
    margin: 1rem auto 3rem;
    padding: 0 20px;
}

.photo-button {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border: 2px solid #555;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.photo-button:hover {
    background-color: #555;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin-bottom: 30px;
    overflow: hidden;
    max-width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Specific style for film page to make videos larger */
#film + .video-container, 
h2[id^="auf-der-suche"] + .video-container, 
h2[id^="die-kunst"] + .video-container,
h2[id^="individuelle"] + .video-container,
h2[id^="showreel"] + .video-container,
h2[id^="consiracy"] + .video-container,
h2[id^="traume"] + .video-container,
h2[id^="molding"] + .video-container,
h2[id^="gloomy"] + .video-container,
h2[id^="die-letzten"] + .video-container,
h2[id^="aufwarts"] + .video-container {
    max-width: 100%;
    margin: 0 auto 40px;
}

/* Film page specific styles */
.film-layout {
    max-width: 1600px; /* Even wider layout for film page */
    padding: 0;
}

.film-content {
    width: 100%;
    max-width: 100%;
}

/* Photo Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 85vh;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

.carousel-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-image.active {
    opacity: 1;
}

/* Prevent scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
    .nav-menu ul li {
        margin-bottom: 15px;
    }
    
    .nav-menu ul li a {
        padding: 10px 5px;
        display: block;
        font-size: 1.1rem;
    }
    
    .hamburger-icon {
        padding: 10px;
    }
    
    /* Adjust buttons for better mobile touch */
    .photo-button {
        padding: 12px 24px;
        margin: 15px auto;
    }
    
    /* Increase spacing for mobile */
    .main-content {
        margin-top: 60px;
    }
}

/* Make it even more touch-friendly on smallest screens */
@media (max-width: 480px) {
    .nav-menu {
        width: 85%;  /* Wider menu on smallest screens */
    }
    
    /* Adjusted image display for mobile */
    .portrait-section img {
        max-width: 150px;
    }
}

/* Responsive styles for photo gallery and series pages */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .photo-detail-container {
        flex-direction: column;
    }
    
    .photo-detail-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .photo-detail-info {
        width: 100%;
    }
    
    .modal-content {
        width: 90%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .series-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-caption {
        font-size: 0.9rem;
    }
    
    .series-title {
        font-size: 1.2rem;
    }
}
