/* Shared site styles, combined in their original cascade order. */

/* ---- Base typography and elements (formerly style.css) ---- */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    line-height: 1.6;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PT Serif', Georgia, serif;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container and layout */
.container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Typography */
h1 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 1.25;
    margin: 0 0 0.5rem 0;
    color: #0076df;
}

.subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: #666;
    margin: 0 0 2rem 0;
}

h2 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 2.5rem 0 1rem 0;
    color: #333;
}

p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.lead,
.vision {
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Sections */
section {
    margin-bottom: 2rem;
}

main > section:first-child h2 {
    margin-top: 0;
}

/* Contact section */
.contact-info {
    margin: 0.75rem 0 0 0;
    font-size: 0.95rem;
}

.contact-info a {
    color: #0066cc;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-info a:hover {
    color: #0076df;
}

.contact-info i {
    font-size: 1rem;
    color: #666;
    flex-shrink: 0;
}

.contact-info .fa-envelope {
    color: #0076df;
}

/* Profile links */
.profile-links {
    margin: 0.75rem 0 0 0;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.profile-links a {
    color: #0066cc;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-links a:hover {
    color: #0076df;
}

.profile-links i {
    font-size: 1rem;
    color: #666;
}

.profile-links .fa-graduation-cap {
    color: #0076df;
}

.profile-links .fa-researchgate {
    color: #0076df;
}

/* Research overview figure */
.research-overview {
    width: min(100%, 38rem);
    margin: 0.25rem auto 1.25rem;
}

.research-overview img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.research-questions {
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.research-questions li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.research-questions li:last-child {
    margin-bottom: 0;
}

/* Selected contributions */
.selected-contributions h2 {
    margin-bottom: 0.75rem;
}

.contribution-list {
    margin: 0;
    padding-left: 1.25rem;
}

.contribution-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.contribution-list li:last-child {
    margin-bottom: 0;
}

.contribution-list a {
    white-space: nowrap;
}

.selected-papers {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: #666;
}

/* Publications list */
.publications {
    text-align: left;
}

.publications h2 {
    margin-bottom: 0.75rem;
}

.publications h3 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 1.25rem 0 0.4rem 0;
    color: #888;
}

ol {
    padding-left: 1.5rem;
    margin: 0;
}

ol li {
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.9rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

ol li::marker {
    font-weight: 700;
}

ol li strong {
    font-weight: 700;
}

.publications ol li strong:not(:first-child) {
    color: #333;
}

ol li em {
    font-style: italic;
}

.publications a {
    color: #333;
}

.publications a:hover {
    color: #005bb5;
}

.publications a em {
    color: #0076df;
}

ol li a[href$=".pdf"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    margin-left: 0.25rem;
    color: rgba(180, 35, 42, 0.72);
    background: transparent;
    border: 0;
    border-radius: 3px;
    vertical-align: -0.12em;
    transition: color 0.15s ease, background-color 0.15s ease;
}

ol li a[href$=".pdf"]:hover {
    color: rgba(143, 23, 29, 0.95);
    background-color: #fff1f1;
    text-decoration: none;
}

ol li .fa-file-pdf {
    display: inline-block;
    font-size: 0.68rem;
    line-height: 1;
}

/* Responsive design */
@media (max-width: 42rem) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: 1rem 0.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .research-overview {
        width: 100%;
        margin: 1rem 0 1.25rem;
    }
    
}

/* Print styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        color: #333;
        text-decoration: underline;
    }
    
    h1, h2 {
        color: #333;
    }
}

/* ---- Original home layout (formerly homepage.css) ---- */

.container {
    max-width: 46rem;
}

.site-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.6rem;
}

.site-identity {
    min-width: 0;
}

.site-identity .subtitle {
    margin-bottom: 0;
}

.site-header .profile-links {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: flex-end;
    justify-items: end;
    gap: 0.35rem;
    margin: 0.55rem 0 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.site-header .profile-links i {
    color: #54779a;
}

.opening {
    margin-bottom: 1.1rem;
}

.compact-bio {
    max-width: 43rem;
    margin-bottom: 0;
    color: #555;
    font-size: 0.96rem;
    line-height: 1.55;
}

.lead,
.vision {
    text-align: left;
    hyphens: none;
}

.research-thesis {
    max-width: 48rem;
    margin: 0 0 1.2rem;
    color: #3f4852;
    font-size: 0.96rem;
    line-height: 1.55;
}

.research-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    margin: 0 0 1.1rem;
}

.research-line {
    --research-accent: #287a75;
    --research-divider: #c5d8d5;
    --research-bg: #fbfdfd;
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.85rem;
    min-height: 7.4rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--research-divider);
    border-left: 4px solid var(--research-accent);
    border-radius: 6px;
    background: var(--research-bg);
    position: relative;
}

.research-line:nth-child(2) {
    --research-accent: #704262;
    --research-divider: #d3c2d0;
    --research-bg: #fdfbfd;
}

