/* ==========================================================================
   Foundation
   CSS variables, reset, base typography, and utility classes.
   ========================================================================== */

:root {
    /* Colors */
    --text-color: #2e2e2e;
    --background-color: #f5f5f5;
    --light-grey: #9B9B9B;
    --dark-bg: #1a1a1a;
    --button-text: #4B4B4B;

    /* Typography */
    --title-fonts: 'Cormorant Infant', Georgia, 'Times New Roman', Times, serif;
    --body-fonts: 'Proza Libre', Georgia, 'Times New Roman', Times, serif;

    /* Animation */
    --animate-delay: 0.5s;
}

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

html>* {
    margin: 0;
    padding: 0;
}

/* --- Base typography --- */

html {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--body-fonts);
    font-size: 16px;
    line-height: 35px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
    min-height: 100dvh; /* Attempting and failing to fill the viewport height */
}

/* Enable ligatures for Cormorant Infant */
h1, h2, h3, h5, .project_stat, .next-pi li *, .logo::before {
    font-variant-ligatures: common-ligatures;
}

a {
    text-decoration: none;
}

/* --- Utility classes --- */

.delay-0 {
    animation-delay: 0s;
}

.delay-1 {
    animation-delay: .1s;
}

.delay-2 {
    animation-delay: .2s;
}

.delay-3 {
    animation-delay: .3s;
}

.delay-4 {
    animation-delay: .4s;
}

.delay-5 {
    animation-delay: .5s;
}

.delay-6 {
    animation-delay: .6s;
}

.delay-7 {
    animation-delay: .7s;
}

.spacer {
    height: 200vh;
    display: block;
    z-index: 1;
    position: relative;
}

/* ==========================================================================
   Layout
   Page-level structure, scroll behavior, overflow.
   ========================================================================== */

body {
    height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: scroll;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    -webkit-scroll-behavior: smooth;
    scroll-behavior: smooth;
}

/* ==========================================================================
   Navigation
   Main nav, mobile drawer, and logo.
   ========================================================================== */

#nav {
    display: grid;
    justify-items: center;
    text-align: center;
    position: fixed;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    top: 0;
    left: 100vw;
    z-index: 98;
    transition: .2s ease-out;
    background-color: var(--text-color);
}

#nav.open {
    left: 0;
    opacity: 1;
    transition: .2s ease-out;
}

nav>* {
    font-size: 1.2em;
    line-height: 1.25em;
    padding: 1em 30px;
    color: var(--background-color);
    fill: var(--background-color);
    position: relative;
}
nav .nav-item svg {
    display: block;
}

.logo::before {
    content: "Home"
}

/* ==========================================================================
   Hamburger menu
   Mobile menu icon and scroll/change states.
   ========================================================================== */

.hamburger_holder {
    top: env(safe-area-inset-top, 0px);
    right: max(env(safe-area-inset-right, 0px), 15px);
    left: auto;
    padding: 5px 15px;
    clear: none;
    position: fixed;
    align-content: center;
    z-index: 99;
    display: inline-flex;
    margin: 0;
}

.hamburger_holder.scroll {
    background-color: var(--background-color);
}

.scroll .bar1, .scroll .bar2, .scroll .bar3 {
    background-color: var(--text-color);
}

.scroll.change .bar1, .scroll.change .bar2, .scroll.change .bar3 {
    background-color: var(--background-color);
}

.hamburger_holder.scroll.change {
    background-color: var(--text-color);
}

.container {
    display: inline-block;
    cursor: pointer;
}

.bar1, .bar2, .bar3 {
    width: 30px;
    height: 1px;
    background-color: var(--background-color);
    margin: 10px 0;
    transition: 0.4s;
}

.change .bar1 {
    transform: rotate(-45deg) translate(-7px, 7px);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: rotate(45deg) translate(-7px, -7px);
}

/* ==========================================================================
   Header / Hero
   Hero section with background image and CTA.
   ========================================================================== */

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.header-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .3);
    background-position: center;
    background-blend-mode: darken;
    background-size: cover;
    animation: fadeIn;
    animation-duration: 2s;
    /* Default: mobile portrait – height-based for sharp cover fill */
    background-image: url(img/patrick_bennett-844h.jpg);
    background-image: image-set(
        url(img/patrick_bennett-844h.webp) type("image/webp"),
        url(img/patrick_bennett-844h.jpg) 1x
    );
}

