/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Zalando Sans', sans-serif;
    letter-spacing: -0.03em; /* -30 in 1/1000 Geviert */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #fff;
    color: #000;
    overflow-x: hidden;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.3s;
}

.menu-toggle {
    font-size: 24px;
    font-weight: 200;
    cursor: pointer;
    transition: opacity 0.3s;
    position: absolute;
    left: 25vw;
}

.logo:hover, .menu-toggle:hover {
    opacity: 0.5;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 100px;
    padding-left: 25vw;
}

.menu-item {
    font-size: 24px;
    font-weight: 200;
    margin-bottom: 8.4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.menu-item:hover {
    opacity: 0.5;
}

/* Page Indicator */
.page-indicator {
    position: fixed;
    top: 33vh;
    left: 30px;
    font-size: 24px;
    font-weight: 200;
    z-index: 900;
}

/* Section Styles */
section {
    min-height: 100vh;
    padding: 100px 0 60px;
    position: relative;
}

.container {
    width: 100%;
    padding-left: 25vw;
    padding-right: 0;
}

/* Landing Page */
#landing {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.landing-text {
    font-size: 52px;
    font-weight: 200;
    max-width: calc(100% - 20vw);
    line-height: 1.1;
}

/* Work Page */
.work-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 60px;
    align-items: flex-end; /* Align text with bottom of image */
}

.work-text {
    width: 700px;
    padding-right: 0;
}

.work-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 16px;
}

.work-description {
    font-size: 16px;
    font-weight: 200;
    font-style: italic;
    margin-bottom: 25px;
}

.work-details {
    display: flex;
    margin-bottom: 200px;
}

.work-details-left {
    flex: 1;
    font-size: 16px;
    font-weight: 200;
}

.work-details-right {
    flex: 1;
    font-size: 16px;
    font-weight: 400;
}

.work-scrollable {
    font-size: 16px;
    font-weight: 200;
    text-align: justify;
    text-align-last: left;
}

.work-scrollable p {
    margin-bottom: 20px;
}

.work-image {
    width: 517.5px;
    height: 832.5px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Portfolio Page */
#portfolio {
    padding-top: 250px;
}

.portfolio-title {
    font-size: 30px;
    font-weight: 300;
    margin-bottom: 16px;
}

.download-portfolio {
    font-size: 20px;
    font-weight: 200;
    margin-bottom: 48px;
    cursor: pointer;
    transition: all 0.3s;
}

.download-portfolio:hover {
    text-decoration: underline;
    opacity: 0.5;
}

.project-gallery {
    margin-bottom: 0;
    position: relative; /* For scroll indicator positioning */
}

.project-gallery-spacing {
    height: 200px;
}

.project-title {
    font-size: 14.4px;
    font-weight: 200;
    margin-bottom: 16px;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 16px;
    width: 100vw;
    margin-left: -25vw;
    padding-left: 25vw;
    align-items: flex-start;
    scroll-behavior: smooth;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-item {
    flex: 0 0 auto;
    background-color: #f0f0f0;
    margin-right: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    height: auto;
}

.horizontal-item img {
    height: auto;
    max-height: 480px;
    width: auto;
    max-width: 432px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    top: 0; /* Align with project title */
    right: 30px;
    font-size: 24px;
    color: black;
    cursor: pointer;
    z-index: 100;
    transition: opacity 0.3s;
    background: none;
    border: none;
    opacity: 0.7;
}

.scroll-indicator:hover {
    opacity: 1;
}

/* About Page */
#about {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 180px 0 0;
    position: relative;
}

#about .container {
    padding-top: 0;
}

.about-text {
    max-width: calc(100% - 250px);
}

.about-bold {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 16px;
    text-align: left;
}

.about-light {
    font-size: 18px;
    font-weight: 200;
    margin-bottom: 16px;
    text-align: left;
}

.download-cv {
    font-size: 20px;
    font-weight: 200;
    margin-top: 200px;
    cursor: pointer;
    transition: all 0.3s;
}

.download-cv:hover {
    text-decoration: underline;
    opacity: 0.5;
}

