* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;

}

:root {
    --bg-color: #191f36;
    --snd-bg-color: #262B40;
    --text-color: #fff;
    --main-color: #307cb6;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.line {
    border-bottom: 5px solid var(--main-color);
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: 20px;
}

.space {
    margin-top: 50px;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: default;;
}

a, a:visited, a:link {color: var(--text-color);}
a:hover, a:active {color:var(--main-color);}

.navbar a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

/*=========== Home ==========*/

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

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;   
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-img {
    margin-left: 50px;
    width: 25vw;
    animation: floatImage 4s ease-in-out infinite;
}

.home-img img {
    width: 500px;
    border-radius: 10px;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.home-content p {
    font-size: 2rem;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

/*=========== About ==========*/

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--snd-bg-color);
}

.about-img img {
    width: 25vw;
    border-radius: 10px;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    margin-top: 20px;
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

/*=========== Curriculum ==========*/

.title {
    box-shadow: 10px 5px 10px rgba(0, 0, 0, 0.5);
    padding: 1rem 0rem 1rem 0.7rem;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
    color: var(--text-color);
    font-size: 2.3rem;
    background-color: var(--main-color);
}

.subtitle {
    padding: 1rem 0rem 1rem 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

#timeline p {
    padding: 1rem 0 1rem 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

#timeline {
    padding: 1rem 0 1rem 1rem;
    color: var(--text-color);
}

#timeline button {
    margin: 0.5rem 0rem 1rem 1rem;
    outline: none;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: transparent;
    transition: all 0.3s ease-in;
    cursor: pointer;
    color: var(--text-color);
}

#timeline button:hover {
    background-color: var(--snd-bg-color);
    color: var(--main-color);
}

#timeline ul {
    padding: 50px 0;
}

/* Create a line */
#timeline ul li {
    list-style: none;
    position: relative;
    width: 7px;
    margin: 0 auto;
    padding-top: 80px;
    background-color: #58d68e;
}

#timeline ul li .timeline-box {
    position: relative;
    bottom: 0;
    width: 650px;
    background-color: var(--snd-bg-color);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    transform: translateX(400%);
    transition: all 0.5s ease-in-out;
}

/* Right side */
#timeline ul li:nth-child(odd) .timeline-box {
    left: 50px;
}

/* Left side */
#timeline ul li:nth-child(even) .timeline-box {
    left: -700px;
    transform: translateX(-400%);
}

#timeline ul li .timeline-box.show {
    transform: translateX(0%);
    transition: all 0.5s ease-in-out;
}

/* Create a circle */
#timeline ul li i {
    position: absolute;
    left: 50%;
    top: 20;
    width: 45px;
    height: 45px;
    background: #2c3e50;
    transform: translateX(-50%);
    border-radius: 50%;
}

/* Set icon inside circles */
#timeline .fa-brands,
#timeline .fa-solid {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--main-color);
}

/* Arrow */
#timeline .timeline-box:before {
    content: "";
    position: absolute;
    top: 5px;
    width: 0;
    right: 0;
    border-style: solid;
}

#timeline ul li:nth-child(odd) .timeline-box:before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent #59B2F4;
}

#timeline ul li:nth-child(even) .timeline-box:before {
    right: -15px;
    border-width: 8px 0px 8px 16px;
    border-color: transparent #59B2F4;
}

/*=========== Publications ==========*/

.publications {
    background: var(--snd-bg-color);
}

.publications h3 {
    font-size: 3rem;
    margin-top: 20px;
}

.publications h4 {
    font-size: 2.5rem;
}

.publications p {
    margin-top: 10px;
    font-size: 2rem;
}

.publications li {
    font-size: 2rem;
    margin: 1rem 0;
}

/*=========== Projects ==========*/

.projects {
    background: var(--bg-color);
}

.projects h2 {
    margin-bottom: 4rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 3rem;
}

.projects-container .project-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--snd-bg-color);
    overflow: hidden;
    display: flex;
}

.projects-box img {
    width: 100%;
    transition: .5s ease;
    opacity:0.7;
}

.projects-box:hover img {
    transform: scale(1.1);
}

.projects-box .projects-layer {
    /* position: absolute; */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25rem;
    background: var(--main-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(10%);
    transition: .5s ease;
}

.projects-box:hover .projects-layer {
    transform: translateY(0);
}

.projects-layer h4 {
    font-size: 3rem;;
}

.projects-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.projects-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
}

.projects-layer a i {
    font-size: 2rem;
    color: var(--bg-color);
}

/*=========== Contact ==========*/

.contact {
    background: var(--snd-bg-color);
}

.contact p {
    font-size: 2rem;
    margin: 2rem 0 3rem;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--snd-bg-color);
}

.footer-text {
    font-size: 1.6rem;
}

.footer-iconTop {
    display:inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem 1rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--snd-bg-color);
}

/* BREAKPOINT */

@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 2%;
    }

    .curriculum {
        padding: 7rem;
    }

    .projects {
        padding-bottom: 7rem;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    /* Hide navbar when screen width reduces */
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 0%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content {
        order: 2;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column;
    }

    .about-img img {
        width: 90vw;
        margin-top: 4rem;
    }

    .curriculum h2 {
        margin-bottom: 3rem;
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 617px) {
    .projects-container {
        grid-template-columns: 1fr;
    }

    .home-img img {
        width: 10vw;
        margin-top: 8rem;
    }

    .about-img img {
        width: 100vw;
        margin-top: 4rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
}