:root {
    --bg: #fbfaf7;
    --text: #1c1b19;
    --text-muted: #6b675f;
    --rule: #e2ded6;
    --accent: #1f5e2f;
    --maxw: 760px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 18px;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding: 22px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text);
    letter-spacing: 0.01em;
}

.nav {
    display: flex;
    gap: 22px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
}

.nav a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Sections */
.section {
    padding: 48px 28px 24px;
    scroll-margin-top: 24px;
}

/* Intro */
.intro {
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 36px;
}

.intro-text {
    flex: 1;
}

.intro-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.intro h1 {
    font-size: 2.4rem;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.intro-role {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.15rem;
}

.intro-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 1rem;
}

.intro-bio {
    margin: 0;
    font-size: 1.1rem;
}

/* Section / page headings */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid var(--text);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.section-head h2 {
    font-size: 1.4rem;
    margin: 0;
}

.section-link {
    font-size: 0.95rem;
}

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

.experience-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}

.experience-item:last-child {
    border-bottom: 0;
}

.experience-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.experience-role {
    margin: 0;
    font-size: 1.1rem;
}

.experience-company {
    color: var(--text-muted);
    font-weight: 400;
}

.experience-period {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.experience-points {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--text-muted);
}

.experience-points li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.page-head {
    margin-bottom: 28px;
}

.page-head h1 {
    font-size: 2.2rem;
    margin: 0;
}

.page-sub {
    color: var(--text-muted);
    font-style: italic;
    margin: 4px 0 0;
}

/* Project list */
.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-row {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}

.project-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.project-row-title {
    font-size: 1.3rem;
    margin: 0;
}

.project-row-title a {
    text-decoration: none;
    color: var(--text);
}

.project-row-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.project-row-year {
    color: var(--text-muted);
    font-size: 0.95rem;
    white-space: nowrap;
}

.project-row-summary {
    margin: 6px 0 12px;
    color: var(--text);
}

/* Expandable project cards */
.project-summary-toggle {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

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

.project-summary-toggle::after {
    content: "+";
    position: absolute;
    top: 0;
    right: 0;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1.3;
    transition: transform 0.15s ease;
}

.project-details[open] > .project-summary-toggle::after {
    content: "\2013"; /* en dash */
}

.project-summary-toggle:hover .project-row-title {
    color: var(--accent);
}

.project-expanded {
    padding: 4px 0 8px;
    font-size: 1.05rem;
}

.project-expanded h4 {
    font-size: 1.1rem;
    margin: 22px 0 8px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 6px;
}

/* Tags */
.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
    font-family: Georgia, serif;
}

.tags li {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
}

.tags li::before {
    content: "#";
    opacity: 0.6;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 16px;
}

.filter {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.filter:hover {
    color: var(--accent);
}

.filter.active {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.no-results {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 20px;
}

/* Detail */
.detail {
    max-width: var(--maxw);
}

.back-link {
    font-size: 0.95rem;
    display: inline-block;
    margin-bottom: 28px;
}

.detail-head {
    border-bottom: 2px solid var(--text);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.detail-head h1 {
    font-size: 2.2rem;
    margin: 0 0 6px;
}

.detail-summary {
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.15rem;
    margin: 0 0 14px;
}

.detail-year {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.detail-media {
    margin: 28px 0;
    border: 1px solid var(--rule);
}

.detail-media img {
    width: 100%;
    display: block;
}

.detail-body {
    font-size: 1.1rem;
}

.detail-body h2 {
    font-size: 1.35rem;
    margin: 32px 0 10px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 6px;
}

.highlights {
    padding-left: 22px;
}

.highlights li {
    margin-bottom: 8px;
}

.detail-actions {
    margin-top: 28px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-top: 0;
}

.about-aside {
    border-left: 2px solid var(--rule);
    padding-left: 24px;
}

.about-aside dl {
    margin: 0 0 20px;
}

.about-aside dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-family: Georgia, serif;
    margin-top: 14px;
}

.about-aside dt:first-child {
    margin-top: 0;
}

.about-aside dd {
    margin: 0;
    font-size: 1.05rem;
}

.about-socials {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Error */
.error-page {
    text-align: center;
    padding: 80px 28px;
}

.error-page h1 {
    font-size: 3.5rem;
    margin: 0 0 8px;
}

.error-page p {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 24px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--rule);
    margin-top: 56px;
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        font-size: 17px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-aside {
        border-left: none;
        border-top: 2px solid var(--rule);
        padding-left: 0;
        padding-top: 24px;
    }

    .intro h1 {
        font-size: 2rem;
    }

    .intro {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
    }

    .intro-photo {
        width: 140px;
        height: 140px;
    }
}
/* ---- Mirage entry-route findings article ---- */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.article-body {
    margin-top: 8px;
}

.article-body h2 {
    margin: 36px 0 12px;
    font-size: 1.3rem;
}

.article-body p {
    margin: 0 0 16px;
    line-height: 1.7;
}

.article-body code {
    background: #f0ede5;
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.9em;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin: 0 0 20px;
}

.stat-table th,
.stat-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--rule);
}

.stat-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
}

.stat-table td:not(:first-child),
.stat-table th:not(:first-child) {
    text-align: right;
}

.article-note {
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
