/* ========================================
   Briefly - Nord Minimal Theme
   Text-focused, keyboard-first design
   ======================================== */

/* ========================================
   CSS Variables - Nord Palette
   ======================================== */
:root {
    /* Polar Night */
    --nord0:  #2E3440;  /* Base background */
    --nord1:  #3B4252;  /* Lighter background */
    --nord2:  #434C5E;  /* Selection background */
    --nord3:  #4C566A;  /* Comments, subtle text */

    /* Snow Storm */
    --nord4:  #D8DEE9;  /* Dark text on light bg */
    --nord5:  #E5E9F0;  /* Body text */
    --nord6:  #ECEFF4;  /* Headings, emphasis */

    /* Frost */
    --nord7:  #8FBCBB;  /* Teal accent */
    --nord8:  #88C0D0;  /* Primary links, focus */
    --nord9:  #81A1C1;  /* Secondary links */
    --nord10: #5E81AC;  /* Tertiary accent */

    /* Aurora */
    --nord11: #BF616A;  /* Red/Error */
    --nord12: #D08770;  /* Orange/Warning */
    --nord13: #EBCB8B;  /* Yellow/Highlight */
    --nord14: #A3BE8C;  /* Green/Success */
    --nord15: #B48EAD;  /* Purple/Special */
}

/* ========================================
   Base & Reset
   ======================================== */
html {
    font-size: 16px;  /* Desktop baseline */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile: smaller base */
@media (max-width: 600px) {
    html { font-size: 14px; }
}

/* Tablet: medium base */
@media (min-width: 601px) and (max-width: 1024px) {
    html { font-size: 15px; }
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--nord5);
    background-color: var(--nord0);
}

* {
    box-sizing: border-box;
}

/* ========================================
   Layout - Container
   ======================================== */
.container {
    max-width: 56rem;     /* 896px */
    margin: 0 auto;
    padding: 1rem;        /* 16px */
}

@media (min-width: 768px) {
    .container {
        padding: 1.5rem;  /* 24px */
    }
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--nord6);
    line-height: 1.3;
}

h1 { font-size: 1.5rem; }    /* 24px */
h2 { font-size: 1.25rem; }   /* 20px */
h3 { font-size: 1rem; }      /* 16px */

a {
    color: var(--nord8);
    text-decoration: none;
    transition: color 0.2s;
}

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

p {
    margin: 0 0 1rem 0;
}

/* ========================================
   Header
   ======================================== */
