@import url("https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&display=swap");

html.is-restoring-scroll body {
    visibility: hidden;
}

:root {
    --bg: #f6f8fb;
    --bg-soft: #eef3f8;
    --ink: #111827;
    --muted: #596575;
    --line: #d7dde6;
    --paper: #fbfaf6;
    --blue: #4d82ee;
    --green: #78bea1;
    --purple: #756bd2;
    --yellow: #f6ca36;
    --rose: #e47780;
    --shadow: 18px 18px 0 rgba(17, 24, 39, 0.06);
    --mono: "JetBrains Mono", "IBM Plex Mono", "Fira Mono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", "Courier New", monospace;
    --sans: "Geist", "Inter", "Avenir Next", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

html.home-page-root {
    scroll-snap-type: y proximity;
    scroll-padding-top: 0;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--sans);
    line-height: 1.55;
}

body.theme-dim {
    --bg: #111827;
    --bg-soft: #182231;
    --ink: #f5f7fb;
    --muted: #aeb8c6;
    --line: #354052;
}

body.home-page {
    background: #f7f9fc;
}

body.home-page.theme-dim {
    background: #0f1724;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 0;
    background: transparent;
    pointer-events: none;
}

.topbar {
    width: min(1240px, calc(100% - 56px));
    margin: 0 auto;
    padding-top: 14px;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 250px;
    align-items: start;
    gap: 22px;
    pointer-events: none;
}

.top-logo,
.top-social,
.nav-wrap {
    pointer-events: auto;
}

.top-logo {
    grid-column: 1;
    grid-row: 1;
    display: inline-grid;
    justify-self: start;
    padding-top: 12px;
    color: var(--ink);
    text-decoration: none;
    line-height: 0.84;
    transition: opacity 180ms ease, transform 180ms ease;
}

.top-logo span,
.top-logo strong {
    display: block;
    letter-spacing: 0;
}

.top-logo span {
    font-size: 19px;
    font-weight: 900;
}

.top-logo strong {
    padding-left: 24px;
    font-size: 27px;
    font-weight: 950;
}

.nav-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: fit-content;
    max-width: min(980px, calc(100% - 36px));
    min-height: 48px;
    margin: 0 auto;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(190, 201, 216, 0.7);
    border-radius: 999px;
    background: rgba(238, 242, 247, 0.82);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(18px) saturate(1.08);
    pointer-events: auto;
}

body.theme-dim .nav-wrap {
    border-color: rgba(88, 101, 119, 0.74);
    background: rgba(24, 34, 49, 0.78);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
}

.nav-item-active {
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(190, 201, 216, 0.52);
}

body.theme-dim .nav-item-active,
body.theme-dim .nav-item:hover {
    background: rgba(245, 247, 251, 0.1);
}

.top-social {
    grid-column: 3;
    grid-row: 1;
    position: relative;
    justify-self: end;
    width: 250px;
    display: grid;
    justify-items: end;
    padding-top: 10px;
    transition: opacity 180ms ease, transform 180ms ease;
}

body.scrolled-past-top .top-logo,
body.scrolled-past-top .top-social {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px);
}

.icon-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-link {
    width: 28px;
    height: 28px;
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
}

.icon-link:hover {
    background: rgba(255, 255, 255, 0.68);
}

.icon-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-ring {
    fill: none;
    stroke: currentColor;
}

.theme-icon-left {
    fill: #f7f8fb;
    stroke: none;
}

.theme-icon-right {
    fill: #111827;
    stroke: none;
}

body.theme-dim .theme-icon-left {
    fill: #f7f8fb;
}

body.theme-dim .theme-icon-right {
    fill: #111827;
}

.stranger-note {
    position: relative;
    z-index: 1;
    display: block;
    justify-self: start;
    margin-top: 31px;
    margin-left: 34px;
    color: #76716f;
    font-family: "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.05;
    text-decoration: none;
    white-space: pre-line;
    transform: rotate(-5deg);
}

.note-arrow {
    position: absolute;
    top: 31px;
    right: 23px;
    width: 78px;
    height: 67px;
    color: #76716f;
    overflow: visible;
    pointer-events: none;
}

