@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&display=swap');

:root {
    /* Light Mode (Parchment) - NOW DEFAULT */
    --bg-main: #fcfaf2;
    --bg-surface: #f5f2e6;
    --bg-card: #ece8da;
    --border-color: #dfdac7;
    --text-main: #23201d;
    --text-muted: #6e695f;
    --text-heading: #12100e;
    --accent-gold: #9c7c4c;
    --accent-gold-hover: #7b6038;
    --accent-red: #8b2626;
    --accent-red-rgb: 139, 38, 38;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1000px;
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
    --progress-height: 4px;
}

[data-theme="dark"] {
    /* Dark Mode (Deep Charcoal) */
    --bg-main: #0d0e10;
    --bg-surface: #141619;
    --bg-card: #1b1e22;
    --border-color: #282d33;
    --text-main: #d0d2d6;
    --text-muted: #8c9099;
    --text-heading: #ffffff;
    --accent-gold: #c5a880;
    --accent-gold-hover: #dfc8a5;
    --accent-red: #b33c3c;
    --accent-red-rgb: 179, 60, 60;
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.85;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Base Layout */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

.article-content a {
    text-decoration: underline;
    text-decoration-color: rgba(156, 124, 76, 0.4);
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: var(--accent-red);
    text-decoration-color: var(--accent-red);
}

.article-card:hover, .profile-card:hover {
    text-decoration: none !important;
}

.article-card:hover *, .profile-card:hover * {
    text-decoration: none !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
}

/* Typographic Bespoke Logo (Refined, no borders) */
.site-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.15;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
}

.logo-top {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: 1px;
    transition: var(--transition);
}

.site-logo:hover .logo-top {
    color: var(--accent-red);
}

.logo-bottom {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 4px;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.2rem;
    width: 100%;
}

/* Header */
.site-header {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0 0 0;
    transition: var(--transition);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.header-top-left, .header-top-right {
    width: 200px;
    display: flex;
}

.header-top-left {
    justify-content: flex-start;
}

.header-top-right {
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-toggle {
    display: none;
}

.header-top-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 2.2rem;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding: 0.8rem 0;
}

.nav-link {
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-red);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-red);
    text-decoration: none;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Hero Section */
.hero-section {
    padding: 6rem 0 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-tag {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.2rem;
    display: inline-block;
}

.hero-title {
    font-size: 3.6rem;
    margin-bottom: 1.2rem;
    letter-spacing: -1.5px;
    font-weight: 800;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.3rem;
    max-width: 650px;
    margin: 0 auto 3rem auto;
    font-style: italic;
    line-height: 1.7;
}

/* Discrete Header Search */
.header-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    transition: var(--transition);
    margin-left: 0.5rem;
}

.header-search-form:focus-within {
    border-color: var(--accent-gold);
    background-color: var(--bg-main);
    box-shadow: 0 0 0 2px rgba(156, 124, 76, 0.1);
}

.header-search-input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-main);
    width: 90px;
    transition: var(--transition);
}

.header-search-input:focus {
    width: 140px;
}

.header-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn:hover {
    color: var(--accent-red);
}

/* Section Title */
.section-header {
    text-align: center;
    margin: 5rem 0 3rem 0;
    position: relative;
}

.section-header h2 {
    font-size: 2.2rem;
    display: inline-block;
    padding-bottom: 0.8rem;
    margin-bottom: 0.5rem;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--accent-red);
    margin: 0.6rem auto 0 auto;
}

/* Timeline Navigation Bar */
.timeline-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.35rem;
    margin: 0 auto 3.5rem auto;
    padding: 0.4rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 90px;
    z-index: 100;
    width: fit-content;
    max-width: calc(100% - 2rem);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.timeline-nav::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.timeline-year-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.4rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 75px;
    text-align: center;
    position: relative;
}

.timeline-year-btn::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--accent-gold);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.timeline-year-btn:hover {
    color: var(--text-main);
}

.timeline-year-btn:hover::after {
    width: 40%;
}

.timeline-year-btn.active {
    background-color: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(186, 45, 50, 0.35);
}

.timeline-year-btn.active::after {
    display: none;
}

/* Beautiful Vertical Timeline */
.vertical-timeline {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 0 4rem 2rem;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background-color: var(--border-color);
}

.timeline-year-group {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
}

.timeline-year-header {
    position: relative;
    left: -2.35rem; /* Aligns its left edge exactly with the vertical timeline line */
    margin: 2.5rem 0 2rem 0;
    align-self: flex-start;
    background-color: var(--accent-red);
    color: #ffffff;
    padding: 0.35rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    letter-spacing: 1px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.vertical-timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 1.5rem;
}

.vertical-timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.65rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 2px solid var(--accent-gold);
    z-index: 2;
    transition: var(--transition);
}

