:root {
    --paper: #f5ede0;
    --paper-soft: rgba(255, 249, 240, 0.76);
    --paper-strong: rgba(255, 252, 246, 0.92);
    --ink: #241915;
    --muted: #73655d;
    --line: rgba(49, 34, 24, 0.12);
    --line-strong: rgba(49, 34, 24, 0.22);
    --accent: #b54134;
    --accent-soft: rgba(181, 65, 52, 0.1);
    --accent-teal: #1f665e;
    --shadow: 0 28px 72px rgba(85, 56, 31, 0.14);
    --radius-lg: 30px;
    --radius-md: 22px;
    --radius-sm: 16px;
    --max-width: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background:
        radial-gradient(circle at 12% 12%, rgba(181, 65, 52, 0.12), transparent 24%),
        radial-gradient(circle at 84% 18%, rgba(31, 102, 94, 0.12), transparent 20%),
        linear-gradient(180deg, #eee3d4 0%, #f7efe5 42%, #ebe0d1 100%);
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(181, 65, 52, 0.1), transparent 24%),
        radial-gradient(circle at 84% 18%, rgba(31, 102, 94, 0.11), transparent 20%),
        linear-gradient(180deg, #eee3d4 0%, #f7efe5 42%, #ebe0d1 100%);
    color: var(--ink);
    font-family: "Noto Serif SC", "Songti SC", serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.16)),
        repeating-linear-gradient(0deg, rgba(73, 52, 39, 0.025) 0, rgba(73, 52, 39, 0.025) 1px, transparent 1px, transparent 5px);
    opacity: 0.72;
}

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

button,
input {
    font: inherit;
}

code {
    padding: 0.12em 0.42em;
    border-radius: 8px;
    background: rgba(36, 25, 21, 0.08);
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 0.92em;
}

.ambient,
.site-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ambient-a {
    background:
        radial-gradient(circle at 24% 28%, rgba(181, 65, 52, 0.18), transparent 24%),
        radial-gradient(circle at 72% 70%, rgba(31, 102, 94, 0.16), transparent 24%);
    filter: blur(56px);
}

.ambient-b {
    background:
        linear-gradient(125deg, transparent 0 28%, rgba(255, 255, 255, 0.2) 32%, transparent 38%),
        linear-gradient(305deg, transparent 0 64%, rgba(255, 255, 255, 0.16) 70%, transparent 76%);
    opacity: 0.42;
}

.site-grid {
    background-image:
        linear-gradient(rgba(65, 45, 31, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(65, 45, 31, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.88), transparent 92%);
}

.topbar,
.section,
.footer {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 16px;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.brand-mark {
    font-family: "Cormorant Garamond", "Noto Serif SC", serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: 0.03em;
}

.brand-sub,
.eyebrow,
.panel-kicker,
.stat-label,
.nav a,
.project-meta span,
.project-tags span,
.note-meta span,
.signal-strip li,
.notes-chip,
.notes-metrics span,
.button,
.text-link,
.project-link,
.note-link,
.footer-links a {
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.brand-sub,
.eyebrow,
.panel-kicker,
.stat-label {
    letter-spacing: 0.18em;
}

.brand-sub,
.nav a {
    color: var(--muted);
    font-size: 0.82rem;
}

.nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a,
.text-link,
.project-link,
.note-link,
.footer-links a {
    transition: color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.text-link:hover,
.project-link:hover,
.note-link:hover,
.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.section {
    padding: 56px 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: start;
    padding-top: 36px;
}

.hero-copy,
.hero-panel,
.intro-card,
.project-copy,
.project-card,
.notes-copy,
.note-preview-card,
.footer {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--paper-soft);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-copy::before,
.hero-panel::before,
.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 40%),
        radial-gradient(circle at 88% 16%, rgba(181, 65, 52, 0.12), transparent 22%);
    pointer-events: none;
}

.hero-copy,
.hero-panel {
    padding: 32px;
}

.hero-copy {
    display: grid;
    gap: 18px;
}

.hero-copy h1 {
    max-width: 12ch;
    font-family: "Cormorant Garamond", "Noto Serif SC", serif;
    font-size: clamp(2.5rem, 4.2vw, 4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.eyebrow,
.panel-kicker,
.stat-label {
    color: var(--accent);
    font-size: 0.76rem;
}

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

.lede,
.intro-card p,
.project-copy p,
.project-card p,
.notes-copy p,
.note-preview-card p,
.panel-text,
.editorial-card p,
.journal-item p,
.footer p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.hero-actions,
.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(181, 65, 52, 0.16);
}

.button-primary {
    background: var(--accent);
    border-color: rgba(181, 65, 52, 0.58);
    color: #fff8f4;
}

.button-secondary {
    background: rgba(31, 102, 94, 0.08);
    border-color: rgba(31, 102, 94, 0.24);
    color: var(--ink);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--line-strong);
    color: var(--muted);
}

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

.hero-meta-card,
.editorial-card,
.journal-item {
    position: relative;
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--paper-strong);
}

.hero-meta-card::before,
.editorial-card::before,
.journal-item::before,
.intro-card::before,
.project-card::before,
.note-preview-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 64px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), rgba(181, 65, 52, 0));
}