@media (min-height: 1025px) and (max-width: 640px) {
    .header-bg::before {
        background-image: url(img/patrick_bennett-1024h.jpg);
        background-image: image-set(
            url(img/patrick_bennett-1024h.webp) type("image/webp"),
            url(img/patrick_bennett-1024h.jpg) 1x
        );
    }
}

@media (min-width: 641px) {
    .header-bg::before {
        background-image: url(img/patrick_bennett-1024w.jpg);
        background-image: image-set(
            url(img/patrick_bennett-1024w.webp) type("image/webp"),
            url(img/patrick_bennett-1024w.jpg) 1x
        );
    }
}

@media (min-width: 1025px) {
    .header-bg::before {
        background-image: url(img/patrick_bennett-1920w.jpg);
        background-image: image-set(
            url(img/patrick_bennett-1920w.webp) type("image/webp"),
            url(img/patrick_bennett-1920w.jpg) 1x
        );
    }
}

@media (min-width: 1921px) {
    .header-bg::before {
        background-image: url(img/patrick_bennett-2560w.jpg);
        background-image: image-set(
            url(img/patrick_bennett-2560w.webp) type("image/webp"),
            url(img/patrick_bennett-2560w.jpg) 1x
        );
    }
}

header {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    z-index: -1;
    margin: 0;
}

.header-content {
    bottom: 40vh;
    text-align: left;
    position: absolute;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 20px 1fr 20px;
}

.header-content.pi h1 {
    font-size: 12vw;
}

.header-content>* {
    grid-column: 2 / -2;
    max-width: calc(100vw - 40px);
}

header a {
    position: absolute;
    top: 60vh;
}

header span {
    color: var(--background-color);
    z-index: 10;
    font-size: .75rem;
    position: absolute;
    bottom: 150px;
    opacity: .5;
}

/* ==========================================================================
   Typography
   Heading and label styles.
   ========================================================================== */

h1, h2, h3 {
    font-family: var(--title-fonts);
    width: 100%;
    letter-spacing: -1px;
    font-size: 18vw;
    font-weight: 500;
    margin: 0;
    line-height: 1.05em;
}

h1, h3 {
    color: var(--background-color);
}

h2 {
    margin-bottom: -.25em;
    margin-left: 20px;
}

h5 {
    font-family: var(--title-fonts);
    font-size: 3rem;
    line-height: 3rem;
    font-weight: 400;
    margin: 0;
}

h6 {
    font-size: 1rem;
    line-height: 1rem;
    font-weight: 400;
    margin: 0;
}

label {
    color: var(--background-color);
    font-size: 1.125rem;
    line-height: 1.5rem;
    margin-top: 10px;
}

/* ==========================================================================
   Buttons
   All button variants including outline and contact buttons.
   ========================================================================== */

button {
    background-color: var(--background-color);
    margin-top: 1rem;
    padding: 1em 4.5em;
    border: none;
    border-radius: 0;
    font-size: 1.125rem;
    font-family: var(--body-fonts);
    transition-timing-function: ease-in-out;
    transition-duration: .2s;
}

button:hover {
    color: var(--background-color);
    background-color: var(--text-color);
    border: 1px solid var(--background-color);
}

/* Override mobile Safari's default blue link color on buttons inside anchors */
#contact_top, #contact_bottom {
    color: var(--button-text);
    -webkit-tap-highlight-color: transparent;
}

#contact_top:hover, #contact_bottom:hover {
    color: var(--background-color);
    background-color: var(--text-color);
    border: 1px solid var(--background-color);
}

button.outline {
    background: none;
    border: 1px solid var(--background-color);
    color: var(--background-color);
    width: auto;
    margin: 1rem auto;
    font-size: .9rem;
    display: block;
}

button.outline:hover {
    color: var(--text-color);
    background-color: var(--background-color);
}

button.outline.dark {
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

button.outline.dark:hover {
    color: var(--background-color);
    background-color: var(--text-color);
}

/* ==========================================================================
   Sections
   Section layout and content blocks.
   ========================================================================== */

#experience, #featured, #brands, #approach, #about {
    padding: 150px 0 50px;
}

#approach .section-item,
#experience + #job-list .job_item:first-child,
#brands + section .job_item,
#about .job_item,
#featured .job_item {
    margin-top: 25px;
}

