@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/static/fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/static/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;
}

/* Digital palette inspired by Tangerine Tango; these are custom sRGB colours. */
body {
    --bg: #f6f4ee;
    --ink: #252826;
    --muted: #62665f;
    --line: rgba(37, 40, 38, 0.17);
    --panel: #fffefa;
    --accent: #b44327;
    --accent-2: #b44327;
    --accent-3: #b44327;
    --accent-4: #b44327;
    --shadow: 0 14px 45px rgba(37, 40, 38, 0.06);
    background: var(--bg);
    font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body::before { background: var(--bg); }
body #field { opacity: 0.055; }
body .header-controls { background: #fffefa; border-radius: 8px; }
body nav a { border-radius: 5px; font-size: 0.85rem; font-weight: 600; }
body nav a[aria-current="page"] { background: var(--ink); box-shadow: none; }
body nav a:hover { background: #eee9df; color: var(--ink); box-shadow: none; }
body .brand-mark strong { color: var(--muted); }
body :is(a, button, summary, input, textarea):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
body :is(input, textarea) { accent-color: var(--accent); }
body .language-options { z-index: 30; background: #fffefa; }
body .language-switcher summary { min-height: 36px; }

/* Work: readable project captions and a distinct filter workspace. */
.page-work .gallery-page { padding-top: clamp(30px, 5vh, 64px); padding-bottom: 64px; }
.page-work .gallery-page-title {
    margin: 0 0 32px;
    font-size: clamp(2.8rem, 5.5vw, 5.8rem);
    font-weight: 720;
    line-height: 1.05;
    letter-spacing: -0.055em;
}
.page-work .gallery-controls {
    margin-bottom: 12px;
    padding: 20px 24px 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--ink);
    border-radius: 6px;
    background: #fffefa;
}
.page-work .gallery-controls-label { margin-bottom: 14px; color: var(--accent); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.12em; }
.page-work .gallery-filters { gap: 7px; }
.page-work .filter-chip {
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid #d2cec3;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 550;
}
.page-work .filter-chip:hover { background: #eeeae1; color: var(--ink); }
.page-work .filter-chip.active { background: var(--ink); border-color: var(--ink); color: white; }
.page-work .gallery-filter-status { margin-top: 14px; font-size: 0.76rem; font-weight: 650; color: var(--ink); }
.page-work .gallery-reset-hint { margin: 0 0 28px; font-size: 0.76rem; }
.page-work .gallery-canvas .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; grid-auto-flow: row; gap: 26px; align-items: start; }
.page-work .gallery-canvas .gallery-card:nth-child(n) {
    display: block;
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffefa;
    color: var(--ink);
    box-shadow: none;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.page-work .gallery-canvas .gallery-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(37,40,38,0.07); }
.page-work .gallery-canvas .gallery-image-wrap { position: relative; display: block; inset: auto; width: 100%; aspect-ratio: 4 / 3; background: #e6e1d5; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-work .gallery-visual { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 10px; }
.page-work .gallery-card:hover .gallery-visual,
.page-work .gallery-card:focus-visible .gallery-visual { transform: none; }
.page-work .gallery-card-count { background: #252826; color: white; border: 0; border-radius: 4px; font-size: 0.65rem; }
.page-work .gallery-canvas .gallery-card-copy { position: static; padding: 20px; background: #fffefa; color: var(--ink); gap: 10px; }
.page-work .gallery-card-copy > span { color: var(--accent) !important; font-size: 0.62rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.page-work .gallery-card-copy strong { font-size: clamp(1.15rem, 1.55vw, 1.6rem); line-height: 1.25; font-weight: 750; letter-spacing: -0.03em; }
.page-work .gallery-card-copy ul { margin: 4px 0 0; }
.page-work .gallery-canvas .gallery-card-copy li { color: var(--muted); border: 0; border-radius: 0; padding: 0; font-size: 0.7rem; font-weight: 450; }
.page-work .gallery-card-copy li + li::before { content: '·'; margin-right: 8px; }
.page-work .project-detail { grid-template-columns: minmax(0, 1fr); background: #fffefa; border: 1px solid #c9c5ba; border-radius: 8px; box-shadow: 0 24px 100px rgba(37,40,38,0.2); }
.page-work :is(.detail-header, .detail-layout, .detail-story, .detail-media-toolbar) { min-width: 0; }
.page-work .detail-header { background: #f2eee5; border-bottom: 1px solid #c9c5ba; }
.page-work .detail-header .project-meta { font-size: 0.65rem; font-weight: 650; }
.page-work .detail-close { border-radius: 5px; background: var(--ink); color: white; }
.page-work .detail-close:hover { background: var(--accent); }
.page-work .detail-media-panel { background: #e6e1d5; }
.page-work .detail-stage { position: relative; background: #e6e1d5; }
.page-work .detail-stage-figure video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; background: #181a18; }
.page-work .detail-stage-figure {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.page-work .detail-stage-figure img {
    position: absolute;
    inset: 0;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 12px;
    object-fit: contain;
    object-position: center;
}
.page-work :is(.detail-media-toolbar, .detail-thumbnails) { background: #f2eee5; border-color: #c9c5ba; }
.page-work .detail-media-button { border-radius: 4px; min-width: 36px; min-height: 36px; }
.page-work .detail-thumbnail { background: #e6e1d5; }
.page-work .detail-thumbnail img { object-fit: contain; }
.page-work .detail-story h2 { font-size: clamp(1.8rem, 2.6vw, 2.7rem); line-height: 1.1; font-weight: 750; letter-spacing: -0.04em; }
.page-work .detail-summary { padding: 16px; background: #f2eee5; border-left: 3px solid var(--accent); font-size: 0.95rem; font-weight: 550; }
.page-work .detail-story #detail-description { font-size: 0.9rem; line-height: 1.75; }
.page-work .detail-story { padding: 28px; }
.page-work .detail-story > h2 { margin-bottom: 28px; }
.page-work .detail-case-section { margin: 0; padding: 20px 0; border-top: 1px solid var(--line); }
.page-work .detail-case-section:first-child { border-top: 3px solid var(--ink); }
.page-work .detail-case-section h3 {
    display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px;
    font-size: 1rem; line-height: 1.3; font-weight: 750; letter-spacing: -0.015em;
}
.page-work .detail-case-section h3 span { color: var(--accent); font-size: 0.64rem; font-weight: 650; letter-spacing: 0.06em; }
.page-work .detail-case-section h3 #detail-request-label { color: inherit; font: inherit; letter-spacing: inherit; }
.page-work .detail-links { display: grid; gap: 10px; margin-top: 18px; }
.page-work .detail-links:empty { display: none; }
.page-work .detail-links a { color: var(--accent); font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
.page-work .detail-case-section p { margin: 0; color: var(--muted); font-size: 0.87rem; line-height: 1.7; white-space: pre-line; }
.page-work .detail-case-section p.is-pending { border-left: 2px solid #c9c5ba; padding-left: 12px; font-size: 0.8rem; }
.page-work .detail-case-description { padding-bottom: 4px; }
.page-work .detail-project-cta { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 14px; background: var(--accent); color: white; border-radius: 5px; font-size: 0.82rem; font-weight: 650; }
.page-work .detail-project-cta:hover { background: var(--ink); }
.page-work .detail-chapter-nav {
    display: block; position: sticky; top: -28px; z-index: 3;
    margin: 0 -28px 12px; padding: 14px 24px 0;
    background: #fffefa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.page-work .detail-chapter-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-bottom: 12px; }
.page-work .detail-chapter-buttons button {
    display: grid; gap: 4px; text-align: left; padding: 9px 8px;
    border: 0; border-radius: 4px; background: transparent; color: var(--muted);
    font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer;
}
.page-work .detail-chapter-buttons button > span { font-size: 0.6rem; color: var(--accent); letter-spacing: 0.08em; }
.page-work .detail-chapter-buttons button:hover { background: #f2eee5; color: var(--ink); }
.page-work .detail-chapter-buttons button[aria-current] { background: var(--ink); color: #fffefa; }
.page-work .detail-chapter-buttons button[aria-current] > span { color: #f1b49b; }
.page-work .detail-reading-progress { height: 3px; margin: 0 -24px; background: #e6e1d5; overflow: hidden; }
.page-work .detail-reading-progress > span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 120ms linear; }
.page-work .detail-case-section { transition: border-color 200ms ease; }
.page-work .detail-case-section.is-current { border-top-color: var(--accent); }
.page-work .detail-case-section.is-current p { color: var(--ink); }
.page-work .detail-tour { white-space: nowrap; font-weight: 650; }
.page-work .detail-tour[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.page-work .detail-stage-figure { animation: media-reveal 220ms ease-out; }
.page-work .detail-thumbnail.is-video { position: relative; }
.page-work .detail-thumbnail.is-video::after { content: '▶'; position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 3px; background: var(--ink); color: white; font-size: 0.65rem; }
@keyframes media-reveal { from { opacity: 0.25; } to { opacity: 1; } }
@media (min-width: 861px) {
    .page-work .detail-layout { grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.9fr); }
}
.page-work .detail-tags { padding-top: 20px; border-top: 1px solid var(--line); }
.page-work .detail-tags li { border-color: #d2cec3; border-radius: 4px; color: var(--muted); font-size: 0.72rem; }
@media (max-width: 1000px) {
    .page-work .gallery-canvas .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 560px) {
    .page-work .gallery-canvas .gallery-grid { grid-template-columns: minmax(0, 1fr); }
    .page-work .gallery-controls { padding: 16px; }
    .page-work .gallery-card-copy strong { font-size: 1.3rem; }
    .page-work .gallery-page-title { margin-bottom: 24px; }
}

.page-home .hub-hero-copy h1 { font-weight: 650; letter-spacing: -0.06em; }
.page-home .hub-hero-copy > .eyebrow { font-weight: 700; letter-spacing: 0.12em; color: var(--accent); }
.page-home .hub-hero-intro { font-size: 1rem; }
.page-home .hub-home-contact { background: var(--accent); }
.page-home .hub-home-contact:hover { background: var(--ink); }
.page-home .hub-home-work { min-height: 28px; display: inline-flex; align-items: center; }
.page-home .hub-workspace { background: #fffefa; border-radius: 8px; }
.page-home .hub-route-tab { min-height: 90px; }
.page-home .hub-route-tab strong { font-size: 0.8rem; font-weight: 650; }
.page-home .hub-route-tab.active { background: var(--ink); }
.page-home .hub-route-tab.active span { color: #f1b49b; }
.page-home .hub-route-tab:hover:not(.active) { background: #eee9df; color: var(--ink); }
.page-home .hub-menu-button { min-height: 48px; }
.page-home .hub-menu-button strong { font-size: 0.8rem; font-weight: 650; }
.page-home .hub-route-label, .page-home .hub-route-result span { font-size: 0.68rem; letter-spacing: 0.08em; }
.page-home .hub-route-text { font-size: 0.9rem; }
.page-home .hub-detail-view h2 { font-weight: 650; }
.page-home .hub-route-result { font-weight: 550; }
.page-home .hub-route-signal {
    background: #e6e1d5;
    color: #51554e;
    border: 1px solid #d4cebf;
}
.page-home .hub-route-signal strong { font-weight: 450; color: var(--accent); }
.page-home .hub-route-signal span { font-size: 0.65rem; }
.page-home .hub-project-form label { font-size: 0.65rem; }
.page-home .hub-project-send { background: var(--accent); }
.page-home .hub-project-send:hover { background: var(--ink); }

.page-about .about-intro-copy h1 { font-weight: 600; }
.page-about .about-intro-copy > p:last-child { font-size: 1.05rem; line-height: 1.8; }
.page-about .about-intro { grid-template-columns: 280px minmax(0, 1fr); }
.page-about .about-portrait { width: 280px; background: #eee9df; border: 1px solid var(--line); overflow: hidden; }
.page-about .about-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@media (max-width: 760px) {
    .page-about .about-intro { grid-template-columns: minmax(0, 1fr); }
    .page-about .about-portrait { width: 200px; }
}
.page-about .profile-grid { gap: 64px; }
.page-about .education-row { flex-wrap: wrap; }
.page-about :is(.education-row strong, .experience-row h3) { font-size: 1rem; }
.page-about .experience-row p { font-size: 0.95rem; line-height: 1.7; }
.page-about .upwork-card { background: #fffefa; box-shadow: none; }
.page-about .upwork-card:hover { border-color: var(--accent); }
.page-about .upwork-job-meta { flex-wrap: wrap; }

.page-contact .contact-page {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: clamp(32px, 6vw, 100px);
    align-content: start;
    padding: clamp(32px, 5vh, 64px) 0 64px;
}
.page-contact .contact-page > h1 { grid-column: 1; margin: 0; font-size: clamp(3rem, 6vw, 6rem); line-height: 1.05; font-weight: 600; }
.page-contact .contact-invitation { grid-column: 1; margin-top: 24px; padding-top: 24px; gap: 26px; }
.page-contact .contact-invitation h2 { font-size: clamp(1.2rem, 1.7vw, 1.7rem); line-height: 1.5; font-weight: 450; }
.page-contact .contact-email { font-size: clamp(1rem, 1.7vw, 1.65rem); overflow-wrap: anywhere; }
.page-contact .contact-method { background: var(--ink); border-radius: 5px; box-shadow: none; }
.page-contact .contact-method:hover { background: var(--accent); }
.page-contact .contact-details { grid-template-columns: 1fr; gap: 6px; font-size: 0.85rem; }
.page-contact .problem-report { grid-column: 2; grid-row: 1 / 3; grid-template-columns: 1fr; gap: 20px; margin: 0; padding: 0; border: 0; }
.page-contact .problem-report-heading h2 { max-width: 24ch; font-size: clamp(1.5rem, 2.3vw, 2.5rem); line-height: 1.15; font-weight: 600; }
.page-contact .problem-report-heading > p:last-child { font-size: 0.9rem; line-height: 1.6; }
.page-contact .problem-form { background: #fffefa; gap: 16px; }
.page-contact .problem-form-submit { background: var(--accent); border-color: var(--accent); border-radius: 5px; }
.page-contact .problem-form label { font-size: 0.8rem; }
.page-contact .form-note { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }

@media (max-width: 860px) {
    .page-contact .contact-page { grid-template-columns: 1fr; gap: 0; }
    .page-contact .problem-report { grid-column: 1; grid-row: auto; margin-top: 40px; }
    .page-about .profile-grid { gap: 32px; }
}
@media (max-width: 720px) {
    .page-home .hub-route-tab { min-height: 56px; }
    .page-home .hub-route-tab strong { font-size: 0.71rem; }
    .page-home .hub-menu-button strong { font-size: 0.71rem; }
    .page-home .hub-menu-button { min-height: 42px; }
    .page-home .hub-hero-intro { font-size: 0.8rem; }
    .page-home .hub-home-work { display: none; }
    body :is(input:not([type="file"]), textarea) { font-size: 1rem; }
}
@media (max-width: 720px) and (max-height: 740px) {
    .page-home .hub-route-tab { min-height: 46px; }
    .page-home .hub-detail-view { gap: 7px; }
    .page-home .hub-route-text { font-size: 0.8rem; }
    .page-home .hub-route-result { font-size: 0.72rem; }
    .page-home .hub-deliverables li { font-size: 0.74rem; }
}
/* Preserve reading and access when a screen is zoomed or unusually short. */
@media (max-width: 359px), (max-height: 560px) {
    .page-home { height: auto; min-height: 100svh; }
    .page-home .hub-hero { height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto; }
    .page-home .hub-workspace { height: auto; min-height: 460px; }
    .page-home .hub-detail-view { height: auto; min-height: 320px; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
    body *, body *::before, body *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    html:has(body) { scroll-behavior: auto; }
}

/* Hierarchy: service choices, view navigation, content, supporting evidence. */
.page-home .hub-route-tabs { background: #eeeae1; border-bottom-color: #bdb9ae; }
.page-home .hub-route-tab { gap: 10px; }
.page-home .hub-route-tab strong { font-size: 0.87rem; font-weight: 750; line-height: 1.3; }
.page-home .hub-route-tab span { font-size: 0.65rem; font-weight: 600; color: var(--muted); }
.page-home .hub-route-menu { background: #f8f6f0; border-bottom: 1px solid #c9c5ba; }
.page-home .hub-menu-button strong { font-size: 0.76rem; font-weight: 550; }
.page-home .hub-menu-button.active strong { font-weight: 750; }
.page-home .hub-menu-button.active { border-bottom-width: 3px; }
.page-home .hub-route-stage { border-right: 1px solid var(--line); }
.page-home .hub-route-signals { margin-left: 18px; }
.page-home .hub-detail-view h2 { font-size: clamp(1.65rem, 2.25vw, 2.65rem); font-weight: 750; line-height: 1.1; }
.page-home .hub-route-label { color: var(--muted); font-weight: 650; letter-spacing: 0.12em; }
.page-home .hub-route-result {
    padding: 12px 14px;
    border: 0;
    border-left: 3px solid var(--accent);
    background: #f2eee5;
    font-size: 0.84rem;
    line-height: 1.5;
    font-weight: 550;
}
.page-home .hub-route-result span { color: var(--accent); font-weight: 750; }
.page-home .hub-hero-copy h1 { font-weight: 720; }
.page-home .hub-hero-intro { padding-top: 20px; border-top: 1px solid var(--line); }
.page-home .hub-deliverables li { font-size: 0.84rem; line-height: 1.45; }
.page-home .hub-project-form { border-top: 1px solid var(--line); padding-top: 12px; }
.page-about .profile-block {
    padding: 24px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--ink);
    border-radius: 6px;
    background: #fffefa;
}
.page-about .profile-grid { gap: 28px; border-top: 0; padding-top: 0; margin-top: 56px; }
.page-about .profile-block .eyebrow { margin: 0 0 12px; font-size: 0.68rem; letter-spacing: 0.12em; }
.page-about .profile-block h2 { margin: 0; font-size: clamp(1.45rem, 2.1vw, 2.1rem); font-weight: 750; }
.page-about .experience-row h3 { font-size: 1.1rem; font-weight: 750; }
.page-about .experience-meta { font-size: 0.67rem; font-weight: 600; line-height: 1.6; }
.page-about .about-upwork { border-top: 2px solid #c9c5ba; padding-top: 36px; }
.page-about .about-upwork h2 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); font-weight: 750; }
.page-about .upwork-disclosure { background: #fffefa; border: 1px solid var(--line); border-radius: 6px; padding: 0 22px; }
.page-contact .contact-page > h1 { font-weight: 700; }
.page-contact .problem-report { border-left: 1px solid #c9c5ba; padding-left: clamp(24px, 3vw, 48px); }
.page-contact .problem-report-heading h2 { font-weight: 750; }
.page-contact .problem-form { border-top: 3px solid var(--ink); }
.page-contact .contact-invitation h2 { font-size: clamp(1.1rem, 1.45vw, 1.4rem); }
.page-contact .contact-details p { font-weight: 450; }
.page-contact .contact-details p:first-child { font-weight: 750; color: var(--ink); }

@media (max-width: 860px) {
    .page-contact .problem-report { border-left: 0; border-top: 2px solid #c9c5ba; padding-left: 0; padding-top: 28px; }
}
@media (max-width: 720px) {
    .page-home .hub-route-tab { gap: 3px; }
    .page-home .hub-route-tab strong { font-size: 0.72rem; }
    .page-home .hub-route-stage { border-right: 0; }
    .page-home .hub-route-signals { margin-left: 0; }
    .page-home .hub-detail-view h2 { font-size: 1.5rem; }
    .page-home .hub-hero-intro { padding-top: 0; border-top: 0; }
    .page-home .hub-route-result { font-size: 0.75rem; padding: 10px 12px; }
    .page-home .hub-project-form { padding-top: 4px; }
    .page-home [data-hub-view-panel="start"] { gap: 8px; }
    .page-about .profile-block { padding: 20px; }
}
@media (max-width: 720px) and (max-height: 740px) {
    .page-home .hub-route-result { font-size: 0.72rem; padding: 7px 10px; }
    .page-home .hub-project-form { padding-top: 8px; }
    .page-home .hub-deliverables li { font-size: 0.74rem; line-height: 1.3; }
}
