@font-face {
    font-family: "Instrument Serif"; src: url("generated/instrument-serif-latin-400-normal.woff2") format("woff2");
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: "Instrument Serif"; src: url("generated/instrument-serif-latin-400-italic.woff2") format("woff2");
    font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
    font-family: "DM Sans"; src: url("generated/dm-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 1000; font-display: swap;
}

:root {
    --ink: #231d40;
    --paper: #f6f4fb;
    --secondary: #514767;
    --line: #c4bdd5;
    --accent: #4d328e;
    --plate: #d4ccf6;
    --lilac: #cfc4f5;
    --deep: #292044;
    --light: #f6f0ff;
    --lemon: #f1f482;
    --serif: "Instrument Serif", Georgia, serif;
    --sans: "DM Sans", "Segoe UI", sans-serif;
    --mono: "Courier New", monospace;
    --ease: cubic-bezier(.19, 1, .22, 1);
    --gutter: clamp(1rem, 4.15vw, 4.5rem);
}
body { font-family: var(--sans); }
::selection { color: var(--deep); background: var(--lemon); }
:focus-visible { outline: 2px solid #5d379d; outline-offset: 4px; }
.skip-link:hover, .skip-link:focus { color: var(--light); background: var(--deep); }
.shell, .case-media { width: min(calc(100% - 2 * var(--gutter)), 1460px); }
.site-header { background: var(--paper); }
.nav-shell { min-height: 4.55rem; gap: .75rem; }
.brand { letter-spacing: -.04em; white-space: nowrap; }
.mark {
    width: 1.05rem; height: .85rem; border-radius: 0; transform: skewX(-24deg);
    background: currentColor; border-left: 5px solid var(--accent); border-right: 3px solid var(--paper);
}
.site-nav { gap: clamp(.75rem, 3vw, 2.6rem); }
.site-nav a { font-weight: 650; }
.site-nav a:hover, .site-footer a:hover { text-decoration: underline; }
.site-nav a:last-child { padding: .45rem .8rem; border: 1px solid var(--ink); }
.site-nav a:last-child:hover { background: var(--lemon); color: var(--ink); }
.site-footer { padding-block: 2.2rem; }
.home-page { min-height: 100svh; display: flex; flex-direction: column; }
.home-page main { flex: 1; display: grid; }
.home-page .nav-shell { min-height: clamp(3.6rem, 8svh, 4.75rem); }
.home-footer { padding-block: clamp(.9rem, 2.4svh, 1.5rem); }
.home-footer .shell { justify-content: space-between; font-size: .9rem; }
.home-footer a { text-decoration: underline; }
.masthead {
    display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
}
.identity {
    padding-block: clamp(1.4rem, 4svh, 3rem);
    padding-inline: max(var(--gutter), calc((100vw - 1460px) / 2)) clamp(1rem, 2.1vw, 2.2rem);
    display: grid; align-content: center;
}
.identity h1 {
    font: 400 clamp(6rem, min(12.85vw, 23.2svh), 14.6rem)/.75 var(--serif);
    letter-spacing: -.063em; margin: .12em 0 .225em -.025em;
}
.identity h1 em { font: inherit; font-style: italic; color: var(--accent); }
.masthead-lead { font-size: clamp(1.04rem, 1.55vw, 1.48rem); line-height: 1.32; font-weight: 620; letter-spacing: -.03em; }
.masthead-detail { color: var(--secondary); margin-top: .55rem; max-width: 33ch; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.1rem; margin-top: clamp(1rem, 3svh, 1.6rem); }
.studio-button {
    display: inline-block; padding: .66rem .9rem;
    background: var(--deep); color: var(--light); font-weight: 600;
    transition: background .24s, color .24s;
}
.studio-button:hover { background: var(--lemon); color: var(--ink); }
.degree-link { font-size: .9rem; font-weight: 620; color: var(--secondary); text-decoration: underline; text-underline-offset: .35em; }
.cad-plate {
    min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; margin: 0;
    background: var(--lilac); border-inline-start: 1px solid var(--line);
}
.cad-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .8rem;
    padding: clamp(.85rem, 2.1svh, 1.45rem) clamp(1rem, 2.2vw, 2.3rem);
}
.cad-head h2 { font-size: clamp(1.05rem, 2vw, 1.7rem); font-weight: 650; letter-spacing: -.045em; }
.featured-link {
    font-size: .88rem; font-weight: 650; color: #3e2a70;
    text-decoration: underline; text-underline-offset: .3em;
}
.cad-field {
    position: relative; isolation: isolate; overflow: hidden; min-height: clamp(245px, 45svh, 480px);
    background: #ddd7ee;
    border-block: 1px solid #8b7aaf80;
}
.cad-field::after {
    content: ""; position: absolute; pointer-events: none; inset: 12px;
    border: 1px solid #64508e57;
    mask: conic-gradient(at 16px 16px, transparent 75%, #000 0) 0 0 / calc(100% - 16px) calc(100% - 16px);
}
.cad-preview, .cad-embed { position: absolute; width: 100%; height: 100%; inset: 0; }
.cad-preview { object-fit: contain; inset-block: 4%; height: 92%; }
.cad-embed { border: 0; background: #ddd7ee; opacity: 0; pointer-events: none; transition: opacity .26s var(--ease); }
.cad-preview-label {
    position: absolute; bottom: 1.15rem; left: 1.25rem; padding: .25rem .6rem;
    color: var(--deep); background: #f2edf8; font-size: .75rem; font-weight: 650;
}
[data-viewer-state="ready"] .cad-embed { opacity: 1; pointer-events: auto; z-index: 1; }
[data-viewer-state="ready"] .cad-field::after,
[data-viewer-state="ready"] .cad-preview-label { opacity: 0; }
[data-viewer-state="ready"] .cad-preview { visibility: hidden; transition: visibility 0s .26s; }
.cad-field:focus-within { outline: 2px solid var(--accent); outline-offset: -3px; }
.cad-caption { padding: .85rem clamp(1rem, 2.2vw, 2.3rem) 1rem; background: var(--lilac); }
.cad-caption p { color: #483b67; font-size: .89rem; max-width: 66ch; }
.cad-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .55rem; }
.cad-toggle { border: 1px solid var(--deep); min-height: 42px; padding: .46rem .8rem; }
.cad-toggle[hidden] { display: none; }
.cad-toggle:active { background: var(--lilac); color: var(--ink); }
.project-intro {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem;
    align-items: end; padding-block: .65rem 1.25rem;
}
.page-hero h1, .case-hero h1, .contact-section h1 {
    font: 400 clamp(4.3rem, 9.6vw, 10rem)/.83 var(--serif); letter-spacing: -.05em;
}
.page-hero h1 em, .case-hero h1 em, .contact-section h1 em { color: var(--accent); font: inherit; font-style: italic; }
.project-intro p { padding-bottom: 1rem; }
.exhibition { background: var(--deep); color: var(--light); padding-block: clamp(2.5rem,5.9vw,6.5rem); }
.exhibits { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: clamp(2.2rem,6.5vw,6rem) clamp(.8rem,3vw,3rem); align-items: start; }
.exhibit { min-width: 0; border-top: 1px solid #786994; padding-top: .7rem; display: flex; flex-direction: column; }
.exhibit figure { overflow: hidden; background: var(--lilac); }
.exhibit img, .exhibit video {
    width: 100%; height: clamp(190px, 28vw, 440px); object-fit: cover;
    transition: transform .65s var(--ease);
}
a.exhibit:hover, a.exhibit:focus-visible { color: var(--lemon); }
a.exhibit:hover img, a.exhibit:focus-visible img { transform: scale(1.04); }
.exhibit-text { order: -1; padding-block: .15rem 1.15rem; }
.exhibit small { font-family: var(--sans); color: #e0d5f6; text-transform: none; }
.exhibit h2 { font: 400 clamp(2rem,4.05vw,4.8rem)/.94 var(--serif); margin-block: .15em .22em; }
.exhibit p { max-width: 53ch; color: #ece4f9; }
.work-primary { grid-column: 1 / 8; }
.work-primary img { height: clamp(260px,36vw,525px); object-position: 50% 62%; }
.work-schematic { grid-column: 8 / -1; margin-top: clamp(2rem, 8vw, 7rem); }
.work-robot { grid-column: 1 / 7; }
.work-elevator { grid-column: 7 / -1; }
.work-schematic img { object-fit: contain; background: #e9e1f9; }
.work-elevator img { object-position: center 86%; }
.experience-page .page-hero .shell:has(.portrait) { padding-right: 33%; }
.experience-page .portrait { width: 26%; min-height: 100%; }
.experience-page .experience-section { background: var(--plate); }
.experience-page .timeline li { padding-block: 1.5rem; }
.experience-page .experience-intro h2, .section-heading h2, .case-summary h2, .case-section-header h2 {
    font: 400 clamp(2.7rem,5.1vw,5.6rem)/.93 var(--serif); letter-spacing: -.035em;
}
.experience-page h2 em, .case-summary h2 em, .case-section-header h2 em { font: inherit; font-style: italic; }
.case-meta { border-color: var(--line); }
.case-meta div span:first-child, .case-breadcrumb, .timeline-role, .timeline-date {
    font-family: var(--sans); text-transform: none; font-weight: 650; letter-spacing: 0;
}
.case-breadcrumb a, .case-next a { text-decoration: underline; text-underline-offset: .24em; }
.case-hero h1 { font-size: clamp(4rem, 6.4vw, 7.8rem); }
.case-media img, .case-media video, .case-gallery img, .case-gallery video { background: var(--plate); }
.case-media.schematic-media img { background: #ede7f8; }
.case-cad-embed summary img { object-fit: contain; background: #ddd7ee; }
.case-body { overflow-wrap: anywhere; }
.case-system {
    padding: clamp(1.1rem, 3vw, 2.6rem); background: var(--deep); color: var(--light);
}
.case-system .case-section-header p, .case-system .system-note { color: #e5d9f7; }
.system-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; list-style: none; }
.system-flow li { padding: .8rem 1rem .9rem; border: 1px solid #9585af; margin-right: -1px; }
.system-flow li:first-child { border-top-color: var(--lemon); }
.system-flow strong, .system-flow span { display: block; }
.system-flow span { font-size: .88rem; color: #e5d9f7; margin-top: .2rem; }
.system-note { margin-top: .8rem; font-size: .91rem; }
.case-team-photo img { width: min(100%, 1024px); height: auto; }
.case-team-photo figcaption { margin-top: .55rem; color: var(--secondary); font-size: .91rem; }
.case-next { padding: 1.4rem; background: var(--plate); }
.contact-section { background: var(--plate); }
.project-page main.tech-case { display: block; width: auto; }
.exhibition :focus-visible { outline-color: var(--lemon); }
@keyframes page-arrive { from { opacity: .78; translate: 0 3px; } }
@media (prefers-reduced-motion: no-preference) {
    :is(.content-page, .project-page) > main { animation: page-arrive .22s var(--ease) both; }
    .home-page .nav-shell { animation: identity-arrive .3s var(--ease) both; }
    .identity h1 { animation: identity-arrive .48s var(--ease) both; }
    .identity :is(.masthead-lead, .masthead-detail, .masthead-actions) { animation: identity-arrive .43s var(--ease) .07s both; }
    .cad-preview { animation: plate-open .55s var(--ease) both; }
    @keyframes identity-arrive {
        from { opacity: .76; transform: translateY(6px); }
        to { opacity: 1; transform: none; }
    }
    @keyframes plate-open {
        from { opacity: .72; clip-path: inset(5% 4%); }
        to { opacity: 1; clip-path: inset(0); }
    }
    @supports (animation-timeline: view()) {
        .case-gallery img {
            animation: plate-open linear both; animation-timeline: view(); animation-range: entry 0% entry 60%;
        }
    }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    :is(.degree-link, .featured-link, .profile-project, .site-nav a) { transition: color .16s, text-underline-offset .18s; }
    :is(.degree-link, .featured-link):hover { text-underline-offset: .43em; }
}
@media (min-width: 1660px) {
    .masthead { grid-template-columns: minmax(0, 40.5%) minmax(0, 1fr); }
}
@media (max-width: 740px), (max-width: 900px) and (orientation: portrait) {
    .masthead { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .identity { padding: clamp(1.45rem, 4vh, 2.7rem) var(--gutter) clamp(1.35rem, 3.5vh, 2.25rem); }
    .identity h1 { font-size: clamp(3.1rem, 15.5vw, 7.6rem); line-height: .83; margin: .08em 0 .235em; }
    .identity h1 br { display: none; }
    .identity h1 em { margin-left: .05em; }
    .cad-plate { border-inline-start: none; border-top: 1px solid var(--line); }
    .cad-field { min-height: clamp(215px, 67vw, 440px); }
    .cad-caption [role="status"] { min-block-size: 2.8em; }
}
@media (max-width: 700px) {
    .system-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .system-flow li { margin-bottom: -1px; }
    .project-intro { grid-template-columns: 1fr; gap: 0; padding-block: 0; }
    .project-intro p { padding-bottom: 0; }
    .exhibit { grid-column: 1 / -1; margin-top: 0; }
    .experience-page .page-hero .shell:has(.portrait) { padding-right: 0; }
    .experience-page .portrait { position: static; width: min(70%, 240px); height: auto; margin-top: 1.3rem; }
}
@media (max-width: 420px) {
    .nav-shell { min-height: 3.6rem; }
    .site-nav { gap: .65rem; }
    .site-nav a { font-size: .83rem; }
    .home-page .brand { font-size: .91rem; gap: .35rem; }
    .home-page .brand .mark { width: .65rem; height: .6rem; }
    .site-nav a:last-child { padding: .32rem .45rem; }
}
@media (max-width: 350px) {
    .nav-shell { gap: .4rem; }
    .site-nav { gap: .4rem; }
    .site-nav a { font-size: .78rem; }
    .nav-shell .brand .mark { display: none; }
    .nav-shell .brand { font-size: .79rem; }
}

