@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-VariableFont_wght.ttf');
}
@font-face {
    font-family: 'SourceCodePro';
    src: url('fonts/SourceCodePro-VariableFont_wght.ttf');
}
html {
    scroll-behavior: smooth;
}
* {
    box-sizing: border-box;
}
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
}

body.modal-open {
    height: 100vh;
    overflow-y: hidden;
}

html.modal-open {
    scroll-behavior: unset;
}

:root {
    --pastel-blue: #9BC5C9;
    --dark-gray: #4c4d4f;
    --light: #edecf1;
    --light-gray: #dfdfe1;
    --green: #BEC496;
    --dark-green: #3c4434;
}

/* scrollbar */

::-webkit-scrollbar {
    width: 20px;
  }

  ::-webkit-scrollbar-track {
    background: var(--light);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--green);
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
  }

/* Header */
nav {
    background-color: var(--dark-gray);
    height: 100px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}
nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    height: 100%;
    gap: 20px;
}
nav > ul > li > a {
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: var(--light);
}

nav > ul > li > a:hover {
    color: var(--pastel-blue);
    transition: ease-in-out 0.3s;
    text-decoration: underline;
}
.section {
    height: 100vh;
    padding-top: 100px;
    width: 100%;
}

#navbar a.clicked {
    text-decoration: underline;
    color: var(--pastel-blue);
}

/* About me */

#home {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    margin: 0 auto;
    padding: 1rem; 
    padding-top: 5rem;
    gap: 3rem;
}

#about-me {
    width: 50%;
    padding: 2rem;
    margin-top: 3.5rem;
    background-color: var(--green);
    border-radius: 10px;
    position: relative;
}

.typed-out {
    font-size: 2rem;
    position: absolute;
    top: -62px;
    right: 0;
    overflow: hidden;
    border-right: 0.15em solid var(--dark-gray);
    white-space: nowrap;
    letter-spacing: 0.15em;
    animation: typed 5s steps(12, end), blink-caret 0.5s step-end infinite;
    font-family: 'SourceCodePro', monospace;
}

@keyframes typed {
    from {
        width: 0;
    }
    to {
        width: 39%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--dark-gray);
    }
}

#my-photo {
    width: 30%;
    max-height: 80%;
    object-fit: cover;
    border-radius: 10px;
    background-color: var(--light);
    box-shadow: 0 0 10px var(--dark-gray);
    padding-top: 0.5rem;
}

.message, .up {
    position: fixed;
    width: 70px;
    height: 70px;
    bottom: 0.8rem;
    right: 3rem;
    font-size: 2rem;
    color: var(--light);
    background-color: var(--dark-green);
    padding: 1rem;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    z-index: 1;
}

.up {
    display: none;
}

/*Skills*/

#skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
}
#skills > h2 {
    margin: 2rem auto;
    padding: 0;
    font-size: 3rem;
    color: var(--dark-gray);
}
#scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 80%;
    margin: 2rem auto;
    align-items: center;
}
#scroll::-webkit-scrollbar {
    width: 10px;
    height: 15px;
}
#scroll::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 10px;
}
#scroll::-webkit-scrollbar-track {
    background: transparent;
}
#scroll > div {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 100%;
    height: 50vh;
    margin-right: 50px;
    border-radius: 10px;
    background-color: var(--pastel-blue);
    transform-origin: center center;
    transform: scale(1);
    transition: transform 0.5s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.arrows {
    font-size: xx-large;
    margin: 2rem;
    z-index: 1;
    cursor: pointer;
    color: var(--dark-gray);
}

.right {
    right: 0;
    position: absolute;
} 

.left {
    left: 0;
    position: absolute;
}

#soft-skills, #customer-service, #languages {
    display: flex;
    flex-direction: column;
}

#soft-skills h3, #customer-service h3, #languages h3, #technical-skills h3, #contacts h3 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin: 1rem;
    padding: 0.1rem;
}

#soft-skills > ul, #customer-service > ul, #languages > ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    padding-left: 0;
}

#soft-skills > ul > li, #customer-service > ul > li, #languages > ul > li {
    margin: 1rem;
    padding: 1rem;
    background-color: var(--light);
    border-radius: 5px;
    font-size: 1.2rem;
    color: var(--dark-gray);
}

