body[data-page="timeline"] {
    --timeline-bg: #f5f8fc;
    --timeline-surface: #ffffff;
    --timeline-surface-soft: #f8faff;
    --timeline-ink: #243047;
    --timeline-ink-soft: #5e6b82;
    --timeline-ink-faint: #8994a8;
    --timeline-line: #dfe6f1;
    --timeline-line-strong: #c8d4e6;
    --timeline-primary: #526fdd;
    --timeline-primary-strong: #3f5bc7;
    --timeline-primary-soft: #e9efff;
    --timeline-accent: #d9739c;
    --timeline-mint: #3ca99a;
    --timeline-shadow: 0 18px 46px rgba(54, 73, 116, 0.09);
    --timeline-shadow-hover: 0 24px 58px rgba(54, 73, 116, 0.15);
    --timeline-font: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    min-width: 320px;
    background: linear-gradient(180deg, #f8faff 0, var(--timeline-bg) 360px, #f3f6fb 100%);
    color: var(--timeline-ink);
    font-family: var(--timeline-font);
}

html[data-theme="dark"] body[data-page="timeline"] {
    --timeline-bg: #121725;
    --timeline-surface: #1b2232;
    --timeline-surface-soft: #20283a;
    --timeline-ink: #eef2fb;
    --timeline-ink-soft: #b8c2d7;
    --timeline-ink-faint: #8995ac;
    --timeline-line: #303a52;
    --timeline-line-strong: #45516d;
    --timeline-primary: #8da7ff;
    --timeline-primary-strong: #a7b9ff;
    --timeline-primary-soft: #27345a;
    --timeline-accent: #eea0be;
    --timeline-mint: #68c6b8;
    --timeline-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
    --timeline-shadow-hover: 0 26px 62px rgba(0, 0, 0, 0.34);
    background: linear-gradient(180deg, #151b2b 0, var(--timeline-bg) 360px, #101521 100%);
}

body[data-page="timeline"] .site-header {
    border-color: transparent;
    background: rgba(248, 250, 255, 0.84);
}

html[data-theme="dark"] body[data-page="timeline"] .site-header {
    background: rgba(18, 23, 37, 0.86);
}

body[data-page="timeline"] .site-header.is-scrolled {
    border-color: var(--timeline-line);
    box-shadow: 0 10px 30px rgba(54, 73, 116, 0.07);
}

body[data-page="timeline"] .timeline-header .header-inner {
    width: min(1180px, calc(100% - 40px));
    grid-template-columns: auto 1fr auto;
    gap: 30px;
}

body[data-page="timeline"] .brand {
    color: var(--timeline-ink);
    font-family: var(--timeline-font);
    font-size: 20px;
    font-weight: 850;
}

body[data-page="timeline"] .brand:hover {
    color: var(--timeline-primary);
}

body[data-page="timeline"] .brand-mark {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(145deg, var(--timeline-primary), #7c8df8 58%, var(--timeline-accent));
    box-shadow: 0 7px 18px rgba(82, 111, 221, 0.24);
}

body[data-page="timeline"] .brand-mark::before {
    inset: 7px;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

body[data-page="timeline"] .brand-mark::after {
    width: 6px;
    height: 6px;
    top: 3px;
    right: 3px;
    background: #ffffff;
}

body[data-page="timeline"] .brand-mark span {
    width: 3px;
    height: 3px;
    left: 6px;
    bottom: 5px;
    background: rgba(255, 255, 255, 0.84);
}

body[data-page="timeline"] .timeline-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

body[data-page="timeline"] .timeline-nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 7px;
    color: var(--timeline-ink-soft);
    font-size: 14px;
    font-weight: 750;
    transition: color 160ms ease, background 160ms ease;
}

body[data-page="timeline"] .timeline-nav-link:hover,
body[data-page="timeline"] .timeline-nav-link.is-active {
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
}

body[data-page="timeline"] .icon-button {
    border-color: var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
    color: var(--timeline-ink-soft);
}

body[data-page="timeline"] .icon-button:hover {
    border-color: rgba(82, 111, 221, 0.5);
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
}

body[data-page="timeline"] .account-trigger {
    border-color: var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
}

body[data-page="timeline"] .account-avatar {
    background: linear-gradient(145deg, var(--timeline-primary), #8497fb);
    color: #ffffff;
}

body[data-page="timeline"] .account-menu {
    border-color: var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
    box-shadow: var(--timeline-shadow);
}

body[data-page="timeline"] .account-menu-item:hover {
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
}

body[data-page="timeline"] #main-content {
    width: 100%;
}

body[data-page="timeline"] .timeline-main {
    flex: 1;
    width: 100%;
}

.timeline-hero {
    position: relative;
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 48px;
    text-align: center;
}

.timeline-hero .eyebrow {
    margin-bottom: 14px;
    color: var(--timeline-primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
}

.timeline-hero h1 {
    max-width: 920px;
    margin: 0 auto;
    color: var(--timeline-ink);
    font-size: 48px;
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: 0;
}

.timeline-hero h1 span {
    display: inline-block;
    margin-left: 0.28em;
    background: linear-gradient(96deg, #5577e9 0%, #876be4 42%, #d875a2 72%, #44aa9d 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: timeline-gradient 9s ease-in-out infinite;
}

.timeline-hero-note {
    max-width: 720px;
    margin: 20px auto 0;
    color: var(--timeline-ink-soft);
    font-size: 15px;
    line-height: 1.9;
}

.timeline-summary {
    min-height: 25px;
    margin: 22px 0 0;
    color: var(--timeline-ink-faint);
    font-size: 13px;
    font-weight: 700;
}

.timeline-stage {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 92px;
}

.timeline-groups {
    display: grid;
    gap: 54px;
}

.timeline-month {
    min-width: 0;
}

.timeline-month-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 20px 62px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--timeline-line);
}

.timeline-month-heading time {
    color: var(--timeline-ink);
    font-size: 19px;
    font-weight: 900;
}

.timeline-month-heading span {
    color: var(--timeline-ink-faint);
    font-size: 12px;
    font-weight: 700;
}

.timeline-month-items {
    position: relative;
    display: grid;
    gap: 22px;
}

.timeline-month-items::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 21px;
    width: 1px;
    content: "";
    background: linear-gradient(180deg, rgba(82, 111, 221, 0.34), rgba(217, 115, 156, 0.25), rgba(60, 169, 154, 0.2));
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.timeline-rail {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding-top: 28px;
}

.timeline-dot {
    width: 13px;
    height: 13px;
    display: block;
    border: 3px solid var(--timeline-surface);
    border-radius: 50%;
    background: var(--timeline-primary);
    box-shadow: 0 0 0 1px rgba(82, 111, 221, 0.34), 0 5px 14px rgba(82, 111, 221, 0.24);
}

.timeline-card {
    min-width: 0;
    padding: 25px 26px 22px;
    border: 1px solid var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
    box-shadow: var(--timeline-shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.timeline-card:hover {
    border-color: var(--timeline-line-strong);
    box-shadow: var(--timeline-shadow-hover);
    transform: translateY(-2px);
}

.timeline-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.timeline-card-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--timeline-ink-faint);
    font-size: 12px;
    font-weight: 750;
}

.timeline-category {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
    font-size: 11px;
    font-weight: 850;
}

.timeline-card h2 {
    margin: 0;
    color: var(--timeline-ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0;
}

.timeline-card h2 a:hover {
    color: var(--timeline-primary);
}

.timeline-entry-date {
    flex: 0 0 auto;
    padding-top: 3px;
    color: var(--timeline-ink-faint);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.timeline-excerpt {
    margin: 14px 0 0;
    color: var(--timeline-ink-soft);
    font-size: 14px;
    line-height: 1.85;
}

.timeline-copy {
    position: relative;
    margin-top: 16px;
    overflow-wrap: anywhere;
    color: var(--timeline-ink-soft);
    font-size: 15px;
    line-height: 1.9;
}

.timeline-copy.is-collapsed {
    max-height: 22rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

.timeline-copy > :first-child {
    margin-top: 0;
}

.timeline-copy > :last-child {
    margin-bottom: 0;
}

.timeline-copy p,
.timeline-copy ul,
.timeline-copy ol,
.timeline-copy blockquote,
.timeline-copy pre,
.timeline-copy figure {
    margin: 0 0 1em;
}

.timeline-copy h2,
.timeline-copy h3 {
    margin: 1.4em 0 0.6em;
    color: var(--timeline-ink);
    line-height: 1.45;
}

.timeline-copy h2 {
    font-size: 21px;
}

.timeline-copy h3 {
    font-size: 18px;
}

.timeline-copy a {
    color: var(--timeline-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.timeline-copy img,
.timeline-copy video {
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.timeline-copy blockquote {
    padding: 2px 0 2px 16px;
    border-left: 3px solid var(--timeline-accent);
    color: var(--timeline-ink-soft);
}

.timeline-copy pre {
    overflow-x: auto;
    padding: 14px;
    border-radius: 8px;
    background: var(--timeline-surface-soft);
}

.timeline-copy code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.timeline-expand {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 0 10px;
    border: 1px solid var(--timeline-line);
    border-radius: 7px;
    background: var(--timeline-surface-soft);
    color: var(--timeline-primary);
    font-size: 12px;
    font-weight: 800;
}

.timeline-expand .icon {
    width: 14px;
    height: 14px;
    transition: transform 160ms ease;
}

.timeline-expand[aria-expanded="true"] .icon {
    transform: rotate(180deg);
}

.timeline-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.timeline-media-item,
.timeline-video-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface-soft);
}

.timeline-video-card {
    margin: 0;
}

.timeline-video-frame {
    position: relative;
    min-width: 0;
    background: #000000;
}

.timeline-video-placeholder {
    z-index: 1;
}

.timeline-media-item {
    aspect-ratio: 4 / 3;
    padding: 0;
}

.timeline-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}

.timeline-media-item:hover img {
    transform: scale(1.035);
}

.timeline-media-overlay {
    position: absolute;
    inset: auto 0 0;
    min-height: 44px;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    background: linear-gradient(180deg, transparent, rgba(10, 20, 36, 0.72));
    color: #ffffff;
    opacity: 0;
    transition: opacity 180ms ease;
}

.timeline-media-item:hover .timeline-media-overlay,
.timeline-media-item:focus-visible .timeline-media-overlay {
    opacity: 1;
}

.timeline-media-overlay .icon {
    width: 16px;
    height: 16px;
}

.timeline-video-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: #111722;
}

.timeline-video-card video {
    width: 100%;
    height: 100%;
    min-height: 220px;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: contain;
}

.timeline-media-caption {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    color: #dbe5f7;
    font-size: 12px;
    font-weight: 700;
}

.timeline-media-caption span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-media-caption .icon {
    width: 14px;
    height: 14px;
    color: #8fb0ff;
}

.timeline-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--timeline-line);
}

.timeline-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--timeline-ink-faint);
    font-size: 12px;
}

.timeline-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.timeline-card-meta .icon {
    width: 14px;
    height: 14px;
}

.timeline-detail-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--timeline-primary);
    font-size: 13px;
    font-weight: 850;
}

