/* The Ledger - Journal of Economic Statecraft Stylesheet */
/* Enhanced Professional Design */

/* Google Fonts Import - Sophisticated Typography */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Enhanced Color Palette */
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #8b7355;
    --accent-light: #b8956a;
    --text-color: #2d2d2d;
    --text-light: #5a5a5a;
    --light-bg: #fafaf8;
    --white: #ffffff;
    --off-white: #fcfcfa;
    --border-color: #e5e5e0;
    --border-dark: #d0d0c8;
    --link-color: #1a1a1a;
    --link-hover: #8b7355;

    /* Typography Scale */
    --font-serif: 'Crimson Text', 'Georgia', serif;
    --font-display: 'Libre Baskerville', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header Styles - Enhanced */
header {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 3rem 0 0;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.logo-container img {
    max-width: 480px;
    width: 100%;
    height: auto;
    filter: contrast(1.05);
}

.logo-container a {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.logo-container a:hover {
    opacity: 0.85;
}

header h1 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: none;
}

header h1 a {
    color: var(--primary-color);
    text-decoration: none;
}

header h1 a:hover {
    color: var(--accent-color);
}

.tagline {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    display: none;
}

/* Navigation - Refined */
nav {
    text-align: center;
    padding: 0;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
}

nav li {
    position: relative;
}

nav a {
    font-family: var(--font-sans);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 1.25rem 2rem;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
    background-color: var(--light-bg);
}

nav a:hover::after {
    width: 60%;
}

/* Main Content - Better Spacing */
main {
    padding: 4rem 0;
    min-height: calc(100vh - 450px);
}

/* Hero Section - Enhanced */
.hero {
    text-align: center;
    padding: 3rem 0 4rem;
    border-bottom: 3px double var(--border-dark);
    margin-bottom: 4rem;
    background: linear-gradient(to bottom, var(--white), var(--off-white));
}

.hero h2 {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.issue-intro {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-light);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Articles Section - Card-Based Design */
.articles {
    display: grid;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.article-preview {
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.article-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--accent-color), var(--accent-light));
    transition: height 0.3s ease;
}

.article-preview:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.article-preview:hover::before {
    height: 100%;
}

.article-preview h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
}

.article-preview h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-preview h3 a:hover {
    color: var(--accent-color);
}

.meta {
    font-family: var(--font-sans);
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.excerpt {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-color);
}

.read-more {
    font-family: var(--font-sans);
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-right: 24px;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: right 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more:hover::after {
    right: -4px;
}

/* Full Article Styles - Enhanced Typography */
.full-article {
    max-width: 720px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    padding-bottom: 2.5rem;
    border-bottom: 3px double var(--border-dark);
    margin-bottom: 3rem;
}

.article-header h2 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.article-content {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

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

.article-content h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.article-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--border-color);
}

.article-footer a {
    font-family: var(--font-sans);
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.article-footer a:hover {
    color: var(--primary-color);
}

/* About & Submission Pages - Enhanced */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.075rem;
    line-height: 1.8;
}

.about-content h2 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.about-content h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.about-content h3:first-of-type {
    border-top: none;
    padding-top: 0;
}

.about-content h4 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.about-content ul {
    margin-bottom: 1.75rem;
    padding-left: 2.5rem;
}

.about-content ul li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.about-content ul ul {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.about-content .note {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: -0.5rem;
}

.about-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

/* Submission Table - Enhanced Design */
.submission-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background-color: var(--white);
}

.submission-table thead {
    background: linear-gradient(to bottom, var(--light-bg), var(--white));
}

.submission-table th {
    font-family: var(--font-sans);
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border-dark);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submission-table td {
    font-family: var(--font-serif);
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    line-height: 1.6;
}

.submission-table tbody tr:last-child td {
    border-bottom: none;
}

.submission-table tbody tr {
    transition: background-color 0.2s ease;
}

.submission-table tbody tr:hover {
    background-color: var(--light-bg);
}

/* Footer - Professional Polish */
footer {
    background: linear-gradient(to bottom, var(--off-white), var(--light-bg));
    color: var(--text-color);
    padding: 3rem 0;
    margin-top: 5rem;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

footer p {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Simple Header for Articles and Issue Pages */
.simple-header {
    background: linear-gradient(to bottom, var(--off-white), white);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: 600;
}

/* Editorial Team Page */
.editorial-section {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.bio-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.bio-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.bio-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.bio-photo {
    flex-shrink: 0;
}

.bio-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.bio-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.bio-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.bio-content p {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.bio-credentials {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

.bio-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.bio-links a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

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

.join-team {
    background: linear-gradient(to bottom, var(--off-white), white);
    border-radius: 8px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.join-team .about-content {
    text-align: center;
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    .container {
        padding: 0 20px;
    }

    header {
        padding: 2rem 0 0;
    }

    .logo-container {
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .logo-container img {
        max-width: 320px;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 0;
    }

    nav a {
        font-size: 0.8rem;
        padding: 1rem 1.25rem;
        letter-spacing: 0.8px;
    }

    main {
        padding: 2.5rem 0;
    }

    .hero {
        padding: 2rem 0 2.5rem;
        margin-bottom: 2.5rem;
    }

    .hero h2 {
        font-size: 2.25rem;
    }

    .issue-intro {
        font-size: 1.1rem;
    }

    .articles {
        gap: 2rem;
    }

    .article-preview {
        padding: 1.75rem;
    }

    .article-preview h3 {
        font-size: 1.5rem;
    }

    .article-header h2 {
        font-size: 2.25rem;
    }

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

    .about-content h2 {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }

    .about-content h3 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .submission-table {
        font-size: 0.875rem;
    }

    .submission-table th,
    .submission-table td {
        padding: 1rem 0.75rem;
    }
}

/* Print Styles */
@media print {
    /* Hide navigation elements */
    header,
    nav,
    footer,
    .read-more,
    .breadcrumb {
        display: none;
    }

    body {
        background-color: white;
        color: black;
        font-size: 12pt;
    }

    /* Article pages - add watermark */
    .full-article {
        position: relative;
    }

    .full-article::before {
        content: "The Ledger: Journal of Economic Statecraft";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-family: var(--font-display);
        font-size: 72pt;
        color: rgba(0, 0, 0, 0.03);
        z-index: -1;
        white-space: nowrap;
        pointer-events: none;
    }

    /* Print footer on every page */
    @page {
        margin: 0.75in 0.75in 1in 0.75in;

        @bottom-center {
            content: "The Ledger: Journal of Economic Statecraft";
            font-family: var(--font-sans);
            font-size: 9pt;
            color: #666;
            border-top: 1px solid #ccc;
            padding-top: 8pt;
        }
    }

    /* Alternative footer using pseudo-element (for browsers that don't support @page) */
    .full-article::after {
        content: "The Ledger: Journal of Economic Statecraft";
        display: block;
        text-align: center;
        font-family: var(--font-sans);
        font-size: 9pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding-top: 8pt;
        margin-top: 2rem;
        page-break-inside: avoid;
    }

    /* Ensure good page breaks */
    .article-preview {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }

    /* Make links visible in print */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #666;
    }

    /* Don't show link URLs for internal navigation */
    a[href^="#"]::after,
    a[href^="/"]::after {
        content: "";
    }

    /* Ensure images print well */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