/* Contact Page */
#contact {
    min-height: 95vh;
    display: flex;
    align-items: flex-start;
    padding-top: 250px;
    position: relative;
}

.contact-text {
    font-size: 20px;
    font-weight: 300;
}

.contact-text a {
    color: black;
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-text a:hover {
    opacity: 0.5;
}

/* Footer */
footer {
    position: absolute;
    bottom: 24px;
    left: 30px;
    font-size: 12px;
    font-weight: 400;
    z-index: 900;
}

/* Only show footer on contact page */
#landing footer,
#work footer,
#portfolio footer,
#about footer {
    display: none;
}

#contact footer {
    display: block;
}

/* Image Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* Same as menu */
    backdrop-filter: blur(10px); /* Same blur as menu */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.gallery-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: black;
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: black;
    font-size: 24px;
    cursor: pointer;
}

/* Large horizontal-vertical cross cursor for clickable elements */
.logo,
.menu-toggle,
.menu-item,
.work-image,
.horizontal-item,
.download-portfolio,
.download-cv,
.gallery-nav,
.gallery-close,
.scroll-indicator {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><line x1="40" y1="10" x2="40" y2="70" stroke="black" stroke-width="1"/><line x1="10" y1="40" x2="70" y2="40" stroke="black" stroke-width="1"/></svg>') 40 40, crosshair;
}

/* Ensure the cross cursor works on all clickable states */
.logo:hover,
.menu-toggle:hover,
.menu-item:hover,
.work-image:hover,
.horizontal-item:hover,
.download-portfolio:hover,
.download-cv:hover,
.gallery-nav:hover,
.gallery-close:hover,
.scroll-indicator:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><line x1="40" y1="10" x2="40" y2="70" stroke="black" stroke-width="1"/><line x1="10" y1="40" x2="70" y2="40" stroke="black" stroke-width="1"/></svg>') 40 40, crosshair;
}

/* Fix cursor issues by applying to all interactive elements */
a, button, [onclick], [cursor="pointer"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><line x1="40" y1="10" x2="40" y2="70" stroke="black" stroke-width="1"/><line x1="10" y1="40" x2="70" y2="40" stroke="black" stroke-width="1"/></svg>') 40 40, crosshair !important;
}

a:hover, button:hover, [onclick]:hover, [cursor="pointer"]:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><line x1="40" y1="10" x2="40" y2="70" stroke="black" stroke-width="1"/><line x1="10" y1="40" x2="70" y2="40" stroke="black" stroke-width="1"/></svg>') 40 40, crosshair !important;
}

/* ============================================= */
/* RESPONSIVE STYLES */
/* ============================================= */

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Header adjustments */
    header {
        padding: 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .menu-toggle {
        font-size: 20px;
        position: relative;
        left: auto;
    }
    
    /* Hide page indicator on mobile */
    .page-indicator {
        display: none;
    }
    
    /* Container adjustments */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Menu overlay adjustments */
    .menu-overlay {
        padding-left: 16px;
        padding-top: 80px;
    }
    
    /* Landing page adjustments */
    #landing {
        padding: 80px 0 40px;
    }
    
    .landing-text {
        font-size: 32px;
        max-width: 100%;
        line-height: 1.2;
    }
    
    /* Work page adjustments */
    .work-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .work-text {
        width: 100%;
        order: 2; /* Text comes after image */
    }
    
    .work-image {
        width: 100%;
        height: auto;
        aspect-ratio: 517.5 / 832.5;
        order: 1; /* Image comes first */
    }
    
    .work-details {
        margin-bottom: 60px;
        flex-direction: column;
        display: none; /* Hide original layout on mobile */
    }
    
    /* Mobile work details with dynamic dotted lines */
    .work-details-mobile {
        display: block;
        margin-bottom: 60px;
    }
    
    .work-detail-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        position: relative;
        white-space: nowrap; /* Prevent text from wrapping */
        width: 100%;
    }
    
    .work-detail-category {
        font-size: 16px;
        font-weight: 200;
        flex-shrink: 0;
    }
    
    .work-detail-info {
        font-size: 16px;
        font-weight: 400;
        flex-shrink: 0;
        text-align: right;
        white-space: nowrap; /* Prevent text from wrapping */
    }
    
    .work-detail-dots {
        flex: 1;
        border-bottom: 1px dotted #000;
        margin: 0 8px;
        align-self: center;
        height: 1px;
        min-width: 0; /* Allow dots to shrink */
    }
    
    /* Portfolio page adjustments */
    #portfolio {
        padding-top: 120px;
    }
    
    .portfolio-title {
        font-size: 24px;
    }
    
    .horizontal-scroll {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }
    
    .horizontal-item img {
        max-height: 300px;
        max-width: 280px;
    }
    
    /* About page adjustments */
    #about {
        padding: 120px 0 100px;
    }
    
    .about-text {
        max-width: 100%;
    }
    
    .about-bold,
    .about-light {
        font-size: 16px;
    }
    
    .download-cv {
        margin-top: 120px;
        margin-bottom: 40px;
    }
    
    /* Contact page adjustments */
    #contact {
        padding-top: 120px;
        min-height: 80vh;
    }
    
    /* Footer adjustments */
    footer {
        left: 16px;
        bottom: 16px;
    }
    
    /* Gallery modal adjustments */
    .gallery-nav {
        padding: 4px;
        font-size: 20px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
    }
}