.research-line:nth-child(3) {
    --research-accent: #b5523b;
    --research-divider: #ebc8bd;
    --research-bg: #fffaf8;
}

.research-line:nth-child(4) {
    --research-accent: #456795;
    --research-divider: #c8d2df;
    --research-bg: #fafbfe;
}

.research-icon {
    display: flex;
    width: 5.4rem;
    height: 4.8rem;
    align-items: center;
    justify-content: center;
}

.research-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    filter: saturate(1.18) contrast(1.04);
    mix-blend-mode: multiply;
    object-fit: contain;
}

.research-copy {
    min-width: 0;
}

.research-line:not(:last-child)::after {
    content: none;
}

.research-line h3 {
    margin: 0 0 0.2rem;
    color: #1f2933;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.3;
}

.question-nowrap {
    white-space: nowrap;
}

.research-line p {
    margin: 0;
    color: var(--research-accent);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.research-foundation {
    margin-top: 1.1rem;
    border-top: 1px solid #d9dee4;
    border-bottom: 1px solid #d9dee4;
}

.foundation-row {
    display: grid;
    grid-template-columns: 5.2rem minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    padding: 0.72rem 0;
}

.foundation-label {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    color: #75808b;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-label::before {
    width: 0.18rem;
    height: 1.05rem;
    border-radius: 1rem;
    background: currentColor;
    content: "";
}

.foundation-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.3rem;
}

.foundation-item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #505b66;
    font-size: 0.83rem;
    font-weight: 500;
    white-space: nowrap;
}

.foundation-item i {
    width: 1rem;
    text-align: center;
}

.foundation-label,
.foundation-item i {
    color: #4f8d89;
}

.selected-contributions {
    margin-top: 2.4rem;
}

.selected-contributions h2 {
    margin-bottom: 0.65rem;
}

.contribution-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    padding: 0;
    list-style: none;
}

.contribution-list li {
    --card-accent: #609b96;
    display: flex;
    min-height: 7.2rem;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.42rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px solid #d5dbe0;
    border-top: 3px solid var(--card-accent);
    border-radius: 6px;
    background: #fff;
}

.contribution-list li:nth-child(2) {
    --card-accent: #7d8892;
}

.contribution-list li:nth-child(3) {
    --card-accent: #6b84aa;
}

.contribution-list li:nth-child(4) {
    --card-accent: #986b91;
}

.selected-title {
    display: block;
    font-weight: 600;
    line-height: 1.45;
}

.selected-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    color: #56636f;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.68rem;
    line-height: 1.35;
}

.selected-methods span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.selected-methods-stack {
    flex-direction: column;
    align-items: flex-start;
}

.selected-methods i {
    width: 0.8rem;
    color: var(--card-accent);
    text-align: center;
}

.selected-papers {
    display: grid;
    gap: 0.18rem;
    color: #66717d;
    font-size: 0.82rem;
    line-height: 1.35;
}

.selected-papers a {
    display: block;
    width: fit-content;
}

.selected-code {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    margin-top: 0.08rem;
    color: #8a949d;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.selected-code a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #566f87;
    font-size: 0.74rem;
    letter-spacing: 0;
    text-transform: none;
}

.selected-code a:hover {
    color: #005bb5;
    text-decoration: none;
}

.selected-code i {
    color: var(--card-accent);
    font-size: 0.78rem;
}

.selected-note {
    color: #7b858e;
    font-style: italic;
}

.publications {
    margin-top: 3.2rem;
    padding-top: 1.8rem;
    border-top: 1px solid #d8dde3;
}

.publications h2 {
    margin-top: 0;
}

.publications h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.6rem;
    margin-bottom: 0.55rem;
    color: #66717d;
    letter-spacing: 0.06em;
}

.publications h3::after {
    height: 1px;
    flex: 1;
    background: #e4e8ec;
    content: "";
}

.publications ol li {
    margin-bottom: 0.8rem;
    color: #707983;
    font-size: 0.86rem;
    line-height: 1.42;
}

.publications ol li::marker {
    color: #98a1aa;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.publications ol li > strong:first-child {
    color: #27323c;
    font-size: 0.9rem;
    font-weight: 600;
}

.publications ol li strong:not(:first-child) {
    color: #3f4b56;
    font-weight: 600;
}

.publications ol li a {
    color: #54779a;
    font-size: 0.82rem;
}

.publications ol li a:hover {
    color: #005bb5;
}

.publications .fa-file-pdf {
    color: #b6655b;
}

.publications .repo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    margin-left: 0.18rem;
    color: #697785;
    border-radius: 3px;
    vertical-align: -0.12em;
}

.publications .repo-icon:hover {
    color: #202a33;
    background: #eef2f5;
    text-decoration: none;
}

.publications .repo-icon i {
    font-size: 0.75rem;
    line-height: 1;
}

