/* Globale Variablen für Farben */
:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-color: #ffffff;
}

html {
    scroll-behavior: smooth;
    /* overflow-y: scroll; wurde hier entfernt, da es die Modal-Sperre behindert hat */
}

/* Blockiert Scrollbalken rigoros, wenn die Lightbox offen ist */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
}

.main-header {
    max-width: 1100px;
    margin: 50px auto 50px auto;
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #222;
}

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

.logo-name {
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 3px;
    margin: 0;
    color: var(--accent-color);
    text-transform: uppercase;
}

.logo-focus {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

nav {
    display: flex;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.container {
    max-width: 1100px; 
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px; 
}

.card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 10px; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer; 
}

.card-vertical {
    grid-column: span 2;
}

.card-vertical .card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.414; 
    background-color: #000;
    overflow: hidden; 
}

.card-horizontal {
    grid-column: span 3;
}

.card-horizontal .card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1.414 / 1; 
    background-color: #222; 
    overflow: hidden;
}

.card-video {
    grid-column: span 6;
    cursor: default; 
}

.card-video .card-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; 
    background-color: #000;
    overflow: hidden;
}

.card-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block; 
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; 
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-content {
    padding: 20px 10px; 
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.card-title {
    font-size: 1rem; 
    font-weight: 300; 
    margin: 0;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    transform: translateY(4px);
    transition: color 0.4s ease, transform 0.4s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.08); 
}

.card:hover .card-title {
    color: var(--accent-color);
    transform: translateY(0);
}

.content-section {
    padding-top: 80px;
    margin-top: 80px;
    border-top: 1px solid #222;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.about-text {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
    max-width: 800px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.contact-form input, 
.contact-form textarea {
    background-color: var(--card-bg);
    border: 1px solid #333;
    color: var(--text-main);
    padding: 15px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-form button {
    background-color: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.contact-form button:hover {
    background-color: #ccc;
}

.lightbox {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); 
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease; 
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px; 
    max-width: 95vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img-container {
    max-height: 90vh;
    flex: 0 1 auto; 
    max-width: fit-content; 
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    cursor: zoom-in; 
    transform: translateZ(0); 
    /* Erlaubt dem Container, Touch-Events richtig abzufangen */
    touch-action: none; 
}

.lightbox-img-container.zoomed {
    cursor: zoom-out;
}

.lightbox img {
    max-height: 90vh;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    transform-origin: center center;
    pointer-events: none; 
    border-radius: 10px; 
}

.lightbox-img-container.zoomed img {
    transform: scale(2.5);
}

.lightbox-info-panel {
    width: 350px; 
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.lightbox-info-panel .project-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.lightbox-info-panel .project-role {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lightbox-info-panel .project-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    font-weight: 300;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    transition: color 0.2s ease;
}

.close-lightbox:hover {
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .portfolio-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .card-vertical, .card-horizontal, .card-video {
        grid-column: span 1;
    }
    
    .lightbox-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        overflow-y: auto;
    }

    .lightbox-img-container {
        max-width: 100%;
        height: auto;
    }

    .lightbox-info-panel {
        width: 100%;
        padding: 20px;
        box-sizing: border-box; 
    }
    
    .about-image,
    .contact-image {
        display: none !important;
    }
    
    .about-wrapper,
    .contact-wrapper {
        flex-direction: column;
    }

    .about-content,
    .contact-content {
        justify-content: flex-start;
        gap: 40px; 
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .main-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .nav-links { gap: 20px; }
}

.footer {
    border-top: 1px solid #222;
    margin-top: 80px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Layout für About-Seite */
.about-wrapper {
    display: flex;
    gap: 60px; 
    align-items: stretch; 
    margin-top: 50px;
    padding: 40px 0;
}

.about-image {
    flex: 0.7; 
    position: relative;
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px; 
    display: block;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.stats-title {
    color: var(--accent-color);
    font-weight: 300;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.stat-item {
    display: flex;
    justify-content: flex-start; 
    gap: 20px;
    border-bottom: none; 
    padding-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    width: 70px;
}

.stat-val {
    color: var(--accent-color);
    font-weight: 400;
}

/* Layout für Contact-Seite */
.contact-wrapper {
    display: flex;
    gap: 60px;
    align-items: stretch; 
    margin-top: 50px;
    padding: 40px 0;
}

.contact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-image {
    flex: 0.7; 
    position: relative;
    z-index: 1;
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 10px; 
    display: block;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.action-buttons {
    display: flex;
    gap: 20px;
    width: 100%;
}

.cta-button {
    flex: 1; 
    text-align: center; 
    padding: 15px 20px; 
    background-color: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    border-radius: 4px; 
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background-color 0.3s ease, color 0.3s ease; 
}

.cta-button:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}