:root {
    --bg: #f3eee6;
    --bg-soft: #f7f2ea;
    --surface: rgba(255, 252, 247, 0.72);
    --surface-strong: #fcf8f1;
    --text: #22211f;
    --text-soft: #5f5a53;
    --line: rgba(62, 54, 45, 0.14);
    --line-strong: rgba(62, 54, 45, 0.22);
    --rust: #8c5b3f;
    --olive: #6e7458;
    --shadow: 0 20px 60px rgba(44, 35, 26, 0.09);
    --radius: 28px;
    --radius-sm: 18px;
    --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "URW Palladio L", Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --container: min(1120px, calc(100% - 2rem));
    --nav-height: 4.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(140, 91, 63, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 28rem),
        var(--bg);
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(72, 60, 48, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(72, 60, 48, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 56%);
    z-index: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-color: rgba(140, 91, 63, 0.45);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--rust);
}

p,
ul,
ol {
    margin: 0 0 1rem;
}

ul,
ol {
    padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(1.72rem, 3.6vw, 2.45rem);
}

.hero-name-gap {
    display: inline-block;
    width: 0.26em;
}

.hero-name-cjk {
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "DFKai-SB", serif;
    font-weight: 500;
    letter-spacing: 0;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3,
h4 {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-weight: 600;
}

hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.shell {
    width: var(--container);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(243, 238, 230, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.nav-shell {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    flex: none;
}

.brand-text {
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: auto;
    padding-bottom: 0.1rem;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.68rem;
    border-radius: 0.9rem;
    text-decoration: none;
    color: var(--text-soft);
    font-size: 0.99rem;
    white-space: nowrap;
    border: 1px solid transparent;
}

.site-nav-link:hover,
.site-nav-link.is-active {
    background: rgba(140, 91, 63, 0.1);
    color: var(--text);
    border-color: rgba(140, 91, 63, 0.12);
}

.hero {
    padding: clamp(1.2rem, 3vw, 2rem) 0 clamp(3rem, 7vw, 4.6rem);
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.hero-copy {
    max-width: 44rem;
}

.eyebrow,
.section-kicker {
    margin: 0 0 1rem;
    color: var(--olive);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-role,
.hero-affiliation {
    color: var(--text-soft);
    font-size: clamp(1rem, 1.8vw, 1.14rem);
}

.hero-role {
    margin-top: 0.8rem;
}

.hero-affiliation {
    margin-top: 0.2rem;
}

.hero-summary {
    margin-top: 1.5rem;
    max-width: 40rem;
    font-size: clamp(1.05rem, 2vw, 1.18rem);
    color: var(--text-soft);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.35rem;
}

.hero-overview-wrap {
    margin-top: 1.08rem;
    max-width: 42rem;
}

.hero-overview-title {
    margin: 0 0 0.95rem;
    color: var(--olive);
    font-size: 0.84rem;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-overview {
    font-size: 1rem;
}

.hero-overview > p:first-child {
    font-size: 1.03rem;
    line-height: 1.76;
    margin-bottom: 1.05rem;
}

.hero-overview p,
.hero-overview li,
.hero-overview address {
    color: var(--text-soft);
}

.hero-overview .interest-grid {
    list-style: none;
    padding-left: 0;
    margin: 0.1rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.58rem;
}

.hero-overview .interest-grid li {
    margin: 0;
    padding: 0.68rem 0.76rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.4);
    line-height: 1.42;
    font-size: 1.06rem;
}

.hero-overview .interest-grid li strong {
    display: block;
    margin-bottom: 0.16rem;
    color: var(--text);
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero-overview .interest-grid li span {
    display: block;
    font-size: 0.94rem;
    line-height: 1.36;
}

.hero-overview .education-list {
    list-style: none;
    padding-left: 0;
    margin: 0.1rem 0 0;
    display: grid;
    gap: 0.26rem;
}

.hero-overview .education-list li {
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.hero-overview h2,
.hero-overview h3,
.hero-overview h4 {
    margin: 1.28rem 0 0.58rem;
    color: var(--text);
    font-size: 0.86rem;
    letter-spacing: 0.18em;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.78rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.social-link:hover {
    transform: translateY(-1px);
    border-color: rgba(140, 91, 63, 0.35);
    background: rgba(255, 255, 255, 0.76);
}

.social-link svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.social-link-label {
    font-size: 0.95rem;
}

.hero-media {
    position: relative;
    min-height: 0;
}

.portrait-frame {
    position: relative;
    z-index: 1;
    margin: 0 0 0 auto;
    width: min(19.5rem, 100%);
    border-radius: 1.25rem;
    overflow: hidden;
    background: transparent;
    border: 0;
    box-shadow: 0 16px 36px rgba(44, 35, 26, 0.08);
}

.portrait-frame img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: linear-gradient(180deg, rgba(140, 91, 63, 0.08), rgba(255, 255, 255, 0));
}

.section {
    border-top: 1px solid var(--line);
    padding: clamp(3.6rem, 8vw, 5.8rem) 0;
}

.section-grid {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.section-intro {
    display: grid;
    gap: 0.9rem;
}

.section-description {
    max-width: 18rem;
    color: var(--text-soft);
}

.section-content {
    min-width: 0;
}

.prose {
    font-size: 1.02rem;
}

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

.prose h2,
.prose h3,
.prose h4 {
    margin: 0 0 1.2rem;
    color: var(--text-soft);
}

.prose h2:not(:first-child),
.prose h3:not(:first-child),
.prose h4:not(:first-child) {
    margin-top: 2.2rem;
}

.prose strong {
    font-weight: 650;
}

.prose ul li,
.prose ol li {
    margin-bottom: 0.7rem;
}

.service-section .service-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}

.service-section .service-list li {
    margin: 0;
    padding: 1rem 1.05rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.16rem 1rem;
    border: 1px solid var(--line);
    border-left: 2px solid rgba(110, 116, 88, 0.36);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.26)),
        var(--surface);
}

.service-section .service-role {
    color: var(--text);
    font-weight: 600;
}

.service-section .service-meta {
    color: var(--text-soft);
}

.service-section .service-years {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 0.02rem;
    color: var(--olive);
    font-size: 0.89rem;
    font-weight: 600;
    white-space: nowrap;
}

.entry-section>ul,
.entry-section>ol {
    padding-left: 0;
    list-style: none;
}

.entry-list {
    display: grid;
    gap: 1rem;
}

.entry-card {
    padding: 1.3rem 1.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.26)),
        var(--surface);
    box-shadow: 0 8px 24px rgba(44, 35, 26, 0.04);
}

.entry-summary p:last-child,
.entry-body p:last-child {
    margin-bottom: 0;
}

.entry-details {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.entry-details summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.entry-details summary::-webkit-details-marker {
    display: none;
}

.entry-toggle {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    position: relative;
    flex: none;
}

.entry-toggle::before,
.entry-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.68rem;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.entry-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: opacity 0.2s ease;
}

.entry-details[open] .entry-toggle::after {
    opacity: 0;
}

.entry-body {
    margin-top: 1rem;
    color: var(--text-soft);
}

.entry-body ul,
.entry-body ol {
    margin-top: 0.9rem;
}

.empty-state {
    margin: 0;
    padding: 1.2rem 1.3rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.35);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0 3rem;
}

.footer-shell {
    display: grid;
    gap: 0.35rem;
}

.footer-note,
.footer-meta {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.footer-meta {
    font-size: 0.88rem;
}

.no-script {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    padding: 1rem 1.2rem;
    border-radius: 1rem;
    background: rgba(34, 33, 31, 0.92);
    color: #fff;
    box-shadow: var(--shadow);
}

@media (min-width: 860px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 20.5rem);
    }

    .section-grid {
        grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr);
        gap: 3rem;
    }

    .section-intro {
        position: sticky;
        top: calc(var(--nav-height) + 1.4rem);
    }
}

@media (max-width: 859px) {
    .nav-shell {
        width: 100%;
        align-items: flex-start;
    }

    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        gap: 0.08rem;
    }

    .site-nav-link {
        padding: 0.56rem 0.52rem;
        font-size: 1rem;
    }

    .hero-media {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(100% - 1.25rem, 100%);
    }

    .hero {
        padding-top: 3rem;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .hero-media {
        min-height: 0;
    }

    .portrait-frame {
        width: min(17rem, 100%);
        margin-left: 0;
    }

    .service-section .service-list li {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }

    .service-section .service-years {
        grid-column: 1;
        grid-row: auto;
    }

    .entry-card {
        padding: 1.05rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .social-link {
        transition: none;
    }
}