#experience, #featured, #brands, #about {
    transform-style: preserve-3d;
}

section.standard {
    padding: 50px 0 100px;
}

.section-content {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    margin: 0 auto;
    max-width: 940px;
    z-index: 1;
    transform-origin: 0;
    transform: translateZ(6px);
}

.section-content>* {
    grid-column: 2 / -2;
    max-width: calc(100vw - 40px);
}

.section-item,
.job_item {
    max-width: 800px;
    margin: 50px auto 0;
    display: grid;
    grid-template-columns: 20px 1fr 20px;
}

.section-item > *,
.job_item > * {
    grid-column: 2 / -2;
    max-width: calc(100vw - 40px);
}

#approach,
#featured {
    background-color: var(--background-color);
    z-index: 2;
    transform-style: preserve-3d;
}

/* ==========================================================================
   About Me
   Parallax-style intro block.
   ========================================================================== */

#about-me {
    height: 140vh;
    z-index: 0;
    position: relative;
    background-color: var(--background-color);
    margin: 0px auto -7em;
    font-size: 1.25rem;
    line-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(3px) scale(.65);
    color: var(--light-grey);
}

/* ==========================================================================
   Portfolio
   Work/portfolio tiles with background images.
   ========================================================================== */

.portfolio-item {
    height: 80lvh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: none;
    position: relative;
    overflow: hidden;
    background-color: var(--dark-bg);
    user-select: none;
    -webkit-user-select: none;
}

.portfolio-item-bg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.portfolio-item-bg-parallax {
    top: -25%;
    height: 150%;
}

.portfolio-item-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-video-mute-btn {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.portfolio-video-mute-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.portfolio-video-mute-btn .portfolio-mute-icon {
    width: 100%;
    height: 100%;
}

.portfolio-item-bg.active {
    opacity: 1;
}

.portfolio-item-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.portfolio-item-bg.portfolio-audio-hidden::after {
    opacity: 0;
}

.portfolio-item.darker-overlay .portfolio-item-bg::after {
    background-color: rgba(0, 0, 0, 0.65);
}

.portfolio-item.darker-overlay.portfolio-item-no-overlay .portfolio-item-bg.active::after {
    background-color: transparent;
}

.portfolio-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
}

.portfolio-item-carousel {
    flex: 1;
    max-width: 1000px;
    overflow: hidden;
    position: relative;
}

.portfolio-item-carousel-track {
    display: flex;
    transition: transform 0.5s ease-out;
}

.portfolio-item-page {
    flex: 0 0 100%;
    min-width: 0;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.portfolio-item-page.active {
    opacity: 1;
}

.portfolio-item-page:nth-child(n+2) {
    display: flex;
    align-items: center;
}

.portfolio-item-page:nth-child(n+2) .portfolio-item-content {
    margin-top: 0;
    margin-bottom: 0;
}

.portfolio-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s, opacity 0.2s;
    z-index: 10;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-chevron:hover:not(:disabled),
.portfolio-chevron:focus,
.portfolio-chevron:active {
    outline: none;
}

.portfolio-chevron:hover:not(:disabled) {
    color: #fff;
}

.portfolio-chevron:disabled {
    opacity: 0.35;
    cursor: default;
}

.portfolio-chevron-left {
    left: 15px;
}

.portfolio-chevron-right {
    right: 15px;
}

.portfolio-chevron-as-next {
    min-width: 52px;
    width: auto;
    padding: 0 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.portfolio-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.portfolio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.portfolio-dot:hover {
    background: rgba(255, 255, 255, 0.65);
}

.portfolio-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.15);
}

.portfolio-item-content {
    width: 100%;
    max-width: 1000px;
    margin: 50px auto 0;
    padding: 0 50px;
    position: relative;
    z-index: 1;
    text-align: left;
}

.portfolio-item-content button.outline,
.portfolio-item-content a.outline {
    margin-left: 0;
    margin-right: auto;
    padding: .7em 1.4em;
}

