/* --------------------------------------- */
/* ----- Basic Setup ----- */
/* --------------------------------------- */

@font-face {
    font-family: 'Hk Grotesk';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/HKGrotesk-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/Jost-Regular.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

:root {
    --font-size-small: 1.8rem;
    --font-size-normal: 2.2rem;
    --font-size-medium: 2.8rem;
    --font-size-medium-1: 3.6rem;
    --font-size-large: 5.5rem;
    --font-size-huge: 7.5rem;

    --font-stack: 'Hk Grotesk', sans-serif;

    --line-height-normal: 1.7;
    --line-height-small: 1.2;

    --black: #0a0a0a;
    --pink: #ff3258;
    --white: #f0e9f2;
    --white-1: #e5e5e6da;

    --container-max-width: 1180px;
    --container-normal-width: 800px;
    --container-medium-width: 700px;
    --container-small-width: 500px;

    --gutter-huge: 12rem;
    --gutter-medium: 6rem;
    --gutter-normal: 3rem;
    --gutter-small-1: 2.5rem;
    --gutter-small: 2rem;

    --border-light: 1px solid rgb(36, 35, 35);
}

html {
    font-size: 62.5%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@media (max-width: 1000px) {
    html {
        font-size: 52%;
    }
}

body {
    font-size: var(--font-size-small);
    font-family: var(--font-stack);
    font-weight: 400;
    color: var(--white-1);
    line-height: var(--line-height-normal);
    background: var(--black);
    overflow-x: hidden;
}

.row {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media (max-width: 1240px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media (max-width: 600px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

section {
    padding: var(--gutter-huge) 0;
    border-bottom: var(--border-light);
}

img {
    object-fit: contain;
    max-width: 100%;
}

/* --------------------------------------- */
/* ----- Headlines ----- */
/* --------------------------------------- */

h1,
h2,
h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    line-height: var(--line-height-small);
    color: var(--white);
}

.heading-primary {
    line-height: 1;
    font-size: var(--font-size-huge);
}

h2 {
    font-size: var(--font-size-large);
    margin-bottom: var(--gutter-medium);
}

h2::after {
    content: '';
    display: block;
    height: 2px;
    width: 10rem;
    background: var(--pink);
    margin: var(--gutter-small) 0;
}

h3 {
    font-size: var(--font-size-medium-1);
    margin-bottom: var(--gutter-small);
}

p {
    margin: var(--gutter-small-1) 0;
}

/* --------------------------------------- */
/* ----- Buttons ----- */
/* --------------------------------------- */

a {
    color: var(--white);
    font-family: 'Jost', sans-serif;
    transition: .2s;
}

.link:hover {
    color: var(--pink);
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1rem 4.2rem;
    border: 1px solid var(--pink);
    text-decoration: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: .2s;
}

.btn:hover::after {
    right: 0;
    background: var(--pink);
}

.btn--pink {
    background: var(--pink);
}

.btn--pink:hover {
    background: transparent;
}

/* --------------------------------------- */
/* ----- Navigation ----- */
/* --------------------------------------- */

.nav {
    display: flex;
    justify-content: flex-end;
    padding: var(--gutter-normal) 0;
}

.nav__items {
    display: flex;
    list-style: none;
}

.nav__item:not(:last-child) {
    margin-right: var(--gutter-medium);
}

.nav__link {
    position: relative;
    padding: 1rem 0;
    text-decoration: none;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    height: 2px;
    background: var(--pink);
    transition: .25s;
}

.nav__link:hover::after {
    right: 0;
}

/* --------------------------------------- */
/* ----- Header ----- */
/* --------------------------------------- */

.header {
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .4)), url('./images/header.jpg');
    height: 100vh;
    background-size: cover;
    background-position: center;
}

.header__text-box {
    height: 100vh;
    display: flex;
    align-items: center;
}

.header__text p {
    margin: 2rem 0 4rem;
    font-family: 'Jost', sans-serif;
    font-size: var(--font-size-medium);
}

#typing {
    display: block;
    min-height: 3rem;
}

#typing::after {
    content: "|";
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* --------------------------------------- */
/* ----- Work ----- */
/* --------------------------------------- */

.work__box {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.work__box:not(:last-child) {
    margin-bottom: 20rem;
}

@media (max-width: 900px) {
    .work__box {
        flex-direction: column-reverse;
    }
}

.work__text {
    flex: 0 0 30%;
}

.nature-prototype .work__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work__list {
    list-style-position: inside;
    margin-bottom: var(--gutter-normal);
}

.work__links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.link__text {
    position: relative;
    padding: .6rem;
    font-size: 1.6rem;
    text-decoration: none;
}

.link__text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--pink);
    transition: .3s;
}