.vertical-timeline-item:hover::before {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.3);
}

.timeline-date {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.45rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    line-height: 1.4;
}

.timeline-excerpt {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Articles Grid - Typographically Beautiful editorial layout */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
}

.article-card {
    background: none;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background-color: var(--bg-surface);
    overflow: hidden;
    margin-bottom: 1.2rem;
    border-radius: 2px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.05);
    transition: var(--transition);
}

.article-card:hover .card-img {
    transform: scale(1.03);
    filter: sepia(0) contrast(1.05);
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
    background-color: var(--bg-surface);
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-badge {
    align-self: flex-start;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.35;
}

.article-card:hover .card-title {
    color: var(--accent-red);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 1.2rem;
    line-height: 1.65;
    flex-grow: 1;
}

.card-meta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Article Template Styling - High-end Editorial */
.article-header {
    padding: 5rem 0 3rem 0;
    text-align: center;
}

.article-category {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.2rem;
}

.article-title {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -1px;
}

.article-meta-info {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-cover-img-wrapper {
    max-width: 850px;
    margin: 0 auto 3rem auto;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.article-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cover styling for personality profiles on single pages (Square 960px format) */
.article-cover-img-wrapper.personality-cover {
    aspect-ratio: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem auto;
    background: none !important;
    overflow: visible !important; /* Prevents shadow and border crop */
    max-height: none !important;
    width: 100%;
    max-width: 960px;
}

.article-cover-img-wrapper.personality-cover .profile-avatar {
    width: 100%;
    max-width: 960px;
    height: auto !important;
    aspect-ratio: 1 / 1;
    border-radius: 35px;
    overflow: hidden; /* Clips the image inside the square */
    border: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    background-color: var(--bg-card);
}

.article-cover-img-wrapper.personality-cover .profile-avatar.fallback-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border: 2px dashed var(--border-color);
}

.article-cover-img-wrapper.personality-cover:hover .profile-avatar {
    border-color: var(--accent-red);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.article-cover-img-wrapper.personality-cover .profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); /* Elegant slow zoom */
}

.article-cover-img-wrapper.personality-cover:hover .profile-avatar-img {
    transform: scale(1.04); /* Zoom effect inside the static border square */
}

/* Article Layout: Sidebar & Content */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 850px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 220px 1fr;
        max-width: 1000px;
    }
}

.article-sidebar {
    position: sticky;
    top: 8rem;
    height: fit-content;
    font-family: var(--font-sans);
}

.toc-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-heading);
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
}

.toc-list {
    list-style: none;
    font-size: 0.85rem;
}

.toc-item {
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.toc-sublist {
    display: none; /* Collapsed by default */
    list-style: none;
    padding-left: 0.8rem;
    margin: 0.4rem 0 0.6rem 0;
    border-left: 1.5px solid var(--border-color);
}

.toc-item-h2.expanded .toc-sublist {
    display: block; /* Expanded when parent is active */
}

.toc-item-h3 {
    font-size: 0.78rem;
    margin-bottom: 0.45rem;
}

.toc-link {
    color: var(--text-muted);
    transition: var(--transition);
}

.toc-link:hover, .toc-link.active {
    color: var(--accent-red);
    font-weight: 600;
    text-decoration: none;
}

/* Article Content markup */
.article-content {
    font-size: 1.18rem;
    line-height: 1.95;
}

.article-content p {
    margin-bottom: 2rem;
    text-align: justify;
}

.article-content h2 {
    font-size: 2.1rem;
    margin: 3.5rem 0 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.article-content h3 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.2rem 0;
}

.article-content ul, .article-content ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
}

.article-content blockquote {
    border-left: 3px solid var(--accent-red);
    padding: 1rem 2rem;
    background-color: var(--bg-surface);
    font-style: italic;
    margin: 2.5rem 0;
    font-size: 1.2rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 3rem 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.article-content th, .article-content td {
    padding: 1rem 1.4rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content th {
    background-color: var(--bg-surface);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Cross-linking style - elegant, non-obtrusive */
.cross-link {
    border-bottom: 1px solid rgba(139, 38, 38, 0.4);
    color: var(--text-main);
    font-weight: 500;
}

.cross-link:hover {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
    text-decoration: none;
    background-color: rgba(139, 38, 38, 0.05);
}

/* Summary Bullets Box */
.summary-bullets-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-red);
    padding: 1.8rem 2.2rem;
    margin-bottom: 3.5rem;
}

.summary-bullets-box h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-red);
    margin-bottom: 1.2rem;
    font-family: var(--font-sans);
}

.summary-bullets-box ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.summary-bullets-box li {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Footnotes & References */
.footnotes-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 5rem 0 3rem 0;
}

.footnotes-section, .references-section {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footnotes-section h3, .references-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-heading);
    margin-bottom: 1.2rem;
}