.note-arrow-curve,
.note-arrow-head {
    fill: none;
    stroke: currentColor;
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-dim .stranger-note,
body.theme-dim .note-arrow {
    color: #cfcac7;
}

@media (max-width: 1120px) {
    .topbar {
        grid-template-columns: 130px minmax(0, 1fr) 130px;
    }

    .top-logo span {
        font-size: 16px;
    }

    .top-logo strong {
        padding-left: 18px;
        font-size: 23px;
    }

    .top-social {
        display: none;
    }
}

main {
    overflow: hidden;
}

.hero,
.section-block,
.project-detail,
.contact-card,
.page-title,
.page-shell {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
}

.hero {
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    align-items: center;
    gap: 72px;
    padding: 80px 0 110px;
}

.micro-label {
    margin: 0 0 14px;
    color: #0f766e;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: 66px;
    line-height: 1.07;
    letter-spacing: 0;
}

.sticker {
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    margin: 0 2px;
    padding: 0 10px;
    border-radius: 999px 999px 999px 14px;
    color: #102033;
    font-size: 0.76em;
    line-height: 1;
    transform: rotate(-3deg);
}

.sticker-blue {
    background: #8eb2ff;
}

.sticker-green {
    background: #9ad4b7;
    transform: rotate(2deg);
}

.sticker-purple {
    background: #b6a7ff;
}

.hero-note {
    align-self: end;
    justify-self: start;
    width: clamp(560px, calc(100vw - 800px), 610px);
    padding-bottom: 18px;
    transform: translate(-136px, 46px);
}

.hero-note p {
    margin: 0;
}

@media (max-width: 1120px) {
    .hero-note {
        width: auto;
        max-width: 100%;
    }
}

.section-heading p,
.detail-copy p,
.note-grid p,
.timeline-list p,
.page-title p,
.panel p,
.lead {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.75;
}

.section-heading .project-intro-copy {
    color: var(--ink);
    font-family: "Fira Mono", "Courier Prime", "Courier New", ui-monospace, monospace;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.58;
    letter-spacing: 0;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-links a {
    color: var(--ink);
    font-family: "Fira Mono", "Courier Prime", "Courier New", ui-monospace, monospace;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.58;
    letter-spacing: 0;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
}

.more-row a {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
}

.section-block {
    padding: 96px 0;
    border-top: 1px dashed #aeb7c4;
}

.home-page .hero,
.home-page .section-block {
    min-height: 100svh;
    scroll-snap-align: start;
}

.home-page .hero {
    position: relative;
    z-index: 0;
    padding-top: 53px;
    padding-bottom: 159px;
}

.home-page .hero::before {
    content: "";
    position: absolute;
    inset: 0 calc((100vw - 100%) / -2);
    z-index: -1;
    background: #eef3f8;
}

body.home-page.theme-dim .hero::before {
    background: #151f2d;
}

.home-page .section-block {
    position: relative;
    padding: 132px 0 104px;
    border-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-page .section-block:not(#projects)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(1020px, 100%);
    transform: translateX(-50%);
    border-top: 2px dashed rgba(126, 141, 162, 0.82);
    opacity: 0;
    transition: opacity 140ms ease;
}

body.home-page.show-section-dividers .section-block:not(#projects)::before {
    opacity: 1;
}

body.home-page.theme-dim .section-block:not(#projects)::before {
    border-top-color: rgba(178, 187, 201, 0.56);
}

.home-page .project-detail {
    min-height: 100svh;
    border-top: 0;
    scroll-snap-align: start;
    align-content: center;
}

.home-page .contact-card {
    position: relative;
    align-content: stretch;
    margin-top: clamp(84px, 10vh, 132px);
    margin-bottom: 72px;
    scroll-snap-align: start;
}

.section-heading,
.project-detail {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
}

.section-heading {
    margin-bottom: 34px;
}

.section-heading h2,
.detail-title h1,
.detail-title h2,
.contact-card h2,
.page-title h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: 0;
}

.home-page #projects {
    padding-top: clamp(128px, 15vh, 156px);
    padding-bottom: clamp(128px, 14vh, 154px);
}

.home-page .section-heading {
    width: min(1020px, 100%);
    margin-right: auto;
    margin-left: auto;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(84px, 7.6vw, 118px);
}

.home-page #photography .section-heading {
    gap: clamp(116px, 9.8vw, 142px);
}

.home-page .hero-note p,
.home-page .section-heading p,
.home-page #projects .project-intro-copy {
    max-width: 720px;
    color: var(--ink);
    font-family: "Fira Mono", "Courier Prime", "Courier New", ui-monospace, monospace;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.58;
    letter-spacing: 0;
}

.project-rail,
.photo-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 270px;
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.project-rail::-webkit-scrollbar,
.photo-rail::-webkit-scrollbar {
    display: none;
}

.project-rail {
    grid-auto-columns: clamp(300px, 21.5vw, 420px);
    gap: clamp(15px, 1vw, 20px);
}

.project-card {
    position: relative;
    min-height: clamp(400px, 42svh, 520px);
    padding: clamp(18px, 1.2vw, 26px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
    outline: none;
    scroll-snap-align: start;
    text-decoration: none;
    transition:
        box-shadow 180ms ease,
        transform 180ms ease;
}

.home-page #projects .project-rail {
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    padding: 0 max(28px, calc((100vw - 1020px) / 2)) 28px;
    gap: clamp(14px, 1.15vw, 18px);
    grid-auto-columns: clamp(292px, 21.4vw, 318px);
    scroll-snap-type: none;
}

.home-page #projects .project-card {
    min-height: clamp(420px, 49svh, 492px);
    padding: clamp(18px, 1.35vw, 24px);
    border-radius: 22px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 18px 40px rgba(17, 24, 39, 0.075);
}

.home-page #projects .project-card:hover,
.home-page #projects .project-card:focus {
    transform: translateY(-4px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.24),
        0 24px 46px rgba(17, 24, 39, 0.12);
}

.project-card:hover,
.project-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(17, 24, 39, 0.14);
}

.project-card[data-project-target] {
    cursor: pointer;
}

.card-blue {
    background: #5b84dc;
}

.card-dark {
    background: #2b2d31;
}

.card-green {
    background: #83b79f;
}

.card-rose {
    background: #da7d83;
}

.card-purple {
    background: #7a70c4;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mono);
    font-size: clamp(13px, 0.92vw, 18px);
}

.home-page #projects .card-top {
    position: relative;
    z-index: 1;
    font-size: clamp(14px, 0.98vw, 17px);
    font-weight: 500;
}

.card-top span {
    padding: clamp(7px, 0.56vw, 11px) clamp(11px, 0.94vw, 18px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.home-page #projects .card-top span {
    padding: clamp(8px, 0.62vw, 10px) clamp(13px, 1vw, 18px);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px) saturate(1.1);
}

