/*
Theme Name: Megagenome 2026
Theme URI: https://megagenome.nchu.edu.tw/
Description: Child theme for the Microbial Genomics Laboratory website.
Author: Ying-Tsong Chen
Template: twentytwentyfive
Version: 0.1.0
Text Domain: megagenome-2026
*/
/* Homepage hero heading */
.home main > .wp-block-group.alignwide:first-child h1 {
    max-width: 900px;
}
/* =========================================================
   PEOPLE PAGE
   ========================================================= */

/* ---------- Shared section spacing ---------- */

.people_featured,
.people_current,
.people_alumni {
    margin-top: 72px;
}

/* 第一區接在頁面介紹後，不需要再多一層巨大空白 */
.people_featured {
    margin-top: 0;
}


/* ---------- Section headings: 01 / Title / 中文 ---------- */

.people_featured > .wp-block-group:first-child,
.people_current > .wp-block-group:first-child,
.people_alumni > .wp-block-group:first-child {
    border-bottom: 1px solid var(--wp--preset--color--line);
    margin-bottom: 32px;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
}

/* 01 / 02 / 03 */
.people_featured > .wp-block-group:first-child > p:first-child,
.people_current > .wp-block-group:first-child > p:first-child,
.people_alumni > .wp-block-group:first-child > p:first-child {
    color: var(--wp--preset--color--muted) !important;
    font-size: 0.76rem !important;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.2;
    margin: 0 0 8px 0 !important;
}

/* Featured Members / Current Members / Lab Alumni */
.people_featured > .wp-block-group:first-child > h2,
.people_current > .wp-block-group:first-child > h2,
.people_alumni > .wp-block-group:first-child > h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

/* 成員風貌 / 目前成員 / 歷屆成員 */
.people_featured > .wp-block-group:first-child > p:last-child,
.people_current > .wp-block-group:first-child > p:last-child,
.people_alumni > .wp-block-group:first-child > p:last-child {
    color: var(--wp--preset--color--muted) !important;
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.5;
    margin: 7px 0 0 0 !important;
}


/* =========================================================
   FEATURED MEMBERS
   ========================================================= */

.people_featured .wp-block-media-text {
    margin-top: 0;
    margin-bottom: 48px;
    gap: 0;
}

/* 圖片 */
.people_featured .wp-block-media-text__media img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* 文字區塊 */
.people_featured .wp-block-media-text__content {
    padding-left: 8%;
    padding-right: 8%;
}

/* 姓名 */
.people_featured .wp-block-media-text__content h4 {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: 14px;
}

/* 一般介紹 */
.people_featured .wp-block-media-text__content p {
    line-height: 1.8;
}

/* 研究題目等較短文字 */
.people_featured .wp-block-media-text__content h4 + p {
    color: var(--wp--preset--color--muted);
}

/* quote 做得比較像一句人物註記，而不是傳統大引言 */
.people_featured blockquote {
    border-left: 2px solid var(--wp--preset--color--line);
    margin: 20px 0 0 0;
    padding-left: 18px;
}

.people_featured blockquote p {
    color: var(--wp--preset--color--muted);
    font-size: 0.92rem;
    font-style: italic;
    margin: 0;
}


/* =========================================================
   CURRENT MEMBERS + ALUMNI
   ========================================================= */

/* 原本 Gutenberg separator 可以不要太搶戲 */
.people_current > .wp-block-separator,
.people_alumni > .wp-block-separator {
    border-top: 1px solid var(--wp--preset--color--line);
    margin-top: 0;
    margin-bottom: 32px;
    opacity: 0.7;
}

/* 學位/身份類別標題 */
.people_current > h4,
.people_alumni > h4 {
    margin-top: 36px;
}

/* 每一大類的第一個 h4 不要離上面太遠 */
.people_current > .wp-block-separator + h4,
.people_alumni > .wp-block-separator + h4 {
    margin-top: 0;
}