.portfolio-item-content label {
    display: block;
    transition: opacity 0.3s ease;
    font-size: 1.25rem;
    line-height: 1.75em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.portfolio-item-client {
    font-size: 0.9rem;
    color: var(--light-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
}

.portfolio-item-results {
    display: flex;
    transition: opacity 0.3s ease;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5em 3em;
    margin-top: 1.5em;
}

.portfolio-item-content label.portfolio-audio-hidden,
.portfolio-item-content .portfolio-item-results.portfolio-audio-hidden {
    opacity: 0;
    pointer-events: none;
}

.portfolio-item-result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
    text-align: center;
}

.portfolio-item-result-stat:not(:first-child) {
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding-left: 1.5em;
}

.portfolio-item-result-num {
    font-family: var(--title-fonts);
    font-size: 18vw;
    font-variant-ligatures: common-ligatures;
    line-height: 1.05em;
    color: #fff;
}

.portfolio-item-result-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 700px) {
    .portfolio-item-result-num {
        font-size: 13vw;
    }
}

@media (max-width: 600px) {
    .portfolio-item-result-num {
        font-size: 25vw;
    }
    .portfolio-item-results {
        gap: 1.5em 2em;
        flex-direction: column;
    }
    .portfolio-item-result-stat:not(:first-child) {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        padding-left: 0;
        padding-top: 1.5em;
    }
}

/* Portfolio work items – smaller text and chevrons on mobile */
@media (max-width: 699px) {
    .portfolio-item {
        height: 100lvh;
    }
    .portfolio-item-inner {
        padding: 0 44px;
    }
    .portfolio-item-content {
        padding: 0 12px;
    }
    .portfolio-item-client {
        font-size: .7rem;
    }
    .portfolio-item-content h3 {
        font-size: 13vw;
        line-height: 1em;
    }
    .portfolio-item-content label {
        font-size: 1rem;
        line-height: 2em;
    }
    .portfolio-item-content {
        font-size: 1rem;
    }
    .portfolio-chevron {
        width: 24px;
        height: 24px;
    }
    .portfolio-chevron-left {
        left: 10px;
    }
    .portfolio-chevron-right {
        right: 10px;
    }
}

/* ==========================================================================
   Experience
   Expandable job list with chevrons.
   ========================================================================== */

.job_item li {
    margin-top: 1em;
}

.myDate {
    color: var(--light-grey);
}

.job_item-expand-all {
    margin-top: 25px;
}

.job_item-expand-all .expand-all-btn {
    font-size: 0.8rem;
    padding: 0.5em 2em;
    margin-top: 0;
}

.experience-header {
    cursor: pointer;
}

.experience-title h5:first-of-type {
    color: var(--text-color);
    opacity: 0.7;
}

.experience-title h5:only-of-type {
    opacity: 1;
}

.experience-date-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}

.experience-chevron {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.25em;
    margin-top: 0;
    cursor: pointer;
    transition: transform 0.3s ease-out, color 0.2s;
}

.experience-chevron:hover {
    color: var(--light-grey);
}

.experience-chevron svg {
    display: block;
}

.experience-item.expanded .experience-chevron {
    transform: rotate(180deg);
}

.experience-details {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style-type: disc;
    padding-left: 1.25em;
    transition: max-height 0.3s ease-out;
}

.experience-item.expanded .experience-details {
    max-height: 500px;
    margin-top: 0.75em;
}

/* ==========================================================================
   Brand Grid
   Logo grid for Trusted By section.
   ========================================================================== */

.brand-grid {
    width: 100vw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 25vw);
    margin-top: 0;
    padding: 0;
    background-color: white;
    position: relative;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-bottom: 4em;
    z-index: -1;
}

@media (min-width:1200px) {
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 16vw);
    }
}

@media (max-width:760px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 40vw);
    }
}

.brand-grid li {
    display: block;
    overflow: hidden;
    text-align: center;
}

.brand-grid img {
    height: auto;
    width: 50%;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

/* ==========================================================================
   Lists and Stats
   Additional elements, stat lists, project stats, next-pi, video.
   ========================================================================== */

ul.additional-elements, ul.stat_list {
    width: 100vw;
    list-style-type: none;
    margin: 50px 0 0;
    padding: 0;
}

ul.additional-elements li {
    height: 100vw;
    background-position: center;
    background-size: cover;
}

video#player {
    height: 100vw;
    width: 100vw;
    background-color: var(--text-color);
}

ul.stat_list {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
}

ul.stat_list>* {
    grid-column: 2 / -2;
    max-width: calc(100vw - 40px);
}

ul.stat_list li {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    border-bottom: 1px solid var(--text-color);
}

