@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-vietnamese.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --paper: #f6f4ec;
    --ink: #191b1b;
    --muted: #535650;
    --line: #d4d3c9;
    --accent: #2447db;
    --accent-dark: #1734b4;
    --wash: #ece9df;
    --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Manrope, "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.62;
}

.site [id] {
    scroll-margin-top: 5.5rem;
}

.site :where(h1, h2, h3, p, figure, dl, dd) {
    margin: 0;
}

.site :where(h1, h2, h3) {
    text-wrap: balance;
}

.site :where(a) {
    color: inherit;
    text-underline-offset: .2em;
}

.site :where(img) {
    display: block;
    max-width: 100%;
}

.site :where(a, button):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

::selection {
    color: white;
    background: var(--accent);
}

.shell {
    width: min(77.5rem, calc(100% - clamp(2rem, 8vw, 8rem)));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: .5rem;
    left: .5rem;
    transform: translateY(calc(-100% - 1rem));
    background: var(--ink);
    color: #fff;
    padding: .65rem 1rem;
    text-decoration: none;
}

.skip-link:focus {
    transform: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.scroll-progress {
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    background: var(--accent);
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
}

.site-nav {
    display: flex;
    min-height: 4.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    flex: none;
    font-size: .99rem;
    font-weight: 800;
    letter-spacing: -.045em;
    text-decoration: none;
}

.wordmark-mark {
    display: grid;
    width: 2rem;
    aspect-ratio: 1;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font: 700 .8rem/1 var(--mono);
    letter-spacing: -.07em;
}

.wordmark-domain {
    color: var(--muted);
    font-weight: 650;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.25rem);
}

.nav-items a {
    position: relative;
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    color: var(--muted);
    font-size: .89rem;
    font-weight: 750;
    text-decoration: none;
}

.nav-items a:hover,
.nav-items a[aria-current="page"] {
    color: var(--accent);
}

.nav-items a[aria-current="page"]::after {
    position: absolute;
    right: 0;
    bottom: .17rem;
    left: 0;
    height: 2px;
    background: currentColor;
    content: "";
}

.eyebrow {
    color: var(--accent);
    font: 700 .72rem/1.5 var(--mono);
    letter-spacing: .055em;
    text-transform: uppercase;
}

.button,
.text-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    font: 800 .89rem/1.35 Manrope, "Segoe UI", Arial, sans-serif;
}

.button {
    padding: .72rem .98rem;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.button--primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.button--primary:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    color: #fff;
}

.text-link {
    color: var(--ink);
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
}

.text-link:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

.button span[aria-hidden],
.text-link span[aria-hidden] {
    font-size: 1.1em;
}

.site-footer {
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .75rem 1.75rem;
    padding-block: 1.35rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.1rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr);
    align-items: center;
    gap: clamp(2rem, 6.5vw, 6.25rem);
    padding-block: clamp(3.25rem, 6vw, 5.75rem) clamp(2.5rem, 5vw, 4.5rem);
}

.hero-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.05rem;
}

.status-dot {
    width: .45rem;
    height: .45rem;
    background: var(--accent);
}

.hero-copy h1 {
    font-size: clamp(3.5rem, 8.2vw, 7.65rem);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1.07;
    text-wrap: initial;
}

.hero-copy h1 > span {
    display: block;
}

.hero-copy h1 > span + span {
    margin-top: .21em;
}

.hero-period {
    color: var(--accent);
}

