/* Visual refinement pass — editorial first, Emacs details second. */

:root {
    --display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
}

/* Rebalance the visual language: display/editorial typography for content,
   monospace for interface, metadata and the Emacs layer. */
.sr-hero h1,
.sr-page-hero h1,
.sr-about-copy h1,
.sr-project-hero-copy h1,
.sr-post-header h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.sr-post-row-main h2 {
    font-family: var(--display);
}

.sr-hero h1,
.sr-page-hero h1,
.sr-about-copy h1,
.sr-project-hero-copy h1 {
    letter-spacing: -.052em;
}

/* Header: slightly quieter and more architectural. */
.sr-header {
    height: 68px;
}
.sr-header-inner {
    gap: 24px;
}
.sr-wordmark {
    letter-spacing: -.025em;
}
.sr-nav-item a {
    font-size: 12px;
    letter-spacing: .005em;
}

/* Homepage hero: stronger first impression without occupying the entire viewport. */
.sr-hero {
    min-height: 570px;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
}
.sr-hero-copy {
    padding: 72px 60px 62px;
}
.sr-hero h1 {
    max-width: 690px;
    margin: 18px 0 22px;
    font-size: clamp(48px, 5vw, 74px);
    font-weight: 780;
    line-height: .96;
}
.sr-hero-statement {
    max-width: 640px;
    font-size: clamp(22px, 2vw, 29px);
    line-height: 1.34;
}
.sr-hero-topics {
    max-width: 660px;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .01em;
}
.sr-hero-visual {
    min-height: 570px;
}
.sr-hero-portrait {
    object-position: center 24%;
}
.sr-hero-note {
    background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
    backdrop-filter: blur(5px);
    padding: 10px 8px 6px;
}

/* Give sections more breathing room and a clearer rhythm. */
.sr-section {
    padding: 70px 48px;
}
.sr-section-head {
    margin-bottom: 32px;
}
.sr-section-head h2 {
    font-size: 24px;
}
.sr-section-head p {
    margin-top: 9px;
    font-size: 17px;
    line-height: 1.5;
}
.sr-section-head > a {
    font-size: 12px;
}
.sr-label,
.sr-kicker {
    font-size: 12px;
}

/* Credibility strip: understated rather than badge-like. */
.sr-credentials > div {
    min-height: 68px;
    padding: 17px 24px;
}
.sr-credentials strong {
    font-size: 12px;
    letter-spacing: .005em;
}

/* Current focus: keep the Org structure, make the descriptions easier to scan. */
.sr-focus {
    min-height: 158px;
    padding: 24px 21px 26px;
    transition: background-color .16s ease;
}
.sr-focus:hover {
    background: var(--panel);
}
.sr-focus h3 {
    margin-top: 12px;
    font-size: 14px;
}
.sr-focus p {
    color: var(--muted);
    font: 14px/1.58 var(--sans);
}

/* Selected work: make the main research story feel editorial and the tools deliberate. */
.sr-selected-grid {
    grid-template-columns: minmax(0, 1.34fr) minmax(330px, .96fr);
    gap: 18px;
}
.sr-featured-story {
    min-height: 414px;
}
.sr-featured-story-copy {
    padding: 30px;
}
.sr-featured-story h3 {
    max-width: 680px;
    font-family: var(--display);
    font-size: clamp(24px, 2.05vw, 31px);
    font-weight: 730;
    line-height: 1.14;
    letter-spacing: -.035em;
}
.sr-featured-story p {
    font-size: 16px;
    line-height: 1.52;
}
.sr-project-stack {
    gap: 18px;
}
.sr-project-card {
    min-height: 198px;
    padding: 20px;
    gap: 18px;
    transition: border-color .16s ease, transform .16s ease, background-color .16s ease;
}
.sr-project-card:hover {
    transform: translateY(-1px);
    background: var(--bg-raised);
}
.sr-project-card h3 {
    margin: 8px 0 12px;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 720;
    letter-spacing: -.025em;
}
.sr-project-description {
    font: 14px/1.55 var(--sans);
}
.sr-project-link {
    font-size: 11px;
}
.sr-project-card-visual {
    height: 154px;
    border-radius: 4px;
}

/* Writing lists: long technical titles read better as editorial headlines than UI labels. */
.sr-post-row {
    padding-top: 24px;
    padding-bottom: 24px;
}
.sr-post-row-main h2 {
    font-size: 18px;
    font-weight: 690;
    line-height: 1.34;
    letter-spacing: -.025em;
    text-wrap: balance;
}
.sr-post-row-main p {
    margin-top: 9px;
    font-size: 16px;
    line-height: 1.55;
}
.sr-post-row-meta,
.sr-post-row-time {
    font-size: 11px;
}
.sr-post-row-thumb {
    border-radius: 6px;
}

/* Page heroes: wider editorial title area, narrower buffer rail. */
.sr-page-hero {
    min-height: 305px;
    grid-template-columns: minmax(0, 1fr) 250px;
}
.sr-page-hero > div:first-child {
    padding: 64px 60px 56px;
}
.sr-page-hero h1 {
    margin-top: 13px;
    font-size: clamp(42px, 4.65vw, 62px);
    font-weight: 760;
    line-height: 1;
}
.sr-page-hero p {
    max-width: 760px;
    font-size: 20px;
    line-height: 1.48;
}
.sr-buffer-index {
    padding: 30px;
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--bg-raised));
    font-size: 11px;
}