header {
    border-bottom: 1px solid var(--nord1);
    margin-bottom: 1.5rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.site-title {
    font-size: 1.25rem;     /* 20px */
    font-weight: 700;
    color: var(--nord8);
}

header nav {
    display: flex;
    gap: 1rem;              /* 16px */
    font-size: 0.875rem;    /* 14px */
}

header nav a {
    color: var(--nord4);
}

header nav a:hover {
    color: var(--nord6);
}

/* ========================================
   Footer
   ======================================== */
footer {
    margin-top: 3rem;                /* 48px */
    padding: 1rem 0;                 /* 16px 0 */
    border-top: 1px solid var(--nord1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    font-size: 1rem;                 /* 16px - normal size */
    color: var(--nord4);
}

.keyboard-hints {
    display: flex;
    gap: 1rem;                       /* 16px */
    font-size: 0.75rem;              /* 12px */
    color: var(--nord3);             /* Greyed out */
}

.keyboard-hints .hint {
    display: flex;
    align-items: center;
    gap: 0.25rem;                    /* 4px */
}

.keyboard-hints kbd {
    font-size: 0.625rem;             /* 10px - smaller in footer */
    padding: 0.125rem 0.375rem;      /* 2px 6px */
    background-color: var(--nord1);
    border-color: var(--nord2);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .keyboard-hints {
        justify-content: center;
    }
}

/* ========================================
   Theme Filter
   ======================================== */
.theme-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;                /* 12px */
    padding: 0.75rem 0;          /* 12px 0 */
    margin-bottom: 1.5rem;       /* 24px */
}

.theme-filter a {
    color: var(--nord4);
    font-size: 0.8125rem;        /* 13px */
    text-decoration: none;
}

.theme-filter a:hover {
    color: var(--nord6);
}

.theme-filter a.active {
    color: var(--nord8);
    font-weight: 600;
}

/* Keyboard focus state for theme navigation */
.theme-filter a.keyboard-focused {
    background-color: rgba(136, 192, 208, 0.15); /* Nord8 teal at 15% */
    border-left: 3px solid var(--nord8);
    padding-left: calc(0.5rem - 3px);
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    margin-left: -0.5rem;  /* Compensate for added padding */
}

/* Hide keyboard navigation on mobile/tablet (touch devices) */
@media (max-width: 1024px) {
    .theme-filter a.keyboard-focused {
        background-color: transparent;
        border-left: none;
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-left: 0;
    }
}

/* ========================================
   Digest List
   ======================================== */
.digest-list {
    list-style: decimal;         /* Enable list markers */
    padding-left: 1.5rem;        /* 24px for numbering */
    margin: 0;
    counter-reset: digest-index -1;  /* Start at 0 instead of 1 */
}

.digest-item {
    padding: 0.75rem 0;              /* 12px desktop */
    transition: background-color 0.2s;
    cursor: pointer;
    counter-increment: digest-index; /* Increment counter for each item */
    display: list-item;              /* Ensure list item display */
}

.digest-item::marker {
    content: counter(digest-index) ". ";  /* Display counter with period */
}

.digest-item:hover {
    background-color: rgba(59, 66, 82, 0.5);  /* --nord1 at 50% */
}

.digest-item.selected {
    background-color: rgba(136, 192, 208, 0.1); /* Nord8 teal at 10% */
    border-left: 3px solid var(--nord8);
    padding-left: 0.3125rem;        /* 5px compensation for border */
}

/* Hide keyboard selection on mobile/tablet (touch devices) */
@media (max-width: 1024px) {
    .digest-item.selected {
        background-color: transparent;
        border-left: none;
        padding-left: 0;
    }
}

.digest-title {
    font-size: 1rem;                /* 16px desktop, scales responsive */
    font-weight: 600;
    color: var(--nord6);
    text-decoration: none;
    display: block;
    line-height: 1.4;               /* Better line spacing for wrapped text */
}

.digest-title:hover {
    color: var(--nord8);
}

/* Theme list styling */
.digest-theme-list {
    font-weight: 400;               /* Normal weight for themes */
    font-size: 0.875rem;            /* Slightly smaller */
    color: var(--nord4);            /* Dimmer color */
    white-space: nowrap;            /* Prevent breaking within parentheses */
}

/* Individual theme tags */
.digest-theme-tag {
    color: inherit;                 /* Inherit from digest-theme-list */
}

.digest-summary {
    font-size: 0.8125rem;           /* ~13px desktop */
    line-height: 1.5;
    color: var(--nord4);
    margin-top: 0.25rem;            /* 4px */
}

.digest-meta {
    font-size: 0.75rem;             /* ~12px desktop */
    color: var(--nord4);
    margin-top: 0.25rem;            /* 4px */
}

.digest-meta span::after {
    content: " · ";
    margin: 0 0.25rem;              /* 4px */
}

.digest-meta span:last-of-type::after {
    content: "";
}

/* ========================================
   Digest Detail Page - Layout
   ======================================== */

/* Two-column layout: sidebar + main content */
.digest-layout {
    display: grid;
    grid-template-columns: 16rem 1fr;  /* 256px sidebar, flexible main */
    gap: 2rem;                          /* 32px gap */
    align-items: start;
}

@media (max-width: 768px) {
    .digest-layout {
        grid-template-columns: 1fr;     /* Stack on mobile */
    }

    .digest-sidebar {
        order: 2;                       /* Move sidebar below content on mobile */
    }
}

/* Sidebar */
.digest-sidebar {
    position: sticky;
    top: 1rem;                          /* 16px from top when scrolling */
    align-self: start;
}

.sidebar-section h2 {
    font-size: 0.875rem;                /* 14px */
    font-weight: 600;
    color: var(--nord8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;             /* 12px */
}

/* Digest Navigation List */
.digest-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.digest-nav-item {
    margin-bottom: 0.5rem;              /* 8px */
}

.digest-nav-item a {
    display: block;
    padding: 0.5rem;                    /* 8px */
    border-radius: 0.25rem;             /* 4px */
    text-decoration: none;
    transition: background-color 0.2s;
}

.digest-nav-item a:hover {
    background-color: var(--nord1);
}

.digest-nav-item.active a {
    background-color: rgba(136, 192, 208, 0.15); /* Nord8 at 15% */
    border-left: 3px solid var(--nord8);
    padding-left: calc(0.5rem - 3px);   /* Compensate for border */
}

/* Hide active state on mobile/tablet (touch devices) */
@media (max-width: 1024px) {
    .digest-nav-item.active a {
        background-color: transparent;
        border-left: none;
        padding-left: 0.5rem;
    }
}

.digest-nav-title {
    font-size: 0.8125rem;               /* 13px */
    font-weight: 500;
    color: var(--nord6);
    margin-bottom: 0.25rem;             /* 4px */
    line-height: 1.3;
}

.digest-nav-item.active .digest-nav-title {
    color: var(--nord8);
    font-weight: 600;
}

.digest-nav-meta {
    font-size: 0.6875rem;               /* 11px */
    color: var(--nord4);
    display: flex;
    gap: 0.5rem;                        /* 8px */
}

/* Main Content Area */
.digest-detail {
    min-width: 0;                       /* Prevent grid blowout */
}

.digest-header {
    margin-bottom: 2rem;                /* 32px */
}

.digest-header h1 {
    font-size: 1.5rem;                  /* 24px */
    margin-bottom: 0.5rem;
}

.digest-header .metadata {
    font-size: 0.875rem;                /* 14px */
    color: var(--nord4);
}

/* Digest sections - increased spacing */
.digest-section {
    margin-bottom: 3rem;             /* 48px - increased from 32px */
    transition: background-color 0.2s, border-color 0.2s;
    padding: 1rem;                   /* 16px padding for focus highlight */
    margin-left: -1rem;              /* Negative margin to compensate */
    margin-right: -1rem;
    border-radius: 0.25rem;          /* 4px */
}

.digest-section h2 {
    font-size: 1.125rem;             /* 18px */
    font-weight: 600;
    color: var(--nord8);
    margin-bottom: 1rem;             /* 16px */
}

.digest-section h3 {
    font-size: 0.9375rem;            /* 15px */
    font-weight: 600;
    color: var(--nord6);
    margin-bottom: 0.75rem;          /* 12px */
}

/* Navigable sections - focus state */
.navigable-section {
    outline: none;                   /* Remove default outline */
}

.navigable-section.focused {
    background-color: rgba(136, 192, 208, 0.1); /* var(--nord8) at 10% */
    border-left: 3px solid var(--nord8);
    padding-left: calc(1rem - 3px);  /* Compensate for border */
}

/* Hide keyboard navigation on mobile/tablet (touch devices) */
@media (max-width: 1024px) {
    .navigable-section.focused {
        background-color: transparent;
        border-left: none;
        padding-left: 1rem;
    }
}

/* Summary content */
.summary-content {
    font-size: 0.9375rem;            /* 15px */
    line-height: 1.7;
    color: var(--nord5);
}

.summary-content p {
    margin-bottom: 1rem;             /* 16px */
}

/* Citation links within summary */
.summary-content a[href^="#article-"] {
    color: var(--nord8);             /* Teal for citations */
    text-decoration: none;
    font-weight: 600;
    padding: 0.125rem 0.25rem;       /* 2px 4px */
    border-radius: 0.125rem;         /* 2px */
    transition: background-color 0.2s;
}

.summary-content a[href^="#article-"]:hover {
    background-color: rgba(136, 192, 208, 0.15);  /* Nord8 at 15% */
    text-decoration: none;
}

/* Copy notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;                    /* 32px from bottom */
    right: 2rem;                     /* 32px from right */
    background-color: var(--nord14); /* Green */
    color: var(--nord0);             /* Dark text */
    padding: 0.75rem 1.5rem;         /* 12px 24px */
    border-radius: 0.25rem;          /* 4px */
    font-size: 0.875rem;             /* 14px */
    font-weight: 600;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideInFade 2s ease-in-out;
}

@keyframes slideInFade {
    0% {
        opacity: 0;
        transform: translateY(1rem);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
}

.section {
    margin-bottom: 2rem;             /* 32px */
}

.section-title {
    font-size: 1rem;                 /* 16px */
    font-weight: 600;
    color: var(--nord8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;          /* 12px */
    padding-bottom: 0.25rem;         /* 4px */
    border-bottom: 1px solid var(--nord2);
}

/* ========================================
   Prose (Rendered Markdown)
   ======================================== */
.prose {
    font-size: 0.875rem;                /* ~14px desktop */
    line-height: 1.6;
    color: var(--nord5);
}

.prose p {
    margin-bottom: 0.75rem;             /* 12px */
}

.prose strong {
    color: var(--nord6);
    font-weight: 600;
}

.prose em {
    color: var(--nord4);
    font-style: italic;
}

.prose ul,
.prose ol {
    margin-left: 1.25rem;               /* 20px */
    margin-bottom: 0.75rem;             /* 12px */
}

.prose li {
    margin-bottom: 0.25rem;             /* 4px */
}

.prose code {
    background-color: var(--nord1);
    padding: 0.125rem 0.25rem;          /* 2px 4px */
    border-radius: 0.1875rem;           /* 3px */
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;                 /* 12px */
}

.prose pre {
    background-color: var(--nord1);
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

/* Citation Links */
.prose a[href^="#article-"] {
    color: var(--nord8);
    text-decoration: none;
    font-weight: 600;
    padding: 0 0.125rem;
}

.prose a[href^="#article-"]:hover {
    background-color: var(--nord1);
    text-decoration: underline;
}

/* ========================================
   Structured Summary Sections
   ======================================== */

/* Executive Intro */
.executive-intro {
    margin-bottom: 2rem;             /* 32px spacing after intro */
    font-size: 0.9375rem;            /* 15px */
    line-height: 1.7;
    color: var(--nord5);
}

.executive-intro p {
    margin-bottom: 0.75rem;
}

/* Key Developments */
.key-developments-section {
    margin-bottom: 2rem;             /* 32px spacing after developments */
}

.key-developments-section h3 {
    font-size: 0.9375rem;            /* 15px */
    font-weight: 600;
    color: var(--nord6);
    margin-bottom: 0.75rem;          /* 12px */
}

.key-developments {
    list-style: decimal;
    padding-left: 1.5rem;            /* 24px for numbering */
    margin: 0;
}

.key-developments li {
    margin-bottom: 0.75rem;          /* 12px */
    color: var(--nord5);
    line-height: 1.6;
    padding-left: 0.25rem;           /* 4px extra spacing */
}

/* Bottom Line */
.bottom-line-section {
    margin-bottom: 2rem;             /* 32px spacing */
    padding-top: 1rem;               /* 16px padding top */
    border-top: 1px solid var(--nord2); /* Subtle divider */
}

.bottom-line-section h3 {
    font-size: 0.9375rem;            /* 15px */
    font-weight: 600;
    color: var(--nord6);
    margin-bottom: 0.75rem;          /* 12px */
}

.bottom-line {
    font-size: 0.9375rem;            /* 15px */
    line-height: 1.7;
    color: var(--nord5);
    font-weight: 500;                /* Slightly bolder for emphasis */
    margin: 0;
}

/* Legacy key moments (for backward compatibility) */
.key-moments-section {
    margin-bottom: 1.5rem;           /* 24px spacing after key moments */
}

.key-moments-section h3 {
    font-size: 0.9375rem;            /* 15px */
    font-weight: 600;
    color: var(--nord6);
    margin-bottom: 0.75rem;          /* 12px */
}

.key-moments {
    list-style: disc;
    padding-left: 1.25rem;           /* 20px */
    margin: 0;
}

.key-moments li {
    margin-bottom: 0.5rem;           /* 8px */
    color: var(--nord5);
    line-height: 1.5;
}

/* ========================================
   Perspectives - Text-focused, minimal styling
   ======================================== */
.perspectives {
    display: flex;
    flex-direction: column;
    gap: 2rem;                       /* 32px - increased spacing */
}

.perspective {
    padding: 0;                      /* Removed padding */
    background-color: transparent;   /* Removed background */
    border-left: none;               /* Removed border */
    border-radius: 0;                /* Removed border radius */
    margin-bottom: 1.5rem;           /* 24px spacing between perspectives */
}

.perspective h3 {
    font-size: 1rem;                 /* 16px - increased from 14px */
    font-weight: 600;
    color: var(--nord8);
    margin-bottom: 0.75rem;          /* 12px */
}

.perspective-content {
    font-size: 0.875rem;             /* 14px */
    line-height: 1.6;
    color: var(--nord5);
    padding-left: 1rem;              /* 16px indent for content */
}

.perspective-content p {
    margin-bottom: 0.75rem;
}

/* ========================================
   Articles List
   ======================================== */
.article-list {
    list-style: decimal;
    padding-left: 1.5rem;            /* 24px */
    margin: 0;
}

.article-item {
    padding: 0.5rem 0;               /* 8px */
    border-bottom: 1px solid var(--nord1);
    transition: background-color 0.2s, outline 0.2s;
}

.article-item:hover {
    background-color: rgba(59, 66, 82, 0.3);
}

/* Highlight article when targeted via citation link */
.article-item:target {
    background-color: rgba(136, 192, 208, 0.2);  /* Nord8 at 20% */
    outline: 2px solid var(--nord8);
    outline-offset: 2px;
    animation: highlightPulse 0.6s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        outline-color: var(--nord8);
    }
    50% {
        outline-color: var(--nord9);  /* Brighter blue pulse */
    }
}

.article-item.selected {
    background-color: var(--nord1);
    border-left: 3px solid var(--nord9);
    padding-left: 0.3125rem;
}

/* Hide keyboard selection on mobile/tablet (touch devices) */
@media (max-width: 1024px) {
    .article-item.selected {
        background-color: transparent;
        border-left: none;
        padding-left: 0;
    }
}

.article-title {
    font-size: 0.875rem;             /* 14px */
    font-weight: 400;
    color: var(--nord6);
}

.article-title a {
    color: var(--nord6);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--nord8);
}

.article-domain {
    font-size: 0.75rem;              /* 12px */
    color: var(--nord3);
    margin-left: 0.25rem;
}

.article-meta {
    font-size: 0.75rem;              /* 12px */
    color: var(--nord4);
    margin-top: 0.125rem;            /* 2px */
}

/* ========================================
   Interactive States - Focus & Selection
   ======================================== */
*:focus {
    outline: 2px solid var(--nord8);
    outline-offset: 2px;
}

.digest-item:focus,
.article-item:focus {
    outline: none;  /* Use .selected class instead */
}

/* ========================================
   Keyboard Shortcuts Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 52, 64, 0.8);  /* --nord0 at 80% */
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--nord1);
    border: 1px solid var(--nord2);
    border-radius: 0.5rem;           /* 8px */
    max-width: 48rem;                /* 768px */
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--nord2);
}

