:root {
    color-scheme: light;
    --ink: #17231f;
    --muted: #68756f;
    --paper: #ffffff;
    --canvas: #f3f6f4;
    --soft: #e7efea;
    --line: #d7dfda;
    --accent: #176b50;
    --accent-dark: #0e4d39;
    --blue: #285d8f;
    --shadow: 0 14px 34px rgba(22, 45, 36, 0.08);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.65;
    letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shell {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(215, 223, 218, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 750;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    color: white;
    background: var(--accent);
    font-family: Georgia, serif;
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--accent-dark);
    background: var(--soft);
}

.hero-band {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 80px;
    align-items: end;
    padding-block: 76px 68px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

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

.hero-copy h1 {
    max-width: 760px;
    margin-bottom: 20px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.13;
}

.hero-text {
    max-width: 700px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 17px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 750;
}

.button.primary { border-color: var(--accent); color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.quiet:hover { border-color: var(--accent); color: var(--accent-dark); }

.journal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.journal-stats div { padding: 18px 10px; text-align: center; }
.journal-stats div + div { border-left: 1px solid var(--line); }
.journal-stats dt { font-family: Georgia, serif; font-size: 30px; font-weight: 700; }
.journal-stats dd { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.section { padding-block: 64px; }
.section-tint { border-block: 1px solid var(--line); background: #eaf0ed; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h2,
.related-section h2 {
    margin-bottom: 0;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: 30px;
    line-height: 1.2;
}

.text-link,
.back-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 750;
}

.text-link:hover, .back-link:hover { color: var(--accent-dark); text-decoration: underline; }

.record-list { border-top: 1px solid var(--line); }

.record-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 26px;
    padding-block: 26px;
    border-bottom: 1px solid var(--line);
}

.record-row > time {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.record-row > time span {
    display: block;
    color: var(--ink);
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
}

.record-main h2,
.record-main h3 { margin-bottom: 8px; line-height: 1.3; }
.record-main h2 { font-size: 22px; }
.record-main h3 { font-size: 20px; }
.record-main h2 a:hover,
.record-main h3 a:hover { color: var(--accent); }
.record-main p { max-width: 780px; margin-bottom: 13px; color: var(--muted); }

.meta-line,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.tag {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

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

.project-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.project-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12px;
}

.status { padding: 3px 8px; border-radius: 999px; font-weight: 750; }
.status-active { color: #0e6247; background: #dff3e9; }
.status-complete { color: #245d8a; background: #e2edf7; }
.status-paused { color: #6c6250; background: #eeeae2; }
.project-card h2, .project-card h3 { margin-bottom: 10px; line-height: 1.3; }
.project-card h2 { font-size: 22px; }
.project-card h3 { font-size: 19px; }
.project-card p { color: var(--muted); }
.project-card .text-link { display: inline-block; margin-top: 18px; }

.tech-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-list span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; }

.page-intro { padding-block: 68px 36px; }
.page-intro h1 { margin-bottom: 12px; font-family: Georgia, "Noto Serif SC", serif; font-size: 46px; line-height: 1.15; }
.page-intro > p:last-child { max-width: 670px; color: var(--muted); font-size: 16px; }

.records-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 54px;
    padding-top: 18px;
}

.filter-panel { position: sticky; top: 94px; align-self: start; }
.search-form label, .tag-filter > p { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.search-row { display: flex; }
.search-row input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px; background: white; color: var(--ink); }
.search-row button { height: 40px; padding-inline: 12px; border: 1px solid var(--accent); border-radius: 0 6px 6px 0; color: white; background: var(--accent); cursor: pointer; }
.search-row input:focus { outline: 2px solid rgba(23, 107, 80, 0.22); outline-offset: 1px; }

.tag-filter { display: grid; gap: 4px; margin-top: 28px; }
.tag-filter a { display: flex; justify-content: space-between; padding: 7px 9px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.tag-filter a:hover, .tag-filter a[aria-current="true"] { color: var(--accent-dark); background: var(--soft); }
.tag-filter a span { font-size: 11px; }
.record-list-large .record-row:first-child { padding-top: 0; }

.article-shell { max-width: 850px; padding-block: 58px 30px; }
.article-header { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: 18px 0 14px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(34px, 6vw, 54px); line-height: 1.18; }
.article-header > p { color: var(--muted); font-size: 17px; }
.prose { padding-block: 34px; font-size: 16px; }
.prose h2 { margin: 2.2em 0 0.6em; font-size: 26px; line-height: 1.3; }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 20px; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 3px solid var(--accent); color: var(--muted); background: var(--soft); }
.prose code { padding: 2px 5px; border-radius: 4px; background: #e7ece9; font-family: "Cascadia Code", Consolas, monospace; font-size: 0.9em; }
.prose pre { overflow-x: auto; margin: 1.5em 0; padding: 18px; border-radius: 7px; color: #e9f2ed; background: #17231f; }
.prose pre code { padding: 0; color: inherit; background: transparent; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--soft); }

.related-section { max-width: 920px; padding-top: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.related-grid a { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.related-grid a:hover { border-color: var(--accent); }
.related-grid time, .related-grid span { color: var(--muted); font-size: 12px; }

.project-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-intro { padding-bottom: 28px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 70px; padding-top: 20px; }
.about-copy { padding-top: 0; }
.about-note { align-self: start; padding: 24px; border-left: 3px solid var(--accent); background: var(--paper); }
.about-note p, .about-note span { color: var(--muted); font-size: 12px; }
.about-note strong { display: block; margin: 8px 0 18px; font-family: Georgia, "Noto Serif SC", serif; font-size: 22px; line-height: 1.4; }

.empty-state { padding: 40px 20px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); text-align: center; background: rgba(255,255,255,0.5); }
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-meta { display: flex; align-items: center; gap: 16px; }
.footer-meta a { color: inherit; text-decoration: none; }
.footer-meta a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 820px) {
    .hero-layout { grid-template-columns: 1fr; gap: 38px; padding-block: 58px 50px; }
    .project-grid, .project-grid-wide { grid-template-columns: 1fr 1fr; }
    .records-layout { grid-template-columns: 1fr; gap: 34px; }
    .filter-panel { position: static; }
    .tag-filter { display: flex; flex-wrap: wrap; align-items: center; }
    .tag-filter > p { width: 100%; }
    .tag-filter a { gap: 8px; }
    .about-grid { grid-template-columns: 1fr; gap: 20px; }
    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .shell { width: min(100% - 28px, 1120px); }
    .header-inner { min-height: 62px; align-items: flex-start; padding-block: 12px 10px; }
    .brand span:last-child { display: none; }
    .main-nav { overflow-x: auto; gap: 0; }
    .main-nav a { padding: 8px 9px; white-space: nowrap; font-size: 13px; }
    .hero-copy h1 { font-size: 40px; }
    .journal-stats dt { font-size: 26px; }
    .section { padding-block: 48px; }
    .section-heading h2 { font-size: 27px; }
    .record-row { grid-template-columns: 1fr; gap: 12px; }
    .record-row > time { display: flex; align-items: baseline; gap: 6px; }
    .record-row > time span { font-size: 18px; }
    .project-grid, .project-grid-wide { grid-template-columns: 1fr; }
    .page-intro { padding-block: 50px 24px; }
    .page-intro h1 { font-size: 38px; }
    .article-shell { padding-top: 42px; }
    .footer-inner { flex-direction: column; justify-content: center; gap: 5px; text-align: center; }
    .footer-meta { flex-direction: column; gap: 3px; }
}
