.justify {
    text-align: justify;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bubble {
    font-size: 0.8rem;
    background-color: var(--x-bubble-color);
    border-radius: 20px;
    margin: 2px;
    padding: 2px 8px;
    display: inline-block;
    color: var(--x-font-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: var(--x-font-color);
    cursor: pointer;
}

/* Nav bar */
#menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: none;
    color: var(--x-font-color);
}

/* Home */
#home {
    width: 100%;
    height: 100vh;
    background: url('../img/background.webp') no-repeat center center/cover;
    text-align: center;
    font-weight: bold;
}

#home .info {
    background-color: color-mix(in srgb, var(--x-dark-background) 50%, transparent);
    padding: 15px;
    border: 2px solid var(--x-primary-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#home a {
    background-color: color-mix(in srgb, var(--x-primary-color) 50%, transparent);
    transition: background-color .25s ease-in-out;
    color: var(--x-font-color);
}

#home a:hover {
    background-color: color-mix(in srgb, var(--x-primary-color) 30%, transparent);
    border: 1px solid var(--x-primary-color);
    color: var(--x-font-color);
}

#home .social svg {
    width: 20px;
    height: 20px;
}

#home .social {
    gap: 15px;
}

.rounded-btn, .social a {
    border-radius: 50%;
    width: 35px;
    height: 35px;
}

/* Section */
.section-content {
    display: flex;
    flex-direction: column;
    width: 85%;
    gap: 20px;
    max-width: 800px;
    margin: auto auto;
}

/* Card */
.card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    background-color: var(--x-card-background);
    border-left: 5px solid var(--x-primary-color);
}

.card h3 {
    text-align: center;
}

.card img {
    width: 210px;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.card img:hover {
    transform: scale(1.025);
}

/* Scroll top button */
.scroll-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--x-font-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    color: var(--x-background);
}

.scroll-btn:hover {
    background-color: var(--x-dark-background);
    color: var(--x-primary-color);
    border: 1px solid var(--x-primary-color);
}

.scroll-btn:focus {
    outline: none;
}

/* Project section */
.project-desc {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.project-skill {
    text-align: center;
}

/* Skill section */
.skill-list {
    list-style: none;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-list li {
    padding: 5px;
    border-radius: 5px;
    width: 75px;
    height: 75px;
    text-align: center;
}

.skill-list svg {
    width: 50px;
    height: 50px;
}

.skill-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.skill-container .description p {
    margin-bottom: 10px;
}

.skill-view {
    flex-basis: 50%;
    flex-grow: 1;
}

.label {
    font-size: 0.8em;
}

/* Timeline section */
.timeline-container {
    display: flex;
    flex-wrap: wrap;
    margin: 25px auto;
}

.timeline-event {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
}

.timeline-date {
    display: flex;
    background: linear-gradient(to right, transparent 48%, var(--x-primary-color) 50%, var(--x-primary-color) 0, transparent 52%);
    order: 2;
    text-align: center;
    width: 90px;
}

.timeline-date span {
    font-size: 22px;
    margin: auto;
    font-weight: 900;
    background-color: var(--x-background);
}

.timeline-details {
    order: 3;
    width: 80%;
    border-radius: 15px;
    padding: 15px;
    background: var(--x-card-background);
    margin: 1.5% 0;
    position: relative;
}

.timeline-event .timeline-details:after {
    position: absolute;
    top: calc(50% - 14px);
    left: -12px;
    display: inline-block;
    border-top: 14px solid transparent;
    border-right: 14px solid var(--x-card-background);
    border-left: 0 solid var(--x-card-background);
    border-bottom: 14px solid transparent;
    content: " ";
}

.timeline-details h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.timeline-details h4 {
    font-weight: normal;
    font-size: 0.9em;
}

/* Contact section */
#contact .social {
    margin-bottom: 10px;
    display: flex;
}

#contact a {
    transition: color .25s ease-in-out;
}

/* Responsive */
@media (min-width: 768px) {

    .modal-content {
        max-width: 80%;
        max-height: 80%;
    }

    .modal-close {
        position: absolute;
        top: 20px;
        right: 30px;
        font-size: 40px;
        color: white;
        cursor: pointer;
    }

    .timeline-details, .empty-box {
        width: 42%;
    }

    .event-right .timeline-details {
        order: 1;
        padding-right: 10px;
    }

    .event-right .empty-box {
        order: 3;
    }

    .timeline-event.event-right .timeline-details:after {
        right: -12px;
        left: auto;
        border-left: 14px solid var(--x-card-background);
        border-right: 0 solid var(--x-card-background);
    }

    .section-content {
        width: 70%;
    }

    .rounded-btn, .social a {
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

    #home a {
        color: var(--x-primary-color);
        background-color: color-mix(in srgb, var(--x-primary-color) 15%, transparent);
    }

    #home .social svg {
        width: 24px;
        height: 24px;
    }

    #menu-toggle {
        display: none;
    }

    .project {
        flex-direction: row;
    }

    .project-skill {
        text-align: left;
    }
}