.modal-header h2 {
    font-size: 1.25rem;              /* 20px */
    font-weight: 600;
    color: var(--nord6);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--nord4);
    font-size: 2rem;                 /* 32px */
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;          /* 4px */
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: var(--nord2);
    color: var(--nord6);
}

.modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 2rem;
}

.shortcut-section {
    min-width: 0;                    /* Prevent grid blowout */
}

.shortcut-section h3 {
    font-size: 0.875rem;             /* 14px */
    font-weight: 600;
    color: var(--nord8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;          /* 12px */
}

.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;                     /* 8px */
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;                       /* 16px */
}

.shortcut-item dt {
    display: flex;
    gap: 0.25rem;                    /* 4px */
    min-width: 6rem;                 /* 96px - fixed width for alignment */
}

.shortcut-item dd {
    color: var(--nord5);
    font-size: 0.875rem;             /* 14px */
    margin: 0;
}

/* Keyboard Key Styling */
kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;         /* 4px 8px */
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;              /* 12px */
    font-weight: 600;
    color: var(--nord6);
    background-color: var(--nord2);
    border: 1px solid var(--nord3);
    border-radius: 0.25rem;          /* 4px */
    box-shadow: 0 1px 0 var(--nord3);
    white-space: nowrap;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .shortcut-item dt {
        min-width: auto;
    }

    header nav {
        font-size: 0.75rem;          /* Smaller on mobile */
        gap: 0.5rem;
    }

    .theme-filter {
        gap: 0.5rem;
    }
}

