:root {
    --border-radius: 0.5rem;
}

/* Typography */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wordmark {
    width: min(65dvw, 500px);
    aspect-ratio: 7/2;
    mask: url("/assets/misc/wordmark-clean.svg") no-repeat center / contain;
    -webkit-mask: url("/assets/misc/wordmark-clean.svg") no-repeat center /
        contain;
    background-color: var(--primary-clr);
    margin-block-end: var(--grid-gutter);
}

.section-title {
    color: var(--accent-clr);
}

.section-title {
    color: var(--accent-clr);
}

.italic {
    font-family: junicode, serif;
    /*font-style: italic;*/
}
/* Links */

.underline-link {
    color: var(--primary-clr);
    position: relative;
    width: fit-content;
}

.underline-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.1em;
    background-color: var(--primary-clr);
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
    transition:
        opacity 300ms,
        transform 300ms;
    pointer-events: none;
}

.underline-link:hover::before,
.underline-link:focus::before {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.external-link svg {
    width: 1.25em;
    height: 1.25em;
    transition: rotate 0.25s ease-in-out;
    vertical-align: bottom;
}

.external-link:hover svg {
    rotate: 45deg;
}

/* Layout */
.wrapper {
    width: 100%;
    justify-content: center;
    flex: 1;
    background-color: var(--bg-clr);
    gap: 1rem;
    z-index: 1;
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 80px));
}

.wrapper:has(.about-wrapper) {
    margin-inline: auto;
    padding-bottom: 5rem;
}

.transition-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    pointer-events: none;
}

.project,
.about-wrapper,
.projects-wrapper,
.misc-wrapper {
    grid-column: 2 / 12;
}

@media (min-width: 1000px) {
    /*.project,
    .projects-wrapper,
    .about-wrapper,
    .misc-wrapper */ {
        grid-column: 3 / 11;
    }
}

.projects-wrapper {
    padding-block: 15vh 6rem;
}

.misc-wrapper {
    padding-block: 6rem 15rem;
}

.hero-wrapper {
    width: 100%;
    height: 70vh;
    background-color: var(--bg-clr);
    color: var(--text-clr);
    display: flex;
    justify-content: center;
    align-items: end;
    z-index: 1;
}

.project-cato-heading {
    padding-bottom: 1rem;
    position: sticky;
    top: 4rem;
}

/* ==== Navbar styles ==== */

.nav {
    width: 100%;
    padding-block: 1rem;
    position: fixed;
    background-color: var(--bg-clr);
    top: 0;
    z-index: 20;
    opacity: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    grid-column: 1 / 13;
    padding-inline: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-clr);
    transition: color 0.2s ease-in;
    font-weight: 900;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-clr);
}

@media (max-width: 500px) {
    .nav ul {
        grid-column: 2 / 12;
        padding: 0;
    }
}

/* ==== HERO SECTION LAYOUT ==== */

/* HERO TITLE */
.hero-title {
    font-size: 8rem;
    line-height: 0.8;
    padding-bottom: 1.5rem;
    z-index: 1;
    text-align: center;
    color: var(--primary-clr);
}

@media (max-width: 800px) {
    .hero-title {
        font-size: 20vw;
    }
}

.role {
    margin: 0.5rem;
}

.me {
    object-fit: cover;
    max-height: 30vh;
    max-width: 30dvw;
    aspect-ratio: 6/8;
    box-shadow:
        rgba(0, 0, 0, 0.12) 0px 1px 3px,
        rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

@media (max-width: 500px) {
    .me {
        max-height: 45vh;
        max-width: 45dvw;
    }

    .projects-wrapper {
        padding-block: 10vh 6rem;
    }
}

#hero-motion {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* project cards */

.project-card {
    position: sticky;
    top: var(--top-offset, 8rem); /* Fall back to 9rem if no top is set */
    background: var(--bg-clr);
    border-radius: var(--border-radius);
}

.card-label {
    position: relative;
    z-index: -1;
}

@media (min-width: 600px) {
    .card-label {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
    }
}

.scope {
    margin: 0;
}

.card-label .scope {
    font-size: 1.35rem;
}

.project-card:not(:first-of-type) {
    margin-top: 15rem;
}

.cover {
    position: relative;
    display: block;
}

.project-card .cover-image {
    width: 100%;
    height: 65dvh;
    object-fit: cover;
    aspect-ratio: 3/2;
    border-radius: var(--border-radius);
}

@media (max-width: 650px) {
    .project-card .cover-image {
        max-height: 40vh;
    }
}

/* Misc Elements */
.arrow,
.broken-heart {
    height: 12vh;
}

/* About Section */
.about {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.about-image {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: block;
    justify-self: center;
    order: 1;
}

.about-copy,
.about-cta {
    grid-column: 1 / 2;
}

/* Responsive About Section */
@media (max-width: 850px) {
    .about {
        grid-template-columns: 1fr;
    }

    .left-section,
    .right-section,
    .about-image,
    .about-copy,
    .about-cta {
        grid-column: 1 / 2;
    }
}

@media (max-width: 500px) {
    .about-image {
        justify-self: unset;
    }
}
/* ==== Footer styles ====*/

footer {
    bottom: 0;
    background-color: var(--bg-clr);
    padding-inline: var(--grid-gutter);
    padding-bottom: var(--grid-gutter);
    height: 50dvh;
    position: sticky;
}

.footer-box {
    position: relative;
    padding: var(--grid-gutter);
    grid-column: 1/13;
    border-radius: var(--border-radius);
    color: var(--text-clr);
    background-color: var(--bg-clr);
    align-items: end;
}

.footer-logo {
    color: var(--accent-clr);
    font-size: 8rem;
    line-height: 0.8;
}

.footer-box .wordmark {
    mask: url("/assets/misc/wordmark-clean.svg") no-repeat center / contain;
    -webkit-mask: url("/assets/misc/wordmark-clean.svg") no-repeat center /
        contain;
    background-color: var(--primary-clr);
    position: absolute;
    width: 100%;
    grid-column: 1/9;
    margin: 0;
}

.footer-text {
    grid-column: 9/13;
    display: flex;
    flex-direction: column;
    gap: calc(var(--grid-gutter) / 2);
    z-index: 1;
}

/* stats */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--grid-gutter);
    justify-content: space-between;
    align-items: baseline;
    padding-block: var(--grid-gutter);
}

.stat {
    flex: 1 0 140px;
}

#local-time,
#visitors {
    color: var(--text-clr);
    font-weight: 900;
}

.copyright,
.stat p,
.bye {
    margin: 0;
}

.bye {
    font-weight: 900;
}

@media (max-width: 850px) {
    .footer-logo {
        order: 1;
        font-size: 20vw;
    }

    .footer-box .wordmark {
        /*order: 1;*/
        grid-column: 1/13;
    }

    .footer-text {
        grid-column: 1/13;
    }

    .copyright {
        padding-top: calc(6dvw * 3);
    }
}

/* ==== video embeds styles ==== */

.video-wrapper {
    width: 100%;
    padding: 56.25% 0 0 0;
    position: relative;
    background: #000;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--border-radius);
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0;
    top: 0;
    left: 0;
}
