:root {
    --text-color: rgb(16, 16, 16);
    --link-color: #7e182c;
    --background-color: rgb(255, 245, 252);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Gabarito", sans-serif;
    background-color: var(--background-color);
    max-width: 1400px;
    margin: 0 auto;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    padding: 0 100px;
    height: 80px;
    align-items: center;
}

nav .left a{
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
}

nav .right a{
    color: var(--text-color);
    margin: 0 10px;
}

nav .right a:last-child {
    color: var(--background-color);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

nav .right a span {
    margin-left: 5px;
}

/* SECTION 1 : Hero */
.hero-section {
    display: flex;
    justify-content: space-between;
    padding: 0 100px;
    margin: 50px 0;
    margin-bottom: 100px;
    align-items: center;
    gap: 40px;
}

.hero-section .text {
    flex: 5;
}

.hero-section .text h2 {
    font-size: 45px;
}

.hero-section .text .links {
    margin-top: 25px;
}

.hero-section .text .links a {
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--link-color);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: .1s;
}

.hero-section .text .links a:hover {
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: right;
}

.hero-section .headshot img {
    border-radius: 50%;
    width: 300px;
    /* search how to do image shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


/* SECTION 2: ACHIEVEMENTS */
.achievements-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.achievements-section h2 {
    text-align: center;
    font-size: 35px;
    margin-bottom: 4px;
}

.achievements-section .text {
    text-align: center;
    margin-bottom: 4px;
}

.achievements-section .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 550px;
}

.container.swiper {
  position: relative;
  overflow: hidden;   /* clip slides inside rounded rectangle */
  border-radius: 20px;
  padding: 0 60px;    /* space so arrows don’t touch the box */
}

.container.swiper .swiper-button-prev {
  left: -5px;
}

.container.swiper .swiper-button-next {
  right: -5px;
}

.card-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card-list .swiper-wrapper {
    max-width: 1100px;
    margin: 0 30px 35px;
    padding: 20px 10px;
}

.card-list .card-item .card-link {
    user-select: none;
    display: block;
    background: white;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    border: 2px solid transparent;
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.2);
    transition: 0.2s ease;
}

.card-list .card-item .card-link:hover {
    border-color: #4a76ee;
}

.card-list .card-link .card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
}

.card-list .card-link .badge {
    color: #4a76ee;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 16px 0 18px;
    background: #DDE4FF;
    width: fit-content;
    border-radius: 50px;
}

.card-list .card-link .badge.gold {
    color: rgb(159, 137, 8);
    background: rgb(255, 243, 164);
}

.card-list .card-link .badge.silver {
    color: rgb(110, 110, 110);
    background: rgb(214, 214, 214);
}

.card-list .card-link .badge.distinction {
    color: rgb(221, 31, 31);
    background: rgb(254, 145, 145);
}

.card-list .card-link .card-title {
    font-size: 1.19rem;
    color: #000;
    font-weight: 600;
}

.card-list .card-link .card-button {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    margin: 30px 0 5px;
    background: none;
    cursor: pointer;
    border: 2px solid #4a76ee;
    transform: rotate(-45deg);
    transition: 0.4s ease;
}

.card-list .card-link:hover .card-button {
    color: #fff;
    background: #4a76ee;

}


/*SECTION 3 : EXPERIENCES */

.experiences-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.experiences-section .section-title {
    text-align: center;
    font-size: 35px;
    margin-bottom: 4px;
}

.experiences-section .text {
    text-align: center;
    margin-bottom: 4px;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 100px auto;
}

.box {
    padding: 10px 50px;
    position: relative;
    width: 50%;
    animation: movedown 1s linear forwards;
    opacity: 0;
}