/* ========================================
   About Page
   ======================================== */
.about-page {
    max-width: 48rem;               /* 768px - narrower for better readability */
    margin: 0 auto;
}

.about-page h1 {
    font-size: 1.75rem;             /* 28px */
    margin-bottom: 1.5rem;          /* 24px */
    color: var(--nord6);
}

.about-page h2 {
    font-size: 1.25rem;             /* 20px */
    margin-top: 2rem;               /* 32px */
    margin-bottom: 0.75rem;         /* 12px */
    color: var(--nord8);            /* Teal accent */
}

.about-section {
    margin-bottom: 2rem;            /* 32px */
}

.about-section p {
    line-height: 1.7;
    margin-bottom: 1rem;            /* 16px */
    color: var(--nord5);
}

.about-section ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.about-section ul li {
    padding: 0.5rem 0;              /* 8px 0 */
    padding-left: 1.5rem;           /* 24px */
    position: relative;
    line-height: 1.6;
}

.about-section ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--nord8);            /* Teal arrow */
    font-weight: bold;
}

.about-section a {
    color: var(--nord8);
    text-decoration: none;
    font-weight: 500;
}

.about-section a:hover {
    color: var(--nord7);
    text-decoration: underline;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--nord2);
}

.pagination-info {
    text-align: center;
    color: var(--nord4);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-button {
    padding: 0.5rem 1rem;
    background: var(--nord1);
    color: var(--nord6);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--nord3);
}

.pagination-button:hover {
    background: var(--nord2);
    color: var(--nord8);
    border-color: var(--nord8);
}

.pagination-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    background: var(--nord1);
    color: var(--nord6);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid var(--nord3);
}

.pagination-number:hover {
    background: var(--nord2);
    color: var(--nord8);
    border-color: var(--nord8);
}

.pagination-number.active {
    background: var(--nord8);
    color: var(--nord0);
    border-color: var(--nord8);
    font-weight: bold;
}

.pagination-ellipsis {
    color: var(--nord4);
    padding: 0 0.25rem;
}

/* Mobile pagination adjustments */
@media (max-width: 600px) {
    .pagination-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination-button {
        width: 100%;
        text-align: center;
    }

    .pagination-numbers {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}