.hero-lead {
    margin-top: clamp(1.25rem, 2.4vw, 2.2rem);
    font-size: clamp(1.2rem, 2.1vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.25;
}

.hero-description {
    max-width: 46ch;
    margin-top: .75rem;
    color: var(--muted);
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1.35rem;
    margin-top: 1.6rem;
}

.hero-portrait {
    width: min(100%, 27.25rem);
    justify-self: end;
}

.portrait-mat {
    padding: clamp(.6rem, 1.4vw, 1.1rem);
    background: var(--accent);
    background-image: radial-gradient(#ffffff3d .75px, transparent .75px);
    background-size: 7px 7px;
}

.portrait-mat img {
    width: 100%;
    height: auto;
    aspect-ratio: .89;
    object-fit: cover;
    object-position: 50% 40%;
    filter: saturate(.85);
}

.hero-portrait figcaption {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    padding-top: .65rem;
    color: var(--muted);
    font: 650 .67rem/1.5 var(--mono);
    letter-spacing: .02em;
    text-transform: uppercase;
}

.portrait-code {
    color: var(--accent);
    white-space: nowrap;
}

.profile-facts {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr;
    border-block: 1px solid var(--line);
}

.profile-facts > div {
    padding: clamp(.85rem, 2vw, 1.5rem) clamp(.5rem, 2.25vw, 2rem);
}

.profile-facts > div:first-child {
    padding-left: 0;
}

.profile-facts > div + div {
    border-left: 1px solid var(--line);
}

.profile-facts dt {
    color: var(--muted);
    font: 650 .71rem/1.45 var(--mono);
    text-transform: uppercase;
}

.profile-facts dd {
    margin-top: .23rem;
    font-size: clamp(.9rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}

.fact-denominator {
    color: var(--muted);
    font-size: .8em;
}

.home-about {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 6vw, 6rem);
    padding-block: clamp(3rem, 6vw, 5.5rem);
    border-bottom: 1px solid var(--line);
}

.about-heading h2 {
    margin-block: .4rem .85rem;
    font-size: clamp(2.55rem, 5.2vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -.075em;
    line-height: 1.03;
}

.about-heading > p:last-child {
    color: var(--muted);
    font: 650 .76rem/1.65 var(--mono);
}

.about-copy > p {
    max-width: 55ch;
    color: var(--muted);
    text-wrap: pretty;
}

.about-copy > p + p {
    margin-top: .8rem;
}

.about-copy p a:hover {
    color: var(--accent);
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.35rem;
    border-block: 1px solid var(--line);
}

.about-details div {
    padding-block: .75rem;
}

.about-details div + div {
    padding-inline-start: .85rem;
    border-left: 1px solid var(--line);
}

.about-details dt {
    color: var(--muted);
    font: 650 .69rem/1.5 var(--mono);
    text-transform: uppercase;
}

.about-details dd {
    margin-top: .25rem;
    font-size: .89rem;
    font-weight: 800;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.15rem;
    margin: .65rem 0 0;
    padding: 0;
    list-style: none;
}

.about-links a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: .25rem;
    font-size: .84rem;
    font-weight: 800;
    text-decoration-color: var(--line);
}

.about-links a:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

.home-work {
    padding-block: clamp(3.5rem, 6vw, 5.25rem) clamp(2.75rem, 5vw, 5rem);
}

.work-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

.work-heading h2,
.contact-panel h2 {
    margin-top: .45rem;
    font-size: clamp(2.55rem, 5.2vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -.075em;
    line-height: 1.03;
}

.featured-work {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    border: 1px solid var(--line);
    background: var(--wash);
}

.featured-image {
    display: grid;
    align-items: center;
    overflow: hidden;
    background: #dedfd8;
    border-right: 1px solid var(--line);
}

.featured-image img {
    width: 100%;
    height: 100%;
    min-height: 15rem;
    object-fit: cover;
    object-position: 50% 50%;
    transition: transform .3s ease;
}

.featured-image:hover img {
    transform: scale(1.025);
}

.featured-copy {
    align-self: center;
    padding: clamp(1.25rem, 3vw, 2.5rem);
}

.featured-copy h3 {
    margin: .3rem 0 .5rem;
    font-size: clamp(1.85rem, 3.4vw, 3rem);
    font-weight: 800;
    letter-spacing: -.065em;
    line-height: 1.08;
}

.featured-copy h3 a {
    text-decoration: none;
}

.featured-copy h3 a:hover {
    color: var(--accent);
}

.featured-copy > p:not(.eyebrow) {
    color: var(--muted);
    text-wrap: pretty;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .6rem;
    margin: .85rem 0 .6rem;
    padding: 0;
    list-style: none;
}

.work-tags li {
    padding: .22rem .4rem;
    border: 1px solid var(--line);
    color: var(--muted);
    font: 650 .68rem/1.3 var(--mono);
}

.work-list {
    margin-top: clamp(.7rem, 2vw, 1.35rem);
}

.work-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) minmax(0, 1.08fr) 1.8rem;
    align-items: center;
    gap: clamp(.65rem, 2vw, 1.5rem);
    padding: 1.25rem .25rem;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.work-row:hover .work-row-title h3,
.work-row:hover .work-row-arrow {
    color: var(--accent);
}

.work-row-index,
.work-row-title > span {
    color: var(--muted);
    font: 650 .71rem/1.3 var(--mono);
    text-transform: uppercase;
}

.work-row-title h3 {
    margin-top: .2rem;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.2;
}

.work-row p {
    color: var(--muted);
    font-size: .91rem;
    text-wrap: pretty;
}

.work-row-arrow {
    justify-self: end;
    font-size: 1.4rem;
}

.home-contact {
    padding-bottom: clamp(2.75rem, 6vw, 5.25rem);
}

.contact-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4.5vw, 3.6rem);
    border: 1px solid #cbd3f1;
    background: #eaeefa;
}

