:root {
    --background-light: #f0f0f0;
    --text-light: #333;
    --background-dark: #121212;
    --text-dark: #f0f0f0;
    --hover-color: #555;
    --margin-gap-small: 1rem;
    --margin-gap-big: 2rem;
    --bottom-space: 2rem;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    transition: all 0.3s ease;
}

.container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    padding-bottom: var(--bottom-space);
    padding-top: calc(var(--margin-gap-big) + 4rem);
}

.toggle-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

button:hover {
    color: var(--hover-color);
}

main {
    text-align: center;
}

#bio {
    margin-bottom: var(--margin-gap-big);
}

#profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: var(--margin-gap-small);
}

#profile-name {
    font-size: 2rem;
    margin-bottom: var(--margin-gap-big);
}

.toggle-language {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--margin-gap-small);
}

#links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: var(--margin-gap-big);
}

#links a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s;
}

#links a img {
    width: 40px;
    height: 40px;
}

#links a:hover {
    transform: scale(1.1);
}

.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

.light-mode {
    background-color: var(--background-light);
    color: var(--text-light);
}

#bio-text {
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-line;
}

@media (max-width: 600px) {
    .toggle-controls {
        top: 0.5rem;
        right: 1rem;
        transform: none;
    }

    #links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: var(--bottom-space);
    }

    #links a {
        flex: 1 1 calc(25% - 1rem);
        max-width: calc(25% - 1rem);
    }
}
