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

/* CSS Custom Properties */
:root {
    --background-0: #2b2b2b;
    --background-1: #333333;
    --background-hero: #f0f0f0;
    --background-card: #424242;
    --text-white: #eee;
    --text-grey-0: #252525;
    --text-grey-1: #cacaca;
    --primary: #daa425;
    --secondary: #00b0ef;
    --scroll-thumb: #6d6d6d;
    --scroll-thumb-h: #929292;
    --header-height: 80px;
}

/* Boilerplate */

html {
    font-size: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}
body {
    color: var(--text-white);
    font-family: "Mulish", sans-serif;
    font-size: 1rem; /* 16px */
    font-weight: 500;
}
a,
a:visited,
a:active {
    text-decoration: none;
}
li {
    list-style: none;
}

/* Globals */

h2 {
    font-size: 1.875rem; /* 30px */
}
.container {
    width: 90%;
    margin: 0 auto;
    display: grid;
}
.heading {
    margin: 70px auto 30px;
    padding: 0 30px 20px;
    border-bottom: 1px solid var(--primary);
}
.content {
    justify-self: center;
    margin-bottom: 70px;
}
.icon {
    color: var(--text-white);
    font-size: 1.4rem;
    transition: color 150ms ease-in-out;
}
.icon:hover {
    color: var(--primary);
}
.link {
    color: var(--text-white);
    transition: color 150ms ease-in-out;
}
.link:hover {
    color: var(--primary);
}
.link-u {
    color: var(--primary);
    font-weight: 600;
}
.link-u:hover {
    text-decoration: underline;
    cursor: pointer;
}
.open-modal {
    background: none;
    border: none;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}
.btn {
    background: none;
    padding: 7px 8px;
    font-weight: 700;
    transition: all 150ms ease-in-out;
}
.btn-primary {
    color: var(--text-white);
    border: 2px solid var(--primary);
}
.btn-primary:hover {
    background: var(--primary);
    color: var(--background-0);
}
.btn-grey {
    color: var(--text-grey-0);
    border: 2px solid var(--text-grey-0);
}
.btn-grey:hover {
    background: var(--text-grey-0);
    color: var(--text-white);
}
.chevron {
    position: absolute;
    bottom: 0;
    font-size: 3rem; /* 48px */
}
@media all and (min-width: 500px) {
    h2 {
        font-size: 2.5rem; /* 40px */
    }
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--background-0);
}
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-h);
}

/* Selection color */

::-moz-selection {
    color: var(--text-grey-0);
    background: var(--primary);
}

::selection {
    color: var(--text-grey-0);
    background: var(--primary);
}

/* Header */

header {
    background: var(--background-0);
}
header .skip-link {
    background: var(--primary);
    color: var(--background-0);
    position: absolute;
    padding: 15px 20px;
    font-weight: 600;
    border: 2px solid var(--background-0);
    transform: translateY(-100%);
    transition: transform 0.3s;
}
.skip-link:focus {
    transform: translateY(0%);
}
header nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(var(--header-height), auto);
    align-items: center;
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
}
header .logo {
    justify-self: start;
}
header .logo img {
    display: block;
    max-width: 55px;
}
header ul {
    padding: 0 15px 8px 0;
    grid-row: 2;
    display: none;
    flex-direction: column;
}
header li {
    padding: 3px 0;
}
header nav > div {
    display: none;
    gap: 7px;
    grid-row: 2;
    justify-self: end;
}
header .hamburger {
    justify-self: end;
    color: var(--text-white);
    font-size: 1.75rem; /* 28px */
    transition: color 150ms ease-in-out;
}
header .hamburger:hover {
    color: var(--primary);
}
header .open {
    display: flex;
}
@media all and (min-width: 700px) {
    header nav {
        grid-template-columns: 1fr 2fr 1fr;
    }
    header ul {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 50px;
        padding-bottom: 0;
    }
    header li {
        padding: 0;
    }
    header nav > div {
        display: flex;
        grid-row: 1;
        grid-column: 3;
    }
    header .hamburger {
        display: none;
    }
}

/* Hero section */

.hero {
    min-height: calc(100vh - var(--header-height));
    background: var(--background-hero);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    color: var(--text-grey-0);
    position: relative;
    display: grid;
    align-items: center;
    font-size: 1.0625rem; /* 17px */
    text-align: center;
}
.hero .content {
    padding-bottom: 30px;
    margin-bottom: 30px;
}
.hero h1 {
    margin-bottom: 12px;
    font-size: 3.5rem; /* 56px */
    font-weight: 400;
    line-height: 1;
}
.hero p {
    max-width: 29.375rem; /* 470px */
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
    line-height: 1.3;
}
.hero p span {
    font-weight: 900;
}
.hero a {
    justify-self: center;
}
.hero .chevron {
    margin-bottom: 30px;
}
@media all and (min-width: 500px) {
    .hero {
        font-size: 1.25rem; /* 20px */
    }
    .hero h1 {
        margin-bottom: 7px;
        font-size: 4.25rem; /* 68px */
    }
}
@media all and (min-width: 900px) {
    .hero .content {
        padding: 0 50px 30px;
    }
    .hero h1 {
        font-size: 4.75rem; /* 76px */
    }
}