@media (max-width: 42rem) {
    .site-header {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.7rem;
        margin-bottom: 1.35rem;
    }

    .site-header .profile-links {
        justify-content: flex-start;
        justify-items: start;
        margin: 0;
    }

    .research-thesis {
        font-size: 1rem;
    }

    .research-map {
        grid-template-columns: 1fr;
    }

    .research-line,
    .research-line:nth-child(odd),
    .research-line:nth-child(even) {
        grid-template-columns: 4.6rem minmax(0, 1fr);
        column-gap: 0.75rem;
        min-height: 0;
        padding: 0.8rem 0.9rem;
    }

    .research-icon {
        width: 4.6rem;
        height: 3.9rem;
    }

    .research-line:last-child {
        border-bottom: 0;
    }

    .foundation-row {
        grid-template-columns: 1fr;
        row-gap: 0.5rem;
    }

    .foundation-items {
        column-gap: 0.9rem;
    }

    .contribution-list {
        grid-template-columns: 1fr;
    }
}

/* ---- Refined layout and section navigation (formerly homepage-refined.css) ---- */

/* Refined homepage layout and visual system. */

html {
    scroll-behavior: smooth;
}

body {
    color: #35434e;
    font-family: Georgia, 'Times New Roman', serif;
}

.container {
    max-width: 54rem;
}

h1 {
    color: #0876c9;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    color: #293640;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.012em;
}

a {
    color: #0969b2;
}

.site-header {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
    gap: 2.25rem;
    margin-bottom: 1.7rem;
}

.site-identity .subtitle {
    color: #69747e;
}

.site-header .profile-links {
    justify-content: flex-start;
    justify-items: start;
    margin-top: 0.95rem;
    font-size: 0.84rem;
}

.site-header .profile-links a {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, auto);
    align-items: baseline;
    column-gap: 0.3rem;
}

.site-header .profile-links a,
.selected-code a,
.publications ol li a {
    color: #39749f;
}

.site-header .profile-links i {
    width: 1.15rem;
    color: #5c7f92;
    text-align: center;
}

.section-nav {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 0.7rem;
    padding: 0.62rem 0;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.012em;
}

.section-nav a {
    color: #536673;
    text-decoration: none;
}

.section-nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.section-nav a:hover {
    color: #0876c9;
    text-decoration: none;
}

.section-nav a[aria-current] {
    color: #0876c9;
}

.site-header,
.research-focus,
.selected-contributions,
.publications,
.publications li[id] {
    scroll-margin-top: 4rem;
}

.header-copy {
    display: grid;
    gap: 0.78rem;
}

.compact-bio,
.research-intro {
    max-width: none;
    margin: 0;
    color: #3f4d58;
    font-size: 0.96rem;
    line-height: 1.62;
}

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

.research-lead {
    margin: 0 0 0.55rem;
    color: #4d5c67;
    font-size: 0.94rem;
    line-height: 1.5;
}

.research-map {
    gap: 0.9rem;
}

.research-line {
    grid-template-columns: 4.9rem minmax(0, 1fr);
    column-gap: 0.9rem;
    min-height: 7.65rem;
    padding: 0.95rem 0.3rem;
    border: 0;
    border-top: 1px solid #d9e1e6;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.research-icon {
    width: 4.9rem;
    height: 4.2rem;
}

.research-icon img {
    filter: saturate(1.08) contrast(1.04);
}

.research-icon img[src$=".svg"] {
    filter: saturate(0.96) contrast(1.03);
}

.research-line h3 {
    margin-bottom: 0.34rem;
    font-weight: 600;
}

.research-line p {
    color: #485b68;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.48;
}

.selected-contributions {
    margin-top: 2.4rem;
}

.contribution-list {
    gap: 0.85rem;
}

.contribution-list li {
    min-height: 9.7rem;
    justify-content: flex-start;
    gap: 0.48rem;
    padding: 1rem 1.1rem;
}

.selected-title {
    color: #293640;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 600;
}

.contribution-list li:nth-child(n) {
    --card-accent: #8298a8;
}

.selected-methods {
    column-gap: 0.8rem;
    row-gap: 0.3rem;
    line-height: 1.45;
    color: #566672;
    font-size: 0.76rem;
}

.selected-papers {
    margin-top: 0.15rem;
    color: #5c6974;
    font-size: 0.86rem;
}

.selected-code {
    margin-top: auto;
    padding-top: 0.3rem;
    color: #77848d;
    font-size: 0.72rem;
}

.selected-code i {
    color: #5c7f92;
}

.selected-code a {
    font-size: 0.78rem;
}

.publications ol li {
    color: #56636f;
    font-size: 0.9rem;
    line-height: 1.5;
}

.publications ol li > strong:first-child {
    color: #27343e;
    font-size: 0.93rem;
}

.publications ol li a {
    font-size: 0.86rem;
}

.writing-index {
    max-width: 42rem;
    margin: 3.25rem auto 0;
}

