* {
    box-sizing: border-box;
}

html, body {
    line-height: 1.6;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
}

h1, h2, h3, p {
    font-display: swap;
}

h1 {
    font-weight: 600;
    font-size: calc(40px + (80 - 40) * ((100vw - 390px) / (1500 - 390)));
}

h2 {
    font-weight: 400;
    font-size: calc(20px + (30 - 20) * ((100vw - 390px) / (1500 - 390)));
    padding-bottom: 2rem;
}

h3 {
    font-weight: 400;
    font-size: calc(18px + (20 - 18) * ((100vw - 390px) / (1500 - 390)));
}

p {
    font-weight: 400;
    font-size: calc(15px + (16 - 15) * ((100vw - 390px) / (1500 - 390)));
}

.introduction {
    padding: 0;
    margin: 0;
    text-align: center;
    font-weight: 500;
    font-size: calc(30px + (40 - 30) * ((100vw - 390px) / (1500 - 390)));
}

.introduction_text {
    text-align: center;
    padding: 0;
    margin: 0;
    font-size: calc(15px + (20 - 15) * ((100vw - 390px) / (1500 - 390)));
}

header {
    background: #ffffff;
    color: #191919;
    position: relative;
    justify-content: center;
    align-items: center;
    padding: 2rem clamp(0.5rem, 5vw, 10rem) 5rem;
}

header h1 {
    margin: 0;
    padding-bottom: 5rem;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 1.6rem;
    height: 1.2rem;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 0.15rem;
    background: #88405a;
    border-radius: 0.05rem;
    transition: all 0.2s;
}

.menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: translateY(0.52rem) rotate(45deg);
}

.menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: translateY(-0.52rem) rotate(-45deg);
}

.menu-toggle:checked ~ #side-menu {
    transform: translateX(0);
}

#side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(34, 34, 34, 0.1);
    transform: translateX(100%);
    transition: transform 0.2s ease-in-out;
    z-index: 1000;
    padding-top: 5rem;
}

#side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#side-menu li {
    position: relative;
    transition: background-color 0.2s border-radius 0.2s;
}

#side-menu li a {
    display: block;
    padding: 1.4rem 2rem;
    color: #191919;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    transition: color 0.01s;
}

#side-menu li:hover {
    background-color: #191919;
    border-radius: 1.5px;
    box-shadow: -2px 0 10px rgba(34, 34, 34, 0.1);
}

#side-menu li:hover a {
    color: #ffffff;
}

.language-switch {
    padding: 23rem 2rem;
    text-align: center;
}

.language-switch a {
    color: #191919;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.2s;
}

.language-switch a:hover {
    color: #88405a;
}

section {
    width: 100vw;
    position: relative;
}

section > div {
    margin: 0 auto;
    padding: 2rem clamp(0.5rem, 15vw, 10rem) 5rem;
    position: relative;
}

.section-end-text {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 4rem;
    margin-bottom: -4rem;
}

.section-arrow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    margin-top: -1rem; /* Adjust as needed */
}

.section-arrow {
    width: 35px; 
    height: 36px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-arrow img {
    width: 100%; 
    height: 100%;
}

section:nth-child(even) {
    background-color: #ffffff;
    color: #191919;
}

section:nth-child(odd) {
    background-color: #191919;
    color: #ffffff;
}

.skill-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-column-gap: 10vw;
    grid-row-gap: 2rem;
    grid-template-areas: 
        "skill1 skill7"
        "skill2 skill8"
        "skill3 skill9"
        "skill4 skill10"
        "skill5 skill11"
        "skill6 .";
}

.skill:nth-child(1) { grid-area: skill1; }
.skill:nth-child(2) { grid-area: skill2; }
.skill:nth-child(3) { grid-area: skill3; }
.skill:nth-child(4) { grid-area: skill4; }
.skill:nth-child(5) { grid-area: skill5; }
.skill:nth-child(6) { grid-area: skill6; }
.skill:nth-child(7) { grid-area: skill7; }
.skill:nth-child(8) { grid-area: skill8; }
.skill:nth-child(9) { grid-area: skill9; }
.skill:nth-child(10) { grid-area: skill10; }
.skill:nth-child(11) { grid-area: skill11; }

.skill {
    display: flex;
    align-items: center;
}

.skill:nth-child(3),
.skill:nth-child(6),
.skill:nth-child(9) {
    margin-bottom: 3rem;
}

.skill img {
    width: 40px;
    height: 40px;
    margin-right: 3rem;
}

.skill-bar {
    position: relative;
    background: #e0e0e0;
    border-radius: 3rem;
    overflow: hidden;
    flex: 1;
    height: 1.4rem;
}

/* Initial width for skill-levels, these will show up if JS is disabled */
.skill-level {
    position: absolute;
    top: 0.3rem;
    left: 0.35rem;
    background: linear-gradient(to right, #522032, #88405a);
    height: 0.8rem;
    border-radius: 0.5rem;
    width: var(--skill-level); /* Set width based on CSS variable */
    transition: width 1s ease;
}

/* Add the class for animation */
.skill-level.animate {
    width: var(--skill-level); /* This width will be set by JavaScript */
}

/* Hide the width set initially for the fallback and use JS to set it */
.no-js .skill-level {
    width: var(--skill-level);
}

.js .skill-level {
    width: 0;
}

footer {
    background: #191919;
    color: white;
    text-align: center;
    padding: 2rem clamp(0.5rem, 15vw, 10rem);
}

footer a {
    color: #ffffff;
    text-decoration: none;
    display: inline-block; 
    padding: 0 2rem;
    transition: transform 0.12s ease, text-shadow 0.12s ease;
}

footer a:hover {
    text-decoration: none; 
    transform: scale(1.04); 
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1), -0.5px -0.5px 1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 750px) {
    .skill-container {
        grid-row-gap: 1rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "skill1"
            "skill2"
            "skill3"
            "skill7"
            "skill8"
            "skill9"
            "skill4"
            "skill5"
            "skill6"
            "skill10"
            "skill11";
    }

    .skill {
        width: 100%;
    }

    .skill:nth-child(3),
    .skill:nth-child(6),
    .skill:nth-child(9) {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 550px) {
    .skill-bar {
        height: 1rem;
    }
    
    .skill-level {
        top: 0.2rem;
        left: 0.2rem;
        height: 0.6rem;
    }
    
    .skill img {
        width: 35px;
        height: 35px;
        margin-right: 2rem;
    }
}