/* Portfolio section */

.portfolio {
    min-height: 800px;
    background: var(--background-1);
    text-align: center;
}
.portfolio .cards {
    margin: 20px 0 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 60px;
}
.portfolio .card {
    margin: 0 auto;
    max-width: 500px;
    background: var(--background-card);
    box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    overflow: hidden;
}
.portfolio .card:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px 5px rgba(0, 0, 0, 0.3);
}
.portfolio img {
    width: 100%;
    transition: 0.6s;
}
.portfolio img:hover {
    transform: scale(1.01);
    cursor: pointer;
}
.portfolio .placeholder {
    height: 250px;
    background: var(--background-0);
}
.portfolio .card-text {
    padding: 10px 35px 25px;
}
.portfolio .card-text h3 {
    margin-bottom: 10px;
    cursor: pointer;
}
.portfolio p {
    margin-bottom: 15px;
    text-align: justify;
}
@media all and (min-width: 1150px) {
    .portfolio .cards {
        margin: 60px 0;
        flex-direction: row;
    }
    .portfolio .card {
        margin: 0;
    }
}

/* Portfolio modals */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}
.modal-container {
    background-color: var(--background-1);
    color: var(--text-white);
    margin: 5% auto;
    padding: 20px 20px;
    border: 1px solid var(--text-white);
    max-width: 820px;
    line-height: 1.5;
}
.modal-heading {
    display: grid;
    grid-template-columns: 0.5fr 2fr 0.5fr;
    align-items: center;
    margin-bottom: 20px;
}
.modal h3 {
    justify-self: center;
    grid-column: 2;
    padding: 0 12px 8px;
    border-bottom: 1px solid var(--primary);
    font-size: 1.375rem; /* 22px */
}
.modal .close {
    justify-self: end;
    font-size: 1.75rem; /* 28px */
    font-weight: bold;
    cursor: pointer;
}
.modal li {
    margin-left: 48px;
    list-style: disc;
    text-align: start;
}
.modal-links {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
}
.modal-images {
    display: grid;
    margin: 0 auto;
    width: 90%;
    border-bottom: 1px solid var(--primary);
}
.modal-images a {
    margin-bottom: 20px;
    border: 1px solid var(--text-white);
}
.modal-images img {
    display: block;
}
@media all and (min-width: 500px) {
    .modal-container {
        padding: 20px 50px 30px;
    }
}

/* About section */

.about {
    min-height: 800px;
    background: var(--background-0);
}
.about .content {
    max-width: 720px;
}
.about p {
    margin-bottom: 10px;
    padding: 0 25px;
    line-height: 1.6;
    text-align: justify;
}
.about h3 {
    text-align: center;
    margin: 30px 0 10px;
}
.about .skills {
    margin-bottom: 40px;
    display: grid;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
}
.about .skills li {
    padding: 5px 0;
    text-align: center;
}
@media all and (min-width: 500px) {
    .about .skills li {
        padding: 10px 20px;
    }
    .about .skills {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Contact section */

.contact {
    min-height: 800px;
    background: var(--background-1);
    position: relative;
    text-align: center;
    line-height: 1.3;
}
.contact .content {
    width: 100%;
}
.contact .content p {
    line-height: 1.5;
}
.contact form {
    display: grid;
    margin: 15px 0;
}
.contact label {
    margin-bottom: 5px;
    text-align: start;
}
.contact input,
.contact textarea {
    width: 100%;
    background: var(--background-card);
    color: var(--text-white);
    margin-bottom: 10px;
    padding: 12px;
    border: none;
    font-size: inherit;
    font-family: inherit;
}
.contact textarea {
    min-height: 200px;
}
.contact button {
    justify-self: start;
    padding: 7px 10px 6px;
    cursor: pointer;
}
.contact > a {
    color: var(--text-white);
    transition: color 150ms ease-in-out;
}
.contact > a:hover {
    color: var(--primary);
}
.contact .chevron {
    width: 100%;
    margin-bottom: 10px;
}
.contact .chevron a {
    color: var(--text-white);
    transition: color 150ms ease-in-out;
}
.contact .chevron a:hover {
    color: var(--primary);
}
@media all and (min-width: 500px) {
    .contact .content {
        max-width: 440px;
    }
}
@media all and (min-width: 900px) {
    .contact .content {
        max-width: 480px;
    }
}

/* Footer */

footer {
    background: var(--background-0);
    color: var(--text-grey-1);
    text-align: center;
    font-size: 0.875rem; /* 14px */
}
footer p {
    margin: 35px 0 30px;
}