.link__text:hover {
    color: var(--pink);
}

.link__text:hover::after {
    width: 100%;
}

.work__code {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.work__image {
    display: block;
    max-width: 100%;
    height: auto;
    transition: transform .4s ease;
    margin-left: auto;
    margin-right: auto;
}

.work__image:hover {
    transform: scale(1.03);
}

.work__image-box {
    position: relative;
    max-width: 600px;
    margin-bottom: var(--gutter-normal);
}

.work__video,
#project-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.5s ease;
}

.work__video {
    display: none;
    margin-top: 0.5rem;
}

.switch-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 901px) {
    .work__image-box {
        flex: 1;
        margin-left: 6rem;
    }
}

/* Nature Conservancy / Figma embed fix */
.nature-prototype .work__image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.nature-prototype iframe {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* --------------------------------------- */
/* ----- About ----- */
/* --------------------------------------- */

.about__content {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

@media (max-width: 900px) {
    .about__content {
        flex-direction: column-reverse;
    }
}

.about__photo-container {
    margin-bottom: var(--gutter-normal);
}

@media (min-width: 901px) {
    .about__text {
        flex: 0 0 35%;
    }

    .about__photo-container {
        flex: 1;
        margin-right: var(--gutter-huge);
    }
}

.about__text p {
    margin-bottom: 1.8rem;
    line-height: 1.8;
}

/* --------------------------------------- */
/* ----- Contact ----- */
/* --------------------------------------- */

.contact__info {
    max-width: var(--container-medium-width);
}

/* --------------------------------------- */
/* ----- Footer ----- */
/* --------------------------------------- */

.footer {
    text-align: center;
    padding: var(--gutter-medium) 0 var(--gutter-normal);
}

.footer__social-links {
    display: flex;
    justify-content: center;
    padding: var(--gutter-normal) 0;
    list-style: none;
}

.footer__social-link-item:not(:last-child) {
    margin-right: var(--gutter-small);
}

.footer__social-image {
    height: 4rem;
}

.footer__github-buttons {
    display: flex;
    justify-content: center;
}

.footer__github-buttons iframe {
    height: 2.5rem;
    width: 84px;
}

/* --------------------------------------- */
/* ----- Back To Top ----- */
/* --------------------------------------- */

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5.5rem;
    width: 5.5rem;
    background: var(--pink);
    border-radius: 50%;
    visibility: hidden;
}

.back-to-top__image {
    height: 70%;
}

/* --------------------------------------- */
/* ----- Teaching / Mentorship ----- */
/* --------------------------------------- */

.teaching__content {
    max-width: var(--container-normal-width);
}

.teaching__text ul {
    list-style-position: inside;
    margin: var(--gutter-small) 0 var(--gutter-normal);
}

.teaching__video {
    margin: var(--gutter-medium) auto;
    max-width: 720px;
}

.teaching__video iframe {
    width: 100%;
    height: 405px;
    border-radius: 8px;
    border: none;
}

@media (max-width: 900px) {
    .teaching__video iframe {
        height: 300px;
    }
}

@media (max-width: 500px) {
    .teaching__video iframe {
        height: 220px;
    }
}