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

/* Use a more editorial, layered typographic system: */
/* - Headings: classic serif for warmth and character (fallbacks to Georgia) */
/* - Body/UI: humanist system sans for readability */
/* - Code: monospaced stack for code blocks and inline code */
/* Keeping external font imports out so this remains self-hostable */

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

:root {
    --cream: #faf7f2;
    --warm-white: #ffffff;
    --charcoal: #2a2a2a;
    --soft-black: #1a1a1a;
    /* shift orange to a warmer, more earthy ochre */
    --primary-orange: #c96f2c; /* ochre */
    --primary-dark: #b65a2a;
    --accent-coral: #ff8c69;
    --light-orange: #fff4f1;
    --stone: #8b8680;
    --light-stone: #e8e4df;
    --border-light: #e0ddd6;
    --text-primary: #2a2a2a;
    --text-secondary: #5a5a5a;
    --text-muted: #8b8680;
    /* additional tokens used later in the file (define sensible defaults) */
    --rust: #9b4b2b;
    --surface: #ffffff;
    --surface-light: #fbf8f6;
    --border: #e7e3dd;
    --primary: var(--primary-orange);
    --text-accent: #2b7a78;
    --accent: #2b7a78;
    --gradient: linear-gradient(90deg, #c96f2c 0%, #b65a2a 100%);
    /* New tokens for richer visual style */
    --heading-gradient: linear-gradient(90deg, #c96f2c 0%, #ff8c69 60%, #2b7a78 100%);
    --card-gradient: linear-gradient(180deg, rgba(201,111,44,0.06) 0%, rgba(255,140,105,0.02) 100%);
    --page-glow: radial-gradient(1200px 600px at 10% 10%, rgba(201,111,44,0.06), transparent 15%), radial-gradient(900px 400px at 90% 90%, rgba(43,122,120,0.03), transparent 18%);
}

body {
    /* readable system sans for body text and UI */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--cream);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* soft ambient glow behind content to lift the page visually */
body::before{
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: var(--page-glow);
    z-index: 0;
}

/* Remove all the gimmicky background animations */

/* Navigation - Clean and Editorial */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    /* give the logo a more literary/brand feel with a serif */
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-logo img {
    height: 48px;
    margin-right: 16px;
}

/* Give the logo a subtle lift */
.nav-logo img {
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.06));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.nav-logo img:hover{ transform: translateY(-2px); filter: drop-shadow(0 12px 24px rgba(0,0,0,0.09)); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    /* keep UI links crisp with a neutral sans */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: width 0.3s ease;
}

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

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--charcoal);
}

/* Container and Layout - Magazine Style */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 32px 80px;
}

.main-content {
    width: 100%;
}

.main-content > p:first-of-type {
    text-align: center;
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Center top-level page headings by default (non-article pages) */
.main-content > h1 {
    text-align: center;
}

/* Typography - Editorial and Refined */
h1 {
    /* prominent serif headings for editorial character */
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--charcoal);
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

/* Gradient-filled H1 for landing/section headers */
.main-content > h1 {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.intro-section h1 {
    font-size: clamp(42px, 6vw, 68px);
    text-align: center;
    font-weight: 800;
}

.mission-statement {
    max-width: 700px;
    margin: 32px auto 48px;
    text-align: center;
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.mission-statement strong {
    color: var(--primary-orange);
    font-weight: 600;
}

h2 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    margin: 56px 0 20px 0;
    color: var(--charcoal);
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
    text-align: left;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--accent-coral));
    border-radius: 3px;
    transition: transform 0.25s ease, width 0.25s ease, opacity 0.25s ease;
}

h2:hover::after{ width: 110px; opacity: 0.95; }

/* Center h2 only on specific pages/sections */
.intro-section h2,
.main-content > h2:first-of-type {
    text-align: center;
}

.intro-section h2::after,
.main-content > h2:first-of-type::after {
    left: 50%;
    transform: translateX(-50%);
}

.intro-section h2:hover::after,
.main-content > h2:first-of-type:hover::after {
    transform: translateX(-50%) scaleX(1.02);
}

.article-page .main-content > h2:first-of-type {
    text-align: left;
}

.article-page .main-content > h2:first-of-type::after {
    left: 0;
    transform: none;
}

/* Ensure article pages keep left-aligned main H1s */
.article-page .main-content > h1 {
    text-align: left;
}

h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: var(--charcoal);
    letter-spacing: -0.2px;
}

p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 18px;
}

/* Links with subtle personality */
a {
    color: var(--rust);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

a:hover {
    border-bottom-color: var(--primary-orange);
}

/* Series Card Styles */
.series-card {
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 32px;
    margin: 32px 0 48px 0;
    box-shadow: 0 2px 8px rgba(42, 42, 42, 0.04);
    transition: all 0.3s ease;
}

.series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 42, 42, 0.08);
    border-color: var(--primary-orange);
}

