@font-face {
    font-family: inter;
    font-style: normal;
    font-weight: 800;
    src: local('Inter'), url('Inter-Regular.woff') format('woff');
}

:root {
    --bg-color: #f2f4f8;
    --text-color: #222;
    --card-bg: rgba(255, 255, 255, 0.25);
    --badge-bg: #e0e7ff;
    --badge-color: #1e3a8a;
    --separator-color: rgba(0, 0, 0, 0.1);
}

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

body.dark-theme {
    --text-color: #f3f4f6;
    --card-bg: rgba(30, 41, 59, 0.3);
    --badge-bg: #1e3a8a;
    --badge-color: #e0e7ff;
    --separator-color: rgba(255, 255, 255, 0.75);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 3rem 2rem 4rem;
}

.top-left,
.top-right {
    position: absolute;
    top: 1rem;
    z-index: 10;
}

.top-left {
    left: 1rem;
}

.top-right {
    right: 1rem;
}

.top-left a {
    font-size: 0.85rem;
    color: var(--badge-color);
    text-decoration: none;
    border: 1px solid var(--badge-color);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    transition: background 0.3s, color 0.3s;
}

.top-left a:hover {
    background: var(--badge-color);
    color: white;
}

.theme-toggle-btn {
    font-size: 1.2rem;
    color: var(--badge-color);
    cursor: pointer;
    transition: opacity 0.3s;
    position: absolute;
    top: 0;
    right: 0;
}

.theme-toggle-btn:hover {
    opacity: 0.6;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 960px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
    z-index: 1;
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card-content {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 1.5rem;
    align-items: center;
}

.card-main {
    text-align: center;
}

.card-text,
.intro-text {
    margin: 1.7rem 0 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    max-width: 70ch;
    opacity: 0.85;
    text-align: center;
}

.card-text {
    max-width: 600px;
    text-align: left;
}

.profile-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 2px solid var(--badge-color);
    filter: grayscale(100%);
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.badges-container {
    overflow: hidden;
    max-height: 5.5rem;
    transition: max-height 0.4s ease;
    position: relative;
}

.badges-container.expanded {
    max-height: 1000px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.badge {
    background-color: var(--badge-bg);
    color: var(--badge-color);
    padding: 0.4rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.toggle-badges {
    font-size: 0.85rem;
    color: var(--badge-color);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
    text-align: center;
}

.contact {
    margin-top: 1.5rem;
}

.contact a {
    text-decoration: none;
    color: var(--badge-color);
    font-weight: 600;
    border: 1px solid var(--badge-color);
    padding: 0.5rem 1.2rem;
    border-radius: 1rem;
    transition: background 0.3s, color 0.3s;
}

.contact a:hover {
    background: var(--badge-color);
    color: white;
}

.card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
    width: 100%;
    padding-top: 1.5rem;
    border-top: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.social-links a {
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: opacity 0.3s;
}

.social-links a.linkedin {
    color: #0077b5;
}

.social-links a.xing {
    color: #006567;
}

.social-links a:hover {
    opacity: 0.6;
}

.vertical-separator {
    display: none;
    background-color: var(--separator-color);
    width: 1px;
    height: auto;
}

.tech-heading {
    display: none;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.copyright {
    font-size: 0.75rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
    padding-bottom: 1rem;
    z-index: 5;
    width: 100%;
    position: absolute;
    bottom: 0.8rem;
}

.copyright a {
    margin-left: 1rem;
    color: var(--text-color);
    opacity: 0.6;
    text-decoration: none;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

@media (min-width: 768px) {
    .card-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .card-main {
        flex: 1;
        text-align: left;
    }

    .card-text {
        flex: 1.2;
        padding-left: 2rem;
    }
}

@media (min-width: 992px) {
    .card {
        flex-direction: row;
    }

    .card-content {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
    }

    .card-left,
    .card-right {
        width: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .vertical-separator {
        display: block;
        width: 1px;
        background-color: var(--separator-color);
        height: 100%;
        margin: 0 2rem;
    }

    .toggle-badges {
        display: none;
    }

    .badges-container {
        max-height: none !important;
    }

    .tech-heading {
        display: block;
    }

    .card-left .theme-toggle-btn {
        display: none;
    }

    .card-right .theme-toggle-btn {
        display: block;
    }

    .card-footer {
        border-top: 1px solid var(--separator-color);
    }
}

@media (max-width: 991px) {
    .card-left .theme-toggle-btn {
        display: block;
    }

    .card-right .theme-toggle-btn {
        display: none;
    }
}