.writing-header {
    margin-bottom: 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #dfe5e8;
}

.writing-header h1 {
    margin: 0 0 0.55rem;
}

.writing-deck {
    max-width: 34rem;
    margin: 0;
    color: #4d5c67;
    font-size: 1rem;
    line-height: 1.6;
}

.writing-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.writing-list li {
    margin: 0;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e4e8eb;
}

.writing-list h2 {
    margin: 0.18rem 0 0.35rem;
    font-size: 1.2rem;
    line-height: 1.35;
}

.writing-meta {
    margin: 0;
    color: #77848d;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.writing-summary {
    margin: 0;
    color: #56636f;
    font-size: 0.9rem;
    line-height: 1.55;
}

:focus-visible {
    outline: 2px solid #0876c9;
    outline-offset: 3px;
}

@media (min-width: 72rem) {
    .section-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        right: auto;
        left: max(0rem, calc((100vw - 54rem) / 2 - 8rem));
        width: 7rem;
        box-sizing: border-box;
        align-items: flex-start;
        justify-content: flex-start;
        margin: 0;
        padding: 2rem 1rem 0 0;
        border-right: 1px solid #dfe5e8;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .section-nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .section-nav a[aria-current] {
        text-decoration: underline;
        text-underline-offset: 0.16em;
    }
}

@media (max-width: 42rem) {
    h1 {
        font-size: 2.15rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .site-header {
        grid-template-columns: 1fr;
        gap: 1.15rem;
        margin-bottom: 1.5rem;
    }

    .section-nav {
        gap: 1rem;
        margin-bottom: 0.6rem;
        padding: 0.52rem 0;
        font-size: 0.82rem;
    }

    .section-nav-links {
        gap: 1rem;
    }

    .research-line,
    .research-line:nth-child(odd),
    .research-line:nth-child(even) {
        grid-template-columns: 4.25rem minmax(0, 1fr);
        column-gap: 0.75rem;
        min-height: 0;
        padding: 0.9rem 0.15rem;
    }

    .research-icon {
        width: 4.25rem;
        height: 3.7rem;
    }

    .contribution-list li {
        min-height: 0;
    }

    .selected-methods {
        font-size: 0.8rem;
    }

    .publications ol li a[href$=".pdf"] {
        width: 1.75rem;
        height: 1.75rem;
        margin-block: -0.3rem;
        vertical-align: -0.45rem;
    }

    .publications ol li .fa-file-pdf {
        font-size: 0.78rem;
    }
}

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

/* ---- Writing list and article pages (formerly writing.css) ---- */

/* Article archive layout. */
.writing-index {
    max-width: none;
    margin: 2.5rem 0 0;
}

.writing-header {
    padding-bottom: 2.3rem;
    border-bottom-color: #dce1e4;
}

.writing-header h1 {
    margin-bottom: 0.65rem;
}

.writing-deck {
    max-width: 37rem;
    font-size: 1.05rem;
}

.writing-list li {
    padding: 0;
    border-bottom: 1px solid #dce1e4;
}

.writing-entry-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem;
    align-items: start;
    column-gap: 2rem;
    padding: 2.1rem 0 2.4rem;
    color: inherit;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.writing-entry-link:not(:has(.writing-thumbnail)) {
    grid-template-columns: minmax(0, 1fr);
}

.writing-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.writing-list h2 {
    margin: 0 0 0.55rem;
    color: #293640;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    text-wrap: pretty;
}

.writing-summary {
    margin: 0 0 0.85rem;
    color: #52606a;
    font-size: 1.02rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.writing-meta {
    color: #69747d;
    font-size: 0.69rem;
    letter-spacing: 0.065em;
    line-height: 1.6;
}

.writing-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 5px;
}

.writing-thumbnail--contain {
    object-fit: contain;
    background: #f5f8f9;
    padding: 0.7rem;
}

a.writing-entry-link:hover {
    text-decoration: none;
}

a.writing-entry-link:hover h2 {
    color: #0969b2;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.writing-article {
    max-width: 44rem;
    margin: 2.5rem auto 0;
}

.article-header {
    max-width: 37rem;
    margin: 0 auto 2rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid #dce1e4;
}

.article-back,
.article-footer {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
}

.article-back {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    margin-bottom: 0.8rem;
    color: #293640;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.15;
    text-wrap: pretty;
}

.article-deck {
    color: #52606a;
    font-size: 1.08rem;
    line-height: 1.55;
}

.article-body > p {
    max-width: 37rem;
    margin: 0 auto 1.3rem;
    font-size: 1.05rem;
    line-height: 1.78;
}

.article-body a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.article-body > .article-coda {
    margin-top: 2.5rem;
    color: #52606a;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    line-height: 1.85;
    text-wrap: pretty;
}

.article-coda::before {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    margin-bottom: 1.2rem;
    background: #b6c1c8;
}

.article-coda span {
    display: block;
}

.article-coda span + span {
    margin-top: 0.45rem;
}

.article-figure {
    margin: 1.7rem 0 2rem;
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.article-figure figcaption {
    max-width: 37rem;
    margin: 0.7rem auto 0;
    color: #69747d;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
}

.article-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    max-width: 37rem;
    margin: 2rem auto 0;
    padding-top: 1.2rem;
    border-top: 1px solid #dce1e4;
}

@media (max-width: 42rem) {
    .writing-index {
        margin-top: 2rem;
    }

    .writing-header {
        padding-bottom: 1.6rem;
    }

    .writing-deck {
        font-size: 1rem;
    }

    .writing-entry-link {
        grid-template-columns: minmax(0, 1fr) clamp(5rem, 24vw, 10rem);
        gap: 1rem;
        padding: 1.6rem 0 1.8rem;
    }

    .writing-list h2 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .writing-summary {
        font-size: 0.95rem;
    }

    .writing-meta {
        font-size: 0.65rem;
    }

    .writing-thumbnail--contain {
        padding: 0.25rem;
    }
}

/* ---- Minimal visual refinements (formerly styles.css) ---- */

/* Local-only visual refinement of the original site. */
:root {
    --minimal-blue: #216b9f;
    --minimal-ink: #2c3943;
    --minimal-muted: #53626e;
    --minimal-rule: #e0e6eb;
}

body {
    background: #fff;
    color: var(--minimal-ink);
}

h1 {
    color: var(--minimal-blue);
    letter-spacing: -0.035em;
}

h2 {
    color: var(--minimal-ink);
    letter-spacing: -0.025em;
}

a,
.site-header .profile-links a,
.selected-papers a,
.selected-code a,
.publications ol li a,
.publications a em {
    color: var(--minimal-blue);
    text-underline-offset: 0.17em;
    text-decoration-thickness: 1px;
}

a:hover,
.section-nav a:hover,
.selected-code a:hover,
.publications ol li a:hover {
    color: #124d79;
}

.section-nav {
    background: #fff;
    font-weight: 500;
    letter-spacing: 0;
}

.section-nav a[aria-current] {
    color: var(--minimal-blue);
}

.site-header .profile-links {
    gap: 0.45rem;
}

.site-identity .subtitle,
.site-header .profile-links i {
    color: var(--minimal-muted);
}

.compact-bio,
.research-intro {
    color: #3b4852;
    line-height: 1.68;
}

.research-lead {
    margin-bottom: 0.8rem;
    color: var(--minimal-muted);
}

.research-map {
    column-gap: 1.35rem;
    row-gap: 0.3rem;
}

.research-line {
    min-height: 6.9rem;
    padding: 0.85rem 0.15rem;
    border-top-color: var(--minimal-rule);
}

.research-line h3 {
    color: var(--minimal-ink);
    font-size: 0.97rem;
    line-height: 1.4;
}

.research-line p {
    color: var(--minimal-muted);
    font-weight: 400;
    line-height: 1.55;
}

.research-icon img,
.research-icon img[src$=".svg"] {
    filter: none;
}

.selected-contributions h2 {
    margin-bottom: 1rem;
}

.selected-heading {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.selected-heading h2 {
    margin: 0;
}

.selected-heading > a {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
}

.contribution-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 2rem;
    margin: 0;
}

.contribution-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-top: 1px solid var(--minimal-rule);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    gap: 1.1rem;
    padding: 1.3rem 0;
}

