@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('../assets/fonts/caveat-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('../assets/fonts/caveat-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('../assets/fonts/caveat-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('../assets/fonts/caveat-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-main: 'Inter', sans-serif;
    --font-handwriting: 'Caveat', cursive;
    --color-bg: #ffffff;
    --color-text: #333333;
    --color-accent: #000000;
    --color-secondary: #666666;
    --spacing-unit: 1rem;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    padding: 2rem 0;
    margin-bottom: 4rem;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.main-nav a.active {
    color: #6B8DEA;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-socials {
    display: flex;
    gap: 1rem;
}

.header-socials a {
    display: block;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.header-socials a:hover {
    transform: scale(1.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    opacity: 0.7;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 4rem 2rem;
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu-close:hover {
    opacity: 0.7;
}

.mobile-nav {
    margin-bottom: 3rem;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    margin: 1.5rem 0;
}

.mobile-nav a {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    display: block;
    padding: 0.5rem;
}

.mobile-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: auto;
}

.mobile-socials a {
    display: block;
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease;
}

.mobile-socials a:hover {
    transform: scale(1.1);
}

.mobile-socials img {
    width: 100%;
    height: 100%;
}

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

/* Home Content */
.home-content {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.profile-image-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 3rem auto 0 auto; /* Added top margin since it's now below content */
}

.profile-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: none;
}

.profile-img-default {
    opacity: 1;
}

.profile-img-hover {
    opacity: 0;
}

.profile-image-container:hover .profile-img-default {
    opacity: 0;
}

.profile-image-container:hover .profile-img-hover {
    opacity: 1;
}

.intro h1 {
    font-family: var(--font-handwriting);
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.intro .subtitle {
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    display: inline-block;
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

.social-links img {
    width: 100%;
    height: 100%;
}

/* Projects Content */
.projects-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 4rem;
    text-align: center;
}

.project-item {
    margin-bottom: 6rem;
}

.project-info {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

.project-info h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.project-meta {
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-description {
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-gallery.gallery-four-columns {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .project-gallery.gallery-four-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.project-divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 6rem 0;
}

/* Text Pages (Impressum, Kontakt, About) */
.text-page {
    max-width: 800px;
    margin: 0 auto;
}

.text-page h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.text-page h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.text-page p {
    margin-bottom: 1rem;
}

.legal-address {
    font-size: 0.65rem;
    line-height: 1.4;
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-form-container {
    margin-top: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.form-consent {
    padding: 2rem;
    text-align: center;
}

.form-consent h2 {
    margin-top: 0;
}

.form-consent button {
    padding: 0.65rem 1rem;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: var(--color-bg);
    cursor: pointer;
    font: inherit;
}

/* Info Page */
.info-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.info-image {
    flex: 1;
    max-width: 400px;
}

.info-text {
    flex: 1;
}

.resume-section p {
    margin-bottom: 1.5rem;
}

.press-section {
    margin-top: 3rem;
}

/* Footer */
.site-footer {
    padding: 4rem 0;
    margin-top: 4rem;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: var(--color-secondary);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.legal-links button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.legal-links button:hover {
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .intro h1 {
        font-size: 3rem;
    }
    
    .intro .subtitle {
        font-size: 1.2rem;
    }
    
    .site-footer .container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Project Gallery Images */
.project-gallery img {
    width: 100%;
    height: 300px; /* Fixed height for uniformity */
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 4px;
}

.project-gallery img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Object Position Utilities */
.project-gallery img.focus-top {
    object-position: top;
}

.project-gallery img.focus-bottom {
    object-position: bottom;
}

.project-gallery img.focus-left {
    object-position: left;
}

.project-gallery img.focus-right {
    object-position: right;
}

.project-gallery img.fit-contain {
    object-fit: contain;
    background-color: #ffffff; /* White background */
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    background: rgba(0,0,0,0.2);
    transition: background 0.2s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.5);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Mobile Responsive Styles */
@media (max-width: 950px) {
    .site-header .container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: block;
        order: 1;
    }

    .main-nav {
        display: none;
    }

    .header-right {
        order: 2;
        margin-left: auto;
    }

    .logo-link {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .header-socials {
        display: none;
    }

    .intro h1 {
        font-size: 2.5rem;
    }

    .intro .subtitle {
        font-size: 1.1rem;
    }

    .profile-image-container {
        width: 350px;
        height: 350px;
    }

    .projects-content h1 {
        font-size: 2rem;
    }

    .project-info h2 {
        font-size: 1.5rem;
    }

    .text-page h1 {
        font-size: 2rem;
    }

    .lightbox-close,
    .lightbox-nav {
        font-size: 30px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}