/* Reset default HTML Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    outline: none;
}

/* --- 1. GLOBAL STYLES (Valid for all subpages) --- */
/* General Setup */
:root {
    --primary-white: #f3f3f3;
    --primary-grey: ;
    --accent-color: ;

    --brown: #734D2C ;
    --nightgreen: #203033;
    --nightgreen-rgb: 32, 48, 51;
    --blue: #2C6673;
    --sand: #C8A98E;
    --skyblue: #D5EDF2;

    /* Form Validation Colors */
    --valid-green: #88A65E;
    --error-red: #B35442;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: #000116;
    background-image: linear-gradient(160deg,
    rgba(59, 137, 154, 1) 0%,
    rgba(164, 116, 81, 0.4) 85%,
    rgba(0, 1, 22, 0.8) 100%
    );
    background-attachment: fixed;
    font-family: "Noto Sans", sans-serif;
    color: var(--primary-white);
    line-height: 1.6;
}

/* Typography System Mobile*/
h1 { font-size: 1.6rem; font-weight: 800; margin: 2rem 0 0.5rem 0; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 1rem 0; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.8rem; font-weight: 500; opacity: 0.8; text-transform: uppercase; }
p {
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 0.3rem;
    text-align: justify;

    -webkit-hyphens: auto; /* Safari */
    hyphens: auto;

    overflow-wrap: break-word;
}

main {
    margin: 1rem;
}

/* --- NAV --- */
header {
    /* Stick to top */
    position: sticky;
    top: 1em;
    z-index: 1000;
    margin: 1em 1em;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: stretch;


    /* Liquid Glass Effect */
    background: color-mix(in srgb, var(--blue), transparent 65%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* jSafari Support */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    margin: 0.8em 0;
}

nav li {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex: 1;
    transition: all 0.3s ease-in-out;
}

nav li:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

nav li a {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--primary-white);
    opacity: 0.8;
    padding: 0.8em 0.4em;
    transition:
            transform 0.3s ease,
            color 0.3s ease,
            opacity 0.3s ease;
}


nav ul li:hover a {
    transform: scale(1.05);
    opacity: 1;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;

    /* Liquid Glass Effekt */
    background: color-mix(
            in srgb, var(--nightgreen), transparent 65%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari Support */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;

    margin: 1.2em 0;
    padding: 0 0 0.5rem 0;
}

.card .project-image {
    max-width: 100%;
    min-width: 100%;
    height: 130px;

    object-fit: cover;
    object-position: top;

    position: relative;
}

.card .technology-image {
    position: absolute;
    bottom: 15px;
    right: 15px;

    width: 40px;
    height: auto;

    margin: 0;
    z-index: 100;
    opacity: 0.8;

}

.card h2 {
    margin: 0.2rem 0.7rem 0.4rem 0.7rem;
}

.card h3 {
    margin-top: 0.5rem;
    margin-left: 0.7rem;
}

.card p {
    margin: 0 1rem 1.2rem 0.7rem
}


.card .project-image-copyright {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: right;

    position: absolute;
    bottom: -9px;
    right: -7px;
    padding: 0.3rem 0.5rem;
    border-radius: 0.2rem;

    background: var(--nightgreen);

}

.card a {
    display: inline-block;
    color: var(--accent-color);
    position: relative;
    font-weight: 500;

    margin: 0 0.7rem 0 0.7rem;
    border: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
    align-self: flex-start;
}

/* Nur der erste Link bekommt "auto", um alles nach unten zu drücken */
.card a:first-of-type {
    margin-top: auto;
}

/* Falls ein zweiter Link folgt, bekommt dieser einen kleinen festen Abstand */
.card a + a {
    margin-top: 0;
}

.card a:hover {
    border-bottom-color: rgba(var(--accent-color), 0.2);
}

.project-description {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Nimmt den restlichen Platz in der Card ein */
}

/* Screenreader only (Accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.cta {
    display: flex;
    flex-direction: column;
}

.cta a {
    margin: 2rem auto 0.5rem auto;
    padding: 0.7rem 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 600px;
}

.material-symbols-outlined {
    vertical-align: middle;
    font-variation-settings: 'wght' 400;
}

.primary-button {
    background: var(--blue);
    color: var(--primary-white);
    border-radius: 0.5em;
}



/* --- FOOTER --- */
footer {
    background: rgba(var(--nightgreen-rgb), 0.6);
    border-radius: 1em 1em 0 0;
    padding: 1em;
    margin: 3rem 0 0 0;
}

.footer-title {
    margin-bottom: 1rem;
}

footer p {
    margin: 0;
}

footer .tel-mail {
    margin: 0.5rem 0;
}

.footer-nav {
    display: flex;
    margin: 2rem 0 1rem 0;
    justify-content: center;
    gap: 10px;
}

.footer-nav a {
    display: inline-block;
    cursor: pointer;
}



/* --- RESPONSIVE DESIGN: Adjust for Desktop (>=1024px) --- */
@media (min-width: 1024px) {

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;

        max-width: calc(1024px + 4rem);
        margin: 0 auto;
        padding: 4rem 4rem 0 4rem;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }

    main {
        flex: 1;
    }

    /* Typography Desktop */
    h1 {
        font-size: 2.5rem;
        margin-top: 3rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1.1rem;
    }


    /* PROJECT CARDS */
    .card {
        padding-bottom: 0;
    }

    .card h3 {
        margin-top: 0;
    }

    .project-card-area {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        grid-row-gap: 0;
    }

    .project-description {
        padding: 0.8rem 0.4rem 0.8rem 0.4rem;
    }

    .card .project-image {
        height: 180px;
    }

    footer {
        padding: 3rem 3rem 1rem 3rem;
    }

}