.contact-panel p:last-child {
    margin-top: .7rem;
    color: var(--muted);
}

@media (max-width: 800px) {
    .home-hero {
        gap: 2rem;
    }

    .hero-copy h1 {
        font-size: clamp(3rem, 8.5vw, 5.8rem);
    }

    .work-row {
        grid-template-columns: 1.8rem minmax(0, 1fr) minmax(0, 1fr) 1.4rem;
    }
}

@media (max-width: 680px) {
    .site-nav {
        min-height: 4rem;
        gap: .7rem;
    }

    .nav-items {
        gap: .9rem;
    }

    .nav-items a {
        font-size: .82rem;
    }

    .home-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        padding-top: 2.8rem;
    }

    .hero-copy h1 {
        font-size: clamp(3.2rem, 11.5vw, 5.7rem);
    }

    .hero-portrait {
        width: min(100%, 27rem);
        justify-self: start;
    }

    .home-about {
        grid-template-columns: minmax(0, 1fr);
    }

    .portrait-mat img {
        aspect-ratio: 1.08;
        object-position: 50% 34%;
    }

    .featured-work {
        grid-template-columns: minmax(0, 1fr);
    }

    .featured-image {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .featured-image img {
        min-height: 0;
        height: auto;
        aspect-ratio: 1280 / 621;
    }

    .work-row {
        grid-template-columns: 1.5rem minmax(0, 1fr) 1.4rem;
        align-items: start;
        row-gap: .45rem;
    }

    .work-row p {
        grid-column: 2;
    }

    .work-row-arrow {
        grid-area: 1 / 3 / 3;
        align-self: center;
    }
}

@media (max-width: 390px) {
    .wordmark-domain {
        display: none;
    }

    .nav-items {
        gap: .68rem;
    }
}