/* Master’s Student / PhD students 等 */
.people_current > h4:not(:has(+ ul)),
.people_alumni > h4:not(:has(+ ul)) {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
}

/* Year of Entry */
.people_current > h4:has(+ ul),
.people_alumni > h4:has(+ ul) {
    color: var(--wp--preset--color--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* 名單本身 */
.people_current > ul,
.people_alumni > ul {
    list-style: none;
    margin-top: 0;
    margin-bottom: 28px;
    padding-left: 0;
}

/* 每個人像一筆 record */
.people_current > ul > li,
.people_alumni > ul > li {
    border-top: 1px solid var(--wp--preset--color--line);
    margin: 0;
    padding: 13px 0 14px 0;
}

/* 最後一筆也補底線，形成完整清單 */
.people_current > ul > li:last-child,
.people_alumni > ul > li:last-child {
    border-bottom: 1px solid var(--wp--preset--color--line);
}

/* 姓名行稍微清楚一點 */
.people_current > ul > li,
.people_alumni > ul > li {
    font-weight: 450;
}

/* br 後面的 thesis / project title 視覺上退一階 */
.people_current > ul > li br,
.people_alumni > ul > li br {
    content: "";
}

.people_current > ul > li br + *,
.people_alumni > ul > li br + * {
    color: var(--wp--preset--color--muted);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .people_featured,
    .people_current,
    .people_alumni {
        margin-top: 56px;
    }

    .people_featured {
        margin-top: 0;
    }

    .people_featured .wp-block-media-text {
        margin-bottom: 42px;
    }

    .people_featured .wp-block-media-text__content {
        padding: 24px 0 0 0;
    }

    /* 圖片在右邊的 block，手機疊起來後也不要出現怪 padding */
    .people_featured .has-media-on-the-right .wp-block-media-text__content {
        padding: 24px 0 0 0;
    }
}
/* =========================================================
   PRINCIPAL INVESTIGATOR — page 6
   ========================================================= */


/* ---------- overall rhythm ---------- */

.page-id-6 .entry-content > * {
    margin-block-start: 0;
}

.page-id-6 .PI_brief,
.page-id-6 #PI_about,
.page-id-6 .PI_CEH,
.page-id-6 .PI_feat_pub {
    margin-top: 72px;
}


/* =========================================================
   PI BRIEF
   ========================================================= */

.page-id-6 .PI_brief {
    padding-top: 32px;
    border-top: 1px solid var(--wp--preset--color--line);
}

.page-id-6 .PI_brief > .wp-block-media-text {
    gap: 0;
    align-items: start;
}

/* remove Gutenberg's rather generous default side padding */
.page-id-6 .PI_brief .wp-block-media-text__content {
    padding: 0 56px 0 0;
}

/* position / affiliations */
.page-id-6 .PI_brief .wp-block-media-text__content > p {
    margin-top: 0;
    margin-bottom: 18px;
    line-height: 1.7;
}

/* first Chinese affiliation */
.page-id-6 .PI_brief .wp-block-media-text__content > p:first-child {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.65;
    color: var(--wp--preset--color--ink);
}

/* English affiliation and secondary appointment */
.page-id-6 .PI_brief .wp-block-media-text__content > p:nth-of-type(2),
.page-id-6 .PI_brief .wp-block-media-text__content > p:nth-of-type(3),
.page-id-6 .PI_brief .wp-block-media-text__content > p:nth-of-type(4) {
    color: var(--wp--preset--color--muted);
}

/* subtle divider before contact details */
.page-id-6 .PI_brief hr {
    margin: 28px 0 22px;
    border: 0;
    border-top: 1px solid var(--wp--preset--color--line);
}

/* e-mail */
.page-id-6 .PI_brief hr + p {
    margin-bottom: 6px;
    font-size: 0.94rem;
    letter-spacing: 0.01em;
}

/* Scholar / Facebook / ResearchGate */
.page-id-6 .PI_brief hr + p + p {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* ORCID */
.page-id-6 .PI_brief .wp-block-media-text__content > div {
    margin-top: 4px;
    font-size: 0.88rem;
}

.page-id-6 .PI_brief .wp-block-media-text__content > div img {
    vertical-align: -0.1em !important;
}

/* PI portrait */
.page-id-6 .PI_brief .wp-block-media-text__media {
    align-self: start;
}

.page-id-6 .PI_brief .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}


/* ---------- quote ---------- */

.page-id-6 .PI_brief blockquote {
    margin: 34px 0 0;
    padding: 18px 0 0 22px;
    border-left: 2px solid var(--wp--preset--color--accent);
    color: var(--wp--preset--color--muted);
}

.page-id-6 .PI_brief blockquote p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.8;
}


/* =========================================================
   SECTION HEADINGS
   About / Career / Featured publications
   ========================================================= */

.page-id-6 #PI_about > h2,
.page-id-6 .PI_CEH > h2,
.page-id-6 .PI_feat_pub > h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.page-id-6 #PI_about > hr,
.page-id-6 .PI_CEH > hr {
    margin: 0 0 32px;
    border: 0;
    border-top: 1px solid var(--wp--preset--color--line);
}


/* =========================================================
   ABOUT PROFESSOR CHEN
   ========================================================= */

.page-id-6 #PI_about .wp-block-media-text {
    align-items: start;
}