.project-glyph {
    align-self: center;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--mono);
    font-size: clamp(46px, 3.4vw, 70px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.home-page #projects .project-glyph {
    width: clamp(72px, 5.8vw, 98px);
    height: clamp(72px, 5.8vw, 98px);
    color: rgba(255, 255, 255, 0.88);
    transform: translateY(-10px);
}

.project-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.project-glyph svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-card:hover .project-glyph,
.project-card:focus .project-glyph {
    opacity: 0.86;
    transform: translateY(-12px) scale(0.96);
}

.home-page #projects .project-card:hover .project-glyph,
.home-page #projects .project-card:focus .project-glyph {
    opacity: 0.8;
    transform: translateY(-20px) scale(0.94);
}

.home-page #projects .card-bottom {
    position: relative;
    z-index: 1;
}

.card-bottom h3 {
    margin: 0 0 clamp(10px, 0.7vw, 14px);
    font-size: clamp(17px, 1.18vw, 24px);
    line-height: 1.2;
}

.home-page #projects .card-bottom h3 {
    margin-bottom: clamp(10px, 0.78vw, 13px);
    font-size: clamp(17px, 1.15vw, 21px);
    font-weight: 680;
    line-height: 1.28;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(7px, 0.45vw, 10px);
    margin: 0;
}

.home-page #projects .card-tags {
    gap: clamp(7px, 0.5vw, 9px);
}

.card-tags span {
    padding: clamp(5px, 0.45vw, 8px) clamp(9px, 0.7vw, 14px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--mono);
    font-size: clamp(11px, 0.76vw, 15px);
    line-height: 1.1;
}

.home-page #projects .card-tags span {
    padding: clamp(5px, 0.38vw, 7px) clamp(9px, 0.68vw, 13px);
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(10px, 0.68vw, 13px);
    font-weight: 500;
}

.card-description {
    max-height: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--sans);
    font-size: clamp(16px, 1.12vw, 20px);
    font-weight: 650;
    line-height: 1.48;
    opacity: 0;
    transform: translateY(10px);
    transition:
        max-height 220ms ease,
        margin-top 220ms ease,
        opacity 180ms ease,
        transform 180ms ease;
}

.project-card:hover .card-description,
.project-card:focus .card-description {
    max-height: 190px;
    margin-top: 18px;
    opacity: 1;
    transform: translateY(0);
}

.project-detail {
    padding: 72px 0 96px;
    border-top: 1px dashed #aeb7c4;
}

.project-page .project-detail {
    min-height: 100svh;
    padding: 170px 0 96px;
    border-top: 0;
    align-content: center;
}

.detail-back-link {
    display: inline-block;
    width: fit-content;
    margin-top: 18px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid currentColor;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.project-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.project-highlights article {
    min-height: 150px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.46);
}

.project-highlights span {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 900;
}

.project-highlights h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.project-highlights p {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.65;
}

