:root {
    --primary-color: #1e1a14;
    --accent-color: #b8922a;
    --bg-color: #faf7f0;
    --card-bg: #fffdf8;
    --text-color: #3a3228;
    --text-strong: #1e1a14;
    --text-muted: #8c7d6a;
    --border-color: #e6ddc8;
    --container-width: 860px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header & Nav ─────────────────────────────── */

header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0 1.75rem;
    margin-bottom: 4rem;
}

header h1 {
    margin: 0 0 0.25rem;
    text-align: center;
    color: var(--primary-color);
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: -0.01em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 2rem;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    padding: 0.4rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    display: inline-block;
}

nav ul li a:hover {
    color: var(--text-strong);
}

nav ul li a.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

/* ── Main & Footer ────────────────────────────── */

main {
    min-height: 60vh;
    padding-bottom: 6rem;
}

footer {
    padding: 2.5rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    text-align: center;
}

/* ── Typography ───────────────────────────────── */

h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 2rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 0.375rem;
    line-height: 1.4;
}

p {
    margin: 0 0 1.25rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── About / Profile ──────────────────────────── */

.profile-container {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.profile-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center 12%;
    border-radius: 50%;
    background-color: var(--border-color);
    display: block;
}

.profile-header {
    flex: 1;
    padding-top: 0.25rem;
}

.profile-header h2 {
    font-size: 2rem;
    margin-bottom: 0.375rem;
    padding-bottom: 0;
    border-bottom: none;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.institution {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0;
}

/* Shared subheading style: bio, interests, contact */
.bio h3,
.interests h3,
.contact h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 2.25rem 0 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-color);
}

.bio h3:first-child {
    margin-top: 0;
}

.bio p {
    color: var(--text-color);
}

/* Research interests */
.interests ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.interests ul li {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Contact block on about page */
.contact {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

/* ── Shared list pattern ──────────────────────── */
/* Both pub-list and item-list use horizontal border separators */

.pub-list,
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0;
}

.pub-list li,
.item-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pub-list li:first-child,
.item-list li:first-child {
    border-top: none;
}

/* ── Publication List ─────────────────────────── */

.publications h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2.5rem 0 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pub-list {
    margin-bottom: 0.5rem;
}

.pub-list li strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
    line-height: 1.45;
}

.pub-list .authors {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pub-list .venue {
    font-size: 0.875rem;
    color: var(--text-color);
}

.pub-list .pub-type {
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.1rem 0.5rem;
}

/* ── Item Lists (achievements, engagement) ───────── */

.item-list li h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.item-list .meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.item-list .description {
    font-size: 0.9375rem;
    color: var(--text-color);
    margin: 0;
}

.item-list .read-more {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-color);
}

/* ── Engagement Contact ────────────────────────── */

.engagement-contact {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9375rem;
}

.engagement-contact p {
    margin: 0 0 0.25rem;
}

.engagement-contact p:last-child {
    margin: 0;
}

.intro {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ── Books ────────────────────────────────────── */

.book-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 4rem;
}

.book-item {
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
}

.book-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Hero: cover + intro side by side */
.book-hero {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.book-cover {
    flex-shrink: 0;
}

.book-cover img {
    width: 200px;
    display: block;
    border-radius: 3px;
    box-shadow:
        4px 4px 0 rgba(0,0,0,0.06),
        8px 8px 20px rgba(0,0,0,0.14),
        0 2px 6px rgba(0,0,0,0.1);
    background-color: var(--border-color);
}

.book-hero-text {
    flex: 1;
    min-width: 0;
    padding-top: 0.25rem;
}

.book-hero-text h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem;
    color: var(--text-strong);
}

.book-byline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 0.25rem;
}

.book-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

.book-description {
    font-size: 0.9375rem;
    line-height: 1.75;
    margin: 0 0 1.5rem;
}

/* Contents */
.book-contents {
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
}

.book-contents h4,
.book-endorsements h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
}

.contents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.contents-section .section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.contents-section ol {
    margin: 0;
    padding-left: 1.125rem;
}

.contents-section ol li {
    font-size: 0.875rem;
    color: var(--text-color);
    padding: 0.2rem 0;
    line-height: 1.4;
}

/* Endorsements */
.book-endorsements {
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
}

.endorsements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.book-endorsements blockquote {
    margin: 0;
    padding: 1.125rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--accent-color);
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-muted);
    border-radius: 0 0 3px 3px;
}

.amazon-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.125rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 0.75rem;
    transition: background-color 0.15s;
}

.amazon-button:hover {
    background-color: var(--accent-color);
    text-decoration: none;
}

/* ── Responsive: 768px ────────────────────────── */

@media (max-width: 768px) {
    header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 2.5rem;
    }

    header h1 {
        font-size: 1.625rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .profile-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .profile-image img {
        width: 110px;
        height: 110px;
    }

    .book-hero {
        flex-direction: column;
        gap: 1.5rem;
    }

    .book-cover img {
        width: 160px;
    }
}

/* ── Responsive: 480px ────────────────────────── */

@media (max-width: 480px) {
    header h1 {
        font-size: 1.375rem;
    }

    h2 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    nav ul {
        gap: 0 1rem;
    }

    nav ul li a {
        font-size: 0.8125rem;
    }

    .profile-header h2 {
        font-size: 1.5rem;
    }

    .book-hero-text h3 {
        font-size: 1.25rem;
    }

    .engagement-contact {
        padding: 1rem;
    }

    main {
        padding-bottom: 4rem;
    }
}