.selected-copy {
    min-width: 0;
}

.selected-title {
    margin: 0 0 0.55rem;
    color: var(--minimal-ink);
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: 0;
}

.selected-title a,
.selected-paper-title a {
    color: inherit;
    white-space: normal;
    overflow-wrap: break-word;
}

.selected-title a:hover,
.selected-paper-title a:hover {
    color: var(--minimal-blue);
}

.selected-paper-entry {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.selected-paper-entry + .selected-paper-entry {
    margin-top: 0.8rem;
}

.selected-paper-title {
    display: inline;
    margin: 0;
    color: var(--minimal-ink);
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
    letter-spacing: 0;
}

.selected-visual {
    width: 100%;
    max-width: 18rem;
    justify-self: center;
    margin: 0;
}

.selected-visual > a {
    display: flex;
    height: 12rem;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.selected-visual > a:hover {
    opacity: 0.85;
}

.selected-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.selected-authors {
    display: inline;
    margin: 0;
    color: var(--minimal-muted);
    font-size: inherit;
    line-height: inherit;
}

.selected-authors strong {
    color: var(--minimal-ink);
    font-weight: 700;
}

.selected-papers {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.selected-papers a {
    display: inline;
    white-space: normal;
}

.code-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.code-entry {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
    height: 100%;
}

.code-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.code-entry h2 {
    margin: 0 0 0.45rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.code-logo {
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 9rem;
    align-items: center;
    justify-content: center;
}

.code-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.code-logo--ipie img {
    width: 6rem;
    height: 6rem;
}

.code-logo:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: 4px;
}

.code-summary {
    margin: 0 0 1rem;
    color: var(--minimal-muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.code-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-repository {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.code-links a:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: 3px;
}

.publications {
    border-top-color: var(--minimal-rule);
}

.publications h3 {
    color: var(--minimal-muted);
    letter-spacing: 0.035em;
}

.publications h3::after {
    background: var(--minimal-rule);
}

.publications ol li {
    margin-bottom: 1rem;
    color: var(--minimal-muted);
    line-height: 1.6;
}

.publications ol li > strong:first-child {
    color: var(--minimal-ink);
}

.publications ol li::marker {
    color: #71808c;
    font-weight: 400;
}

.publications li[id]:target {
    outline: 1px solid #bed3e2;
    outline-offset: 0.45rem;
}

.publication-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1.25rem;
    margin-bottom: 1.3rem;
}

.publication-header h1 {
    margin: 0;
}

.publication-scholar {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    white-space: nowrap;
    text-decoration: none;
}

.publication-scholar:hover {
    text-decoration: underline;
}

.publication-scholar:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: 3px;
}

.publication-years {
    position: sticky;
    top: var(--publication-site-nav-height, 3rem);
    z-index: 15;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.35rem 0;
    overflow-x: auto;
    background: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    scrollbar-width: thin;
}

.publication-years a {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    border-bottom: 2px solid transparent;
    color: var(--minimal-muted);
    text-decoration: none;
    white-space: nowrap;
}

.publication-years a:hover,
.publication-years a[aria-current="location"] {
    color: var(--minimal-blue);
}

.publication-years a[aria-current="location"] {
    border-color: var(--minimal-blue);
}

.publication-years a:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: -2px;
}

.publication-page .publications {
    margin-top: 1.7rem;
    padding-top: 0;
    border-top: 0;
}

.publication-page .publications h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 0.4rem;
    color: var(--minimal-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.65rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    scroll-margin-top: calc(var(--publication-site-nav-height, 3rem) + var(--publication-year-nav-height, 3.5rem) + 1rem);
}

.publication-page .publications h2::after {
    height: 1px;
    flex: 1;
    background: var(--minimal-rule);
    content: '';
}

.publication-page .publications a {
    white-space: normal;
}

.publication-page .publications ol {
    padding: 0;
    list-style: none;
}

.publication-page .publications .publication-entry {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: center;
    gap: 1.1rem;
    margin: 0;
    padding: 0.6rem 0;
    border: 0;
    line-height: 1.5;
}

.publication-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 5.25rem;
    cursor: zoom-in;
}

.publication-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.publication-thumbnail:hover {
    opacity: 0.8;
}

.publication-thumbnail:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: 4px;
}

