:root {
    --paper: #fffaf7;
    --paper-deep: #f8eee9;
    --blush: #f5d7dc;
    --pink: #dd8297;
    --pink-dark: #9d4961;
    --green: #71816b;
    --green-dark: #42503e;
    --ink: #302a2c;
    --muted: #695f62;
    --line: #e5cfd1;
    --white: #ffffff;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --content: 1140px;
    --shadow: 0 24px 70px rgba(92, 53, 61, 0.12);
    --project-width: min(calc(100% - 3rem), 1920px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(rgba(83, 57, 62, 0.07) 0.6px, transparent 0.6px);
    background-size: 7px 7px;
    content: "";
    pointer-events: none;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--green-dark);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 1rem;
    color: var(--white);
    background: var(--green-dark);
    border-radius: 999px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 50%;
    display: flex;
    width: min(calc(100% - 3rem), var(--content));
    min-height: 5.5rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(157, 73, 97, 0.24);
    transform: translateX(-50%);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    text-decoration: none;
}

.site-logo span {
    color: var(--pink-dark);
    font-family: var(--sans);
    font-size: 1.1rem;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
}

.site-navigation a {
    position: relative;
    padding: 0.5rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-navigation a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--pink-dark);
    content: "";
    transform: scaleX(0);
    transition: transform 180ms ease;
}

.site-navigation a:hover::after,
.site-navigation a[aria-current="page"]::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
}

.hero {
    position: relative;
    display: grid;
    min-height: 100svh;
    padding: 9rem max(1.5rem, calc((100% - var(--content)) / 2)) 5rem;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 25%, rgba(245, 215, 220, 0.72), transparent 28%),
        radial-gradient(circle at 15% 80%, rgba(220, 229, 214, 0.65), transparent 25%),
        linear-gradient(135deg, #fffdf9 0%, #fbeeed 54%, #fff9f4 100%);
}

.hero::before {
    position: absolute;
    width: min(78vw, 780px);
    aspect-ratio: 1;
    border: 1px solid rgba(157, 73, 97, 0.18);
    border-radius: 50%;
    content: "";
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, 780px);
    padding: clamp(2rem, 7vw, 5rem);
    text-align: center;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--pink-dark);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

h1 {
    font-size: clamp(3.5rem, 10vw, 7.5rem);
}

h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.heading-link {
    color: inherit;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.14em;
    transition: color 180ms ease, text-decoration-color 180ms ease;
}

.heading-link:hover {
    color: var(--pink-dark);
    text-decoration-color: currentColor;
}

.hero-intro {
    max-width: 620px;
    margin: 1.8rem auto 2.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    line-height: 1.6;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--pink-dark);
    color: var(--pink-dark);
    font-size: 0.86rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.text-link span {
    transition: transform 180ms ease;
}

.text-link:hover span {
    transform: translateY(4px);
}

.sakura-branch {
    position: absolute;
    z-index: 1;
    width: min(42vw, 500px);
    height: 5px;
    background: var(--green-dark);
    border-radius: 100%;
    opacity: 0.78;
    transform-origin: left center;
}

.sakura-branch::before,
.sakura-branch::after {
    position: absolute;
    width: 55%;
    height: 3px;
    background: var(--green-dark);
    border-radius: 100%;
    content: "";
    transform-origin: left center;
}

.sakura-branch::before {
    left: 22%;
    transform: rotate(-23deg);
}

.sakura-branch::after {
    left: 47%;
    transform: rotate(27deg);
}

.sakura-branch--top {
    top: 13%;
    right: -6%;
    transform: rotate(157deg);
}

.sakura-branch--bottom {
    bottom: 8%;
    left: -8%;
    transform: rotate(-12deg);
}

.sakura-branch i,
.petal {
    position: absolute;
    width: clamp(1.3rem, 2.5vw, 2.1rem);
    aspect-ratio: 1;
    background: var(--blush);
    border-radius: 65% 0 65% 40%;
    box-shadow: 0 0 0 1px rgba(157, 73, 97, 0.1);
    transform: rotate(45deg);
}

.sakura-branch i::after {
    position: absolute;
    top: 44%;
    left: 44%;
    width: 18%;
    aspect-ratio: 1;
    background: var(--pink-dark);
    border-radius: 50%;
    content: "";
}