@media screen and (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    .site-header {
        view-transition-name: site-header;
    }

    ::view-transition-old(root) {
        animation: site-depart .22s ease-in both;
    }

    ::view-transition-new(root) {
        animation: site-arrive .45s cubic-bezier(.2, .72, .2, 1) both;
    }

    ::view-transition-group(site-header),
    ::view-transition-new(site-header) {
        animation: none;
    }

    ::view-transition-old(site-header) {
        display: none;
    }

    .motion-ready [data-intro] {
        animation: intro-rise .76s cubic-bezier(.2, .72, .2, 1)
            calc(30ms + var(--intro-step, 0) * 72ms) both;
    }

    [data-intro="1"] { --intro-step: 1; }
    [data-intro="2"] { --intro-step: 2; }
    [data-intro="3"] { --intro-step: 3; }
    [data-intro="4"] { --intro-step: 4; }
    [data-intro="5"] { --intro-step: 5; }
    [data-stagger="1"] { --reveal-step: 1; }
    [data-stagger="2"] { --reveal-step: 2; }

    .motion-ready [data-intro-media] {
        animation-name: portrait-arrive;
        animation-duration: .92s;
    }

    .motion-ready [data-intro]:focus-within {
        animation: none;
    }

    .motion-ready [data-reveal][data-reveal-state] {
        transition: opacity .56s ease, translate .72s cubic-bezier(.2, .72, .2, 1);
        transition-delay: calc(var(--reveal-step, 0) * 65ms);
    }

    .motion-ready [data-reveal-state="pending"] {
        opacity: 0;
        translate: 0 1.05rem;
    }

    .motion-ready [data-reveal="media"][data-reveal-state="pending"] {
        translate: 0 1.55rem;
    }

    .motion-ready [data-reveal-state="pending"]:focus-within,
    .motion-ready [data-reveal-state="pending"]:target {
        opacity: 1;
        translate: none;
        transition: none;
    }

    .motion-ready .portrait-mat {
        position: relative;
        overflow: hidden;
    }

    .motion-ready .portrait-mat::after {
        position: absolute;
        inset: 0;
        background: linear-gradient(110deg, transparent 38%, #fff2 49%, transparent 60%);
        pointer-events: none;
        content: "";
        animation: portrait-light-pass .95s .26s cubic-bezier(.25, .55, .3, 1) both;
    }

    .motion-ready .button span[aria-hidden],
    .motion-ready .text-link span[aria-hidden],
    .motion-ready .work-row-arrow,
    .motion-ready .about-links span[aria-hidden] {
        transition: transform .27s cubic-bezier(.2, .72, .2, 1);
    }

    .motion-ready .button:hover span[aria-hidden],
    .motion-ready .text-link:hover span[aria-hidden],
    .motion-ready .work-row:hover .work-row-arrow,
    .motion-ready .about-links a:hover span[aria-hidden] {
        transform: translate(3px, -2px);
    }
}

@media screen and (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    .motion-ready [data-portrait-tilt] .portrait-mat {
        transform: perspective(1000px)
            rotateX(var(--portrait-rotate-x, 0deg))
            rotateY(var(--portrait-rotate-y, 0deg));
        transition: transform .52s cubic-bezier(.2, .72, .2, 1);
    }

    .motion-ready [data-portrait-tilt][data-tilt-active] .portrait-mat {
        transition-duration: .14s;
    }

    .motion-ready [data-portrait-tilt] .portrait-mat::before {
        position: absolute;
        z-index: 1;
        inset: 0;
        background: radial-gradient(circle at var(--portrait-light-x, 50%) var(--portrait-light-y, 50%), #fff3, transparent 58%);
        opacity: 0;
        pointer-events: none;
        content: "";
        transition: opacity .35s ease;
    }

    .motion-ready [data-portrait-tilt][data-tilt-active] .portrait-mat::before {
        opacity: 1;
    }
}

@keyframes site-depart {
    to { opacity: 0; }
}

@keyframes site-arrive {
    from { opacity: 0; translate: 0 .5rem; }
}

@keyframes intro-rise {
    from { opacity: 0; translate: 0 .9rem; }
}

@keyframes portrait-arrive {
    from { opacity: 0; transform: translateY(1.35rem) scale(.975); }
}

@keyframes portrait-light-pass {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site *,
    .site *::before,
    .site *::after {
        animation: none !important;
        transition: none !important;
    }
}