.page-id-6 #PI_about .wp-block-media-text__content {
    padding: 0 0 0 48px;
}

.page-id-6 #PI_about .wp-block-media-text__content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.page-id-6 #PI_about .wp-block-media-text__content p:first-child {
    font-size: 1.02rem;
}

.page-id-6 #PI_about .wp-block-media-text__media {
    align-self: start;
}

.page-id-6 #PI_about .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}


/* =========================================================
   CAREER, EDUCATION AND HONORS
   ========================================================= */

.page-id-6 .PI_CEH .wp-block-media-text {
    align-items: start;
}

.page-id-6 .PI_CEH .wp-block-media-text__content {
    padding: 0 48px 0 0;
}

.page-id-6 .PI_CEH .wp-block-media-text__content > p {
    margin-top: 0;
    margin-bottom: 12px;
    line-height: 1.75;
}

.page-id-6 .PI_CEH .wp-block-media-text__content > ul {
    margin-top: 6px;
    margin-bottom: 30px;
    padding-left: 1.25rem;
}

.page-id-6 .PI_CEH .wp-block-media-text__content li {
    margin-top: 4px;
    line-height: 1.65;
}

.page-id-6 .PI_CEH .wp-block-media-text__media {
    align-self: start;
}

.page-id-6 .PI_CEH .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}


/* =========================================================
   FEATURED PUBLICATIONS
   ========================================================= */

.page-id-6 .PI_feat_pub {
    padding-top: 32px;
    border-top: 1px solid var(--wp--preset--color--line);
}

.page-id-6 .PI_feat_pub > h2 {
    margin-bottom: 40px;
}

.page-id-6 .PI_feat_pub > h4 {
    margin-top: 34px;
    margin-bottom: 6px;
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
}

.page-id-6 .PI_feat_pub > h4:first-of-type {
    margin-top: 0;
}

.page-id-6 .PI_feat_pub > p {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.93rem;
    line-height: 1.7;
}

.page-id-6 .PI_feat_pub > p a {
    overflow-wrap: anywhere;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .page-id-6 .PI_brief,
    .page-id-6 #PI_about,
    .page-id-6 .PI_CEH,
    .page-id-6 .PI_feat_pub {
        margin-top: 56px;
    }

    .page-id-6 .PI_brief {
        padding-top: 24px;
    }

    .page-id-6 .PI_brief .wp-block-media-text__content,
    .page-id-6 #PI_about .wp-block-media-text__content,
    .page-id-6 .PI_CEH .wp-block-media-text__content {
        padding: 0;
    }

    .page-id-6 .PI_brief .wp-block-media-text__media,
    .page-id-6 #PI_about .wp-block-media-text__media,
    .page-id-6 .PI_CEH .wp-block-media-text__media {
        margin-top: 28px;
    }

    .page-id-6 #PI_about .wp-block-media-text__content {
        margin-top: 28px;
    }

    .page-id-6 .PI_CEH .wp-block-media-text__media {
        margin-bottom: 28px;
    }

    .page-id-6 .PI_brief blockquote {
        margin-top: 28px;
    }

    .page-id-6 .PI_feat_pub > h2 {
        margin-bottom: 30px;
    }
}
/* =========================================================
   Publications
   ========================================================= */

