:root {
    --bg-color: #ffffff;
    --card-bg: #f5f5f7;
    --text-color: #1d1d1f;
    --text-muted: #86868b;
    --accent-color: #2997ff;
    --nav-bg: rgba(255, 255, 255, 0.72);
    --font-main: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

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

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.04em;
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: -0.01em;
}

h1,
h2 {
    font-family: var(--font-serif);
}

.gradient-text {
    font-size: clamp(3rem, 8vw, 7rem);
    white-space: nowrap;
    background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-muted);
    font-weight: 500;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* HERO (unchanged) */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    text-align: center;
    position: relative;
}

/* =========================
   SECTION 3 — FIXED CARDS
========================= */

.bento-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

/* CARD BASE */
.bento-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* SMALLER CARDS */
.card-medium {
    min-height: unset;
    padding: 0;
}

/* TEXT AREA — WICHTIGER FIX */
.card-medium .bento-content {
    padding: 1rem 1.2rem;
}

/* TITLE SMALLER */
.card-medium .bento-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* TEXT SMALLER */
.card-medium .bento-content p {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* IMAGE HEIGHT REDUCTION (MAIN FIX) */
.card-medium .bento-img-container {
    height: 140px;
    width: 100%;
}

.card-medium .bento-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* hover subtle */
.bento-card:hover {
    transform: translateY(-4px);
}

/* PROJECT PAGE SPECIFICS */
.project-page .hero {
    min-height: 40vh; /* Genügend Platz für den Header auf Unterseiten */
    padding-top: 15vh;
}

.project-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;

    column-count: 3;
    column-gap: 1.2rem;
}

.project-gallery img {
    width: 100%;
    height: auto; /* Natural height to prevent cutoff */
    display: block;
    margin-bottom: 1.2rem;
    break-inside: avoid; /* Prevents image from splitting between columns */

    border-radius: 0;
    transition: transform 0.4s ease;
}


.project-gallery img:hover {
    transform: scale(1.015);
}

/* Responsive Fix for Gallery */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .project-gallery {
        column-count: 2;
        column-gap: 1rem;
        padding: 2rem 1rem;
    }

    .project-gallery img {
        margin-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .project-gallery {
        column-count: 1;
    }
}