ul.stat_list li:last-child {
    border-bottom: none;
}

.holder {
    margin: 0;
    padding: 0;
}

.project_stat {
    font-family: var(--title-fonts);
    color: var(--light-grey);
    font-weight: 400;
    display: block;
    font-size: 20vw;
    line-height: 30vw;
}

.next-pi {
    padding-bottom: 0 !important;
}

.next-pi ul {
    margin: 50px 0 0;
    padding: 0;
    width: 100vw;
    list-style-type: none;
    display: flex;
}

.next-pi li {
    height: 30vh;
    width: 50vw;
    margin: 0;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-blend-mode: darken;
    display: block;
}

.next-pi li * {
    width: 40vw;
    position: relative;
    top: 50%;
    transform: perspective(1px) translateY(-50%);
    margin: 0 auto;
    color: var(--background-color);
    font-family: var(--title-fonts);
    font-size: 7vw;
    line-height: 1.125em;
}

/* ==========================================================================
   Footer
   Footer layout and CTA.
   ========================================================================== */

footer {
    margin-top: 100px;
    background-color: var(--text-color);
    padding: 100px 0 200px;
    color: var(--background-color);
}

footer h2 {
    font-size: 20vw;
    line-height: 17vw;
    text-align: center;
    margin: 0;
}

footer button {
    margin: 50px auto;
    display: block;
}

/* ==========================================================================
   Images
   Full-width image utility.
   ========================================================================== */

img.full-width-img {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Responsive
   Overrides for viewport >= 700px.
   ========================================================================== */

@media (min-width: 700px) {

    /* --- Body and base --- */
    body {
        perspective: 8px;
        transform-style: preserve-3d;
    }
    html {
        font-size: 18px;
    }

    /* --- Navigation at 700px+ --- */
    #nav {
        grid-template-columns: 1fr auto auto auto auto auto auto auto auto;
        justify-items: start;
        visibility: visible;
        position: sticky;
        text-align: center;
        width: 100vw;
        height: auto;
        top: 0;
        left: 0;
        margin: 0;
        z-index: 99;
        transition: background .5s ease-out, backdrop-filter .5s ease-out;
        background: rgba(245, 245, 245, 0);
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
    }
    nav>* {
        font-size: .8em;
        line-height: 1.25em;
        padding: 1.5em 30px;
        color: var(--background-color);
        fill: var(--background-color);
        position: relative;
    }
    .hamburger_holder {
        visibility: hidden;
    }
    nav a .nav-item::before {
        content: '';
        width: 0;
        position: absolute;
        left: 0;
        bottom: 1em;
        margin: 0 2em;
        border-bottom: 1px solid var(--background-color);
        -webkit-transition: all 0.3s ease-out;
        transition: all 0.3s ease-out;
    }
    nav a .nav-item:hover::before {
        width: calc(100% - 58px);
    }
    nav a[href*="linkedin"] .nav-item:hover::before,
    nav a[href^="mailto:"] .nav-item:hover::before {
        width: 16px;
    }
    nav.scroll a .nav-item::before {
        border-bottom: 1px solid var(--background-color);
    }
    nav.scroll {
        background: var(--text-color) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    nav.scroll>* {
        color: var(--background-color);
    }
    nav.scroll svg {
        fill: var(--background-color);
    }
    #nav7 {
        padding-right: 45px;
    }
    .logo::before {
        font-family: var(--title-fonts);
        font-size: 1.5em;
        content: "Hi, I'm Patrick"
    }

    /* --- Header at 700px+ --- */
    header {
        height: 110vh;
        width: 100vw;
        margin: -100px 0 -50px;
    }
    .header-bg::before {
        transform: scale(1);
    }
    .header-content {
        transform: translateZ(3px) scale(.5);
        bottom: 80vh;
        position: static;
        display: block;
    }
    header a {
        position: absolute;
        bottom: 30vh;
        top: auto;
    }
    header span {
        bottom: 20vh;
    }

    /* --- About Me at 700px+ --- */
    #about-me {
        font-size: 1.5rem;
        line-height: 3rem;
        margin-bottom: -500px;
        transform: translateZ(3px) scale(.65);
    }

    /* --- Typography at 700px+ --- */
    h1, h2, h3 {
        width: 100%;
        font-size: 15vw;
        margin: 0;
        line-height: 1.05em;
        margin-bottom: -.125em;
    }
    h2 {
        transform: translateZ(2px) scale(.7);
        transform-style: preserve-3d;
    }
    h3 {
        font-size: 13vw;
        line-height: .85em;
        transform: translateZ(2px) scale(.7);
    }

    /* --- Buttons at 700px+ --- */
    button {
        margin-top: 2.5rem;
        padding: 1em 4.5em;
        font-size: 1.125rem;
    }

    /* --- Sections and content at 700px+ --- */
    .job_item {
        margin: 100px auto 0;
    }

    /* --- Portfolio at 700px+ --- */
    .portfolio-item {
        height: 100lvh;
        transform: translateZ(-4px) scale(1.);
    }
    label {
        transform: translateZ(1px) scale(.5);
        line-height: 1.5em;
        margin-top: 1.5em;
        margin-bottom: 1em;
        font-size: 2rem;
    }
    .portfolio-item-content h3 {
        transform: translateZ(2px);
        font-size: 9.1vw;
    }
    .portfolio-item-content label {
        transform: translateZ(1px);
        font-size: 1.25em;
        line-height: 1.75em;
    }
    .portfolio-item button {
        transform: translateZ(1.5px) scale(1);
        margin: 0;
    }
    .portfolio-item .portfolio-chevron {
        transform: translateY(-50%) translateZ(1.5px) scale(1);
    }
    .portfolio-item .portfolio-video-mute-btn {
        transform: translateX(-50%) translateZ(1.5px) scale(1);
    }

    /* --- Footer at 700px+ --- */
    footer h2 {
        font-size: 6vw;
        line-height: 1.05em;
    }
    footer button {
        font-size: .9rem;
    }

    /* --- Lists and stats at 700px+ --- */
    ul.additional-elements {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    ul.additional-elements li {
        height: 50vw;
        background-position: center;
        background-size: cover;
    }
    video#player {
        height: 80vh;
        width: 100vw;
        background-color: var(--text-color);
    }
    section.standard {
        padding: 150px 0 50px;
    }
    .section-item {
        font-size: 1.25em;
        line-height: 1.75em;
    }
    ul.stat_list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    ul.stat_list>* {
        grid-column: auto;
        max-width: 50vw;
        width: 50vw;
    }
    ul.stat_list li {
        border-bottom: none;
        border-right: 1px solid var(--text-color);
    }
    ul.stat_list li:last-child {
        border-right: none;
    }
    .project_stat {
        font-size: 13vw;
        line-height: 1.05em;
    }
    .next-pi ul {
        margin: 0;
    }
    .next-pi li {
        height: 50vh;
    }
    .next-pi li * {
        width: 30vw;
        font-size: 3vw;
        line-height: 1.125em;
    }
}