.footnote-ref {
    font-size: 0.7rem;
    vertical-align: super;
    line-height: 0;
    margin-left: 2px;
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--accent-red);
}

.footnotes-list {
    padding-left: 1.5rem;
    margin-bottom: 3rem;
}

.footnotes-list li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.footnote-backlink {
    margin-left: 6px;
    color: var(--accent-red);
    font-weight: 700;
    text-decoration: none !important;
}

.references-list {
    list-style-type: none;
}

.references-list li {
    margin-bottom: 0.6rem;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.6;
}

.references-list li::before {
    content: '▪';
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    top: 0.1rem;
}

/* Reading Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--progress-height);
    background-color: transparent;
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--accent-red);
    transition: width 0.1s ease-out;
}

/* Personalities Directory / Profile Grid */
.personalities-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.profile-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    border-radius: 4px;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--bg-card);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.profile-card:hover .profile-avatar {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-svg {
    width: 32px;
    height: 32px;
    opacity: 0.65;
    transition: var(--transition);
}

.profile-card:hover .profile-avatar-svg {
    opacity: 0.9;
}

.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevents overflow in flex child */
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-heading);
    line-height: 1.3;
    word-wrap: break-word;
}

.profile-role {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Alphabet Filter panel */
.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 1rem 0 3.5rem 0;
    font-family: var(--font-sans);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.alphabet-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 3px;
    transition: var(--transition);
    min-width: 32px;
    text-align: center;
}

.alphabet-btn:hover, .alphabet-btn.active {
    background-color: var(--accent-red);
    color: #ffffff;
    border-color: var(--accent-red);
}

/* Read Next section */
.read-next-section {
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    margin-top: 5rem;
}

.read-next-title {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.read-next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 3rem 0;
    margin-top: 6rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 3fr 1fr;
    }
}

.footer-brand h3 {
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-brand p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 0.85rem;
    color: var(--text-heading);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-links ul {
    list-style-type: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

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

.footer-links a:hover {
    color: var(--accent-red);
    text-decoration: none;
}

.footer-sponsors {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sponsors-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sponsors-links {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.sponsors-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.sponsors-links a:hover {
    color: var(--accent-red);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* Images in content formatting */
.content-img-wrapper {
    margin: 3rem 0;
    text-align: center;
}

.content-img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.img-caption {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive fixes */
@media (max-width: 768px) {
    .header-top-left {
        display: none !important;
    }
    
    .header-top-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
    }
    
    .header-top-center {
        justify-content: flex-start;
        flex-grow: 1;
    }
    
    .header-top-right {
        width: auto;
        display: flex;
        align-items: center;
        gap: 1.2rem;
        justify-content: flex-end;
    }
    
    .site-logo .logo-top {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
    }
    
    .site-logo .logo-bottom {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        flex-direction: column;
        gap: 5px;
        z-index: 1100;
    }
    
    .hamburger-bar {
        display: block;
        width: 22px;
        height: 2px;
        background-color: var(--text-main);
        transition: var(--transition);
        border-radius: 2px;
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-main);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .site-nav.open {
        display: flex;
        animation: slideDown 0.25s ease-out forwards;
    }
    
    .site-nav .nav-link {
        padding: 1.1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
    
    .site-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .site-nav .nav-link::after {
        display: none !important;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .article-title {
        font-size: 2.1rem;
    }
    
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .article-sidebar {
        display: none; /* Hide sidebar table of contents on mobile for a clean book reading experience */
    }
    
    .vertical-timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-year-header {
        left: -1.82rem;
        font-size: 0.85rem;
    }
    
    .vertical-timeline-item {
        padding-left: 0.8rem;
    }
    
    .vertical-timeline-item::before {
        left: -1.82rem;
    }
    
    .timeline-nav {
        position: sticky;
        top: 65px;
        margin-bottom: 2.5rem;
        border-radius: 30px;
        max-width: 95%;
        padding: 0.3rem;
        gap: 0.2rem;
    }
    
    .timeline-year-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        min-width: 60px;
    }
    
    .personalities-directory {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.25rem;
    }
    
    .home-personalities-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1.5rem;
    }
    
    .home-personality-avatar {
        width: 90px;
        height: 90px;
    }
}

/* Homepage Key Personalities Grid */
.home-personalities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
    justify-items: center;
    margin-top: 2rem;
}

.home-personality-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    max-width: 160px;
    width: 100%;
}

.home-personality-card:hover {
    text-decoration: none !important;
}

.home-personality-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: var(--transition);
    color: var(--text-muted);
}

.home-personality-card:hover .home-personality-avatar {
    border-color: var(--accent-gold);
    transform: scale(1.05);
    color: var(--accent-gold);
}

.home-personality-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-personality-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.home-personality-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.home-personality-role {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}