.sakura-branch i:nth-child(1) { left: 12%; top: -0.9rem; }
.sakura-branch i:nth-child(2) { left: 31%; top: 0.5rem; transform: rotate(90deg); }
.sakura-branch i:nth-child(3) { left: 49%; top: -1.8rem; transform: rotate(12deg); }
.sakura-branch i:nth-child(4) { left: 67%; top: 0.25rem; transform: rotate(115deg); }
.sakura-branch i:nth-child(5) { left: 86%; top: -1.3rem; transform: rotate(68deg); }

.petal {
    width: 0.8rem;
    opacity: 0.55;
    animation: drift 7s ease-in-out infinite;
}

.petal--one { top: 25%; left: 21%; }
.petal--two { top: 42%; right: 17%; animation-delay: -2.5s; }
.petal--three { bottom: 25%; left: 32%; animation-delay: -5s; }

.section {
    width: min(100%, calc(var(--content) + 3rem));
    margin: 0 auto;
    padding: clamp(5rem, 10vw, 9rem) 1.5rem;
}

.about {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    gap: clamp(3rem, 8vw, 8rem);
}

.about-copy {
    max-width: 31rem;
}

.about-copy .lead {
    margin-top: 2rem;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.55;
}

.about-copy p:last-child {
    color: var(--muted);
}

.blossom-rule {
    position: relative;
    display: block;
    width: 8rem;
    height: 1px;
    margin-top: 1.8rem;
    background: var(--pink);
}

.blossom-rule i {
    position: absolute;
    top: 50%;
    right: -0.45rem;
    width: 0.85rem;
    aspect-ratio: 1;
    background: var(--paper);
    border: 2px solid var(--pink);
    border-radius: 60% 0 60% 40%;
    transform: translateY(-50%) rotate(45deg);
}

.image-slot {
    position: relative;
    display: grid;
    min-height: 285px;
    margin: 0;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(245, 215, 220, 0.55)),
        var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 46% 46% 1.2rem 1.2rem;
    box-shadow: var(--shadow);
}

.image-slot--large {
    min-height: clamp(380px, 50vw, 590px);
}

.image-slot::before,
.image-slot::after {
    position: absolute;
    border: 1px solid rgba(157, 73, 97, 0.18);
    border-radius: 50%;
    content: "";
}

.image-slot::before {
    width: 12rem;
    aspect-ratio: 1;
    top: -5rem;
    right: -4rem;
}

.image-slot::after {
    width: 7rem;
    aspect-ratio: 1;
    bottom: -3rem;
    left: -2rem;
}