/* Work section password gate */
.work-gate-form {
    margin-top: 0;
}

.work-gate-input-group {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--text-color);
    overflow: hidden;
}

.work-gate input[type="password"] {
    flex: 1;
    margin: 0;
    padding: 14px 12px;
    font-family: var(--body-fonts);
    font-size: 1rem;
    border: none;
    outline: none;
    min-width: 0;
    background: transparent;
}

.work-gate-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 14px 12px;
    border: none;
    border-left: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: color .2s, background .2s;
}

.work-gate-chevron:hover {
    background: var(--text-color);
    color: var(--background-color);
}

.work-gate-chevron svg {
    display: block;
}

.work-gate-error {
    color: #c00;
    margin-top: 10px;
}

.work-gate-request {
    margin-top: 15px;
    font-size: 0.9em;
}

.work-gate-request a {
    color: var(--text-color);
    text-decoration: underline;
}

.work-gate-request a:hover {
    text-decoration: underline;
}

/* Locked: show gate, hide portfolio */
body:not(.work-unlocked) #work-container {
    display: none !important;
}

body:not(.work-unlocked) .work-gate {
    display: block;
}

/* Unlocked: hide gate, show portfolio */
body.work-unlocked .work-gate {
    display: none !important;
}

body.work-unlocked #work-container {
    display: block;
}

/* Largest viewport: wider content */
@media (min-width: 1400px) {
    .section-content {
        max-width: 1140px;
    }
    .section-item,
    .job_item {
        max-width: 960px;
    }
    .portfolio-item-carousel,
    .portfolio-item-content {
        max-width: 1200px;
    }
}