.timeline-detail-link .icon {
    width: 15px;
    height: 15px;
    transition: transform 160ms ease;
}

.timeline-detail-link:hover .icon {
    transform: translateX(3px);
}

.timeline-loading {
    display: grid;
    gap: 22px;
}

.timeline-skeleton {
    display: grid;
    gap: 11px;
    padding: 24px 26px;
    border: 1px solid var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
    box-shadow: var(--timeline-shadow);
}

.timeline-skeleton span {
    height: 13px;
    display: block;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--timeline-surface-soft) 0%, var(--timeline-primary-soft) 50%, var(--timeline-surface-soft) 100%);
    background-size: 200% 100%;
    animation: timeline-shimmer 1.5s linear infinite;
}

.timeline-skeleton span:first-child {
    width: 24%;
    height: 18px;
}

.timeline-skeleton span:nth-child(2) {
    width: 78%;
}

.timeline-skeleton span:nth-child(3) {
    width: 56%;
}

.timeline-state {
    padding: 54px 24px;
    border: 1px solid var(--timeline-line);
    border-radius: 8px;
    background: var(--timeline-surface);
    box-shadow: var(--timeline-shadow);
    text-align: center;
}

.timeline-state-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
}

.timeline-state-icon .icon {
    width: 23px;
    height: 23px;
}