.image-slot img {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

code {
    padding: 0.08rem 0.3rem;
    background: rgba(255, 255, 255, 0.62);
    border-radius: 0.25rem;
    font-size: 0.84em;
}

.projects {
    width: 100%;
    max-width: none;
    padding-right: max(1.5rem, calc((100% - var(--content)) / 2));
    padding-left: max(1.5rem, calc((100% - var(--content)) / 2));
    background: var(--paper-deep);
}

.section-heading {
    width: min(100%, 700px);
    margin: 0 auto clamp(3rem, 7vw, 5rem);
    text-align: center;
}

.section-heading > p:not(.eyebrow) {
    margin: 1.4rem auto 0;
    color: var(--muted);
}

.blossom-rule--centered {
    margin-right: auto;
    margin-left: auto;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
}

.project-gallery > :nth-child(2) .image-slot {
    border-radius: 1.2rem 1.2rem 46% 46%;
}

.project-preview {
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.project-preview .image-slot {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-preview > span {
    display: flex;
    padding: 1.15rem 0.25rem 0;
    align-items: center;
    justify-content: space-between;
    font-family: var(--serif);
    font-size: 1.15rem;
}

.project-preview i {
    color: var(--pink-dark);
    font-family: var(--sans);
    font-style: normal;
    transition: transform 180ms ease;
}

.project-preview:hover .image-slot {
    border-color: var(--pink);
    box-shadow: 0 28px 75px rgba(92, 53, 61, 0.18);
    transform: translateY(-5px);
}

.project-preview:hover i {
    transform: translateX(4px);
}

.page-hero {
    position: relative;
    display: grid;
    min-height: 62svh;
    padding: 10rem max(1.5rem, calc((100% - var(--content)) / 2)) 6rem;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 16%, rgba(245, 215, 220, 0.85), transparent 27%),
        linear-gradient(135deg, #fffdf9, #f9eeeb);
}

.page-hero::after {
    position: absolute;
    width: min(55vw, 580px);
    aspect-ratio: 1;
    border: 1px solid rgba(157, 73, 97, 0.16);
    border-radius: 50%;
    content: "";
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    text-align: center;
}

.page-hero h1,
.project-detail-hero h1 {
    font-size: clamp(3.3rem, 9vw, 7rem);
}

.page-hero .hero-intro {
    margin-bottom: 0;
}

.project-index {
    width: min(100%, calc(var(--content) + 3rem));
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project-card {
    min-width: 0;
}

.project-card-link {
    display: block;
    height: 100%;
    padding: 0.75rem;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--line);
    border-radius: 8rem 8rem 1.25rem 1.25rem;
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card-link:hover {
    border-color: var(--pink);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.project-card .image-slot {
    min-height: 330px;
    border: 0;
    border-radius: 7.25rem 7.25rem 0.8rem 0.8rem;
    box-shadow: none;
}

.project-card-copy {
    padding: 1.5rem 1rem 1rem;
}

.project-number {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--pink-dark);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.project-card h2 {
    font-size: 2rem;
}

.project-card-cta {
    display: flex;
    margin-top: 1.25rem;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.project-card-cta span:last-child {
    color: var(--pink-dark);
    font-size: 1.1rem;
}

.project-detail {
    background: var(--paper);
}

.project-detail-hero {
    position: relative;
    padding: 11rem 1.5rem 4.5rem;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(145deg, #fffdf9, var(--paper-deep));
}

.project-detail-hero::before {
    position: absolute;
    top: -9rem;
    left: 50%;
    width: min(70vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(157, 73, 97, 0.18);
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
}

.project-detail-hero > * {
    position: relative;
    z-index: 1;
}

.project-detail-hero .hero-intro {
    margin-bottom: 0;
}

.project-detail-body {
    width: var(--project-width);
    margin: 0 auto;
    padding: 0 0 clamp(5rem, 10vw, 9rem);
}

.project-detail-image {
    min-height: clamp(360px, 58vw, 620px);
    margin-bottom: clamp(3rem, 7vw, 6rem);
    border-radius: 1.5rem;
    transform: translateY(-1rem);
}

.project-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 7vw, 6rem);
}

.project-notes h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.project-notes p {
    color: var(--muted);
}

.project-back {
    display: inline-flex;
    margin-top: 2rem;
    color: var(--pink-dark);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

/* Pokémon binder project */
.binder-hero {
    padding-bottom: clamp(5rem, 10vw, 8rem);
    background:
        radial-gradient(circle at 72% 30%, rgba(245, 215, 220, 0.9), transparent 25%),
        radial-gradient(circle at 15% 78%, rgba(220, 229, 214, 0.72), transparent 22%),
        linear-gradient(145deg, #fffdf9, var(--paper-deep));
}

.binder-hero h1 {
    font-size: clamp(3.2rem, 9vw, 7.4rem);
}

.binder-hero .text-link {
    margin-top: 0.25rem;
}

.binder-introduction,
.binder-notes {
    display: grid;
    width: var(--project-width);
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 8rem) 0;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 8vw, 7rem);
}

.binder-introduction p {
    margin: 0;
    color: var(--muted);
}

.binder-introduction .binder-introduction-lead {
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.45;
}

.binder-section {
    padding: clamp(4rem, 7vw, 6rem) max(1rem, calc((100% - 1320px) / 2));
    background:
        radial-gradient(circle at 90% 10%, rgba(245, 215, 220, 0.12), transparent 25%),
        #263029;
    color: var(--white);
}

.binder-section-heading {
    display: flex;
    max-width: 1200px;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.binder-section-heading h2 {
    font-size: clamp(2.8rem, 6vw, 5rem);
}

.binder-section-heading > p {
    max-width: 31rem;
    margin: 0 0 0.5rem;
    color: #d7ddd4;
}

.binder {
    max-width: 1320px;
    margin: 0 auto;
}

.binder-toolbar {
    display: grid;
    max-width: 1200px;
    margin: 0 auto 1rem;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.binder-control,
.binder-jump button {
    min-height: 2.75rem;
    padding: 0.6rem 1rem;
    color: var(--white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.binder-control:first-child {
    justify-self: start;
}

.binder-control:last-child {
    justify-self: end;
}

.binder-control:hover:not(:disabled),
.binder-jump button:hover {
    color: var(--ink);
    background: var(--blush);
    border-color: var(--blush);
}

.binder-control:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.binder-position {
    margin: 0;
    color: #d7ddd4;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.binder-viewport {
    padding: 1.1rem;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.8rem;
    scrollbar-color: var(--pink) transparent;
}

.binder-viewport:focus-visible {
    outline-color: var(--blush);
}

.binder-book {
    position: relative;
    display: grid;
    min-width: 680px;
    padding: clamp(1rem, 2vw, 1.6rem);
    grid-template-columns: 1fr 1fr;
    background: #171b18;
    border: 3px solid #0e110f;
    border-radius: 1.6rem;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    transform-origin: center;
    transition: opacity 160ms ease, transform 160ms ease;
}

.binder-book::before {
    position: absolute;
    z-index: 3;
    top: 1.1rem;
    bottom: 1.1rem;
    left: 50%;
    width: 1.2rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.3));
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
}

.binder-book.is-turning-forward {
    opacity: 0.25;
    transform: perspective(1000px) rotateY(-4deg) scale(0.99);
}

.binder-book.is-turning-back {
    opacity: 0.25;
    transform: perspective(1000px) rotateY(4deg) scale(0.99);
}

.binder-page {
    display: grid;
    min-width: 0;
    padding: clamp(0.65rem, 1.5vw, 1.15rem);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.35rem, 0.85vw, 0.7rem);
    background: #202622;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.4);
}

.binder-page--left {
    border-radius: 1rem 0.15rem 0.15rem 1rem;
}

.binder-page--right {
    border-radius: 0.15rem 1rem 1rem 0.15rem;
}

.binder-page--cover {
    display: flex;
    min-height: 510px;
    padding: 3rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.62);
    background:
        radial-gradient(circle at center, rgba(245, 215, 220, 0.08), transparent 35%),
        #161a17;
    text-align: center;
}

.binder-page--cover > span {
    color: var(--pink);
    font-size: 2rem;
}

.binder-page--cover p {
    font-family: var(--serif);
    font-size: 1.4rem;
    line-height: 1.4;
}

.binder-page--cover small {
    font-family: var(--sans);
    font-size: 0.65rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.binder-pocket {
    position: relative;
    min-width: 0;
    aspect-ratio: 68 / 97;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
        #181c19;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.38rem;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.13);
    color: rgba(255, 255, 255, 0.35);
    cursor: default;
}

.binder-pocket::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(120deg, transparent 45%, rgba(255, 255, 255, 0.11) 51%, transparent 57%);
    content: "";
    pointer-events: none;
}

.binder-pocket.has-card {
    cursor: zoom-in;
}

.binder-pocket.has-card:hover {
    border-color: var(--pink);
    transform: translateY(-2px);
}

.binder-pocket img {
    position: absolute;
    inset: 3%;
    width: 94%;
    height: 94%;
    object-fit: contain;
}

.binder-pocket-number {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: clamp(0.55rem, 1vw, 0.72rem);
    font-variant-numeric: tabular-nums;
    transform: translate(-50%, -50%);
}

.binder-pocket.has-card .binder-pocket-number {
    opacity: 0;
}

.binder-jump {
    display: flex;
    max-width: 1200px;
    margin: 1.25rem auto 0;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.binder-jump label {
    color: #d7ddd4;
    font-size: 0.8rem;
    font-weight: 700;
}

.binder-jump > div {
    display: flex;
    gap: 0.5rem;
}

.binder-jump input {
    width: 8rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.8rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid transparent;
    border-radius: 0.7rem;
    font: inherit;
}

.binder-message {
    padding: 1rem;
    color: var(--ink);
    background: var(--blush);
    border-radius: 0.75rem;
}

.binder-notes h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.binder-notes p {
    margin-top: 0;
    color: var(--muted);
}

.binder-file-note {
    padding: 1rem 1.15rem;
    background: var(--paper-deep);
    border-left: 3px solid var(--pink);
    border-radius: 0 0.65rem 0.65rem 0;
}

.binder-file-note span {
    margin-right: 0.5rem;
    color: var(--pink-dark);
}

.card-dialog {
    width: min(calc(100% - 2rem), 520px);
    max-height: calc(100svh - 2rem);
    padding: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
}

.card-dialog::backdrop {
    background: rgba(31, 28, 29, 0.78);
    backdrop-filter: blur(4px);
}

.card-dialog-inner {
    padding: 1rem;
}

.card-dialog-heading {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.card-dialog-heading p {
    margin: 0;
    color: var(--pink-dark);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-dialog-heading button {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--ink);
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.card-dialog img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100svh - 7rem);
    margin: 0 auto;
    border-radius: 0.65rem;
}

.project-card-binder .binder-preview-art {
    position: absolute;
    z-index: 1;
    display: flex;
    width: 58%;
    aspect-ratio: 0.72;
    align-items: center;
    justify-content: center;
    color: #f7e8eb;
    background: #313a33;
    border: 4px solid #1e2520;
    border-radius: 0.9rem 1.2rem 1.2rem 0.9rem;
    box-shadow: 0 18px 35px rgba(48, 42, 44, 0.2), inset -8px 0 0 rgba(0, 0, 0, 0.15);
    transform: rotate(-5deg);
}

.project-card-binder .binder-preview-art::after {
    position: absolute;
    top: 0.4rem;
    right: 0.35rem;
    bottom: 0.4rem;
    width: 0.18rem;
    background: var(--pink);
    border-radius: 999px;
    content: "";
}

.binder-preview-art i {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 0.7rem;
    aspect-ratio: 1;
    background: var(--pink);
    border-radius: 65% 0 65% 40%;
    transform: rotate(45deg);
}

.binder-preview-art b {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 400;
    line-height: 1.05;
    text-align: center;
}

.project-card-binder.has-image .binder-preview-art {
    display: none;
}

.project-card-chrono .chrono-preview-art {
    position: relative;
    z-index: 1;
    width: 58%;
    aspect-ratio: 1;
    background:
        radial-gradient(circle, #eafcff 0 4%, transparent 5%),
        radial-gradient(circle, #2c2358 0 42%, #8fd8ec 43% 45%, transparent 46%),
        radial-gradient(circle, rgba(143, 123, 255, 0.42), transparent 68%);
    border: 1px solid rgba(159, 224, 242, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 2.5rem rgba(111, 214, 242, 0.4);
}

.project-card-chrono .chrono-preview-art::before,
.project-card-chrono .chrono-preview-art::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 30%;
    background: #eafcff;
    border-radius: 999px;
    content: "";
    transform-origin: 50% 0;
}

.project-card-chrono .chrono-preview-art::before {
    transform: rotate(135deg);
}

.project-card-chrono .chrono-preview-art::after {
    height: 36%;
    transform: rotate(70deg);
}

.chrono-preview-art i {
    position: absolute;
    width: 11%;
    aspect-ratio: 1;
    background: #bdf1ff;
    border-radius: 35%;
    box-shadow: 0 0 0.8rem currentcolor;
    transform: rotate(45deg);
}

.chrono-preview-art i:nth-child(1) {
    top: 12%;
    right: -5%;
    color: #6fd6f2;
}

.chrono-preview-art i:nth-child(2) {
    right: 6%;
    bottom: 3%;
    color: #8f7bff;
    background: #c8b6ff;
}

.chrono-preview-art i:nth-child(3) {
    bottom: 12%;
    left: -4%;
    color: #dd8297;
    background: #ffe3ea;
}

.project-card-chrono.has-image .chrono-preview-art {
    display: none;
}

.site-footer {
    display: flex;
    width: min(calc(100% - 3rem), var(--content));
    min-height: 7rem;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.site-footer a {
    color: var(--pink-dark);
    font-weight: 700;
    text-decoration: none;
}

/* Chrono Field calculator project */
.cf-section {
    width: var(--project-width);
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 5rem) 0;
    border-top: 1px solid var(--line);
}

.cf-section-heading {
    display: flex;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.cf-section-heading h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.cf-section-heading > p {
    max-width: 26rem;
    margin: 0 0 0.5rem;
    color: var(--muted);
}

.cf-section-heading code {
    font-family: var(--sans);
    font-size: 0.9em;
}

.cf-panel {
    display: flex;
    padding: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
}

.cf-file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.cf-file-label span {
    padding: 0.75rem 1.25rem;
    color: var(--white);
    background: var(--pink-dark);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cf-file-label:hover span {
    background: var(--pink);
}

.cf-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.cf-file-label:has(input:focus-visible) span {
    outline: 3px solid var(--green-dark);
    outline-offset: 4px;
}

.cf-status {
    margin: 0;
    color: var(--muted);
}

.cf-status.is-error {
    color: var(--pink-dark);
    font-weight: 700;
}

.cf-workspace {
    display: grid;
    margin-top: clamp(2rem, 5vw, 3rem);
    gap: clamp(2rem, 5vw, 3rem);
}

.cf-loadouts {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.cf-loadout {
    padding: 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
}

.cf-loadout h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.cf-loadout-body {
    display: grid;
    margin-top: 1rem;
    grid-template-columns: 2fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}

.cf-core-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cf-loadout-field {
    display: block;
}

.cf-loadout-field + .cf-loadout-field {
    margin-top: 1rem;
}

.cf-core-modules .cf-loadout-field + .cf-loadout-field {
    margin-top: 0;
}

.cf-loadout-field label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cf-loadout-field select,
.cf-loadout-field input[type="number"] {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.8rem;
    color: var(--ink);
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    font: inherit;
}

.cf-module-slots-wrap {
    margin-top: 0.6rem;
}

.cf-module-slots-empty {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.cf-module-slots {
    display: grid;
    margin: 0.6rem 0 0;
    padding: 0;
    gap: 0.3rem;
    list-style: none;
}

.cf-module-slot {
    display: flex;
    padding: 0.4rem 0.5rem 0.4rem 0.6rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    background: var(--paper-deep);
    border-radius: 0.6rem;
    font-size: 0.8rem;
}

.cf-module-slot.is-empty {
    font-style: italic;
    background: transparent;
    border: 1px dashed var(--line);
}

.cf-module-slot.is-cf {
    color: var(--ink);
    background: var(--blush);
    font-weight: 700;
}

.cf-module-slot.is-planned {
    align-items: start;
    color: var(--ink);
    background: #e4ead9;
    outline: 2px solid var(--green-dark);
    outline-offset: -2px;
    font-weight: 700;
}

.cf-slot-arrow {
    margin: 0 0.3em;
    color: var(--muted);
}

.cf-slot-before {
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 500;
}

.cf-slot-after {
    display: block;
    margin-top: 0.2rem;
    color: var(--green-dark);
    font-weight: 700;
}

.cf-module-slot-label {
    min-width: 0;
}

.cf-module-slot-toggle {
    flex-shrink: 0;
    padding: 0.25rem 0.7rem;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.cf-module-slot-toggle:hover {
    border-color: var(--pink);
}

.cf-module-slot-toggle[aria-pressed="true"] {
    color: var(--white);
    background: var(--pink-dark);
    border-color: var(--pink-dark);
}

.cf-module-slot-toggle[aria-pressed="false"] {
    color: var(--green-dark);
    background: #e4ead9;
    border-color: transparent;
}

.cf-loadout-toggle {
    display: flex;
    margin-top: 1rem;
    align-items: center;
    gap: 0.6rem;
}

.cf-loadout-toggle label {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.cf-loadout-side {
    padding-left: clamp(1.5rem, 3vw, 2.5rem);
    border-left: 1px solid var(--line);
}

.cf-result-status {
    display: inline-flex;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cf-result-status.is-reached {
    color: var(--green-dark);
    background: #e4ead9;
}

.cf-result-status.is-short {
    color: var(--pink-dark);
    background: var(--blush);
}

.cf-result dl {
    display: grid;
    margin: 1rem 0 0;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
}

.cf-result dt {
    color: var(--muted);
}

.cf-result dd {
    margin: 0;
    font-weight: 700;
}

.cf-planner {
    padding: 1.5rem;
    background: var(--paper-deep);
    border-radius: 1.25rem;
}

.cf-planner h3 {
    margin: 0;
}

.cf-planner > p {
    margin-top: 0.35rem;
    color: var(--muted);
}

.cf-reset-button {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0.5rem 1.1rem;
    color: var(--pink-dark);
    background: transparent;
    border: 1px solid var(--pink-dark);
    border-radius: 999px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}

.cf-reset-button:hover {
    color: var(--white);
    background: var(--pink-dark);
}

.cf-planner-row {
    display: flex;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    align-items: start;
    gap: 1.5rem;
}

.cf-planner-box {
    padding: 1.1rem 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1rem;
}

.cf-planner-form {
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.cf-planner-form .cf-loadout-field {
    margin-top: 0;
}

.cf-planner-form input[type="number"] {
    width: 100%;
}

.cf-planner-actions {
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
    gap: 0.75rem;
}

.cf-planner-submit {
    min-height: 2.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--white);
    background: var(--green-dark);
    border: none;
    border-radius: 999px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.cf-planner-submit:hover {
    background: var(--green);
}

.cf-investment-box {
    flex: 1 1 260px;
}

.cf-investment-box h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.cf-investment-summary {
    margin: 0.75rem 0 0;
    color: var(--ink);
}

.cf-investment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.cf-investment-table th,
.cf-investment-table td {
    padding: 0.35rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.cf-investment-table thead th {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cf-investment-table thead th:first-child {
    text-align: left;
}

.cf-investment-table tbody th {
    color: var(--ink);
    font-weight: 500;
}

.cf-investment-table tbody tr:last-child th,
.cf-investment-table tbody tr:last-child td {
    border-bottom: none;
}

.cf-planner-result {
    color: var(--ink);
}

.cf-planner-result ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.cf-breakdown {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.cf-breakdown summary {
    cursor: pointer;
}

.cf-breakdown ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

.cf-message {
    padding: 1rem;
    color: var(--ink);
    background: var(--blush);
    border-radius: 0.75rem;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(1.2rem, 1.8rem) rotate(115deg); }
}

@media (max-width: 900px) {
    .cf-loadout-body {
        grid-template-columns: 1fr;
    }

    .cf-loadout-side {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: none;
    }
}

@media (max-width: 760px) {
    .site-header {
        width: calc(100% - 2rem);
    }

    .js .menu-toggle {
        position: relative;
        z-index: 2;
        display: grid;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0.75rem;
        place-content: center;
        gap: 0.35rem;
        background: rgba(255, 250, 247, 0.8);
        border: 1px solid var(--line);
        border-radius: 50%;
    }

    .menu-toggle span:not(.visually-hidden) {
        display: block;
        width: 1rem;
        height: 2px;
        background: var(--ink);
        transition: transform 180ms ease;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .site-navigation {
        position: absolute;
        top: 4.5rem;
        right: 0;
        display: flex;
        width: min(18rem, calc(100vw - 2rem));
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(255, 250, 247, 0.98);
        border: 1px solid var(--line);
        border-radius: 1rem;
        box-shadow: var(--shadow);
    }

    .js .site-navigation {
        display: none;
    }

    .js .site-navigation.is-open {
        display: flex;
    }

    .site-navigation a {
        padding: 0.85rem 0.75rem;
    }

    .site-navigation a::after {
        display: none;
    }

    .hero {
        min-height: 780px;
    }

    .sakura-branch {
        width: 68vw;
    }

    .about {
        grid-template-columns: 1fr;
    }

    .about-copy {
        max-width: none;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-cards,
    .project-notes {
        grid-template-columns: 1fr;
    }

    .image-slot {
        min-height: 340px;
    }

    .project-gallery .image-slot,
    .project-gallery > :nth-child(2) .image-slot {
        border-radius: 7rem 7rem 1.2rem 1.2rem;
    }

    .page-hero {
        min-height: 680px;
    }

    .project-detail-image {
        min-height: 330px;
    }

    .binder-introduction,
    .binder-notes {
        grid-template-columns: 1fr;
    }

    .binder-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .binder-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .binder-position {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .binder-viewport {
        padding: 0.6rem;
    }

    .binder-book {
        min-width: 650px;
    }

    .binder-jump {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        padding: 2rem 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.5rem;
    }

    .site-footer p {
        margin: 0;
    }

    .cf-core-modules {
        grid-template-columns: 1fr;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