@keyframes movedown {
    0% {
        opacity: 1;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.box:nth-child(1) {
    animation-delay: 0s;
}

.box:nth-child(2) {
    animation-delay: 1s;
}

.box:nth-child(3) {
    animation-delay: 2s;
}

.box:nth-child(4) {
    animation-delay: 3s;
}

.box:nth-child(5) {
    animation-delay: 4s;
}

.textbox {
    padding: 20px 30px;
    background: #ffffff;
    position: relative;
    border-radius: 9px;
    font-size: 15px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
}

.textbox h2 {
    font-weight: 800;
}

.textbox h3 {
    font-weight: 600;
    color: rgb(194, 43, 43);
}

.textbox small {
    display: inline-block;
    margin-bottom: 15px;
}

.left-side {
    left: 0;
}

.right-side {
    left: 50%;
}

.box img {
    position: absolute;
    width: 40px;
    border-radius: 50%;
    right: -20px;
    top: 32px;
    z-index: 10;
}

.right-side img {
    left: -20px;
}

.left-side-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #ffffff;
    right: -13px;
}

.right-side-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #ffffff;
    left: -13px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 100%;
    background: #2c2c2c;
    top: 0;
    left: 50%;
    margin-left: -3px;
    z-index: -1;
    animation: moveline 6s linear forwards;
}

/* SECTION 4 : PROJECTS */

.projects-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.projects-section .section-title {
    text-align: center;
    font-size: 35px;
    margin-bottom: 4px;
}

.accordion {
    margin: 60px auto;
    width: 100%;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.accordion li{
    list-style: none;
    width: 300px;
    margin: 20px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
}

.accordion li label {
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 25px;
    font-weight: 700;
    cursor: pointer;
}

.accordion img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.accordion .btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: pink;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 16px;
    color: #121212;
}

label::before {
    content: '+';
    margin-right: 10px;
    font-size: 24px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

input[type="radio"] {
    display: none;
}

.accordion .content {
    color: #555;
    padding: 0 10px;
    line-height: 26px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.accordion input[type="radio"]:checked + img + label + .content {
    max-height: 400px;
    padding: 10px 10px 20px;
}

.accordion input[type="radio"]:checked + img + label::before {
    content: '-';
}

/* SECTION 5: CONTACT */

.contact-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.contact-section h2 {
    font-size: 35px;
}

.contact-section .group {
    display: flex;
    gap: 50px;
}

.contact-section .group .text {
    flex: 3;
    margin-top: 20px;
}

.contact-section .group form {
    flex: 3;
    display: flex;
    flex-direction: column;
}

.contact-section .group form input, .contact-section .group textarea {
    font-family: "Gabarito", sans-serif;
    border: 2px solid var(--link-color);
    border-radius: 10px;
    background-color: transparent;
    padding: 10px;
    margin-bottom: 15px;
    outline: none;
    resize: none;
}

.contact-section .group form button {
    font-size: 16px;
    font-family: "Gabarito", sans-serif;
    color: #fff;
    background-color: var(--link-color);
    border: none;
    border-radius: 5px;
    height: 35px;
    cursor: pointer;
    transition: 0.1s;
}

.contact-section .group form button:hover {
    filter: brightness(.8);
}

@keyframes moveline {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

@media screen and (max-width: 600px) {
    .timeline {
        margin: 50px auto;
    }
    .timeline::after {
        left: 31px;
    }
    .box {
        width: 100%;
        padding-left: 80px;
        padding-right: 25px;
        margin-top: 10px;
    }
    .textbox {
        font-size: 13px;
    }
    .textbox h3 {
        font-size: 9px;
    }
    .textbox small {
        margin-bottom: 10px;
    }
    .right-side {
        left: 0;
    }
    .left-side img, .right-side img {
        left: 10px;
    }
    .left-side-arrow, .right-side-arrow {
        border-right: 15px solid #ffffff;
        border-left: 0;
        left: -13px;
    }

    

    /* SECTION 5 : CONTACT */
    .contact-section {
        padding: 0 20px;
    }
}

@media (max-width: 850px) {
    /* SECTION 1 : HERO */
    .hero-section .text h2 {
        font-size: 35px;
    }
}

@media (max-width: 740px) {
    /* SECTION 1 : HERO */
    .hero-section {
        flex-direction: column-reverse;
    }

    .hero-section .headshot img {
        width: 300px;
    }

    /* SECTION 5 : CONTACT */
    .contact-section .group {
        flex-direction: column;
    }
}

@media (max-width: 800px) {
    /* NAVBAR */
    nav {
        padding: 0 20px;
    }

    nav .right a {
        font-size: 22px;
    }

    nav .right a:last-child {
        color: var(--text-color);
        background-color: transparent;
        padding: 0;
    }

    nav .right a span {
        display: none;
    }

    /* SECTION 1 : HERO */
    .hero-section {
        padding: 0 20px;
    }

    .hero-section .text h2 {
        font-size: 30px;
    }
}