html{
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", sans-serif;
    background-color: #2b3240;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2 {
    margin: 0.5em 0;
    font-weight: bold;
}

h1 {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 0.5em;
    border-bottom: 2px solid #0066cc;
}

.nav {
    position: fixed;
    width: 100vw;
    max-width: 100%;
    height: 4em;
    box-shadow: none;
    background-color: #516687;
    z-index: 999;
}

.nav nav {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

.nav a {
    display: flex;
    align-items: center;
    color: black;
    text-decoration: none;
    justify-content: center;
    position: relative;
    background: #c5c5c5;
    min-width: 10em;
    height: 100%;
    border: none;
    border-left: 2px solid white;
    cursor: pointer;
    transition: all 0.5s ease;
    overflow: hidden;
}

.nav a:hover {
    background: white;
}

span.ripple {
    position: absolute; /* The absolute position we mentioned earlier */
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 600ms linear;
    background-color: rgba(80, 140, 228, 0.5);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.nav a.active {
    background: rgb(80, 140, 228);
}

.presentation {
    background-color: black;
    top: 4em;
    margin-bottom: 5em;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 2em 0;
    overflow: hidden;
    & .pp, h1, p {
        animation: slidein 2s;
        z-index: 2;
        background: white;
        padding: 0.5em;
        border: 1px solid white;
        border-radius: 50px;
    }
}

.presentation .bg {
    position: absolute;
    top: -70%;
    width: 110%;
    left: -5%;
    z-index: 1;
}

.presentation .pp {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.presentation h1 {
    border-bottom: 0;
}

.content section {
    position: relative;
    padding: 2em;
    margin: 1em auto;
    max-width: 900px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    animation: slidein 2s;
}

@keyframes slidein {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.anchor {
    position: absolute;
    transform: translateY(-25vh);
}

.about h2 {
    font-weight: normal;
    font-size: 1.2em;
    color: #555;
}

.cv {
    display: flex;
    gap: 2rem;
    padding: 2em;
    margin: 2em auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-direction: column;
    flex-wrap: wrap;
}

.cv section {
    flex: 1 1 45%;
    background-color: #f7f7f7;
    margin: 0;
    padding: 1.5em;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.03);
    font-size: 1em;
    line-height: 1.6;
}

.cv h2 {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 0.5em;
    border-bottom: 2px solid #0066cc;
}

.skills nav {
    display: flex;
    justify-content: center;
}

.skill-button {
    background: #c5c5c5;
    position: relative;
    width: 10rem;
    height: 6rem;
    font-size: 1.2em;
    padding: 0;
    border: none;
    border-left: 2px solid white;
    cursor: pointer;
    transition: all 0.5s ease;
    overflow: hidden;
}

.skill-button.active {
    background: rgb(80, 140, 228);
}

.skill-list:not(.active) {
    display: none;
}

.skill-list img {
    width: 3em;
    height: 3em;
}

.skill-list.active {
    display: grid;
    list-style: none;
    margin: 2em 0;
    padding: 0;
    grid-auto-flow: column;
    gap: 0.2em;
}

.skill-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 5em;
    min-height: 5em;
    border: 1px solid black;
    border-radius: 5px;
    flex-direction: column;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

form div {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
    justify-content: center;
    & input {width: 100%;}
}

form input[type="text"],
form textarea {
    padding: 0.8em;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    resize: vertical;
}

form textarea {
    min-height: 10em;
}

form input[type="submit"] {
    background-color: #0066cc;
    color: white;
    padding: 0.8em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
    background-color: #004999;
}

/* Responsive */
@media (max-width: 768px) {
    .presentation {
        padding: 1em;
    }

    section {
        margin: 1em;
        padding: 1em;
    }

    .cv {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cv section {
        flex: 1 1 100%;
    }

    form input[type="text"],
    form textarea,
    form input[type="submit"] {
        font-size: 1em;
    }
}
