*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Properties */
:root {
    --ff-primary: "Source Sans Pro", sans-serif;
    --ff-secondary: "Source Code Pro", monospace;

    --fw-reg: 300;
    --fw-bold: 900;

    --clr-dark: #121212;
    --clr-light: #ffff;
    --clr-accent: #16e0bd;

    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;

    --bs: 0.25 em 0.25em 0.75em rgba(0, 0, 0, 0.25);
}

@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3.75rem;
        --fs-h3: 1.5rem;
        --fs-body: 1.125rem;
    }
}

/* General Styles */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--clr-dark);
    color: var(--clr-light);
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
}

section {
    padding: 5em 2em;
}

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

strong {
    font-weight: var(--fw-bold);
}

/* Typography */

h1,
h2,
h3 {
    line-height: 1;
    margin: 0;
}

h1 {
    font-size: var(--fs-h1);
}
h2 {
    font-size: var(--fs-h2);
}
h3 {
    font-size: var(--fs-h3);
}

.section__title {
    margin-bottom: 0.25em;
}

.section__title--intro {
    font-weight: var(--fw-reg);
}

.section__title--intro strong {
    display: block;
}

.section__subtitle {
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
    background: var(--clr-accent);
    padding: 0.25em 1em;
    font-family: var(--ff-secondary);
    margin-bottom: 1em;
}

.section__subtitle--work {
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
    margin-bottom: 2em;
}

/* Header */

header {
    position: sticky;
    top: 0;
    z-index: 3;
}

.header__wrapper {
    height: 9vh;
    display: flex;
    justify-content: space-between;
    background-color: #1d1d1d;
}

.nav__list {
    list-style: none;
    margin-top: 4px;
}

.nav__item {
    display: inline-block;
    margin-top: 1em;
    padding: 0 20px;
}

.nav__link {
    text-decoration: none;
    transition: all 0.3s ease 0s;
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
}

.nav__link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Intro section */

.intro {
    position: relative;
}

.intro__img {
    box-shadow: var(--bs);
}

.section__subtitle--intro {
    display: inline-block;
}

@media (min-width: 600px) {
    .intro {
        display: grid;
        width: min-content;
        margin: 0 auto;
        column-gap: 1em;
        grid-template-areas:
            "img title"
            "img subtitle";
        grid-template-columns: min-content max-content;
    }

    .intro__img {
        grid-area: img;
        min-width: 250px;
        position: relative;
        z-index: 2;
    }

    .section__subtitle--intro {
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        left: -1.5em;
        width: calc(100% + 1.5em);
    }
}

.about-me {
    max-width: 1000px;
    margin: auto;
}

.skills {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    justify-items: center;
    text-align: center;
}

.skill-1 {
    justify-self: start;
}

.skill-2 {
    justify-self: center;
}

.skill-3 {
    justify-self: end;
}

.skill-4 {
    justify-self: start;
}

.skill-5 {
    justify-self: center;
}

.skill-6 {
    justify-self: end;
}

.skill-6 i {
    font-size: 5em;
}

/* My Work */

.my-work {
    background-color: #1d1d1d;
    color: #fff;
    text-align: center;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.portfolio__img {
    transition: transform 750ms cubic-bezier(0.5, 0, 0.5, 1),
        opacity 250ms linear;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio__link {
    font-size: 2rem;
    color: #fff;
}

.hoverwrap {
    position: relative;
    overflow: hidden;
    background: var(--clr-accent);
    height: 400px;
}

.hovercap {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    text-align: center;
    padding-top: 30%;
    visibility: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.hoverwrap:hover .portfolio__img {
    transform: scale(1.2);
    opacity: 0.25;
}

.hoverwrap:hover .hovercap {
    visibility: visible;
    opacity: 1;
}

/* Footer */

.footer {
    background: #111;
    color: var(--clr-accent);
    text-align: center;
    padding: 2.5em 0;
    font-size: var(--fs-h3);
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer__link {
    font-weight: var(--fw-bold);
}

.footer__link:hover,
.social-list__link:hover {
    opacity: 0.7;
}

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

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 2em 0 0;
    padding: 0;
}

.social-list__item {
    margin: 0 0.5em;
}

.social-list__link {
    padding: 0.5em;
    font-size: 2rem;
}