#soft-skills > ul > li:hover, #customer-service > ul > li:hover, #languages > ul > li:hover, #technical-skills > ul > li:hover {
    background-color: var(--green);
    transition: ease-in-out 0.5s;
}

#technical-skills {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

#technical-skills ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding-left: 0;
}

#technical-skills > ul > li {
    background-color: var(--light);
    border-radius: 5px;
    padding: 1rem 1.5rem;
    margin: 1rem;
}

/* Education and experience */

#education-experience-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: fit-content(50%);
}

#education-experience > h2 {
    margin: 2rem auto;
    padding: 0.5rem;
    font-size: 3rem;
    color: var(--dark-gray);
    text-align: center;
}

#education, #experience {
    margin: 2rem;
    text-align: center;
    border-radius: 10px;
}

#education > ul, #experience > ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin: 1rem;
}

#education > ul > li, #experience > ul > li {
    margin: 1rem;
    padding: 1rem;
    background-color: var(--light);
    border-radius: 5px;
    font-size: 1.2rem;
    color: var(--dark-gray);
}

#education > ul > li:hover {
    background-color: var(--pastel-blue);
    transition: ease-in-out 0.5s;
}

#experience > ul > li:hover {
    background-color: var(--green);
    transition: ease-in-out 0.5s;
}

#education {
    background-color: var(--green);
}

#experience {
    background-color: var(--pastel-blue);
}

#education > h3, #experience > h3 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin: 1rem;
    padding: 0.1rem;
}

/* Portfolio */

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

#portfolio > h2 {
    margin: 2rem auto;
    padding: 0;
    font-size: 3rem;
    color: var(--dark-gray);
}

#projects {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.project img{
    width: 60%;
    height: 25%;
    margin: auto;
    margin-top: 0.5rem;
}
.project {
    max-width: 20%;
    height: 100%;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    color: var(--dark-gray);
    background-color: var(--green);
    position: relative;
}
.project:nth-of-type(2), .project:nth-of-type(4) {
    background-color: var(--pastel-blue);
}

.project h4, .project h5, .project p {
    margin: 0.7rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.learn-more-button {
    background-color: var(--dark-gray);
    color: var(--light);
    border: none;
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    padding: 0.5rem;
    cursor: pointer;
}

.modal-content {
    background-color: var(--light);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    text-align: center;
}

.modal ul {
    text-align: left;
}

.modal a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: bold;
    padding: 0.5rem;   
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Contacts */

#contacts > h2 {
    margin: 2rem auto;
    padding: 0;
    font-size: 3rem;
    color: var(--dark-gray);
    text-align: center;
}
#contacts h3 {
    color: var(--light);
}
#info {
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    gap: 5rem;
}
#contacts-form {
    height: 50%;
    width: 50%;
    background-color: var(--green);
    padding: 2rem;
    display: grid;
    grid-template-columns: 0.5fr 1fr;
    grid-template-rows: 0.1fr 0.1fr 0.8fr 0.1fr;
    align-items: center;
    gap: 0.5rem;
    border-radius: 10px;
}

#contacts-form label {
    font-size: 1rem;
    justify-self: center;
}

#contacts-form > label[for = "name"] {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    text-align: right;
}

#contacts-form > label[for = "email"] {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    text-align: right;
}

#contacts-form > label[for = "message"] {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    text-align: right;
}


#contacts-form > input[type = "text"] {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

#contacts-form > input[type = "email"] {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

#contacts-form > textarea {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    width: 70%;
    height: min-content;
    border: none;
    border-radius: 5px;
    padding: 1rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    resize: none;
    margin-bottom: 0.5rem;
}

#contacts-form input:not([type = "submit"]) {
    width: 70%;
    height: 10%;
    border: none;
    border-radius: 5px;
    padding: 1rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

#links {
    background-color: var(--dark-green);
    color: var(--light);
    width: 40%;
    height: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 2rem 1rem;
}
#links > ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    padding-left: 0;
}

#links > ul > li > a {
    text-decoration: none;
    color: var(--light);
    font-size: 2rem;
    margin: 1rem;
    padding: 0.1rem;
}

#links > ul > li > a i:hover{
    transform: scale(1.2);
    transition: ease-in-out 0.5s;
}

#send-button {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
    width: 70%;
    border: none;
    border-radius: 5px;
    padding: 0.5rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    background-color: var(--dark-gray);
    color: var(--light);
}