/* Publication sections */
.publication_prep,
.publication_articles {
    margin-top: 72px;
}

/* First section does not need extra top space after page intro */
.publication_prep {
    margin-top: 0;
}

/* 01 / 02 */
.publication_prep > p:first-child,
.publication_articles > p:first-child {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--wp--preset--color--muted);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.2;
}

/* Preprints / Journal Articles */
.publication_prep > h2,
.publication_articles > h2 {
    margin-top: 0;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--wp--preset--color--line);

    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* CitePress year blocks */
.publication_prep .citepress-year-group,
.publication_articles .citepress-year-group {
    margin-top: 0;
    margin-bottom: 48px;
}

/* Year heading */
.publication_prep .citepress-year,
.publication_articles .citepress-year {
    margin-top: 0;
    margin-bottom: 20px;

    color: var(--wp--preset--color--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

/* Publication list */
.publication_prep .citepress-list,
.publication_articles .citepress-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Individual publication */
.publication_prep .citepress-item,
.publication_articles .citepress-item {
    margin: 0;
    padding: 0 0 28px 0;
    border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Space between entries */
.publication_prep .citepress-item + .citepress-item,
.publication_articles .citepress-item + .citepress-item {
    padding-top: 28px;
}

/* Publication title */
.publication_prep .citepress-title,
.publication_articles .citepress-title {
    display: block;
    margin-bottom: 8px;

    color: var(--wp--preset--color--ink);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
}

/* Subtle link behavior */
.publication_prep .citepress-title:hover,
.publication_articles .citepress-title:hover {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

/* Authors */
.publication_prep .citepress-authors,
.publication_articles .citepress-authors {
    display: block;
    margin-bottom: 5px;

    color: var(--wp--preset--color--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Keep highlighted lab author visible but not too heavy */
.publication_prep .citepress-authors strong,
.publication_articles .citepress-authors strong {
    color: var(--wp--preset--color--ink);
    font-weight: 600;
}

/* Journal / year / volume */
.publication_prep .citepress-citation,
.publication_articles .citepress-citation {
    display: block;
    margin-bottom: 3px;

    font-size: 0.9rem;
    line-height: 1.55;
}

/* Journal name */
.publication_prep .citepress-journal,
.publication_articles .citepress-journal {
    font-style: italic;
}

/* DOI */
.publication_prep .citepress-doi,
.publication_articles .citepress-doi {
    display: block;

    color: var(--wp--preset--color--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* DOI link slightly quieter than title links */
.publication_prep .citepress-doi a,
.publication_articles .citepress-doi a {
    color: var(--wp--preset--color--accent);
}

/* Mobile */
@media (max-width: 600px) {
    .publication_prep,
    .publication_articles {
        margin-top: 56px;
    }

    .publication_prep {
        margin-top: 0;
    }

    .publication_prep > h2,
    .publication_articles > h2 {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .publication_prep .citepress-item,
    .publication_articles .citepress-item {
        padding-bottom: 22px;
    }

    .publication_prep .citepress-item + .citepress-item,
    .publication_articles .citepress-item + .citepress-item {
        padding-top: 22px;
    }
}
/* =========================================================
   Notes page
   ========================================================= */


/* ---------------------------------------------------------
   Jump navigation
   --------------------------------------------------------- */

.notes-jump-nav {
    align-items: center;
}

.notes-jump-nav p {
    margin-top: 0;
}

.notes-jump-nav a {
    color: var(--wp--preset--color--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.notes-jump-nav a:hover,
.notes-jump-nav a:focus {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}


/* ---------------------------------------------------------
   Main sections
   --------------------------------------------------------- */

.notes-section {
    scroll-margin-top: 48px;
}


/* ---------------------------------------------------------
   Query Loop
   --------------------------------------------------------- */

.notes-section .wp-block-query {
    margin-top: 0;
}

.notes-section .wp-block-post-template {
    margin: 0;
    padding: 0;
}


/* Each post item */

.notes-section .wp-block-post-template > li {
    margin: 0;
}

.notes-section .wp-block-post-template > li > .wp-block-group {
    transition: opacity 0.15s ease;
}

.notes-section .wp-block-post-template > li > .wp-block-group:hover {
    opacity: 0.78;
}


/* ---------------------------------------------------------
   Date
   --------------------------------------------------------- */

.notes-section .wp-block-post-date {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.4;
}

.notes-section .wp-block-post-date a {
    color: inherit;
    text-decoration: none;
}


/* ---------------------------------------------------------
   Post title
   --------------------------------------------------------- */

.notes-section .wp-block-post-title {
    margin-top: 7px;
    margin-bottom: 8px;
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.notes-section .wp-block-post-title a {
    color: var(--wp--preset--color--ink);
    text-decoration: none;
}

.notes-section .wp-block-post-title a:hover,
.notes-section .wp-block-post-title a:focus {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}


/* ---------------------------------------------------------
   Excerpt
   --------------------------------------------------------- */

.notes-section .wp-block-post-excerpt {
    margin-top: 0;
    margin-bottom: 0;
}

.notes-section .wp-block-post-excerpt__excerpt {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.94rem;
    font-weight: 300;
    line-height: 1.7;
}


/* WordPress sometimes generates a "read more" element anyway */

.notes-section .wp-block-post-excerpt__more-text {
    margin-top: 8px;
    margin-bottom: 0;
}

.notes-section .wp-block-post-excerpt__more-link {
    color: var(--wp--preset--color--accent);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.notes-section .wp-block-post-excerpt__more-link:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Empty query result
   --------------------------------------------------------- */

.notes-section .wp-block-query-no-results {
    color: var(--wp--preset--color--muted);
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Pagination, if added later
   --------------------------------------------------------- */

.notes-section .wp-block-query-pagination {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--wp--preset--color--line);
    font-size: 0.86rem;
}

.notes-section .wp-block-query-pagination a {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

.notes-section .wp-block-query-pagination a:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .notes-jump-nav {
        gap: 10px 22px !important;
        margin-bottom: 52px !important;
    }

    .notes-jump-nav p {
        margin-bottom: 10px !important;
        font-size: 0.84rem !important;
    }

    .notes-section {
        margin-bottom: 68px !important;
    }

    .notes-section .wp-block-post-title {
        font-size: 1.12rem;
        line-height: 1.35;
    }

    .notes-section .wp-block-post-excerpt__excerpt {
        font-size: 0.9rem;
        line-height: 1.65;
    }
}

/* =========================================================
   MILESTONES PAGE
   ========================================================= */

/* ---------- Page header ---------- */

.milestones-header {
    margin-bottom: 72px;
}

.milestones-kicker {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--wp--preset--color--muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.13em;
}

.milestones-page-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.milestones-intro-en {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--wp--preset--color--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
}

.milestones-intro-zh {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    line-height: 1.75;
}

/* ---------- Year jump navigation ---------- */

.milestones-jump-nav {
    gap: 28px !important;
    align-items: center;
    margin-bottom: 72px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wp--preset--color--line);
}

.milestones-jump-nav p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.milestones-jump-nav a {
    color: var(--wp--preset--color--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.milestones-jump-nav a:hover,
.milestones-jump-nav a:focus {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

/* ---------- Year sections ---------- */

.milestone-year {
    margin-bottom: 96px;
    scroll-margin-top: 48px;
}

.milestone-year-heading {
    margin-bottom: 38px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wp--preset--color--line);
}

.milestone-year-heading h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* ---------- Individual milestone ---------- */

.milestone-item {
    position: relative;
    margin: 0;
    padding: 2px 0 46px 152px;
}

/* Vertical timeline line */
.milestone-item::before {
    content: "";
    position: absolute;
    left: 105px;
    top: 10px;
    bottom: -1px;
    width: 1px;
    background: var(--wp--preset--color--line);
}

/* Timeline node */
.milestone-item::after {
    content: "";
    position: absolute;
    left: 101px;
    top: 8px;
    width: 9px;
    height: 9px;
    border: 1px solid var(--wp--preset--color--accent);
    border-radius: 50%;
    background: var(--wp--preset--color--paper);
    box-sizing: border-box;
}

/* Stop the line after the final item in each year */
.milestone-year > .milestone-item:last-child::before {
    bottom: auto;
    height: 1px;
}

/* ---------- Date ---------- */

.milestone-date {
    position: absolute;
    top: 0;
    left: 0;
    width: 78px;
    margin: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    line-height: 1.4;
    text-align: right;
    text-transform: uppercase;
}

/* ---------- Title and description ---------- */

.milestone-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.milestone-text {
    max-width: 760px;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.96rem;
    font-weight: 300;
    line-height: 1.75;
}

/* ---------- Media ---------- */

/*
 * Default milestone image presentation:
 * - 520 px maximum width on desktop
 * - 3:2 display ratio
 * - center crop for non-3:2 source images
 * The original uploaded image is not modified.
 */
.milestone-media {
    max-width: 520px;
    margin-top: 18px;
}

.milestone-image-placeholder {
    margin: 0;
    padding: 42px 24px;
    border: 1px dashed var(--wp--preset--color--line);
    color: var(--wp--preset--color--muted);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-align: center;
}

.milestone-media .wp-block-image {
    width: 100%;
    margin: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.milestone-media .wp-block-image img {
    display: block;
    width: 100%;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* Optional per-image crop focus classes */
.milestone-media .wp-block-image.crop-top img {
    object-position: center top;
}

.milestone-media .wp-block-image.crop-bottom img {
    object-position: center bottom;
}

/* Gutenberg image caption and separate caption paragraph */
.milestone-media .wp-block-image figcaption,
.milestone-caption {
    max-width: 520px;
    margin-top: 7px;
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
    font-size: 0.76rem;
    font-weight: 300;
    line-height: 1.5;
    text-align: left;
}

/* ---------- Links ---------- */

.milestone-item a {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

.milestone-item a:hover,
.milestone-item a:focus {
    text-decoration: underline;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    .milestones-header {
        margin-bottom: 52px;
    }

    .milestones-jump-nav {
        gap: 10px 22px !important;
        margin-bottom: 52px;
        padding-bottom: 14px;
    }

    .milestones-jump-nav p {
        font-size: 0.84rem;
    }

    .milestone-year {
        margin-bottom: 72px;
    }

    .milestone-year-heading {
        margin-bottom: 28px;
    }

    .milestone-year-heading h2 {
        font-size: 2rem;
    }

    .milestone-item {
        padding-left: 34px;
        padding-bottom: 38px;
    }

    .milestone-item::before {
        left: 4px;
        top: 8px;
    }

    .milestone-item::after {
        left: 0;
        top: 7px;
    }

    .milestone-date {
        position: static;
        width: auto;
        margin-bottom: 6px;
        text-align: left;
        font-size: 0.72rem;
    }

    .milestone-title {
        font-size: 1.12rem;
        line-height: 1.35;
    }

    .milestone-text {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .milestone-media {
        max-width: 100%;
        margin-top: 18px;
    }

    .milestone-media .wp-block-image figcaption,
    .milestone-caption {
        max-width: 100%;
        font-size: 0.74rem;
    }
}

