:root {
    --bg: #f7f3ea;
    --paper: #fffdf7;
    --ink: #24211d;
    --muted: #716b62;
    --line: #ded4c6;
    --green: #27685d;
    --amber: #b86d18;
    --red: #a4453f;
    --blue: #2d6077;
    --shadow: 0 18px 45px rgba(43, 34, 25, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(39, 104, 93, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(184, 109, 24, 0.05) 1px, transparent 1px),
        var(--bg);
    background-size: 28px 28px;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 0;
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    min-height: calc(100vh - 48px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 247, 0.9);
    box-shadow: var(--shadow);
}

.profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: #f0b66d;
    color: #221a12;
    font-weight: 700;
}

.eyebrow,
.label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 25px;
    line-height: 1.2;
}

h2 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.25;
}

h3 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.35;
}

.nav-list {
    display: grid;
    gap: 8px;
    margin: 32px 0;
}

.nav-list a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
}

.nav-list a:hover {
    border-color: var(--line);
    background: #f6eadc;
    color: var(--ink);
}

.status-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f5efe2;
}

.status-panel strong,
.status-panel span {
    display: block;
}

.status-panel strong {
    margin-bottom: 8px;
    line-height: 1.45;
}

.status-panel span {
    color: var(--muted);
    font-size: 14px;
}

.content {
    display: grid;
    gap: 22px;
}

.topbar,
.section-head,
.links-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    min-height: 86px;
    padding: 20px 0;
}

.search-box {
    width: min(360px, 100%);
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    outline: none;
}

.search-box input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(39, 104, 93, 0.14);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 14px;
}

.summary-block,
.metric,
.panel,
.links-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 247, 0.92);
    box-shadow: var(--shadow);
}

.summary-block {
    min-height: 180px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(39, 104, 93, 0.12), transparent 42%),
        var(--paper);
}

.summary-block p:last-child {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.8;
}

.metric {
    display: grid;
    min-height: 180px;
    place-content: center;
    text-align: center;
}

.metric span {
    color: var(--green);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
}

.metric p {
    margin: 10px 0 0;
    color: var(--muted);
}

.metric.accent span {
    color: var(--amber);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter {
    min-width: 68px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
}

.filter.active,
.filter:hover {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.work-card {
    display: grid;
    gap: 14px;
    min-height: 230px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

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

.work-card h3 {
    margin-bottom: 0;
    font-size: 18px;
}

.tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e9f0e6;
    color: var(--green);
    font-size: 12px;
    white-space: nowrap;
}

.work-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: end;
}

.meta-row span {
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 14px;
}

.panel {
    padding: 20px;
}

.section-head.compact {
    margin-bottom: 14px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.note-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.note-item time {
    color: var(--red);
    font-size: 13px;
}

.note-item strong {
    display: block;
    margin-bottom: 6px;
}

.note-item p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-list span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbf6ed;
    color: var(--blue);
}

.links-panel {
    padding: 20px;
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f1eadf;
}

.link-row a:hover {
    border-color: var(--amber);
    color: var(--amber);
}

.site-footer {
    padding: 6px 0 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.site-footer a:hover {
    color: var(--green);
}

.empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 247, 0.72);
    color: var(--muted);
    text-align: center;
}

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

@media (max-width: 920px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: 0;
    }

    .nav-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 22px 0;
    }

    .hero-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .shell {
        width: min(100% - 20px, 1180px);
        padding: 10px 0;
    }

    .topbar,
    .section-head,
    .links-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .note-item {
        grid-template-columns: 1fr;
    }
}
