/* Background gradient from the previous style */
:root {
    --bg-gradient: linear-gradient(135deg, #2F2F2F 50%, #A9A9A9 50%);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Times New Roman", Times, serif;
    /* classic 1999 look */
    font-size: 1.1rem;
    color: #000000;
}

/* Fixed background for all devices including iOS to prevent stretching or clipping */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient);
    z-index: -1;
}

.main-frame {
    background-color: #FFFFFF;
    border: 3px solid #000000;
    width: 100%;
    max-width: 800px;
    min-height: 60vh;
    padding: 2rem;
    position: relative;
    /* added to contain absolute lang-switcher */
    /* Keeps the shadow from the previous design as it looks nice with the frame */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Old school 1999 links */
a {
    color: blue;
    text-decoration: underline;
}

a:visited {
    color: purple;
}

a:active {
    color: red;
}

h1,
h2,
h3 {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

hr {
    border: none;
    border-top: 1px solid #000;
    margin: 1.5em 0;
}

/* Projects Layout */
.projects-container {
    display: flex;
    gap: 0;
    margin-top: 1.5em;
    border: 2px solid #000;
    background-color: #C0C0C0;
    /* classic Win95 grey */
    padding: 2px;
}

.projects-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #000;
    background-color: #FFF;
    padding: 10px;
    gap: 10px;
}

.project-item {
    display: block;
    padding: 10px;
    border: 2px outset #DFDFDF;
    background-color: #E0E0E0;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.project-item:active {
    border: 2px inset #DFDFDF;
    background-color: #D0D0D0;
}

.project-item.active {
    background-color: #000080;
    /* classic 1999 selected navy blue */
    color: #FFF;
    border: 2px inset #DFDFDF;
}

.project-details {
    flex: 2;
    padding: 20px;
    background-color: #FFF;
    min-height: 300px;
}

.project-detail {
    display: none;
}

.project-detail.active {
    display: block;
}

.project-detail h3 {
    margin-top: 0;
}

.image-placeholder {
    margin-top: 20px;
    width: 100%;
    height: 200px;
    border: 2px dashed #000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    background-color: #E0E0E0;
    font-style: italic;
}

.project-image {
    margin-top: 20px;
    max-width: 100%;
    height: auto;
    border: 2px solid #000;
    display: block;
    box-shadow: 2px 2px 0px #000;
    /* retro drop shadow style */
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
    margin-bottom: 0;
    font-family: monospace;
    font-size: 1rem;
}

.lang-btn {
    text-decoration: none;
    color: #000;
    padding: 2px 6px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
}

.lang-btn:hover {
    background-color: #E0E0E0;
}

.lang-btn.active-lang {
    font-weight: bold;
    border: 2px inset #DFDFDF;
    background-color: #D0D0D0;
}

/* Footer Links */
.footer-links {
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #000;
}

.footer-links a {
    color: #000;
    text-decoration: underline;
}

.footer-links a:visited {
    color: #000;
}

.footer-links a:hover {
    background-color: #E0E0E0;
    text-decoration: none;
}

/* Hide elements based on active language */
html[data-lang="en"] [data-lang="de"] {
    display: none !important;
}

html[data-lang="de"] [data-lang="en"] {
    display: none !important;
}

/* List item spacing */
.main-frame ul li {
    margin-bottom: 12px;
}

/* Responsive Design for smaller screens */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 1rem;
    }

    .main-frame {
        padding: 1rem;
        /* Increase bottom padding to make space for footer links if absolute, or keep normal if static */
        padding-bottom: 2rem;
    }

    .projects-container {
        flex-direction: column;
    }

    .projects-list {
        border-right: none;
        border-bottom: 2px solid #000;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .project-item {
        flex: 1 1 auto;
    }

    .lang-switcher {
        position: static;
        text-align: right;
        margin-bottom: 15px;
    }

    .footer-links {
        position: static;
        margin-top: 30px;
        text-align: center;
        display: block;
    }
}