@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Stoke:wght@300;400&display=swap');

:root {
    --bg-main: #000000;
    --bg-surface: #0a0a0a;
    --bg-card: #121212;
    --border-color: #222222;
    --border-color-light: #333333;
    
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --text-heading: #ffffff;
    
    --accent-white: #ffffff;
    --accent-gray: #555555;
    
    --font-heading: 'Stoke', Georgia, serif;
    --font-body: 'IBM Plex Serif', Georgia, serif;
    --font-sans: 'IBM Plex Serif', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1100px;
    --shadow-md: 0 4px 30px rgba(0, 0, 0, 0.8);
    --progress-height: 3px;
}

* {
    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.1rem;
    line-height: 1.9;
    letter-spacing: 0.015em;
    overflow-x: hidden;
}

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

a {
    color: var(--accent-white);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

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

.article-content a {
    color: var(--accent-white);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-gray);
}

.article-content a:hover {
    color: var(--accent-white);
    border-bottom-color: var(--accent-white);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
}

/* Header */
.site-header {
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.site-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: none;
}

.site-logo:hover {
    border: none;
}

.logo-top {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--accent-white);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.logo-bottom {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.25rem;
    width: 100%;
}

.header-search-form {
    display: flex;
    align-items: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.25rem 0.75rem;
    transition: var(--transition);
}

.header-search-form:focus-within {
    border-color: var(--accent-white);
}

.header-search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 180px;
    padding: 0.25rem 0;
}

.header-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--accent-white);
    transition: var(--transition);
}

/* Navigation */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.nav-link {
    font-size: 0.85rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 0.25rem 0;
    border: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-white);
    border: none;
    position: relative;
}

.nav-link:hover::after, .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-white);
}

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

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

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 0 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: radial-gradient(circle at center, #111111 0%, #000000 100%);
}

.hero-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: block;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.8;
}

/* Main Grid & Cards */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.article-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-white);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color-light);
}

.article-card:hover::before {
    opacity: 0.15;
}

.card-category {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

.card-title a {
    color: var(--text-heading);
    border: none;
}

.card-title a:hover {
    color: var(--text-muted);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

.card-link {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--accent-white);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.card-link i {
    font-size: 0.7rem;
    transition: var(--transition);
}

.card-link:hover i {
    transform: translateX(3px);
}

/* Category Sections on Homepage */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-top: 5rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0;
    font-weight: 300;
}

.view-all-link {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.view-all-link:hover {
    color: var(--accent-white);
}

/* Category Page Specific */
.category-intro {
    padding: 4rem 0 2rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.category-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Article Page Layout */
.article-container {
    padding: 3rem 0;
}

.article-header {
    text-align: center;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.article-category {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-meta-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
    align-items: start;
}

.article-layout.no-sidebar {
    grid-template-columns: 1fr;
}

.article-sidebar {
    position: sticky;
    top: 120px;
    border-right: 1px solid var(--border-color);
    padding-right: 2rem;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.toc-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.toc-list {
    list-style: none;
}

.toc-item-h2 {
    margin-bottom: 0.75rem;
}

.toc-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.5;
    border: none;
}

.toc-link:hover, .toc-link.active {
    color: var(--accent-white);
    border: none;
}

.toc-link.active {
    font-weight: 500;
}

.toc-sublist {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    display: none;
}

.toc-item-h2.expanded .toc-sublist {
    display: block;
}

.toc-item-h3 {
    margin-bottom: 0.5rem;
}

.toc-item-h3 .toc-link {
    font-size: 0.8rem;
}

/* Article Body Content */
.article-main {
    min-width: 0;
}

.summary-bullets-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-white);
    padding: 2rem;
    margin-bottom: 3rem;
}

.summary-bullets-box h3 {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
}

.summary-bullets-box ul {
    list-style: none;
}

.summary-bullets-box li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
}

.summary-bullets-box li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.article-content {
    font-size: 1.15rem;
}

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

.article-content h2 {
    font-size: 2rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: 300;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 300;
}

.article-content blockquote {
    border-left: 2px solid var(--accent-white);
    padding-left: 2rem;
    margin: 3rem 0;
    font-style: italic;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.02);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-right: 1.5rem;
}

/* Info Box / Note (No emojis) */
.article-content blockquote[class*="note"] {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-white);
    font-style: normal;
    padding: 2rem;
}

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

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

/* Inline Images in Text */
.content-img-wrapper {
    margin: 3.5rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    padding: 1rem;
}

.content-img {
    max-width: 100%;
    height: auto;
    filter: grayscale(1);
    transition: var(--transition);
}

.content-img:hover {
    filter: grayscale(0.2);
}

.img-caption {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Tables styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 3.5rem 0;
    font-size: 0.95rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
}

th, td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-white);
    background-color: rgba(255, 255, 255, 0.03);
    font-weight: 400;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

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

.footnotes-container h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footnotes-list {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footnotes-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
    padding-left: 2rem;
    position: relative;
}

.footnote-backlink {
    color: var(--accent-white);
    margin-left: 0.5rem;
    border: none;
}

.footnote-ref {
    font-size: 0.75rem;
    vertical-align: super;
    line-height: 0;
    border: none;
    color: var(--accent-white);
    margin-left: 0.15rem;
}

.footnote-ref:hover {
    color: var(--text-muted);
}

/* FAQ Accordion */
.faq-section {
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 300;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-heading);
    cursor: pointer;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 250px;
    padding-bottom: 1.5rem;
}

.faq-toggle-icon {
    font-size: 0.8rem;
    transition: var(--transition);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

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

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

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

/* About Page styling */
.about-layout {
    max-width: 800px;
    margin: 4rem auto;
}

.about-intro-text {
    font-size: 1.35rem;
    line-height: 1.8;
    color: var(--text-heading);
    margin-bottom: 3rem;
    font-weight: 300;
    text-align: center;
}

.about-section {
    margin-bottom: 4rem;
}

.about-section h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about-section p {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Footer */
.site-footer {
    background-color: #050505;
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 3rem 0;
    margin-top: 8rem;
}

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

.footer-brand h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

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

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

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

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    border: none;
}

.footer-links a:hover {
    color: var(--accent-white);
}

.footer-sponsors {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-bottom: 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sponsors-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-heading);
}

.sponsors-links {
    line-height: 1.8;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .article-sidebar {
        display: none; /* Hide TOC on mobile for clean scrolling */
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .header-top-row {
        flex-wrap: wrap;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .header-top-left {
        order: 3;
        width: 100%;
    }
    
    .header-search-form {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-search-input {
        width: 100%;
    }
    
    .header-top-center {
        order: 1;
        flex-grow: 1;
        display: flex;
        justify-content: flex-start;
    }
    
    .site-logo {
        align-items: flex-start;
        text-align: left;
    }
    
    .logo-top {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }
    
    .logo-bottom {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }
    
    .header-top-right {
        order: 2;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .article-title {
        font-size: 2.2rem;
    }
    
    .article-meta-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .site-nav {
        display: none;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        padding: 2rem 0;
    }
    
    .site-nav.open {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