.tag-row span,
.chip {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.water-showcase {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 0 0 112px;
}

.water-section {
    padding: 78px 0;
    border-top: 1px dashed #aeb7c4;
}

.water-section h2 {
    margin: 0;
    font-size: clamp(32px, 3.2vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.water-section-copy {
    display: grid;
    align-content: start;
    gap: 18px;
}

.water-section-copy p {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.74;
}

.water-section-intro {
    max-width: 780px;
    margin-bottom: 28px;
}

.water-section-architecture {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.water-section-split {
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.water-section-reverse {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

.water-figure {
    margin: 0;
}

.water-figure img {
    width: 100%;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.water-figure-wide img {
    padding: 14px;
    object-fit: contain;
}

.water-figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
}

.water-fact-grid,
.water-process-grid {
    display: grid;
    gap: 12px;
}

.water-fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.water-fact-grid article,
.water-process-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.water-fact-grid article {
    padding: 16px;
}

.water-fact-grid span,
.water-process-grid span {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 900;
}

.water-fact-grid strong {
    display: block;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.35;
}

.water-image-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
    gap: 18px;
    align-items: start;
}

.water-image-grid-cloud {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
}

.water-image-grid .water-figure img {
    height: clamp(300px, 31vw, 440px);
    object-fit: cover;
}

.water-image-grid-cloud .water-figure:first-child img {
    object-fit: contain;
    padding: 10px;
    background: #fff;
}

.water-image-grid-cloud .water-figure:last-child img {
    object-position: top center;
}

.water-detail-list {
    display: grid;
    gap: 9px;
    margin: 4px 0 0;
    padding-left: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
}

.water-section-process {
    padding-bottom: 20px;
}

.water-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.water-process-grid article {
    min-height: 188px;
    padding: 20px;
}

.water-process-grid h3 {
    margin: 10px 0 10px;
    font-size: 19px;
    line-height: 1.24;
}

.water-process-grid p {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
}

.wms-showcase {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 0 0 112px;
}

.wms-section {
    padding: 78px 0;
    border-top: 1px dashed #aeb7c4;
}

.wms-section h2 {
    margin: 0;
    font-size: clamp(32px, 3.2vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.wms-section-copy {
    display: grid;
    align-content: start;
    gap: 18px;
}

.wms-section-copy p {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.74;
}

.wms-section-intro {
    max-width: 780px;
    margin-bottom: 28px;
}

.wms-section-architecture,
.wms-section-split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.wms-section-reverse {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.wms-architecture-map {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.wms-layer,
.wms-ui-board,
.wms-schema-board article,
.wms-flow article,
.wms-process-grid article,
.wms-mini-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.wms-layer {
    min-height: 220px;
    padding: 22px;
    display: grid;
    align-content: start;
    gap: 10px;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.07);
}

.wms-layer span,
.wms-flow span,
.wms-process-grid span,
.wms-mini-grid span,
.wms-schema-board span {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 900;
}

.wms-layer strong {
    font-size: 20px;
    line-height: 1.18;
}

.wms-layer em {
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-style: normal;
    line-height: 1.55;
}

.wms-connector {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 800;
    writing-mode: vertical-rl;
}

.wms-ui-board {
    min-height: 420px;
    padding: 18px;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.wms-ui-sidebar {
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 10px;
    border-radius: 8px;
    background: #111827;
    color: #f8fafc;
    font-family: var(--mono);
}

.wms-ui-sidebar span {
    margin-bottom: 12px;
    color: #9ae6d4;
    font-size: 13px;
    font-weight: 900;
}

.wms-ui-sidebar strong {
    padding: 9px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.wms-ui-main {
    display: grid;
    align-content: start;
    gap: 16px;
}

.wms-ui-toolbar,
.wms-ui-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.wms-ui-toolbar span,
.wms-ui-toolbar button,
.wms-ui-row span {
    min-height: 36px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    text-align: left;
}

.wms-ui-toolbar button {
    border-color: transparent;
    background: #0f766e;
    color: #fff;
    font-weight: 800;
}

.wms-ui-table {
    display: grid;
    gap: 8px;
}

.wms-ui-head span {
    background: var(--bg-soft);
    color: var(--ink);
    font-weight: 900;
}

.wms-mini-grid,
.wms-process-grid,
.wms-flow {
    display: grid;
    gap: 12px;
}

.wms-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.wms-mini-grid article {
    padding: 16px;
}

.wms-mini-grid strong {
    display: block;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 15px;
}

.wms-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wms-flow article,
.wms-process-grid article {
    min-height: 190px;
    padding: 20px;
}

.wms-flow h3,
.wms-process-grid h3 {
    margin: 10px 0;
    font-size: 19px;
    line-height: 1.24;
}

.wms-flow p,
.wms-process-grid p,
.wms-schema-board p {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
}

.wms-detail-list {
    display: grid;
    gap: 9px;
    margin: 4px 0 0;
    padding-left: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
}

.wms-schema-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wms-schema-board article {
    min-height: 150px;
    padding: 20px;
}

.wms-schema-board span {
    display: block;
    margin-bottom: 10px;
}

.wms-section-process {
    padding-bottom: 20px;
}

.wms-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dali-showcase {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 0 0 112px;
}

.dali-section,
.dali-hero-panel {
    padding: 78px 0;
    border-top: 1px dashed #aeb7c4;
}

.dali-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.dali-section h2,
.dali-hero-panel h2 {
    margin: 0;
    font-size: clamp(32px, 3.2vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.dali-section-copy,
.dali-hero-panel > div {
    display: grid;
    align-content: start;
    gap: 18px;
}

.dali-section-copy p,
.dali-hero-panel p {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.74;
}

.dali-section-intro {
    max-width: 780px;
    margin-bottom: 28px;
}

.dali-hero-panel img,
.dali-figure img,
.dali-content-grid img {
    width: 100%;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.dali-hero-panel img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.dali-section-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.dali-section-reverse {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.dali-figure {
    margin: 0;
}

.dali-figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
}

.dali-mini-grid,
.dali-content-grid,
.dali-screen-grid,
.dali-process-grid {
    display: grid;
    gap: 12px;
}

.dali-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.dali-mini-grid article,
.dali-content-grid article,
.dali-process-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.dali-mini-grid article {
    padding: 16px;
}

.dali-mini-grid span,
.dali-content-grid span,
.dali-process-grid span {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 900;
}

.dali-mini-grid strong {
    display: block;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.35;
}

.dali-content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dali-content-grid article {
    overflow: hidden;
}

.dali-content-grid img {
    height: 210px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    object-fit: cover;
    box-shadow: none;
}

.dali-content-grid span,
.dali-content-grid h3,
.dali-content-grid p {
    margin-right: 18px;
    margin-left: 18px;
}

.dali-content-grid span {
    display: block;
    margin-top: 18px;
}

.dali-content-grid h3,
.dali-process-grid h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 19px;
    line-height: 1.24;
}

.dali-content-grid p,
.dali-process-grid p {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
}

.dali-detail-list {
    display: grid;
    gap: 9px;
    margin: 4px 0 0;
    padding-left: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
}

.dali-screen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.dali-screen-grid .dali-figure img {
    height: clamp(330px, 34vw, 470px);
    object-fit: cover;
    object-position: top center;
}

.dali-section-process {
    padding-bottom: 20px;
}

.dali-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dali-process-grid article {
    min-height: 188px;
    padding: 20px;
}

.dali-process-grid p {
    margin-bottom: 0;
}

.python-showcase {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 0 0 112px;
}

.python-section {
    padding: 78px 0;
    border-top: 1px dashed #aeb7c4;
}

.python-section h2 {
    margin: 0;
    font-size: clamp(32px, 3.2vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.python-section-copy {
    display: grid;
    align-content: start;
    gap: 18px;
}

.python-section-copy p {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.74;
}

.python-section-intro {
    max-width: 780px;
    margin-bottom: 28px;
}

.python-section-split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.python-section-reverse {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.python-figure {
    margin: 0;
}

.python-figure img {
    width: 100%;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.python-figure-wide img {
    background: #f8fafc;
}

.python-figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
}

.python-metric-grid,
.python-result-grid,
.python-pipeline,
.python-process-grid {
    display: grid;
    gap: 12px;
}

.python-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.python-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.python-metric-grid article,
.python-result-grid article,
.python-pipeline article,
.python-process-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.python-metric-grid article,
.python-result-grid article {
    padding: 16px;
}

.python-metric-grid span,
.python-result-grid span,
.python-pipeline span,
.python-process-grid span {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 900;
}

.python-metric-grid strong,
.python-result-grid strong {
    display: block;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 22px;
    line-height: 1.2;
}

.python-pipeline,
.python-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.python-pipeline article,
.python-process-grid article {
    min-height: 188px;
    padding: 20px;
}

.python-pipeline h3,
.python-process-grid h3 {
    margin: 10px 0;
    font-size: 19px;
    line-height: 1.24;
}

.python-pipeline p,
.python-process-grid p {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
}

.python-detail-list {
    display: grid;
    gap: 9px;
    margin: 4px 0 0;
    padding-left: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
}

.python-section-process {
    padding-bottom: 20px;
}

.photo-rail {
    grid-auto-columns: clamp(250px, 18.8vw, 286px);
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    gap: clamp(18px, 1.35vw, 24px);
    padding: 0 max(28px, calc((100vw - 1020px) / 2)) 18px;
    scroll-snap-type: none;
}

.photo-rail figure {
    margin: 0;
    height: clamp(350px, 34vw, 430px);
    overflow: hidden;
    border-radius: 2px;
    background: #dde3ec;
    scroll-snap-align: start;
}

.photo-rail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.postcards-section {
    overflow: hidden;
}

.postcards-section .section-heading {
    position: relative;
    grid-template-columns: 210px minmax(0, 620px) 104px;
    gap: clamp(84px, 7.6vw, 118px) clamp(22px, 3vw, 42px);
}

.postcards-section .section-heading p {
    max-width: 620px;
}

.postcard-badge {
    position: relative;
    top: -28px;
    right: auto;
    justify-self: end;
    width: 94px;
    height: 94px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #c8b1ff;
    color: #5c4a7d;
    transform: rotate(-12deg);
    box-shadow: inset 0 0 0 2px rgba(92, 74, 125, 0.16);
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.postcard-badge:hover {
    transform: rotate(-12deg) translateY(-2px);
    box-shadow:
        inset 0 0 0 2px rgba(92, 74, 125, 0.16),
        0 12px 24px rgba(92, 74, 125, 0.14);
}

.postcard-badge:focus-visible {
    outline: 2px solid #8b6dff;
    outline-offset: 6px;
}

.postcard-badge::before,
.postcard-badge::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px dashed rgba(92, 74, 125, 0.34);
    border-radius: 50%;
}

.postcard-badge::after {
    inset: 19px;
    border-style: solid;
    opacity: 0.18;
}

.postcard-badge span {
    position: absolute;
    inset: 7px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    transform: rotate(18deg);
}

.postcard-badge svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.postcard-rail {
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    padding: 74px max(28px, calc((100vw - 1020px) / 2)) 42px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(560px, 45vw, 640px);
    gap: clamp(18px, 1.6vw, 28px);
    overflow-x: auto;
    scroll-snap-type: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.postcard-rail::-webkit-scrollbar {
    display: none;
}

.postcard-card {
    min-height: clamp(290px, 26vw, 350px);
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    position: relative;
    padding: clamp(28px, 2.2vw, 38px);
    border: 1px solid rgba(118, 106, 82, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(250, 247, 240, 0.88)),
        #fbf8f0;
    box-shadow:
        0 18px 42px rgba(17, 24, 39, 0.1),
        12px 12px 0 rgba(17, 24, 39, 0.08);
    color: #0f2345;
    scroll-snap-align: start;
}

.postcard-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(92, 89, 78, 0.25) 50%, transparent 50.2%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 26%);
    opacity: 0.7;
}

.postcard-card.tilt-left {
    transform: rotate(-1.6deg);
}

.postcard-card.tilt-right {
    transform: rotate(1.2deg);
}

.postcard-card.soft-blank {
    transform: rotate(-0.6deg);
}

.postcard-message,
.postcard-back {
    position: relative;
    z-index: 1;
}

.postcard-message {
    padding-right: clamp(22px, 2vw, 34px);
    font-family: "Bradley Hand", "Comic Sans MS", "Marker Felt", cursive;
    font-size: clamp(21px, 1.65vw, 27px);
    font-weight: 700;
    line-height: 1.56;
    color: #1f4f95;
}

.postcard-message p {
    margin: 0 0 10px;
}

.postcard-back {
    padding-left: clamp(26px, 2vw, 36px);
}

.postcard-stamp {
    position: absolute;
    top: -16px;
    right: 0;
    width: 58px;
    height: 70px;
    border: 4px solid rgba(255, 255, 255, 0.84);
    box-shadow:
        0 0 0 1px rgba(17, 24, 39, 0.16),
        0 6px 12px rgba(17, 24, 39, 0.08);
}

.stamp-blue {
    background:
        linear-gradient(135deg, #6758c8 0 35%, transparent 35% 100%),
        linear-gradient(45deg, #ec8f70 0 45%, #7a5bc8 45% 72%, #3c7adf 72%);
}

.stamp-green {
    background:
        linear-gradient(135deg, #f45c5c 0 34%, transparent 34%),
        linear-gradient(45deg, #1d415d 0 42%, #58b986 42% 70%, #f5f1dd 70%);
}

.stamp-rose {
    background:
        linear-gradient(135deg, #f6d1d5 0 40%, transparent 40%),
        linear-gradient(45deg, #305f9f 0 45%, #e97984 45% 72%, #f7efdd 72%);
}

.postmark {
    position: absolute;
    top: -7px;
    right: 44px;
    width: 82px;
    height: 54px;
    border-top: 3px solid rgba(105, 105, 105, 0.44);
    border-bottom: 3px solid rgba(105, 105, 105, 0.36);
    border-radius: 50%;
    transform: rotate(10deg);
}

.postmark::before,
.postmark::after {
    content: "";
    position: absolute;
    right: -32px;
    width: 72px;
    height: 11px;
    border-top: 3px solid rgba(105, 105, 105, 0.44);
    border-radius: 50%;
}

.postmark::before {
    top: 9px;
}

.postmark::after {
    top: 24px;
}

.postcard-line {
    position: absolute;
    top: 50px;
    bottom: 26px;
    left: 0;
    border-left: 1px solid rgba(92, 89, 78, 0.28);
}

.postcard-back dl {
    position: absolute;
    right: 4px;
    bottom: 0;
    left: clamp(28px, 2.2vw, 42px);
    margin: 0;
    font-family: var(--mono);
    color: rgba(30, 37, 48, 0.65);
}

.postcard-back dt {
    margin-top: 14px;
    font-size: 12px;
}

.postcard-back dd {
    margin: 2px 0 0;
    padding-bottom: 4px;
    border-bottom: 1px dotted rgba(30, 37, 48, 0.46);
    font-family: "Bradley Hand", "Comic Sans MS", "Marker Felt", cursive;
    font-size: clamp(18px, 1.3vw, 23px);
    font-weight: 700;
    color: #1f4f95;
}

.postcards-more {
    width: min(1020px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.postcard-form-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 148px 22px 80px;
}

.postcard-form-panel {
    width: min(470px, 100%);
}

.postcard-form-panel h1 {
    margin: 0 0 38px;
    font-size: clamp(40px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: 0;
}

.postcard-form {
    display: grid;
    gap: 30px;
}

.postcard-form label {
    display: grid;
    gap: 8px;
}

.postcard-form label span {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
}

.postcard-form label em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.postcard-form input,
.postcard-form textarea {
    width: 100%;
    border: 1.5px solid var(--ink);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--ink);
    font: 500 17px/1.55 var(--mono);
}

.postcard-form input {
    height: 50px;
    padding: 10px 12px;
}

.postcard-form textarea {
    resize: vertical;
    min-height: 176px;
    padding: 12px;
}

.postcard-form input:focus,
.postcard-form textarea:focus {
    outline: 3px solid rgba(139, 109, 255, 0.2);
    outline-offset: 2px;
}

.postcard-form small {
    color: rgba(89, 101, 117, 0.7);
    font-size: 12px;
    font-weight: 700;
}

.postcard-form button {
    justify-self: start;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: var(--ink);
    color: var(--bg);
    font: 800 15px/1 var(--mono);
    cursor: pointer;
}

.postcard-form-status {
    min-height: 24px;
    margin: -12px 0 0;
    color: #0f766e;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
}

.more-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.note-grid article,
.timeline-list article,
.panel,
.skill-group,
.timeline-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.48);
}

.note-grid h3,
.timeline-list h3,
.panel h3,
.skill-group h3,
.timeline-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0;
}

.timeline-list {
    display: grid;
    gap: 14px;
}

.timeline-list article,
.timeline-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
}

.timeline-list span,
.timeline-date {
    color: #0f766e;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 800;
}

.contact-card {
    --contact-bg: #eef3f8;
    --contact-ink: #142033;
    --contact-line: rgba(20, 32, 51, 0.16);
    --contact-icon-bg: #ffc833;
    --contact-icon-ink: #142033;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 70px;
    width: min(1020px, calc(100% - 44px));
    margin: 0 auto 90px;
    padding: 46px 54px;
    border-radius: 10px;
    background: var(--contact-bg);
    color: var(--contact-ink);
    transition:
        background 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease;
}

body.theme-dim .contact-card:not([data-contact-active]) {
    --contact-bg: #182536;
    --contact-ink: #e8edf5;
    --contact-line: rgba(232, 237, 245, 0.18);
    --contact-icon-bg: #ffd15a;
    --contact-icon-ink: #182536;
}

.contact-card[data-contact-active="email"] {
    --contact-bg: #6ba7f4;
    --contact-ink: #15365c;
    --contact-line: rgba(21, 54, 92, 0.28);
    --contact-icon-bg: rgba(255, 255, 255, 0.38);
    --contact-icon-ink: #15365c;
}

.contact-card[data-contact-active="github"] {
    --contact-bg: #b9a7ff;
    --contact-ink: #4b3f68;
    --contact-line: rgba(75, 63, 104, 0.3);
    --contact-icon-bg: rgba(255, 255, 255, 0.36);
    --contact-icon-ink: #4b3f68;
}

.contact-card[data-contact-active="resume"] {
    --contact-bg: #ffc21a;
    --contact-ink: #6b5400;
    --contact-line: rgba(107, 84, 0, 0.3);
    --contact-icon-bg: rgba(255, 255, 255, 0.42);
    --contact-icon-ink: #6b5400;
}

.contact-card-side {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-card h2 {
    margin: 0;
    color: currentColor;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: 0;
}

.contact-icon-set {
    position: relative;
    width: 76px;
    height: 76px;
    margin-top: 60px;
}

.contact-icon {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    border-radius: 24px;
    background: var(--contact-icon-bg);
    color: var(--contact-icon-ink);
    transform: rotate(-7deg);
    transition:
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.contact-icon-default {
    display: grid;
}

.contact-card[data-contact-active="email"] .contact-icon-default,
.contact-card[data-contact-active="github"] .contact-icon-default,
.contact-card[data-contact-active="resume"] .contact-icon-default {
    display: none;
}

.contact-card[data-contact-active="email"] .contact-icon-email,
.contact-card[data-contact-active="github"] .contact-icon-github,
.contact-card[data-contact-active="resume"] .contact-icon-resume {
    display: grid;
}

.contact-icon svg {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-icon-email {
    font-family: var(--mono);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.contact-list {
    display: grid;
    align-content: center;
}

.contact-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid var(--contact-line);
    color: currentColor;
    font-family: var(--mono);
    font-size: 18px;
    text-decoration: none;
    cursor: default;
}

a.contact-row {
    cursor: pointer;
}

.contact-row strong {
    color: currentColor;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 800;
}

.contact-value {
    color: currentColor;
    opacity: 0.86;
}

.contact-arrow {
    justify-self: end;
    font-size: 20px;
    transition: transform 160ms ease;
}

.contact-row:hover .contact-arrow,
.contact-row:focus-visible .contact-arrow {
    transform: translate(2px, -2px);
}

.contact-row:focus-visible {
    outline: 2px solid rgba(20, 32, 51, 0.28);
    outline-offset: 4px;
    border-radius: 4px;
}

.site-footer {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 42px 0 54px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

.site-footer a {
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* Shared support for the secondary pages. */
.page-hero {
    border-bottom: 1px solid var(--line);
}

.page-title {
    padding: 150px 0 66px;
}

.experience-page .page-title {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: end;
    gap: clamp(72px, 7vw, 112px);
    padding: 156px 0 72px;
}

.experience-page .page-title-copy,
.experience-page .lead {
    max-width: 760px;
    color: var(--ink);
    font-family: "Fira Mono", "Courier Prime", "Courier New", ui-monospace, monospace;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.58;
    letter-spacing: 0;
}

.section {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 84px 0;
    border-top: 1px dashed #aeb7c4;
}

.section.alt {
    width: 100%;
    padding-left: max(22px, calc((100vw - 1180px) / 2));
    padding-right: max(22px, calc((100vw - 1180px) / 2));
    background: var(--bg-soft);
}

.section-header {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 64px;
    margin-bottom: 34px;
}

.section-kicker {
    margin: 0 0 10px;
    color: #0f766e;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 800;
}

.section h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: 0;
}

.two-column,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--mono);
    font-size: 14px;
}

.quick-list li {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
}

.skill-group ul,
.timeline-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 14px;
}

.experience-page .section {
    padding: 76px 0;
}

.experience-page .timeline {
    display: grid;
    gap: 18px;
}

.experience-page .timeline-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 68px;
    padding: 30px 34px;
    background: rgba(255, 255, 255, 0.58);
}

.experience-page .timeline-card h3 {
    margin-bottom: 14px;
    font-size: 22px;
}

.experience-page .timeline-card p,
.experience-page .panel p {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.68;
}

.experience-page .timeline-card ul {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.62;
}

.experience-page .panel {
    padding: 30px 34px;
    background: rgba(255, 255, 255, 0.58);
}

.experience-page .panel h3 {
    font-size: 22px;
}

.callout {
    border-left: 4px solid var(--rose);
    padding: 24px;
    background: #fff7f7;
    border-radius: 0 8px 8px 0;
}

@media (max-width: 900px) {
    html.home-page-root {
        scroll-snap-type: none;
    }

    .site-header {
        top: 0;
    }

    .topbar {
        width: min(100% - 36px, 680px);
        padding-top: 10px;
        display: block;
    }

    .top-logo,
    .top-social {
        display: none;
    }

    .nav-wrap {
        min-height: auto;
        padding: 6px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        border-radius: 24px;
    }

    .nav-item {
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .hero,
    .section-heading,
    .project-detail,
    .contact-card,
    .section-header,
    .timeline-list article,
    .timeline-card {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hero {
        min-height: auto;
        padding: 170px 0 82px;
    }

    .home-page .hero,
    .home-page .section-block,
    .home-page .project-detail,
    .home-page .contact-card {
        min-height: auto;
        scroll-snap-align: none;
    }

    .home-page .section-block {
        display: block;
    }

    .home-page #projects {
        padding-top: 132px;
        padding-bottom: 82px;
    }

    .home-page .section-heading {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .home-page .hero-note p,
    .home-page .hero-links a,
    .home-page .section-heading p,
    .home-page #projects .project-intro-copy {
        max-width: 100%;
        font-size: 16px;
    }

    .contact-card {
        gap: 28px;
        padding: 36px;
    }

    .contact-card-side {
        min-height: auto;
        flex-direction: row;
        align-items: center;
    }

    .contact-icon-set {
        width: 64px;
        height: 64px;
        margin-top: 0;
    }

    .contact-row {
        grid-template-columns: 110px minmax(0, 1fr) auto;
        gap: 14px;
        font-size: 15px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .section-heading h2,
    .detail-title h1,
    .detail-title h2,
    .contact-card h2,
    .page-title h1,
    .section h2 {
        font-size: 36px;
    }

    .hero-note {
        padding-bottom: 0;
        transform: none;
    }

    .page-title {
        padding-top: 150px;
    }

    .experience-page .page-title,
    .experience-page .timeline-card {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .experience-page .page-title-copy,
    .experience-page .lead {
        max-width: 100%;
        font-size: 16px;
    }

    .note-grid,
    .project-highlights,
    .skills-grid,
    .two-column,
    .water-section-architecture,
    .water-section-split,
    .water-section-reverse,
    .water-image-grid,
    .water-image-grid-cloud,
    .water-process-grid,
    .wms-section-architecture,
    .wms-section-split,
    .wms-section-reverse,
    .wms-architecture-map,
    .wms-flow,
    .wms-process-grid,
    .wms-schema-board,
    .dali-hero-panel,
    .dali-section-split,
    .dali-section-reverse,
    .dali-content-grid,
    .dali-screen-grid,
    .dali-process-grid,
    .python-section-split,
    .python-section-reverse,
    .python-pipeline,
    .python-process-grid {
        grid-template-columns: 1fr;
    }

    .water-showcase {
        width: min(100% - 36px, 1180px);
        padding-bottom: 84px;
    }

    .water-section {
        padding: 58px 0;
    }

    .water-section-copy p {
        font-size: 15px;
    }

    .water-fact-grid {
        grid-template-columns: 1fr;
    }

    .water-image-grid .water-figure img {
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    .water-process-grid article {
        min-height: auto;
    }

    .wms-showcase {
        width: min(100% - 36px, 1180px);
        padding-bottom: 84px;
    }

    .wms-section {
        padding: 58px 0;
    }

    .wms-section-copy p {
        font-size: 15px;
    }

    .wms-connector {
        writing-mode: initial;
        text-align: center;
    }

    .wms-ui-board {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .wms-ui-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wms-ui-sidebar span {
        grid-column: 1 / -1;
    }

    .wms-mini-grid {
        grid-template-columns: 1fr;
    }

    .wms-flow article,
    .wms-process-grid article {
        min-height: auto;
    }

    .dali-showcase {
        width: min(100% - 36px, 1180px);
        padding-bottom: 84px;
    }

    .dali-section,
    .dali-hero-panel {
        padding: 58px 0;
    }

    .dali-section-copy p,
    .dali-hero-panel p {
        font-size: 15px;
    }

    .dali-mini-grid {
        grid-template-columns: 1fr;
    }

    .dali-screen-grid .dali-figure img {
        height: auto;
        object-fit: contain;
    }

    .dali-process-grid article {
        min-height: auto;
    }

    .python-showcase {
        width: min(100% - 36px, 1180px);
        padding-bottom: 84px;
    }

    .python-section {
        padding: 58px 0;
    }

    .python-section-copy p {
        font-size: 15px;
    }

    .python-metric-grid,
    .python-result-grid {
        grid-template-columns: 1fr;
    }

    .python-pipeline article,
    .python-process-grid article {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .hero,
    .section-block,
    .project-detail,
    .contact-card,
    .page-title,
    .page-shell,
    .section,
    .site-footer {
        width: min(100% - 28px, 1180px);
    }

    .hero h1 {
        font-size: 38px;
    }

    .sticker {
        min-height: 38px;
        padding: 0 8px;
    }

    .section-block,
    .project-detail {
        padding: 62px 0;
    }

    .project-page .project-detail {
        min-height: auto;
        padding: 150px 0 70px;
    }

    .water-showcase {
        width: min(100% - 28px, 1180px);
    }

    .water-section h2 {
        font-size: 30px;
    }

    .water-figure-wide img,
    .water-image-grid-cloud .water-figure:first-child img {
        padding: 8px;
    }

    .wms-showcase {
        width: min(100% - 28px, 1180px);
    }

    .wms-section h2 {
        font-size: 30px;
    }

    .wms-ui-board {
        padding: 12px;
    }

    .wms-ui-toolbar,
    .wms-ui-row {
        grid-template-columns: 1fr 1fr;
    }

    .dali-showcase {
        width: min(100% - 28px, 1180px);
    }

    .dali-section h2,
    .dali-hero-panel h2 {
        font-size: 30px;
    }

    .dali-content-grid img {
        height: 220px;
    }

    .python-showcase {
        width: min(100% - 28px, 1180px);
    }

    .python-section h2 {
        font-size: 30px;
    }

    .project-rail {
        grid-auto-columns: minmax(250px, 78vw);
    }

    .photo-rail {
        grid-auto-columns: minmax(235px, 72vw);
        width: 100vw;
        margin-left: calc((100vw - 100%) / -2);
        padding-right: 22px;
        padding-left: 22px;
    }

    .photo-rail figure {
        height: 340px;
    }

    .postcard-badge {
        position: relative;
        top: auto;
        right: auto;
        justify-self: start;
        margin-top: 6px;
    }

    .postcard-rail {
        grid-auto-columns: minmax(310px, 84vw);
        padding-right: 22px;
        padding-left: 22px;
    }

    .postcard-card {
        min-height: 430px;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .postcard-card::before {
        background:
            linear-gradient(180deg, transparent 48.8%, rgba(92, 89, 78, 0.18) 49%, transparent 49.2%),
            radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 26%);
    }

    .postcard-message {
        padding-right: 0;
    }

    .postcard-back {
        min-height: 170px;
        padding-left: 0;
    }

    .postcard-line {
        display: none;
    }

    .contact-card {
        width: min(100% - 28px, 1180px);
        padding: 28px 22px;
    }

    .contact-card h2 {
        font-size: 28px;
    }

    .contact-row {
        grid-template-columns: 1fr auto;
    }

    .contact-row strong,
    .contact-value {
        grid-column: 1;
    }

    .contact-arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .site-footer {
        flex-direction: column;
    }
}
