/* ==========================================
   APEL 100 - MINIMALIST ARCHIVAL STYLING
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@fontsource-variable/zalando-sans-expanded/index.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource-variable/zalando-sans/index.css');

:root {
    --bg-paper: #fbfbf9;
    --bg-card: #ffffff;
    --text-primary: #1c1c1a;
    --text-secondary: #4a4a46;
    --text-muted: #7c7c75;
    
    --border-color: #d8d8d0;
    --border-light: #e5e5de;
    --accent-color: #1c1c1a;
    
    --font-heading: 'Zalando Sans Expanded Variable', 'Zalando Sans Expanded', 'Outfit', sans-serif;
    --font-body: 'Zalando Sans Variable', 'Zalando Sans', sans-serif;
    
    --container-max: 1100px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   BASE & RESET
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: var(--transition);
}

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

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

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-stretch: 120%;
    font-variation-settings: "wdth" 120, "wght" 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-paper);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    font-stretch: 120%;
    font-variation-settings: "wdth" 120, "wght" 800;
    text-decoration: none;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.site-logo span {
    font-weight: 300;
    color: var(--text-muted);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.nav-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
    transform-origin: left center;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 4px;
}

/* ==========================================
   HERO / INTRO SECTION
   ========================================== */
.hero-section {
    padding: 5rem 0;
    background-color: var(--text-primary); /* Ink-black background */
    color: var(--bg-paper); /* Cream white text */
    border-bottom: none;
}

.hero-section h1 {
    color: var(--bg-paper);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.hero-meta {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--border-color); /* Light gray meta text */
    margin-bottom: 1rem;
}

.hero-lead {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--border-color); /* Light gray instead of dark secondary */
    max-width: 800px;
    margin-bottom: 2.5rem;
    text-align: left;
}

/* ==========================================
   CANDIDACY STORY SECTIONS
   ========================================== */
.story-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding: 4rem 0;
}

.story-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
}

.story-sidebar h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--text-primary);
    padding-left: 5px;
    border-left: 2px solid var(--accent-color);
}

.story-content {
    max-width: 750px;
}

.story-content section {
    margin-bottom: 4rem;
}

.story-content section:last-child {
    margin-bottom: 0;
}

/* ==========================================
   SIGNATURES GRID (100 PEOPLE)
   ========================================== */
.signatures-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.signatures-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.signatures-title h2 {
    border: none;
    margin: 0;
    padding: 0;
    font-size: 2.2rem;
}

.signatures-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.search-container {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.2rem;
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--bg-paper);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(28, 28, 26, 0.05);
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Alphabet filter bar styling */
.alphabet-filter-container {
    margin-bottom: 2.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.alphabet-filter {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    min-width: 28px;
    text-align: center;
}

.filter-btn[data-letter="all"] {
    min-width: 45px;
}

.filter-btn:hover {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.02);
}

.filter-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-paper);
}

.filter-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    border-style: dashed;
    pointer-events: none;
}

/* Person card modifications */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.person-card {
    background-color: var(--bg-paper);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: var(--transition);
    height: 180px; /* Fixed height for all boxes */
    justify-content: flex-start;
    box-shadow: none;
}

.person-card:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.person-firstname {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    font-stretch: 120%;
    font-variation-settings: "wdth" 120, "wght" 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.person-lastname {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    font-stretch: 120%;
    font-variation-settings: "wdth" 120, "wght" 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.person-profession {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.35;
    margin-top: auto; /* Push profession to the bottom of the card */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==========================================
   SINGLE ARTICLE / BIOGRAPHY PAGE
   ========================================== */
.bio-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    padding: 4rem 0;
}

.bio-main {
    max-width: 720px;
}

.bio-meta {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.bio-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.bio-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.bio-separator {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 3rem 0;
}

/* References / Footnotes */
.footnotes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footnotes h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.footnotes ol {
    padding-left: 1.2rem;
}

.footnotes li {
    margin-bottom: 0.8rem;
    text-align: justify;
}

.footnote-ref {
    font-size: 0.75rem;
    vertical-align: super;
    line-height: 0;
    text-decoration: none;
    font-weight: 700;
}

.footnote-backref {
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* Bio Sidebar Document Details */
.bio-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 110px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
}

.sidebar-meta-list {
    list-style: none;
}

.sidebar-meta-item {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.sidebar-meta-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.sidebar-meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background-color: var(--accent-color);
    color: var(--bg-paper);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    transition: var(--transition);
}

.sidebar-action-btn:hover {
    background-color: var(--text-secondary);
    color: var(--bg-paper);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 3rem;
    background-color: var(--bg-paper);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info {
    max-width: 400px;
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-desc {
    line-height: 1.5;
    margin-bottom: 0;
}

.footer-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-meta-item {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-support {
    background-color: var(--text-primary); /* Full-width black band */
    color: var(--bg-paper);
    padding: 1.25rem 0;
    width: 100%;
}

.support-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar for clean ticker look */
}

.support-inner::-webkit-scrollbar {
    display: none; /* Hide scrollbar in WebKit */
}

.support-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--border-color);
    margin-bottom: 0;
    flex-shrink: 0;
}

.support-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.support-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.support-links a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Add separator bullet between links */
.support-links a:not(:last-child)::after {
    content: "•";
    margin-left: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: inline-block;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 900px) {
    .story-layout, .bio-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .story-sidebar, .bio-sidebar {
        position: static;
        top: auto;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h1.bio-title {
        font-size: 2.3rem; /* Target specific class specificity */
    }
    
    .signatures-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .search-container {
        max-width: none;
    }
    
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-meta {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    body {
        font-size: 1rem;
    }
    
    .site-logo {
        font-size: 1.25rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .site-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-paper);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
        z-index: 99;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    }
    
    .site-nav.active {
        display: flex;
    }
    
    .nav-link {
        font-size: 1.05rem;
        padding: 0.25rem 0;
        width: 100%;
    }
    
    .nav-link:hover, .nav-link.active {
        border-bottom: none;
        border-left: 3px solid var(--accent-color);
        padding-bottom: 0;
        padding-left: 10px;
    }
    
    /* Hamburger animation to 'X' */
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        width: 0%;
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg);
    }
    
    /* Text layout clipping fixes */
    h1.bio-title {
        font-size: 2.0rem;
        line-height: 1.15;
    }
    
    .story-content section {
        margin-bottom: 2.5rem;
    }
    
    .bio-main {
        max-width: 100%;
    }
    
    /* Safe word wraps */
    .bio-body p, .bio-body h2, .bio-body h3, .bio-body li {
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}
