:root {
    --primary-background-color: #202020;
    --secondary-background-color: #2b2b2b;
    --secondary-border-color: #1d1d1d;
    --tertiary-background-color: #373737;
    --tertiary-border-color: #3f3f3f;
    --text-color: #e1e1e1;
    --text-secondary: #a0a0a0;
    --accent-color: #00659f;
    --outline-color: #687172;
    --button-text-color: white;
    --github-icon: url("assets/github-light.svg");

    --card-border-radius: 1vh;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.light-mode {
    --primary-background-color: #f3f3f3;
    --secondary-background-color: #fbfbfb;
    --secondary-border-color: #e5e5e5;
    --tertiary-background-color: #fefefe;
    --tertiary-border-color: #d3d3d3;
    --text-color: #3f3f3f;
    --text-secondary: #666666;
    --accent-color: #00659f;
    --outline-color: #687172;
    --button-text-color: white;
    --github-icon: url("assets/github-dark.svg");

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body {
    position: relative;
    background-color: var(--primary-background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.navigation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh;
    background-color: var(--secondary-background-color);
    border: 0.2vh solid var(--secondary-border-color);
    border-radius: 1vh;
    height: 9vh;
    margin: 1vh;
    gap: 1vh;

    box-sizing: border-box;
    width: calc(100% - 2vh);
    flex-shrink: 0;
}

.logo {
    padding: 0;
    margin: 0;
    height: 90%;
}

.navigation-links {
    display: flex;
    flex-direction: row;
    gap: 2vh;
    padding: 1vh;
}

.navigation-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 2.5vh;
    letter-spacing: 0.15vh;
    margin: auto;
    margin-left: 0;
    margin-right: 2vh;
    position: relative;
    text-transform: uppercase;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navigation-link:hover {
    color: var(--accent-color);
}

.navigation-link:not(.active):active {
    transform: scale(0.99, 0.99);
}

.navigation-link.active::after {
    content: "";
    position: absolute;
    bottom: -0.4vh;
    left: 50%;
    transform: translateX(-50%);

    width: 75%;
    height: 0.3vh;
    border-radius: 1vh;
    background-color: var(--accent-color);
}

.icon-only-button {
    aspect-ratio: 1/1;
    background: none;
    cursor: pointer;
    background-color: var(--button-background-color);
    color: var(--text-color);
    border: none;
    border-radius: 5vh;
    padding: 1vh;
    margin-left: auto;
    height: 5vh;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: 0.2vh solid transparent;
    outline-offset: 0vh;
    transition: outline ease 0.3s, outline-offset ease 0.3s, transform ease 0.3s;
}

.icon-only-button:hover,
.icon-only-button:focus {
    outline: 0.2vh solid var(--outline-color);
    outline-offset: 0.2vh;
}

.icon-only-button:active {
    transform: scale(0.95);
}

#github-button {
    margin: 0;
    padding: 0;
    text-decoration: none;
}

.github-icon {
    width: 5vh;
    height: 5vh;
}

#theme-icon {
    font-size: 3vh;
}

#contact-button {
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--button-text-color);
    font-weight: bold;
    font-size: 2vh;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1vh;
    border: none;
    border-radius: 5vh;
    padding: 1vh 3vh;
    height: 3vh;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: 0.2vh solid transparent;
    outline-offset: 0vh;
    transition: letter-spacing ease 0.3s, outline ease 0.3s, outline-offset ease 0.3s, transform ease 0.3s;

    &:hover,
    &:focus {
        letter-spacing: 0.2vh;
        outline: 0.2vh solid var(--outline-color);
        outline-offset: 0.2vh;
    }

    &:active {
        transform: scale(0.95);
    }
}

#contact-button .button-icon {
    display: none;
}