#send-button:hover {
    transition: ease-in-out 0.5s;
    cursor: pointer;
    transform: scale(1.1);
}

@media only screen and (max-width: 800px) {
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    #home {
        gap: 2rem;
        flex-direction: row;
        margin-top: 5rem;
        justify-content: start;
    }
    #my-photo {
        width: 30%;
        align-self: baseline;
        margin-top: 1rem;
    }
    #about-me {
        width: 90%;
    }
    #education-experience-layout {
        display: flex;
        flex-direction: column;
        font-size: 1rem;
    }
    #education, #experience {
        margin: 1rem;
    }
    #education > ul, #experience > ul {
        margin: 0.5rem;
    }
    #education > ul > li, #experience > ul > li {
        margin: 0.5rem;
        padding: 0.5rem;
    }
    #portfolio {
        height: fit-content;
    }
    #projects {
        flex-direction: row;
        gap: 0.3rem;
        flex-wrap: wrap;
    }
    .project {
        max-width: 45%;
        height: 45%;
        margin: 1rem;
    }
    .project img {
        max-height: 40%;
    }
    #info {
        flex-direction: column;
        gap: 1rem;
    }
    #links {
        width: 60%;
    }
    #contacts-form {
        width: 90%;
        height: 80%;
        grid-template-columns: 1fr;
        grid-template-rows: 0.1fr 0.1fr 0.8fr 0.1fr;
        gap: 0.5rem;
    }
    #contacts-form > label[for = "name"] {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        text-align: left;
    }
    #contacts-form > label[for = "email"] {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        text-align: left;
    }
    #contacts-form > label[for = "message"] {
        grid-column: 1 / 2;
        grid-row: 5 / 6;
        text-align: left;
    }
    #contacts-form > input[type = "text"] {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        width: 80%;
        margin: auto;
    }
    #contacts-form > input[type = "email"] {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
        width: 80%;
        margin: auto;
    }
    #contacts-form > textarea {
        grid-column: 1 / 2;
        grid-row: 6 / 7;
        width: 80%;
        height: min-content;
    }
    #contacts-form input[type = "submit"] {
        width: 70%;
        grid-row: 7 / 8;
        grid-column: 1 / 2;
        margin: auto;
    }
    #contacts-form textarea {
        width: 80%;
        margin: auto;
    }
    #scroll div {
        height: 60vh;
        flex-direction: row;
        align-content: center;
    }
    #scroll div ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media only screen and (max-width: 690px) {
    #home img {
        width: 40%;
    }
    .typed-out {
        right: 30px;
        font-size: 1.5rem;
    }
    #technical-skills {
        align-content: baseline!important;
    }
    #technical-skills h3 {
        margin-top: 1.2rem;
    }
    #scroll div {
        overflow-y: auto;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    #projects {
        flex-direction: column;
        gap: 0;
    }
    .project {
        max-width: 100%;
        max-height: 70%;
        margin: 0.1rem;
    }
    .project img {
        max-width: 20%;
        max-height: 40%;
    }
    .project h4, h5, p {
        margin: 0.2rem;
    }
}
@media only screen and (max-width: 475px) {
    nav > ul {
        flex-wrap: wrap;
        justify-content: center;
        height: fit-content;
    }
    #home {
        flex-wrap: wrap;
    }
    #home img {
        width: 50%;
    }
    #about-me {
        margin-right: auto;
        margin-left: auto;
    }
    .arrows {
        margin: 0.5rem;
    }
    .section {
        height: fit-content;
    }
    .project {
        margin: 0.1rem;
        max-width: 80%;
    }
    #links {
        width: 80%;
    }
    #contacts-form {
        width: 100%;
    }
    #contacts-form > input[type = "text"] {
        width: 90%;
    }
    #contacts-form > input[type = "email"] {
        width: 90%;
    }
    #contacts-form > textarea {
        width: 90%;
    }
    #contacts-form input[type = "submit"] {
        width: 80%;
    }
    #soft-skills h3 {
        margin-top: 4rem;
    }
    #customer-service h3 {
        margin: 1rem 0.1rem;
    }
}

@media only screen and (max-width: 320px) {
    #navbar {
        height: fit-content;
    }
    nav > ul {
        justify-content: flex-start;
    }
    #home img {
        width: 70%;
    }
    #scroll {
        width: 90%;;
    }
    #scroll > div {
        height: 60vh;
    }
}