/* Subtle background gradient and left accent for cards */
.series-card {
    background-image: var(--card-gradient);
    border-left: 6px solid rgba(201,111,44,0.12);
}

.series-card:hover { border-left-color: var(--primary-orange); }

.series-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 24px;
}

.series-card h2::after {
    display: none;
}

.series-card p {
    margin-bottom: 24px;
    font-size: 16px;
}

.series-button {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
}

.series-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border-bottom-color: transparent;
}

/* Homepage - Editorial Style */
.intro-section {
    margin-bottom: 64px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 48px;
    text-align: center;
}

.lead {
    font-size: 24px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.cta-section {
    text-align: center;
    margin: 48px 0;
}

.browse-cta {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.browse-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    border-bottom-color: transparent;
}

.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 48px;
    text-align: left;
}

.principle {
    padding: 28px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.principle:hover {
    border-color: var(--primary-orange);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
}

.principle h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.principle p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Remove gimmicky elements */
.highlight {
    color: var(--primary-orange);
    font-weight: 500;
    background: none;
    padding: 0;
    border-bottom: 1px solid var(--primary-orange);
}

/* Code styling - more refined */
code {
    background: var(--surface-light);
    color: var(--charcoal);
    padding: 3px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.92em;
    border: 1px solid var(--border);
}

/* Lists - cleaner */
ul {
    margin: 16px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

li::marker {
    color: var(--primary-orange);
}

/* Code styling */
code {
    background: var(--surface-light);
    color: var(--text-accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border);
}

/* Lists */
ul {
    margin: 16px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    position: relative;
}

li::marker {
    color: var(--text-accent);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .container {
        padding: 100px 20px 60px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-logo img {
        height: 36px;
        margin-right: 12px;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .container {
        padding: 120px 16px 40px;
    }
    
    h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 1.5rem;
        margin: 32px 0 16px 0;
    }
    
    .lead {
        font-size: 20px;
        margin-bottom: 32px;
    }
    
    .principles {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 32px;
    }
    
    .principle {
        padding: 20px 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .principle:last-child {
        border-bottom: none;
    }
    
    .intro-section {
        margin-bottom: 48px;
        padding-bottom: 32px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 32px;
    }
    
    .article-card {
        padding: 20px;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .password-form {
        padding: 24px;
        margin: 0 16px;
    }
    
    .article-page h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .article-page .article-body {
        font-size: 1.05rem;
    }
    
    .article-page .article-body h3 {
        font-size: 1.2rem;
        margin: 32px 0 16px 0;
    }
    
    .back-link {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Admin Components */
.admin-link-container {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.admin-link-container:hover {
    opacity: 1;
}

.admin-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
}

.admin-link:hover {
    background: var(--surface-light);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Password Protection */
.password-screen {
    text-align: center;
    padding: 80px 0;
    max-width: 500px;
    margin: 0 auto;
}

.password-form {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 40px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.password-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-orange);
}

.password-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    color: var(--charcoal);
}

.password-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.password-button {
    width: 100%;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.password-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.password-button:active {
    transform: translateY(0);
}

.password-error {
    color: #d73027;
    margin-top: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 12px;
    background: rgba(215, 48, 39, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(215, 48, 39, 0.2);
}

.csv-note {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.csv-note ul {
    margin: 8px 0 0 20px;
    color: #555;
}

.csv-note li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.file-creation-note {
    margin-top: 16px;
    padding: 16px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.file-creation-note ul {
    margin: 8px 0 0 20px;
    color: #555;
}

.file-creation-note li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.file-creation-note code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.test-section {
    margin-top: 32px;
    padding: 20px;
    background: rgba(46, 204, 113, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.sample-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.sample-button:hover {
    background: #219a52;
}

/* Upload Section Styles */
.upload-section {
    background: rgba(44, 62, 80, 0.05);
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    border: 1px solid rgba(44, 62, 80, 0.1);
}

.upload-container {
    margin: 16px 0;
}

.upload-button {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-button:hover {
    background: var(--primary-dark);
}

.upload-status {
    margin-top: 12px;
    padding: 8px;
    border-radius: 4px;
    font-weight: 500;
}

.upload-status.success {
    background: rgba(74, 142, 62, 0.1);
    color: #4a8e3e;
    border: 1px solid rgba(74, 142, 62, 0.2);
    font-family: 'Inter', sans-serif;
}

.upload-status.error {
    background: rgba(215, 48, 39, 0.1);
    color: #d73027;
    border: 1px solid rgba(215, 48, 39, 0.2);
    font-family: 'Inter', sans-serif;
}

.upload-status.info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.csv-format {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border-left: 4px solid #2c3e50;
    font-size: 0.9rem;
}

.csv-format h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #2c3e50;
}

.csv-format p {
    margin-bottom: 6px;
}

/* Back Navigation */
.back-nav {
    margin-bottom: 32px;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.back-link:hover {
    background: var(--surface-light);
    color: var(--text-primary);
    transform: translateX(-4px);
    border-color: var(--primary);
}

/* Article Page Styles */
.article-page .container {
    max-width: 800px;
}

.article-page .article-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 32px;
    margin-bottom: 40px;
    position: relative;
}

.article-page .article-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--gradient);
}

.article-page .article-meta {
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.article-page .article-meta .article-date {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    background: var(--surface);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.article-page .article-meta .article-category {
    background: var(--gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-page h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 0;
}

.article-page .article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-page .article-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
    color: var(--text-primary);
    position: relative;
}

.article-page .article-body p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

/* Article Grid - Clean, Magazine Layout */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 48px;
}

.article-card {
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(42, 42, 42, 0.04);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 42, 42, 0.08);
    border-color: var(--stone);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: var(--text-muted);
    font-weight: 500;
}

.article-category {
    color: var(--rust);
    font-weight: 600;
    background: rgba(184, 84, 80, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
}

.article-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--charcoal);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

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

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 16px;
}

.read-more {
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-card:hover .read-more {
    color: var(--rust);
    border-bottom-color: var(--rust);
}

/* Post Styles for Jekyll */
.post {
    margin: 0 auto;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
}

.post-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.post-author {
    font-weight: 500;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 48px;
}

.post-content h3 {
    margin-top: 32px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-orange);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.post-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-orange);
    color: var(--primary-orange);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Posts List Styles */
.posts-list {
    margin-top: 40px;
}

.post-preview {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    margin: 0 0 12px 0;
    font-size: 28px;
}

.post-preview h2::after {
    display: none;
}

.post-preview h2 a {
    color: var(--charcoal);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-preview h2 a:hover {
    color: var(--primary-orange);
    border-bottom: none;
}

.post-excerpt {
    color: var(--text-secondary);
    margin: 16px 0;
    line-height: 1.7;
}

.posts-list .read-more {
    color: var(--primary-orange);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.posts-list .read-more:hover {
    transform: translateX(4px);
    border-bottom: 1px solid var(--primary-orange);
}

/* Article Form Styles */
.upload-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.article-form {
    max-width: 800px;
    margin: 24px 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    color: var(--charcoal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.preview-button {
    background: white;
    color: var(--charcoal);
    border: 1px solid var(--border-light);
    padding: 16px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.preview-button:hover {
    background: var(--sage);
    color: white;
    border-color: var(--sage);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 174, 148, 0.3);
}

.publish-button {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.publish-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.upload-status {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid;
}

.upload-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

.upload-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.upload-status.info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-color: rgba(6, 182, 212, 0.2);
}

.content-helper {
    margin-top: 40px;
    padding: 24px;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    font-size: 0.95rem;
}

.content-helper h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.content-helper ul {
    margin: 16px 0 0 20px;
}

.content-helper li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.content-helper code {
    background: var(--surface-light);
    color: var(--text-accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

/* Preview Modal Styles */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.preview-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 900px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-light);
}

.preview-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.close-preview {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-preview:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.preview-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.preview-actions {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    background: var(--surface-light);
}

.content-helper ul {
    margin: 12px 0 0 20px;
}

.content-helper li {
    margin-bottom: 6px;
}

.content-helper code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* Preview Modal Styles */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.preview-content {
    background: white;
    border-radius: 8px;
    max-width: 900px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-preview {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-preview:hover {
    background: rgba(0, 0, 0, 0.1);
}

.preview-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.preview-actions {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .preview-modal {
        padding: 10px;
    }

    .preview-content {
        max-height: 95vh;
    }

    .preview-header,
    .preview-actions {
        padding: 16px;
    }

    .preview-body {
        padding: 16px;
    }

    .preview-actions {
        flex-direction: column;
    }

    body {
        padding: 70px 16px 40px 16px;
    }
    
    h1 {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 16px;
        gap: 24px;
    }

    .nav-menu {
        gap: 20px;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .admin-link-container {
        top: 15px;
        right: 15px;
    }

    .password-form {
        padding: 24px;
        margin: 0 16px;
    }

    .upload-section {
        padding: 20px;
        margin: 24px 0;
    }

    .csv-format {
        padding: 12px;
        font-size: 0.85rem;
    }

    .articles-grid {
        gap: 20px;
        margin-top: 24px;
    }

    .article-card {
        padding: 20px;
    }

    .article-title {
        font-size: 1.1rem;
    }

    .article-page h1 {
        font-size: 1.8rem;
    }

    .article-page .article-body h3 {
        font-size: 1.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .preview-modal {
        padding: 10px;
    }

    .preview-content {
        max-height: 95vh;
    }

    .preview-header,
    .preview-actions {
        padding: 16px;
    }

    .preview-body {
        padding: 16px;
    }

    .preview-actions {
        flex-direction: column;
    }
}

/* Small floating animation for CTAs to draw attention */
.browse-cta {
    box-shadow: 0 8px 20px rgba(201,111,44,0.12);
}
.browse-cta:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 18px 40px rgba(201,111,44,0.14); }