.publication-copy {
    min-width: 0;
    padding-left: 2.1rem;
    overflow-wrap: break-word;
}

.publication-title {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    column-gap: 0.6rem;
    align-items: baseline;
    margin-bottom: 0.15rem;
    margin-left: -2.1rem;
    font-size: 0.93rem;
    line-height: 1.45;
}

.publication-page .publication-copy strong {
    color: var(--minimal-ink);
    font-weight: 600;
}

.publication-number {
    color: #667580;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    text-align: right;
}


@media (min-width: 1200px) {
    .section-nav {
        top: 2.6rem;
        bottom: auto;
        padding-top: 0;
        padding-bottom: 0.4rem;
        border-right-color: var(--minimal-rule);
    }

    .section-nav-links {
        gap: 0.55rem;
    }

    .publication-years {
        position: fixed;
        top: 2.6rem;
        left: calc(50% + 27rem);
        width: 4rem;
        max-height: calc(100vh - 5.2rem);
        max-height: calc(100dvh - 5.2rem);
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .publication-years a {
        padding: 0.3rem 0.65rem 0.3rem 0.8rem;
        border-bottom: 0;
        border-left: 2px solid var(--minimal-rule);
    }

    .publication-years a[aria-current="location"] {
        border-left-color: var(--minimal-blue);
    }

    .publication-page .publications h2 {
        scroll-margin-top: 4rem;
    }
}

@media (max-width: 52rem) {
    .code-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .code-entry {
        gap: 0.9rem;
    }

    .code-logo {
        width: 14rem;
        height: 7rem;
        justify-content: flex-start;
    }

    .code-logo img {
        object-position: left center;
    }

    .site-header,
    .research-map,
    .contribution-list {
        grid-template-columns: 1fr;
    }

    .site-header {
        gap: 1.3rem;
    }

    .research-line {
        min-height: 0;
    }
}

@media (max-width: 42rem) {
    .container {
        padding-inline: 1.2rem;
    }

    .research-line,
    .research-line:nth-child(odd),
    .research-line:nth-child(even) {
        min-height: 0;
        padding-block: 1rem;
    }

    .contribution-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.8rem;
    }

    .selected-visual > a {
        height: 10rem;
    }

    .contribution-list a {
        white-space: normal;
    }

    .publications ol li {
        font-size: 0.94rem;
    }
}

