html {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 20px;
    margin: 0;
}

body {
    background-color: #1B211A;
    margin: 0;
}


main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #EBD5AB;
    padding: 20px;

    transform: translateY(100px);
    opacity: 0;
    animation: slideIn 1s ease forwards;
}


@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1, h2 {
    background-color: #8BAE66;
    color: #1B211A;
    text-align: center;
    margin: 0;
    padding: 20px 0;
}

.section-heading {
    margin-top: 60px; /* Abstand nach oben */
}

p, h3, a {
    color: #1B211A;
    text-decoration: none;
    margin: 0;
    
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #628141;
    display: flex;
    justify-content: center;
}


ul li a {
    display: block;
    padding: 14px 25px;
    text-align: center;

    position: relative;
}


ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 0;
    height: 2px;
    background-color: #EBD5AB;
    transition: width 0.3s ease;
}

ul li a:hover::after {
    width: 100%;
}

ul li a:hover {
    background-color: #8BAE66;
}

#about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
}

.about-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    flex-shrink: 0;
}

.about-text {
    max-width: 700px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
}

footer {
    background-color: #628141;
    padding: 20px;



    align-items: center;  
    justify-content: center; 
    text-align: center;
}

.social-icons a {
    font-size: 30px;
    margin: 10px;
    text-decoration: none;
    transition: 0.3s ease;
    color: #EBD5AB;
}

.social-icons a:hover {
    opacity: 0.7;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background-color: #628141;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.project-card h3 a {
    color: #1B211A;
}

.project-card h3 a:hover {
    text-decoration: underline;
}

.project-card p:first-of-type {
    border-bottom: 2px solid rgba(27, 33, 26, 0.25);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1200px;
    margin: 30px auto 0 auto;
    margin-top: 60px;
    padding: 0 20px;
    grid-auto-rows: 220px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background-color: #628141;
    transition: transform 0.25s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transition: transform 0.4s ease;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

#contact {
    margin: 0 auto;
}




:root {
    --bg-page: #1B211A;
    --bg-main: #EBD5AB;
    --bg-accent: #8BAE66;
    --bg-nav: #628141;
    --bg-card: #628141;

    --text-main: #1B211A;
    --text-light: #EBD5AB;

    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-strong: 0 10px 25px rgba(0, 0, 0, 0.4);

    --radius: 18px;
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;

    --max-width: 1200px;
}

html {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 20px;
    margin: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    background-color: var(--bg-main);
    padding: var(--spacing-sm);

    transform: translateY(100px);
    opacity: 0;
    animation: slideIn 1s ease forwards;
}

@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1,
h2 {
    background-color: var(--bg-accent);
    color: var(--text-main);
    text-align: center;
    margin: 0;
    padding: 20px 16px;
    word-wrap: break-word;
}

.section-heading {
    margin-top: var(--spacing-lg);
}

p,
h3,
a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-nav);
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: var(--bg-nav);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

ul li a {
    display: block;
    padding: 14px 25px;
    text-align: center;
    position: relative;
}

ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 0;
    height: 2px;
    background-color: var(--text-light);
    transition: width 0.3s ease;
}

ul li a:hover::after,
ul li a:focus-visible::after {
    width: 100%;
}

ul li a:hover,
ul li a:focus-visible {
    background-color: var(--bg-accent);
    outline: none;
}

#about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1400px;
    margin: var(--spacing-md) auto;
    padding: var(--spacing-sm);
}

.about-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    flex-shrink: 0;
}

.about-text {
    max-width: 700px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
}

footer {
    background-color: var(--bg-nav);
    padding: var(--spacing-sm);
    text-align: center;
}

.social-icons a {
    font-size: 30px;
    margin: 10px;
    text-decoration: none;
    transition: 0.3s ease;
    color: var(--text-light);
    display: inline-block;
}

.social-icons a:hover,
.social-icons a:focus-visible {
    opacity: 0.7;
    transform: translateY(-2px);
    outline: none;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.project-card {
    background-color: var(--bg-card);
    padding: var(--spacing-sm);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.project-card h3 a {
    color: var(--text-main);
}

.project-card h3 a:hover,
.project-card h3 a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.project-card > a:hover,
.project-card > a:focus-visible {
    text-decoration: underline;
}

.project-card p:first-of-type {
    border-bottom: 2px solid rgba(27, 33, 26, 0.25);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1200px;
    margin: 60px auto 0 auto;
    padding: 0 20px;
    grid-auto-rows: 220px;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: var(--bg-card);
    transition: transform 0.25s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.wide img {
    object-position: center top;
}

.gallery-item.tall {
    grid-row: span 2;
}

#contact {
    margin: 0 auto;
}


.download-btn {
    display: inline-block;
    background-color: #8BAE66;
    color: #1B211A;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.download-btn:hover {
    background-color: #6f8f52;
    transform: scale(1.05);
}



@media (max-width: 1024px) {
    html {
        font-size: 20px;
    }

    main {
        padding: 18px;
    }

    #about {
        gap: 30px;
        padding: 16px;
    }

    .about-img {
        width: 320px;
        height: 320px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    nav {
        position: sticky;
        top: 0;
    }

    ul {
        flex-direction: row;
        justify-content: center;
    }

    ul li a {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    main {
        padding: 14px;
    }

    h1,
    h2 {
        padding: 16px 12px;
    }

    .section-heading {
        margin-top: 40px;
    }

    #about {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin: 30px auto;
        padding: 10px;
    }

    .about-img {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .about-text {
        max-width: 100%;
    }

    .projects {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        padding: 0 10px;
    }

    .gallery-item,
    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .social-icons a {
        font-size: 26px;
        margin: 8px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    ul li a {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    h1,
    h2 {
        padding: 14px 10px;
    }

    .project-card {
        padding: 16px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #101410;
        --bg-main: #1A2118;
        --bg-accent: #4F6F45;
        --bg-nav: #2E4428;
        --bg-card: #243320;

        --text-main: #F3E9D2;
        --text-light: #F3E9D2;

        --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.35);
        --shadow-strong: 0 10px 25px rgba(0, 0, 0, 0.5);
    }

    .project-card p:first-of-type {
        border-bottom: 2px solid rgba(243, 233, 210, 0.2);
    }
}

@media print {

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    nav,
    footer,
    .social-icons {
        display: block !important;

        display: block !important;
        color: black !important;
        margin: 6px 0;
        font-size: 12pt;

        content: "Email: deineemail@example.com";
        content: "GitHub: github.com/deinprofil";
        content: "LinkedIn: linkedin.com/in/deinprofil";
        content: "Instagram: instagram.com/deinprofil";
    }

    main {
        max-width: 100%;
        margin: 0;
        padding: 0;
        background: white !important;
        transform: none !important;
        opacity: 1 !important;
    }

    h1,
    h2 {
        background: none !important;
        color: black !important;
        border: 1px solid #999;
        padding: 8px;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card,
    .gallery-item {
        background: white !important;
        border: 1px solid #bbb;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0;
        margin-top: 20px;
    }

    .gallery-item img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    #about {
        display: block;
        padding: 0;
        margin: 20px 0;
    }

    .about-img {
        max-width: 250px;
        margin: 0 auto 20px auto;
    }

   footer {
        display: block !important;
        background: white !important;
        color: black !important;
        border-top: 1px solid #999;
        margin-top: 30px;
        padding-top: 15px;
        text-align: left;
    }
}
