html {
    font-size: 62.5%;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

body {
    background-color: var(--primaryColor);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--secondaryColor);
    margin: 12px 0;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

p, li {
    font-size: 2rem;
    font-weight: 420;
    color: var(--secondaryColor);
}

a {
    text-decoration: none;
}

.n {
    font-size: 4rem;
    font-weight: 700;
    color: var(--detailColor);
    margin: 20px 20px; 
}

.navbar {
    width: 100%;
    height: 12rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--secondaryColor);
    position: fixed;
    z-index: 3;
}

.item {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--detailColor);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.item:hover {
    background-color: var(--detailColor);
    color: var(--secondaryColor);
}

.item.active {
    background-color: var(--detailColor);
    color: var(--primaryColor);
}

button {
    width: 30%;
    font-size: 2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.button {
    width: 30%;
    font-size: 2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.white {
    background-color: var(--primaryColor);
    color: var(--detailColor);
}

.dark {
    background-color: var(--secondaryColor);
    color: var(--detailColor);
}

.darkHover {
    transition: color 0.1s ease, background-color 0.3s ease;
}

.darkHover:hover {
    background-color: var(--detailColor);
    color: var(--secondaryColor);
}

.darkHover:active {
    color: var(--primaryColor);
}

section {
    height: calc(100vh - 12rem);
}

#fill {
    height: 12rem;
}

#section1 {
    display: grid;
    background-color: var(--primaryColor);
    grid-template-columns: 1fr 20fr 1fr;
    grid-template-rows: 1fr 20fr 1fr;

}

#nodisplay {
    opacity: 0;
}

#number_section1 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
}

.container {
    align-self: center;
    justify-self: center;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    width: 100%;
    align-items: center;
}

#section1_img {
    width: 35%;
    margin: 0 8%;

}

#section1_content {
    margin: 0 8%;
}

#button_group {
    display: flex;
    justify-content: space-between;
    height: 60px;
}

#mail {
    display: flex;
    justify-content: space-between;
}

#section2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

#section2_dark {
    background-color: var(--secondaryColor);
    color: var(--detailColor);
}

#section2_white {
    background-color: var(--primaryColor);
    color: var(--secondaryColor);
}

.icon {
    height: 9vh;
    padding: 0 15px;
}

.list_section {
    display: grid;
    grid-template-columns: 1fr 8fr 2fr;
    grid-template-rows: 0.8fr 0.7fr 1.25fr 0.7fr 1.25fr 0.7fr 1.25fr 0.8fr;
    height: calc(100vh - 12rem);
}

.Titles1 {
    justify-self: start;
    align-self: center;
    grid-column: 2;
    grid-row: 2;
}

.content1{
    align-self: center;
    grid-column: 2;
    grid-row: 3; 
}

.Titles2 {
    grid-column: 2;
    grid-row: 4;
}

.content2{
    align-self: center;
    grid-column: 2;
    grid-row: 5; 
}

.Titles3 {
    grid-column: 2;
    grid-row: 6;
}

.content3{
    align-self: center;
    grid-column: 2;
    grid-row: 7; 
}

.number_grid {
    align-self: center;
    justify-self: center;
}

#section3 {
    display: flex;
}

.carousel {
    width: 100vw;

    overflow: hidden;
}

.carousel-item {
    display: none;
    background-color: var(--secondaryColor);
    color: var(--detailColor);
}

.carousel-item.active {
    display: grid;
    grid-template-columns: 1fr 20fr 1fr;
    grid-template-rows: 1fr 20fr 1fr;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    position: absolute;
    z-index: 0;
    left: 47.4vw;
    top: 270vh;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: var(--detailColor);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primaryColor);
}

.project_content {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    height: 70vh;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.project_p, .proyect_a, .project_h2 {
    color: var(--detailColor);
    padding: 20px 20px 0 20px;

    
}

.project_a {
    color: var(--secondaryColor);
    background-color: var(--detailColor);
    margin: 35px;
    padding: 20px;
    transition: color 0,7 ease-in-out;
}

.project_a:hover {
    color: var(--primaryColor);
    background-color: var(--detailColor);
}

.project_text {
    display: grid;
    grid-template-rows:3fr 6fr 3fr 3fr;
}

#project_flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.project_img {
    height: 60vh;
    justify-self: center;
    align-self: center;
}

.project_button {
    width: 8vw;
    background-color: var(--detailColor);
}

