/*                        RESET                       */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*                      VARIABLES                     */
:root {
    --background-color: #d3d3d3;
    --primary-color: #00bf8c;
    --secondary-color: #f9f9f9;
    --alternate-color: #ff6f61;
    --font-color: #333333;
    --font-title: 'Sequel';
    --font-content: 'Oswald';
}

/*                     GENERAL STYLES                 */
body {
    background-color: var(--background-color);
    font-family: var(--font-content);
    color: var(--font-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 70%;
    margin: 0 auto;
    padding: 1em;
}

/*                      HEADER                        */

/*    MAIN TITLE     */
.main__title {
    margin: 20px;
    font-family: var(--font-title);
    color: var(--primary-color);
    text-shadow: 2px 2px 2px var(--font-color);
}

/*      NAV BAR      */
.header__menu {
    display: flex;
    gap: 50px;
    justify-content: center;
}

/*   NAV LINKS   */
.btn {
    background-color: var(--primary-color);
    height: 40px;
    width: 90px;
    align-content: center;
    text-align: center;
    border-radius: 8px;
    border: white;
    transition: background-color 0.5s ease, border 0.2s ease, transform 0.3s ease, color 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: 2px 2px 2px var(--font-color);
}

.btn:hover {
    background-color: white;
    border: 3px solid var(--primary-color);
    transform: scale(1.2);
    color: var(--primary-color);
}

.btn__nav:nth-child(1) {
    animation:1s linear slide ;
}
.btn__nav:nth-child(2) {
    animation:0.7s linear slide ;
}
.btn__nav:nth-child(3) {
    animation:0.5s linear slide ;
}

@keyframes slide {
    from {
        transform: translateX(-300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/*      CONTENT      */
.sections {
    background-color: white;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    height: auto;
    font-size: 20px;
    margin: 10px auto;
    padding: 1em;
    box-shadow: 0 0 5px var(--font-color);
}

.section__title {
    font-size: 30px;
    margin: 20px;
    font-family: var(--font-title);
    color: var(--primary-color);
    text-shadow: 2px 2px 2px var(--font-color);
}
/*   ABOUT-ME    */
.section__content {
    display: flex;
    width: 80%;
    margin: 0 auto;
}

.section__text {
    text-align: left;
    width: 63%;
    margin: 10px auto;
}

.photo {
    margin: 10px;
    width: 200px;
    height: 250px;
    border-radius: 8px;
}

.skills {
    margin: 20px auto;
}

.skill {
    list-style-position: inside;
}

/*     PROJECTS   */
.projects {
    width: 80%;
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    justify-content: space-evenly;
}

.project {
    width: 260px;
    height: 300px;
    margin: 20px auto;
    padding: 1em;
    text-align: center;
    position: relative;
    box-shadow: 0 0 5px var(--primary-color);
    border-radius: 8px;
}

.project:nth-child(1) {
    animation: slide-up 0.2s linear;
}
.project:nth-child(2) {
    animation: slide-up 0.4s linear;
}
.project:nth-child(3) {
    animation: slide-up 0.6s linear;
}
.project:nth-child(4) {
    animation: slide-up 0.8s linear;
}
.project:nth-child(5) {
    animation: slide-up 1s linear;
}
.project:nth-child(6) {
    animation: slide-up 1.2s linear;
}
.project:nth-child(7) {
    animation: slide-up 1.4s linear;
}
.project:nth-child(8) {
    animation: slide-up 1.6s linear;
}

@keyframes slide-up {
    from {
        transform: translateY(500px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.project__img{
    width: 200px;
    height: 200px;
    border-radius: 8px;
    margin-top: 20px;
    transition: transform 0.3s ease;
        box-shadow: 0 0 10px var(--background-color);
}

.card {
    display: none;
    transition: display 1s ease, transform 0.3s;
    width: 200px;
    height: 50px;
    background-color: var(--secondary-color);
    font-size: 15px;
    align-items: center;
    border-bottom-right-radius: 8px ;
    border-bottom-left-radius: 8px ;
}

.card__btn {
    height: 30px;
    width: 80px;
    align-content: center;
    text-align: center;
}

.project:hover {
    .project__img {
        transform: scale(1.2);
        box-shadow: 0 0 3px var(--primary-color);
    }
    .card {
        display: flex;
        justify-content: space-around;
        position: absolute;
        bottom: 10.8px;
        left: 30px;
        transform: scale(1.2);
    }
}

#card__qr {
    display: none;
}

#card__qr:target { 
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.link__qr {
    position: absolute;
    top: 25px;
    right: 8px;
    color: #fa9769;
    background-color: rgba(0, 0, 0, 0.1);
    width: 33px;
    height: 33px;
    padding: 3px;
    border-radius: 3px;
}

.fa-qrcode {
    font-size: 28px;
}

.link__qr:hover {
    transform: scale(1.2);
}

.img__qr {
    width: 300px;
    border-radius: 15px;
}

.close {
    width: 50px;
    height: 30px;
    background-color: white;
}

/*     FORM    */
.form {
    margin: 0 auto;
    width: 400px;
    padding: 1em;
    border: 1px solid var(--font-color);
    border-radius: 1em;
    text-align: end;
}

.form__label {
    display: inline-block;
    width: 90px;
    text-align: right;
}

.form__input {
    font-size: 1em;
    width: 300px;
    border: 1px solid #999;
}

.form__input:hover {
    border-color: var(--primary-color);
}

.form__btn {
    font-size: 1em;
    font-weight: bold;
    width: 300px;
    border: 1px solid #999;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-shadow: 2px 2px 2px var(--font-color);
}

/*    FOOTER   */
.footer {
    margin-top: auto;
}
.networks {
    display: inline-flex;
    font-size: 20px;
    gap: 20px;
}

.net {
    text-decoration: none;
    color: var(--alternate-color);
}

.net:hover {
    text-decoration: underline;
}


/*             MEDIA QUERIES         */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
    .projects {
        column-gap: 1em;
    }
}

@media (max-width: 480px) {
    .section__content{
        flex-direction: column;
    }
    .photo {
        margin: auto;
    }
    .section__text {
        width: 100%;
    }
    .projects {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 1em;
    }
    .project {
        margin: auto;
    }
    .form, .form__input, .form__btn {
        width: 100%;
    }
}

/*       SECONDARY FONT      */
@font-face {
    font-family: 'Sequel';
    src: url(../fonts/Sequel.ttf) format(truetype);
    font-weight: normal;
}