@media (max-width: 32rem) {
    .publication-page .publications .publication-entry {
        grid-template-columns: 5rem minmax(0, 1fr);
        align-items: start;
        gap: 0.85rem;
    }

    .publication-thumbnail {
        height: 5rem;
        margin-top: 0.2rem;
    }

    .publication-copy {
        padding-left: 1.7rem;
    }

    .publication-title {
        grid-template-columns: 1.2rem minmax(0, 1fr);
        column-gap: 0.5rem;
        margin-left: -1.7rem;
    }

    .contribution-list li {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .selected-visual {
        width: 13rem;
        max-width: 100%;
        justify-self: center;
    }

    .selected-visual > a {
        height: 10rem;
    }

}

/* ---- Shared proportions, navigation, and code cards (formerly site-layout.css) ---- */

/* Shared editorial proportions and typography across the local site. */
html {
    scrollbar-gutter: stable;
}

:root {
    --site-content-width: 920px;
    --site-body-size: 16px;
    --site-heading-size: 40px;
    --site-nav-size: 14px;
    --site-ui-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Georgia is what renders today; the inherited PT Serif was never loaded. */
    --site-text-font: Georgia, 'Times New Roman', serif;
    --site-surface: #fafafa;
    --site-active: #f1f2f2;
    --site-radius: 8px;
    --site-rule: #e2e4e5;
    --site-heading-ink: #242729;
    --minimal-blue: #315f7b;
    --minimal-blue-hover: #20465e;
    --minimal-rule: #e2e4e5;
    --minimal-ink: #34383c;
    --minimal-muted: #555e65;
}

a:hover,
.section-nav a:hover,
.selected-code a:hover,
.publications ol li a:hover {
    color: var(--minimal-blue-hover);
}

body {
    font-family: var(--site-text-font);
}

/* Even out heading lines and avoid single-word last lines in prose. */
h1,
h2,
h3 {
    text-wrap: balance;
}

p,
li,
figcaption,
.publication-title {
    text-wrap: pretty;
}

/* Cross-fade between pages while the section menu stays in place. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

.section-nav {
    view-transition-name: site-nav;
}

/* Use color to distinguish actions from headings throughout the site. */
h1,
h2 {
    font-family: var(--site-ui-font);
    color: var(--site-heading-ink);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--minimal-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

::selection {
    background: #e3edf2;
    color: var(--site-heading-ink);
}

body > .container {
    max-width: var(--site-content-width);
    padding: 32px 24px 32px;
}

h1,
.publication-header h1,
.code-page h1,
.writing-header h1,
.article-header h1 {
    margin: 0 0 4px;
    font-size: var(--site-heading-size);
    font-weight: 600;
    line-height: 1.15;
}

.section-nav {
    font-size: var(--site-nav-size);
    font-family: var(--site-ui-font);
}

.section-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 5px;
    line-height: 1.4;
}

.section-nav a:hover {
    background: var(--site-surface);
}

.section-nav a[aria-current] {
    color: var(--minimal-blue);
    background: var(--site-active);
    text-decoration: none;
}

/* Google Scholar leaves the site, so it sits apart from the section links. */
.section-nav .section-nav-external {
    color: var(--minimal-muted);
    font-weight: 400;
}

.publication-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.publication-scholar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--site-rule);
    border-radius: 6px;
    background: #fff;
    font-weight: 500;
    line-height: 1.4;
}

.publication-scholar i {
    font-size: 16px;
}

.publication-scholar:hover {
    border-color: #c5d2db;
    background: var(--site-surface);
    text-decoration: none;
}

.publication-scholar,
.publication-years {
    font-size: var(--site-nav-size);
}

.publication-page .publications {
    margin-top: 18px;
}

/* Keep the complete list readable when JavaScript is unavailable. */
.publication-page [hidden] {
    display: none !important;
}

.publication-filters {
    margin: 20px 0 16px;
}

.publication-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.publication-topics button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--site-rule);
    border-radius: 6px;
    background: #fff;
    color: var(--minimal-muted);
    font-family: var(--site-ui-font);
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
}

.publication-topics button:hover {
    border-color: #c5d2db;
    background: var(--site-surface);
}

.publication-topics button[aria-pressed="true"] {
    border-color: #b9cedc;
    background: var(--site-active);
    color: var(--minimal-blue);
}