.timeline-state h2 {
    margin: 0;
    color: var(--timeline-ink);
    font-size: 22px;
}

.timeline-state p {
    max-width: 520px;
    margin: 12px auto 0;
    color: var(--timeline-ink-soft);
    font-size: 14px;
    line-height: 1.8;
}

.timeline-state .button {
    margin-top: 22px;
}

.timeline-state-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 42px;
}

.timeline-page-button {
    min-width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid var(--timeline-line);
    border-radius: 7px;
    background: var(--timeline-surface);
    color: var(--timeline-ink-soft);
    font-size: 13px;
    font-weight: 800;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.timeline-page-button:hover:not(:disabled) {
    border-color: var(--timeline-primary);
    color: var(--timeline-primary);
    transform: translateY(-1px);
}

.timeline-page-button.is-current {
    border-color: var(--timeline-primary);
    background: var(--timeline-primary);
    color: #ffffff;
}

.timeline-page-button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.timeline-page-button .icon {
    width: 15px;
    height: 15px;
}

.timeline-page-ellipsis {
    min-width: 22px;
    color: var(--timeline-ink-faint);
    text-align: center;
}

.timeline-noscript {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    padding: 11px 14px;
    border-radius: 7px;
    background: #242b3d;
    color: #ffffff;
    font-size: 13px;
}

.timeline-lightbox {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
}

.timeline-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 22, 0.86);
    backdrop-filter: blur(5px);
}