/* iPad Styles (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Header adjustments */
    .menu-toggle {
        position: relative;
        left: auto;
    }
    
    /* Container adjustments */
    .container {
        padding-left: 10vw;
        padding-right: 10vw;
    }
    
    /* Hide page indicator on tablet */
    .page-indicator {
        display: none;
    }
    
    /* Menu overlay adjustments */
    .menu-overlay {
        padding-left: 10vw;
    }
    
    /* Landing page adjustments */
    .landing-text {
        font-size: 42px;
        max-width: 100%;
    }
    
    /* Work page adjustments */
    .work-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .work-text {
        width: 100%;
        order: 2; /* Text comes after image */
    }
    
    .work-image {
        width: 100%;
        height: auto;
        aspect-ratio: 517.5 / 832.5;
        order: 1; /* Image comes first */
    }
    
    .work-details {
        margin-bottom: 100px;
        display: none; /* Hide original layout on tablet */
    }
    
    /* Tablet work details with dynamic dotted lines */
    .work-details-mobile {
        display: block;
        margin-bottom: 100px;
    }
    
    .work-detail-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        position: relative;
        white-space: nowrap; /* Prevent text from wrapping */
        width: 100%;
    }
    
    .work-detail-category {
        font-size: 16px;
        font-weight: 200;
        flex-shrink: 0;
    }
    
    .work-detail-info {
        font-size: 16px;
        font-weight: 400;
        flex-shrink: 0;
        text-align: right;
        white-space: nowrap;
    }
    
    .work-detail-dots {
        flex: 1;
        border-bottom: 1px dotted #000;
        margin: 0 8px;
        align-self: center;
        height: 1px;
        min-width: 0;
    }
    
    /* Portfolio page adjustments */
    .horizontal-scroll {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }
    
    /* About page adjustments */
    #about {
        padding-bottom: 80px;
    }
    
    .about-text {
        max-width: 100%;
    }
    
    .download-cv {
        margin-top: 150px;
        margin-bottom: 30px;
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    .landing-text {
        font-size: 28px;
    }
    
    .work-title {
        font-size: 24px;
    }
    
    .portfolio-title {
        font-size: 20px;
    }
    
    .project-title {
        font-size: 12px;
    }
    
    .contact-text {
        font-size: 18px;
    }
    
    .download-portfolio,
    .download-cv {
        font-size: 18px;
    }
}

/* Restore desktop menu position and hide mobile work details */
@media (min-width: 1025px) {
    .menu-toggle {
        position: absolute;
        left: 25vw;
    }
    
    /* Hide mobile work details on desktop */
    .work-details-mobile {
        display: none;
    }
    
    /* Show original work details on desktop */
    .work-details {
        display: flex;
    }
}