.topic-count {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.publication-page .publications h2 {
    gap: 12px;
    margin: 22px 0 6px;
    font-size: 24px;
}

.publication-page .publications .publication-entry {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 8px 0;
    font-size: var(--site-body-size);
    line-height: 1.55;
}

.publication-thumbnail {
    height: 80px;
}

.publication-copy {
    padding-left: 30px;
    font-size: var(--site-body-size);
}

.publication-title {
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 8px;
    margin-left: -30px;
    margin-bottom: 2px;
    font-size: var(--site-body-size);
}

.publication-number {
    font-size: 13px;
}

.publication-page .publication-copy > a {
    font-size: inherit;
}

.publication-page .publication-title .publication-paper-link {
    color: var(--minimal-ink);
    font-family: var(--site-ui-font);
    font-size: inherit;
    text-decoration: none;
}

.publication-page .publication-title .publication-paper-link:hover,
.publication-page .publication-title .publication-paper-link:focus-visible {
    color: var(--minimal-blue);
    text-decoration: underline;
}

.publication-title .publication-paper-link:hover strong,
.publication-title .publication-paper-link:focus-visible strong {
    color: inherit;
}

.publication-page .publications li[id] {
    scroll-margin-top: calc(var(--publication-site-nav-height, 3rem) + var(--publication-year-nav-height, 3.5rem) + 1rem);
}

.code-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 0;
}

.code-entry {
    gap: 0;
    border: 1px solid var(--site-rule);
    border-radius: var(--site-radius);
    background: #fff;
}

.code-content {
    padding: 16px;
}

.code-entry h2 {
    margin-bottom: 8px;
    font-size: 21px;
    line-height: 1.3;
}

.code-logo {
    width: 100%;
    height: 132px;
    padding: 16px;
    justify-content: center;
    border-radius: 7px 7px 0 0;
    border-bottom: 1px solid #eef0f2;
    background: var(--site-surface);
}

.code-logo img {
    max-width: 280px;
    object-position: center;
    mix-blend-mode: multiply;
}

.code-logo--ipie img {
    width: 84px;
    height: 84px;
}

.code-summary {
    margin-bottom: 18px;
    font-size: var(--site-body-size);
    line-height: 1.55;
}

.code-links {
    gap: 8px 16px;
    font-size: var(--site-nav-size);
}

.code-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}


@media (min-width: 1200px) {
    .section-nav {
        position: fixed;
        top: 32px;
        bottom: auto;
        left: max(16px, calc(50% - 578px));
        width: 112px;
        align-items: flex-start;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
        border-right: 0;
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .section-nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
    }

    .section-nav a {
        width: 100%;
    }

    .section-nav .section-nav-external {
        margin-top: 12px;
    }

    .publication-years {
        position: fixed;
        top: 32px;
        left: calc(50% + 464px);
        width: 60px;
        max-height: calc(100vh - 64px);
        max-height: calc(100dvh - 64px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .publication-years a {
        padding: 5px 10px 5px 12px;
        border-bottom: 0;
        border-left: 2px solid var(--minimal-rule);
    }

    .publication-years a[aria-current="location"] {
        border-left-color: var(--minimal-blue);
    }

    .publication-page .publications h2,
    .publication-page .publications li[id] {
        scroll-margin-top: 64px;
    }
}

@media (max-width: 1199px) {
    .section-nav {
        position: sticky;
        top: 0;
        left: auto;
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 16px;
        padding-block: 8px;
        border-right: 0;
        border-bottom: 1px solid var(--site-rule);
    }

    .section-nav-links {
        flex: 1 1 auto;
        flex-direction: row;
        gap: 4px;
    }

    .section-nav .section-nav-external {
        margin-left: auto;
    }
}

@media (max-width: 759px) {
    :root {
        --site-heading-size: 36px;
    }

    body > .container {
        max-width: 580px;
        padding: 12px 20px 28px;
    }

    .section-nav {
        justify-content: flex-start;
    }

    /* One row on phones; the bar scrolls sideways if the links do not fit. */
    .section-nav-links {
        min-width: 0;
        flex-wrap: nowrap;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .section-nav-links::-webkit-scrollbar {
        display: none;
    }

    .section-nav a {
        display: inline-flex;
        flex: none;
        min-height: 44px;
        align-items: center;
        padding-inline: 5px;
        white-space: nowrap;
    }

    .section-nav .section-nav-external span {
        display: none;
    }

    .code-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .code-entry {
        gap: 0;
    }

    .code-entry h2 {
        font-size: 21px;
    }

    .code-logo {
        width: 100%;
        height: 116px;
        justify-content: center;
    }

    .code-logo img {
        max-width: 200px;
        object-position: center;
    }

    .code-summary {
        line-height: 1.5;
    }
}

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

@media (max-width: 575px) {
    .publication-topics button {
        padding-inline: 7px;
    }

    .publication-header {
        column-gap: 16px;
    }

    .publication-page .publications .publication-entry {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
        gap: 12px;
    }

    .publication-thumbnail {
        height: 64px;
        margin-top: 3px;
    }

    .publication-copy {
        padding-left: 24px;
    }

    .publication-title {
        grid-template-columns: 18px minmax(0, 1fr);
        column-gap: 6px;
        margin-left: -24px;
    }
}