.timeline-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    display: grid;
    place-items: center;
}

.timeline-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 84px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.timeline-lightbox-close,
.timeline-lightbox-nav {
    position: fixed;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(20, 28, 45, 0.7);
    color: #ffffff;
}

.timeline-lightbox-close {
    top: 20px;
    right: 20px;
}

.timeline-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.timeline-lightbox-prev {
    left: 20px;
}

.timeline-lightbox-next {
    right: 20px;
}

.timeline-lightbox-caption {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 2;
    max-width: min(760px, calc(100% - 40px));
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    text-align: center;
}

@keyframes timeline-gradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes timeline-shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 820px) {
    body[data-page="timeline"] .timeline-nav {
        display: none;
    }

    .timeline-hero {
        padding: 58px 0 38px;
    }

    .timeline-hero h1 {
        font-size: 40px;
    }

    .timeline-stage {
        width: min(100% - 28px, 1040px);
        padding-bottom: 70px;
    }

    .timeline-month-heading {
        margin-left: 50px;
    }

    .timeline-entry {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 13px;
    }

    .timeline-month-items::before {
        left: 16px;
    }

    .timeline-rail {
        padding-top: 24px;
    }
}

@media (max-width: 620px) {
    body[data-page="timeline"] .timeline-header .header-inner {
        width: calc(100% - 24px);
        gap: 12px;
    }

    body[data-page="timeline"] .brand-name {
        display: none;
    }

    body[data-page="timeline"] .timeline-compose-link {
        display: none;
    }

    .timeline-hero {
        width: calc(100% - 28px);
        padding-top: 46px;
        text-align: left;
    }

    .timeline-hero h1 {
        font-size: 34px;
    }

    .timeline-hero h1 span {
        display: block;
        margin: 3px 0 0;
    }

    .timeline-hero-note {
        font-size: 14px;
    }

    .timeline-month-heading {
        gap: 10px;
        margin-left: 0;
    }

    .timeline-month-heading time {
        font-size: 17px;
    }

    .timeline-month-items::before {
        display: none;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .timeline-rail {
        display: none;
    }

    .timeline-card {
        padding: 21px 18px 18px;
    }

    .timeline-card-header {
        display: block;
    }

    .timeline-entry-date {
        display: block;
        margin-top: 9px;
    }

    .timeline-card h2 {
        font-size: 21px;
    }

    .timeline-media-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-state {
        padding: 42px 18px;
    }

    .timeline-lightbox-prev {
        left: 10px;
    }

    .timeline-lightbox-next {
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-page="timeline"] *,
    body[data-page="timeline"] *::before,
    body[data-page="timeline"] *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
