@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* definição de variáveis */

:root {
    --white: #f0f0f0;
    --red: #D92A1A;
    --blue: #A69E33;
    --gray: #151826;
}

/* reset básico */

* {
    margin: 0;
    padding: 0;
}

/* box-sizing */

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* tamanho da font */

html {
    box-sizing: border-box;
    /* Set font size for easy rem calculations
     * default document font size = 16px, 1rem = 16px, 100% = 16px
     * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px
    */
    font-size: 62.5%;
    scroll-behavior: smooth;
}

/* 1200px / 16px = 75em */
@media (max-width: 75em) {
    html {
        font-size: 60%;
    }
}

/* 980px / 16px = 61.25em */
@media (max-width: 61.25em) {
    html {
        font-size: 58%;
    }
}

/* 460px / 16px = 28.75em */
@media (max-width: 28.75em) {
    html {
        font-size: 55%;
    }
}

/* estilos básicos */

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--white);
}

h1,
h2 {
    font-family: 'Raleway' sans-serif;
    font-weight: 700;
    text-align: center;
}

h1 {
    font-size: 6rem;
}

h2 {
    font-size: 4.2rem;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--white);
}

img {
    display: block;
    width: 100%;
}

/* configurações de navegação */

.nav {
    display: flex;
    justify-content: flex-end;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--red);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.nav-list {
    display: flex;
    margin-right: 2rem;
}

@media (max-width: 28.75em) {
    .nav {
      justify-content: center;
    }

    .nav-list {
        margin: 0 1rem;
    }
}

.nav-list a {
    display: block;
    font-size: 2.2rem;
    padding: 2rem;
}

.nav-list a:hover {
    background-color: var(--blue);
}

/* seção de boas-vindas */

.welcome {
    background-color: var(--grafite);
    background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome > p {
    font-size: 3rem;
    font-weight: 300;
    color: var(--red);
}

/* seção de projetos */

.projects-section {
    background-color: var(--blue);
    padding: 10rem 2rem;
    text-align: center;
}

.projects-section-header {
    max-width: 800px;
    margin: 0 auto 6rem auto;
}

@media (max-width: 28.75em) {
    .projects-section-header {
      font-size: 4rem;
    }
}

/* grade de imagem "Automagic" sem consultas de mídia */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 4rem;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    margin-bottom: 6rem;
}

@media (max-width: 30.625em) {
    .projects-section {
      padding: 6rem 1rem;
    }

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

.project {
    background-color: var(--gray);
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

.code {
    color: var(--gray);
    transition: color 0.3s ease-out;
}

.project:hover .code {
    color: var(--red);
}

.project-image {
    height: clac(100% - 6.8rem);
    width: 100%;
    object-fit: cover;
}

.project-title {
    font-size: 2rem;
    padding: 0rem 0rem;
    margin: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 2px;
}

.btn-show-all {
    font-size: 2rem;
    background-color: var(--gray);
    transition: background 0.3s ease-out;
}

.btn-show-all:hover {
    background: var(--red);

}

.btn-show-all:hover > i {
    transform: translateX(2px);
    
}

.btn-show-all > i {
    margin-left: 10px;
    transform: translateX(0);
    transition: transform 0.3s ease-out;
}

/* seção de contato */

.contact-section {
    background-color: var(--gray);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 80vh;
    padding: 0 2rem;
}

.contact-section-header > h2 {
    font-size: 6rem;
}

@media (max-width: 28.75em) {
    .contact-section-header > h2 {
      font-size: 4rem;
    }
}

.contact-links {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 980px;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.contact-details {
    font-size: 2.4rem;
    text-shadow: 2px 2px 1px #1f1f1f;
    transition: transform 0.3s ease-out;
}

.contact-details:hover {
    transform: translateY(8px);
}

/* rodapé */

footer {
    background-color: var(--gray);
    font-weight: 300;
    display: flex;
    justify-content: space-evenly;
    padding: 2rem;
    border-top: 4px solid var(--red);
}

footer > p {
    margin: 2rem;
}

footer i {
    vertical-align: middle;
}

@media (max-width: 28.75em) {
    footer {
      flex-direction: column;
      text-align: center;
    }
}