body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

canvas#bg {
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

#content {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10;
    transition: opacity 1s ease;
}

#loading h1 {
    color: #fff;
    margin-bottom: 20px;
}

.progress-bar {
    width: 300px;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: #0066ff;
    transition: width 0.3s ease;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: auto;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 3.5em;
    margin: 0;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 1.2em;
    margin: 0 0 20px 0;
    color: #cccccc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
    margin-top: 0;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

button {
    font-family: 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-weight: 400;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button.active {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

main {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

section.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile, .contacts {
    margin-bottom: 20px;
}

.contacts ul {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.contacts a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contacts a:hover {
    color: #0066ff;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 30px;
}

.item::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0066ff;
    border: 2px solid #ffffff;
}

.item h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin: 0;
    margin-right: 125px;
    color: #ffffff;
}

.item .sub {
    color: #aaaaaa;
    font-style: italic;
    margin: 5px 0;
}

.item .year {
    position: absolute;
    right: 0;
    top: 0;
    color: #0066ff;
    font-size: 0.9em;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill {
    background: rgba(0, 102, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 102, 255, 0.5);
    transition: all 0.3s ease;
}

.skill:hover {
    background: rgba(0, 102, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 102, 255, 0.3);
}

.awards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.award {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.award:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.award h4 {
    margin-top: 0;
    color: #ffffff;
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    text-align: center;
    pointer-events: auto;
}

.controls {
    margin-bottom: 10px;
}

.controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Modify the language toggle button to fit the text */
#toggle-language {
    width: auto;
    min-width: 60px;
    padding: 0 12px;
}

#lang-indicator {
    margin-left: 5px;
    font-size: 0.8em;
    font-weight: bold;
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.project-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.project-details:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-details h4 {
    margin-top: 0;
    color: #ffffff;
}

.project-details img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

.project-details button {
    margin-top: 15px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    
    h2 {
        font-size: 1em;
    }
    
    .navigation {
        flex-wrap: wrap;
    }
    
    main {
        width: 80%;
        right: 10%;
        left: 10%;
        bottom: 100px;
    }
    
    .awards-container {
        grid-template-columns: 1fr;
    }
    
    .contacts ul {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