.hero-meta-card strong {
    display: block;
    margin: 10px 0 8px;
    font-family: "Cormorant Garamond", "Noto Serif SC", serif;
    font-size: clamp(1.28rem, 2vw, 1.7rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.hero-panel {
    display: grid;
    gap: 16px;
}

.profile-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.avatar {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 16px 28px rgba(36, 25, 21, 0.16);
}

.profile-card h2,
.editorial-card h3,
.journal-item h3 {
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-card h2 {
    margin-top: 6px;
    font-size: 1.5rem;
}

.journal-list {
    display: grid;
    gap: 12px;
}

.signal-strip,
.notes-chip-list,
.notes-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.signal-strip {
    margin: 0;
    padding: 0;
    list-style: none;
}

.signal-strip li,
.notes-chip,
.notes-metrics span,
.project-meta span,
.project-tags span,
.note-meta span {
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.42);
    color: #4b3d36;
}

.signal-strip li,
.notes-chip,
.notes-metrics span {
    padding: 10px 14px;
    font-size: 0.9rem;
}

.section-heading {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.section-heading h2,
.footer h2 {
    max-width: 15ch;
    font-size: clamp(1.8rem, 2.6vw, 2.8rem);
    line-height: 1.14;
    overflow-wrap: anywhere;
}

.intro-layout,
.project-layout,
.notes-layout {
    display: grid;
    gap: 18px;
}

.intro-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.intro-card,
.project-copy,
.notes-copy,
.note-preview-card,
.project-card {
    background: var(--paper-strong);
}

.intro-card,
.project-copy,
.notes-copy,
.note-preview-card {
    padding: 24px;
}

.intro-card h3,
.project-card h3,
.note-preview-card h3 {
    margin: 12px 0;
    font-size: 1.42rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.notes-layout,
.project-layout {
    grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
    align-items: start;
}

.text-link,
.project-link,
.note-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
}

.text-link::after,
.project-link::after,
.note-link::after {
    content: "↗";
    font-size: 0.95em;
}

.notes-preview-list {
    display: grid;
    gap: 16px;
}

.note-preview-card {
    display: grid;
    gap: 14px;
    min-height: 0;
}

.note-preview-card header,
.project-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.note-meta,
.project-meta,
.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.project-card {
    display: grid;
    gap: 14px;
    min-height: 220px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
}

.project-meta span,
.project-tags span,
.note-meta span {
    padding: 8px 12px;
    font-size: 0.84rem;
}

.notes-metrics {
    margin: 20px 0;
}

.notes-chip-list {
    margin-bottom: 22px;
}

.note-preview-empty {
    min-height: 180px;
}

.footer {
    display: grid;
    gap: 18px;
    margin: 18px auto 40px;
    padding: 30px;
    background: rgba(255, 249, 240, 0.84);
}

.footer-links a {
    color: var(--muted);
}

.footer-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1120px) {
    .hero,
    .intro-layout,
    .notes-layout,
    .project-layout,
    .project-list,
    .hero-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .topbar,
    .section,
    .footer {
        width: min(calc(100% - 24px), var(--max-width));
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy,
    .hero-panel,
    .intro-card,
    .project-copy,
    .project-card,
    .notes-copy,
    .note-preview-card,
    .footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-copy h1 {
        max-width: none;
        font-size: clamp(2.1rem, 10vw, 3.1rem);
    }

    .section-heading h2,
    .footer h2 {
        font-size: 1.9rem;
    }

    .profile-card,
    .note-preview-card header,
    .project-card header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .footer-links {
        flex-direction: column;
        align-items: stretch;
    }
}
