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

/* Custom Properties */

:root {
    --ff-primary: 'Source Sans Pro', sans-serif;
    --ff-secondary: 'Source Code Pro', monospace;

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

    --clr-light: #F5F3F5;
    --clr-dark: #302B27;
    --clr-accent: #129490;

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

    --bs: 0.25em 0.25em 0.75em rgba(0,0,0,.25), 0.125em 0.125em 0.25em rgba(0,0,0,.15);
}

@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-light);
    color: var(--clr-dark);
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
}

section {
    padding: 5em 2em;
    scroll-margin-top: 90px;
}

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

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

:focus {
    outline: 3px solid var(--clr-accent);
    outline-offset: 3px;
}

/* Buttons */

.btn {
    display: inline-block;
    padding: .5em 2.5em;
    background: var(--clr-accent);
    color: var(--clr-dark);
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: var(--fw-bold);
    transition: transform 200ms ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
}


/* 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: .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:.25em 1em;
    font-family: var(--ff-secondary);
    margin-bottom: 1em;
}


/* Header */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25em;
    padding: 1em;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Text logo */
.site-logo {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: #f5f5f5;
    white-space: nowrap;
}

.site-logo .accent,
.site-logo span {
    color: #4fd1c5;
}

.site-logo:hover {
    opacity: 0.9;
}

/* Top navigation (no hamburger) */
.nav {
    position: static;
    transform: none;
    transition: none;
    background: transparent;
    color: var(--clr-light);
    width: auto;
    height: auto;
    z-index: auto;
}

.nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25em;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: #f5f5f5;
    font-weight: var(--fw-bold);
    font-size: 1rem;
    text-decoration: none;
}

.nav__link:hover {
    color: var(--clr-accent);
}

/* Remove hamburger/toggle completely */
.nav-toggle {
    display: none !important;
}

.nav__list {
  flex-wrap: wrap;
  row-gap: 0.5em;
}

/* Intro Section */

.intro {
    position: relative;
}

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

    .intro__img {
        grid-area: img;
        min-width: 300px;
        min-height: 210px;
        position: relative;
        left: 3em;
        z-index: 2;
    }

    .section__subtitle--intro{
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        margin-left: 2.5em;
    }
}

/* My sevices section */

.my-services {
    background-color: var(--clr-dark);
    background-image: url(../images/my_services_background_img.jpg);
    background-size: cover;
    background-blend-mode: multiply;
    color: var(--clr-light);
    text-align: center;
}

.section__title--services {
    color: var(--clr-accent);
    position: relative;
}

.section__title--services::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: 0.5em auto 0.5em;
    background: var(--clr-light);
    opacity: 0.25;
}

.services {
    margin-bottom: 4em;
}

.service {
    max-width: 500px;
    margin: 0 auto;
}

.services-intro {
  max-width: 60ch;
  margin: 0 auto 2em;
  text-align: center;
}

.service p {
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}

.service h3 {
  text-align: center;
}


@media (min-width: 800px) {
    .services {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .service + .service {
        margin-left: 2em;
    }
}

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

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

@media (min-width: 600px) {
    .about-me {
        display: grid;
        grid-template-columns: 1fr 200px;
        grid-template-areas: 
            "title img"
            "subtitle img"
            "text img";
        grid-column-gap: 2em;
    }
    
    .section__title--about {
        grid-area: title;
    }

    .section__subtitle--about {
        grid-column: 1 / -1;
        grid-row: 2;
        position: relative;
        left: -1em;
        width: calc(100% + 3em);
        padding-left: 1em;
        padding-right: calc(200px + 6.5em);
    }
    
    .about-me__img {
        grid-area: img;
        position: relative;
        z-index: 2;
    }
}

/* My work */

.my-work {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;
}

.section__title--work::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: .4em auto 0;
    background: var(--clr-light);
    opacity: 0.5;
}

.section__subtitle--work {
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
    text-align: center;
    padding-bottom: .4em;
}

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

.portfolio__item {
    background: var(--clr-dark);
    overflow: hidden;
    padding: 10px;
}

.portfolio__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: 
    transform 750ms cubic-bezier(.5, 0, .5, 1),
    opacity 250ms linear;
    border-radius: 2em;
    border: none;
}

.portfolio__item:focus {
    position: relative;
    z-index: 2;
}

.portfolio a {
    text-decoration: none;
    color: var(--clr-light);
}

.portfolio a:hover,
.portfolio__item:focus a {
    text-decoration: none;
    color: var(--clr-light);
    transform: scale(.9);
    opacity: .75;
}

.portfolio h3 {
    padding: .6em;
}

/* Projects*/

.projects__grid {
  max-width: 1100px;
  margin: 0 auto;
}

.projects__heading {
    margin: 1.5em 0 .75em;
    font-size: calc(var(--fs-h3) * 1.15);
    position: relative;
}


.projects__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75em;
    margin: 1.25em 0 0.75em;
}

.projects__filter {
    border: 2px solid var(--clr-light);
    background: transparent;
    color: var(--clr-light);
    padding: .55em 1.1em;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--ff-secondary);
    letter-spacing: 1px;
    transition: transform 150ms ease-in-out, background-color 150ms ease-in-out;
}

.projects__filter:hover {
    transform: translateY(-2px);
}

.projects__filter.is-active {
    background: var(--clr-accent);
    color: var(--clr-dark);
    border-color: var(--clr-accent);
}

.projects__card {
    padding: 10px;
}

.projects__thumb {
  position: relative;
  border-radius: 2em;
  overflow: hidden;
  margin-bottom: .75em;
  background: var(--clr-dark);
}

.projects__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--clr-light);
  border-radius: inherit;
  pointer-events: none;
}

/* Come back to this after all project thumbnails have been updated.
.projects__thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.projects__img {
  position: relative;
  z-index: 0;
}
*/

.projects__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: 0;
}

.projects__impact {
    margin: .5em auto .75em;
    max-width: 42ch;
    color: var(--clr-light);
    opacity: .9;
}

.projects__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5em;
    margin: 0 0 .75em;
}

.projects__chip {
    display: inline-block;
    border: 1px solid rgba(245, 243, 245, 0.6);
    border-radius: 999px;
    padding: .25em .7em;
    font-size: .85rem;
    color: var(--clr-light);
    opacity: .95;
}

.projects__links {
    display: flex;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
    margin-bottom: .75em;
}

.projects__links a {
    color: var(--clr-light);
    text-decoration: none;
    border-bottom: 2px solid rgba(245, 243, 245, 0.35);
    padding-bottom: 2px;
    font-weight: var(--fw-bold);
}

.projects__links a:hover {
    border-bottom-color: var(--clr-accent);
}

.projects__how {
    margin-top: 2em;
    border-top: 1px solid rgba(245, 243, 245, 0.25);
    padding-top: 1.25em;
}

.projects__how-list {
    display: inline-block;
    text-align: left;
    margin: 0;
    padding-left: 1.25em;
    line-height: 1.8;
}

.projects__divider {
  width: min(900px, 90%);
  height: 1px;
  margin: 2.25em auto 2em;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 243, 245, 0.35),
    transparent
  );
}

.projects__card-link {
  display: block;
  border-radius: 2em;
  overflow: hidden;
}

.projects__card-link:focus {
  outline: none;
}

.projects__card-link:focus-visible .projects__thumb::after {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent);
}

/* Resume */

.my-resume {
    text-align: center;
}

.section__title--resume::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: .8em auto 1em;
    background: var(--clr-dark);
    opacity: 0.5;
}

.resume {
    display: flex;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--bs);
}

/* 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: .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 .5em;
}

.social-list__link {
    padding: .5em;
}