.projects-slidein {
    flex-grow: 1;
    max-height: 7.5vh;
    background-color: var(--secondary-background-color);
    border: 0.2vh solid var(--secondary-border-color);
    color: var(--text-color);
    border-radius: 1vh;
    padding: 1vh 0;
    margin: 1vh;
    margin-top: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.projects-slidein-h1 {
    text-transform: uppercase;
    margin-left: 2vh;
    margin-right: 2vh;
    font-size: 2vh;
    letter-spacing: 0.15vh;
    white-space: normal;
    line-height: 1.2;
    flex-shrink: 1;
}

.projects-slidein-button {
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--button-text-color);
    font-weight: bold;
    font-size: 2vh;
    margin-right: 1vh;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1vh;
    border: none;
    border-radius: 5vh;
    padding: 1vh 3vh;
    height: 3vh;
    display: flex;
    justify-content: center;
    align-items: center;

    white-space: nowrap;
    flex-shrink: 0;

    outline: 0.2vh solid transparent;
    outline-offset: 0vh;
    transition: letter-spacing ease 0.3s, outline ease 0.3s, outline-offset ease 0.3s, transform ease 0.3s;

    &:hover,
    &:focus {
        letter-spacing: 0.2vh;
        outline: 0.2vh solid var(--outline-color);
        outline-offset: 0.2vh;
    }

    &:active {
        transform: scale(0.95);
    }
}

.content {
    flex-grow: 1;
    background-color: var(--secondary-background-color);
    border: 0.2vh solid var(--secondary-border-color);
    color: var(--text-color);
    border-radius: 1vh;
    padding: 1vh;
    margin: 1vh;
    margin-top: 0;
    gap: 1vh;
    /* Ermöglicht Scrollen innerhalb des Content-Bereichs wenn Grid zu groß wird */
    overflow-y: auto;
}

/* --------------------------------------------------
   NEUES PROJEKT GRID LAYOUT 
   --------------------------------------------------
*/

.project-grid {
    display: grid;
    /* Responsive Grid: Karten sind mindestens 320px breit */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 10px;
}

.card {
    background-color: var(--secondary-background-color);
    border: 0.2vh solid var(--secondary-border-color);
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

.card:hover {
    border-color: var(--accent-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1vh;
}

.project-logo {
    width: 5vh;
    height: 5vh;
    background: var(--tertiary-background-color);
    border: 0.2vh solid var(--tertiary-border-color);
    color: var(--accent-color);
    border-radius: 1vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-logo .material-symbols-rounded {
    font-size: 28px;
}

.project-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.project-subtitle {
    margin: 0.1vh 0 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15vh;
}

.tags {
    display: flex;
    gap: 1vh;
    margin-bottom: 1vh;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--tertiary-background-color);
    border: 0.2vh solid var(--tertiary-border-color);
    color: var(--text-secondary);
    padding: 1vh 2vh;
    border-radius: 1vh;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0 0 30px 0;
    flex-grow: 1;
}

.card-footer {
    margin-top: auto;
}

.btn-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vh;
    background-color: var(--accent-color);
    color: var(--button-text-color);
    text-decoration: none;
    padding: 1vh 2vh;
    border-radius: 1vh;
    font-weight: 600;
    font-size: 0.95rem;
    transition: letter-spacing ease 0.3s, outline ease 0.3s, outline-offset ease 0.3s, transform ease 0.3s;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.1vh;
    outline: 0.2vh solid transparent;
    outline-offset: 0vh;

    &:hover,
    &:focus {
        letter-spacing: 0.2vh;
        outline: 0.2vh solid var(--outline-color);
        outline-offset: 0.2vh;
    }

    &:active {
        transform: scale(0.95);
    }
}

@media screen and (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1vh;
    }

    .card {
        padding: 1vh;
    }

    .logo {
        width: 9vh;
    }

    .navigation-links {
        gap: 1vh;
    }

    .navigation-link {
        font-size: 1.5vh;
        margin-right: 1vh;
        letter-spacing: 0.075vh;
    }

    #contact-button {
        position: fixed;
        right: 2vh;
        bottom: 2vh;
        z-index: 1000;
        border: 0.2vh solid var(--primary-background-color);

        width: 7vh;
        height: 7vh;
        padding: 0;
        border-radius: 50%;
        aspect-ratio: 1/1;
    }

    #contact-button .button-text {
        display: none;
    }

    #contact-button .button-icon {
        display: block;
        font-size: 3.5vh;
    }

    .projects-slidein {
        flex-direction: column;
        padding: 2vh;
        text-align: center;
        gap: 1.5vh;
    }

    .projects-slidein-h1 {
        margin: 0;
        font-size: 2vh;
    }

    .projects-slidein-button {
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        font-size: 1.5vh;
    }

    .content-tile {
        height: 20vh;
    }

    .content-text h3 {
        font-size: 2vh;
    }

    .content-text p {
        font-size: 1.5vh;
    }
}