.toggleSection {
    display: flex;
}

.toggle {
    display: flex;
    flex-direction: column;
    width: 5vw;
    cursor: pointer;
}

.toggleContent {
    width: 0;
    overflow: hidden;
    transition: max-width 1s ease-in-out, opacity 1s ease-in-out;
}

.toggleContent.active {
    width: 45vw;
    padding: 30px;
    transition: width 1s ease-in-out, opacity 1s ease-in-out;
}

.toggleContent.hide {
    width: 0;
    transition: width 1s ease-in-out, opacity 1s ease-in-out;
}

.toggleTitle {
    margin-top: 100px;
    transform: rotate(90deg);
}

.subsectionToggle {
    display: flex;
}

#education, #educationContent, #certifications, #certificationsContent{
    background-color: var(--secondaryColor);
    color: var(--detailColor);
}

.darkUl li {
    color: var(--detailColor);
}

@media only screen and (max-width: 600px) {
    html {
        font-size: 50%;
    }

    section {
        height: 85rem;
    }

    .list_section {
        height: 110rem;
    }

    .navbar {
        height: 8rem;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .item {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    p, li {
        font-size: 1.6rem;
    }

    .container {
        flex-direction: column;
    }

    #section1_img {
        width: 80%;
        margin: 20px 0;
    }

    #section1_content {
        display: flex;
        flex-direction: column;
        align-self: center;
        justify-self: center;
    }
    
    #section1 {
        grid-template-columns: 1fr 7fr 1fr;
    }

    #nodisplay {
        grid-column: 3;
        grid-row: 1;
    }

    .sec1 {
        align-self: center;
        justify-self: center;
    }

    .icon {
        width: 4rem;
        height: 4rem;
    }

    #button_group {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: auto;
        width: 100%;
    }

    .button {
        width: 100%;
        height: 3rem;
    }

    #mail {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 80%;
    }

    .list_section {
        grid-template-columns: 1fr 3fr;
    }

    .carousel-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .carousel-dots {
        left: 45%;
        top: calc(270rem - 12rem);
    }

    .n {
        font-size: 3rem;
        font-weight: 700;
        color: var(--detailColor);
        margin: 20px 20px; 
    }

    #container1 {
        flex-direction: column-reverse;
    }

    #section2 {
        display: flex;
        flex-direction: column;
        height: 1150px;
    }

    #section2_dark, #section2_white {
        grid-template-columns: 1fr 5fr;
    }

    .content1 li, .content2 li, .content3 li {
        font-size: 1.7rem;
    }

    #section3 {
        height: 66rem;
        display: grid;
        grid-template-columns: 3fr 3fr 3fr;
        grid-template-rows: 10fr 1fr;
    }

    .carousel {
        grid-column: 1/4;
        grid-row: 1/3;
    }

    .prev {
        grid-column: 1;
        grid-row: 2;
        z-index: 2;
    }

    .next {
        grid-column: 3;
        grid-row: 2;
        z-index: 2;
    }

    .project_button {
        width: 33vw;
    }

    .carousel-dots {
        position: static;
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
        align-self: center;
        margin: 0;
    }
}

@media only screen and (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .navbar {
        height: 10rem;
    }

    .item {
        font-size: 2rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    p, li {
        font-size: 1.8rem;
    }

    .container {
        flex-direction: column;
    }

    #section1_img {
        width: 60%;
        margin: 15px 0;
    }

    #button_group {
        flex-direction: column;
        height: auto;
    }

    .button {
        width: 70%;
        margin: 8px 0;
    }

    #mail {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 70%;
    }

    .list_section {
        grid-template-columns: 1fr;
    }

    .carousel-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
}

@media only screen and (max-width: 840px) {
    html {
        font-size: 60%;
    }

    .navbar {
        height: 11rem;
    }

    .item {
        font-size: 2.2rem;
    }

    h1 {
        font-size: 3.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    p, li {
        font-size: 1.9rem;
    }

    .container {
        flex-direction: column;
    }

    #section1_img {
        width: 55%;
        margin: 10px 0;
    }

    #button_group {
        flex-direction: column;
        height: auto;
    }

    .button {
        width: 65%;
        margin: 8px 0;
    }

    #mail {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 65%;
    }

    .list_section {
        grid-template-columns: 1fr;
    }

    .carousel-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .carousel-dots {
        left: 45%;
        top: calc(269rem - 12rem);
    }
}
