@font-face {
    font-family: 'Source Serif 4';
    src: local('Source Serif 4 Regular'),
         url('../assets/fonts/SourceSerif4-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4 Variable';
    src: url('../assets/fonts/SourceSerif4Variable-latin-wght-normal.woff2') format('woff2-variations');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4 Variable';
    src: url('../assets/fonts/SourceSerif4Variable-latin-wght-italic.woff2') format('woff2-variations');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: local('Source Serif 4 Medium Italic'),
         url('../assets/fonts/SourceSerif4-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

:root {
    --page-bg: #fafafa;
    --page-text: #000000;
    --muted-text: #1b1b1b;
    --photo-filter: grayscale(1) contrast(1.04);
    --photo-opacity: 1;
    --duration-smooth: 300ms;
    --ease-smooth: cubic-bezier(0.19, 1, 0.22, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: #101113;
        --page-text: #f2eee7;
        --muted-text: #ddd8cf;
        --photo-filter: grayscale(1) contrast(1.08) brightness(0.86);
        --photo-opacity: 0.94;
    }
}

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

html {
    min-height: 100%;
    background: var(--page-bg);
}

body {
    min-height: 100%;
    background: var(--page-bg);
    color: var(--page-text);
    color-scheme: light dark;
    font-family: 'Source Serif 4 Variable', 'Source Serif 4', Georgia, serif;
    text-rendering: optimizeLegibility;
    transition:
        background-color var(--duration-smooth) var(--ease-smooth),
        color var(--duration-smooth) var(--ease-smooth);
}

.preview-page {
    min-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

.portfolio {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--page-bg);
    transition: background-color var(--duration-smooth) var(--ease-smooth);
}

.portfolio-header {
    position: relative;
    height: 182px;
}

.intro-copy {
    position: absolute;
    top: 18px;
    left: 24px;
}

.interactive-name {
    width: max-content;
    color: var(--page-text);
    cursor: default;
    font-family: 'Source Serif 4 Variable', 'Source Serif 4', Georgia, serif;
    font-size: 32px;
    font-style: italic;
    font-variation-settings: "wght" 500;
    font-weight: 500;
    line-height: 44px;
    letter-spacing: 0;
}

.bio {
    margin-top: 10px;
    color: var(--muted-text);
    font-size: 16px;
    font-style: normal;
    font-variation-settings: "wght" 400;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0;
}

.email-link {
    position: absolute;
    top: 33px;
    right: 33px;
    display: inline-block;
    color: var(--page-text);
    font-size: 16px;
    font-style: italic;
    font-variation-settings: "wght" 400;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0;
    text-align: right;
    text-decoration: none;
    transform-origin: 50% 58%;
}

.text-fragment,
.name-fragment,
.email-wave-char {
    display: inline-block;
    transform-origin: 50% 72%;
}

.name-fragment {
    --name-weight: 500;
    font-variation-settings: "wght" var(--name-weight);
    font-weight: var(--name-weight);
    transition:
        font-variation-settings 260ms var(--ease-smooth),
        font-weight 260ms var(--ease-smooth),
        transform 260ms var(--ease-smooth);
    will-change: transform, font-variation-settings, font-weight;
}

.email-wave-char {
    --email-weight: 400;
    color: inherit;
    opacity: 1;
    filter: none;
    transform: none;
    font-variation-settings: "wght" var(--email-weight);
    font-weight: var(--email-weight);
    will-change: font-variation-settings, font-weight;
}

.photo-strip {
    position: relative;
    width: 100%;
    height: 493px;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.photo-strip::-webkit-scrollbar {
    display: none;
}

.photo-strip.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.photo-track {
    position: relative;
    width: 4536px;
    height: 493px;
    transform: translate3d(var(--rail-pull, 0px), 0, 0);
    transition: transform 420ms var(--ease-smooth);
}

.photo-card {
    position: absolute;
    top: var(--photo-y);
    left: var(--photo-x);
    width: var(--photo-w, 336px);
    height: var(--photo-h);
    overflow: hidden;
    background: var(--page-bg);
    transition:
        background-color var(--duration-smooth) var(--ease-smooth),
        opacity var(--duration-smooth) var(--ease-smooth);
    transform: translateZ(0);
}

.photo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter: var(--photo-filter);
    opacity: var(--photo-opacity);
    object-position: var(--photo-position, center);
    transition:
        filter var(--duration-smooth) var(--ease-smooth),
        opacity var(--duration-smooth) var(--ease-smooth);
}

.photo-card-01 {
    --photo-x: 24px;
    --photo-y: 0px;
    --photo-h: 370px;
}

.photo-card-02 {
    --photo-x: 372px;
    --photo-y: 0px;
    --photo-h: 473px;
    --photo-position: 28% center;
}

.photo-card-03 {
    --photo-x: 720px;
    --photo-y: 0px;
    --photo-h: 252px;
}

.photo-card-04 {
    --photo-x: 1068px;
    --photo-y: 0px;
    --photo-h: 277px;
    --photo-position: center 55%;
}

.photo-card-05 {
    --photo-x: 1416px;
    --photo-y: 0px;
    --photo-h: 252px;
    --photo-position: center 45%;
}

.photo-card-06 {
    --photo-x: 1764px;
    --photo-y: 0px;
    --photo-h: 414px;
}

.photo-card-07 {
    --photo-x: 2112px;
    --photo-y: 0px;
    --photo-h: 481px;
}

.photo-card-08 {
    --photo-x: 2460px;
    --photo-y: 0px;
    --photo-h: 351px;
}

.photo-card-09 {
    --photo-x: 2808px;
    --photo-y: 0px;
    --photo-h: 304px;
}

.photo-card-10 {
    --photo-x: 3156px;
    --photo-y: 0px;
    --photo-h: 488px;
}

.photo-card-11 {
    --photo-x: 3504px;
    --photo-y: 0px;
    --photo-h: 388px;
}

.photo-card-12 {
    --photo-x: 3852px;
    --photo-y: 0px;
    --photo-h: 277px;
}

.photo-card-13 {
    --photo-x: 4200px;
    --photo-y: 0px;
    --photo-h: 493px;
}

@media (max-width: 760px) {
    .preview-page {
        overflow-y: auto;
    }

    .portfolio {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        padding: 18px 0 14px;
    }

    .portfolio-header {
        height: auto;
        padding: 0 14px;
    }

    .intro-copy,
    .email-link {
        position: static;
    }

    .interactive-name {
        font-size: 28px;
        line-height: 36px;
    }

    .bio {
        margin-top: 10px;
        font-size: 15px;
        line-height: 23px;
    }

    .email-link {
        margin-top: 16px;
        font-size: 15px;
        line-height: 23px;
        text-align: left;
    }

    .photo-strip {
        width: 100vw;
        height: auto;
        margin-top: 28px;
        overflow: visible;
        cursor: default;
    }

    .photo-track {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        height: auto;
        padding: 0 14px;
        transform: none;
        transition: none;
    }

    .photo-card {
        position: relative;
        top: auto;
        left: auto;
        flex: none;
        width: calc(100vw - 28px);
    }

    .photo-card-01 { --photo-h: calc((100vw - 28px) * 1.1); }
    .photo-card-02 { --photo-h: calc((100vw - 28px) * 1.408); }
    .photo-card-03 { --photo-h: calc((100vw - 28px) * 0.75); }
    .photo-card-04 { --photo-h: calc((100vw - 28px) * 0.825); }
    .photo-card-05 { --photo-h: calc((100vw - 28px) * 0.75); }
    .photo-card-06 { --photo-h: calc((100vw - 28px) * 1.232); }
    .photo-card-07 { --photo-h: calc((100vw - 28px) * 1.43); }
    .photo-card-08 { --photo-h: calc((100vw - 28px) * 1.045); }
    .photo-card-09 { --photo-h: calc((100vw - 28px) * 0.902); }
    .photo-card-10 { --photo-h: calc((100vw - 28px) * 1.452); }
    .photo-card-11 { --photo-h: calc((100vw - 28px) * 1.155); }
    .photo-card-12 { --photo-h: calc((100vw - 28px) * 0.825); }
    .photo-card-13 { --photo-h: calc((100vw - 28px) * 1.466); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }
}