/* About: let the portrait and biography breathe equally. */
.sr-about-hero {
    grid-template-columns: .9fr 1.1fr;
    min-height: 500px;
}
.sr-about-image {
    min-height: 500px;
}
.sr-about-image img {
    object-position: center 22%;
}
.sr-about-copy {
    padding: 66px 64px;
}
.sr-about-copy h1 {
    font-size: clamp(43px, 4.7vw, 64px);
    font-weight: 760;
}
.sr-about-copy p {
    font-size: 21px;
    line-height: 1.48;
}

/* Articles: long standards titles no longer look like giant terminal output. */
.sr-post-header-inner {
    max-width: 1080px;
    padding-top: 68px;
    padding-bottom: 40px;
}
.sr-post-header h1 {
    max-width: 1040px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: clamp(38px, 4.45vw, 61px);
    font-weight: 750;
    line-height: 1.04;
    letter-spacing: -.045em;
}
.sr-post-deck {
    max-width: 800px;
    font-size: 20px;
    line-height: 1.5;
}
.sr-post-meta-top,
.sr-post-byline {
    font-size: 11px;
}
.sr-post-feature {
    max-width: 1160px;
    padding-bottom: 46px;
}
.sr-post-feature img {
    border-radius: 8px;
}
.sr-article-shell {
    gap: 46px;
    padding-top: 68px;
}
.gh-content,
.sr-prose {
    font-size: 19px;
    line-height: 1.76;
}
.gh-content h2,
.gh-content h3,
.gh-content h4 {
    letter-spacing: -.028em;
}
.gh-content h2 {
    font-size: 29px;
    font-weight: 740;
}
.gh-content h3 {
    font-size: 22px;
    font-weight: 720;
}
.gh-content h4 {
    font-size: 17px;
    font-weight: 720;
}
.gh-content h2::before,
.gh-content h3::before {
    font-family: var(--mono);
}
.sr-toc {
    padding-left: 20px;
}
.sr-toc-title {
    font-size: 11px;
}
.sr-toc a {
    padding: 6px 0;
    font-size: 11px;
    line-height: 1.5;
}
.sr-toc a[data-level="3"] {
    font-size: 10px;
}

/* Small controls remain compact, but no longer drop below comfortable reading size. */
.sr-filter-tags a,
.sr-filter-label,
.sr-rw-jump,
.sr-output-band a span,
.sr-lab-grid span,
.sr-lab-grid em,
.sr-footer p,
.sr-footer .sr-nav-item a,
.sr-secondary-nav a,
.sr-mobile-shortcuts {
    font-size: 11px;
}
.sr-mode-line {
    font-size: 11px;
}

/* Cards and bands get tactile feedback without becoming app-like. */
.sr-output-band > a,
.sr-lab-grid a {
    transition: background-color .16s ease, color .16s ease;
}

/* Keep the Emacs mode line useful on phones without spending excessive viewport height. */
@media (max-width: 900px) {
    .sr-hero {
        grid-template-columns: 1fr;
    }
    .sr-hero-visual {
        min-height: 430px;
    }
    .sr-hero-portrait {
        height: 500px;
    }
    .sr-selected-grid {
        grid-template-columns: 1fr;
    }
    .sr-project-card:hover {
        transform: none;
    }
    .sr-page-hero,
    .sr-about-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sr-header {
        height: 60px;
    }
    .sr-mobile-menu {
        top: 59px;
    }
    .sr-section {
        padding: 46px 20px 50px;
    }
    .sr-hero-copy {
        padding: 48px 24px 38px;
    }
    .sr-hero h1 {
        margin-top: 16px;
        margin-bottom: 18px;
        font-size: clamp(42px, 13.2vw, 56px);
    }
    .sr-hero-statement {
        font-size: 20px;
    }
    .sr-hero-topics {
        font-size: 12px;
    }
    .sr-hero-visual {
        min-height: 350px;
    }
    .sr-hero-portrait {
        height: 390px;
        object-position: center 20%;
    }
    .sr-hero-note {
        right: 18px;
        bottom: 20px;
        width: 170px;
    }
    .sr-focus {
        min-height: 0;
        padding: 22px 18px 23px;
    }
    .sr-featured-story {
        min-height: 330px;
    }
    .sr-featured-story h3 {
        font-size: 23px;
    }
    .sr-project-card {
        min-height: 0;
        padding: 16px;
    }
    .sr-project-card-visual {
        height: 176px;
    }
    .sr-post-row-main h2 {
        font-size: 16px;
    }
    .sr-page-hero > div:first-child,
    .sr-about-copy,
    .sr-project-hero-copy {
        padding: 44px 24px 40px;
    }
    .sr-page-hero h1,
    .sr-about-copy h1,
    .sr-project-hero-copy h1 {
        font-size: 38px;
    }
    .sr-page-hero p,
    .sr-about-copy p,
    .sr-project-hero-copy p {
        font-size: 18px;
    }
    .sr-about-image {
        min-height: 380px;
    }
    .sr-about-image img {
        max-height: 470px;
    }
    .sr-post-header-inner {
        padding: 44px 22px 30px;
    }
    .sr-post-header h1 {
        font-size: clamp(33px, 10.2vw, 45px);
        line-height: 1.06;
    }
    .sr-post-deck {
        font-size: 18px;
    }
    .gh-content,
    .sr-prose {
        font-size: 18px;
        line-height: 1.74;
    }
    .sr-mode-site,
    .sr-mode-encoding {
        display: none !important;
    }
    .sr-mode-line > span {
        padding-left: 7px;
        padding-right: 7px;
    }
}
