/* CSS Variables for consistent theming */
:root {
    --primary-color: #1d428a;
    --secondary-color: #2a5bb8;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --background-color: #ffffff;
    --accent-color: #e74c3c;
    --border-color: #ecf0f1;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.15);
    --golden-ratio: 1.618;
    --base-spacing: 1rem;
    --section-spacing: calc(var(--base-spacing) * var(--golden-ratio));
}

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.3em;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4em;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5em;
}

/* Layout and Spacing */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--base-spacing);
}

.header {
    text-align: center;
    padding: calc(var(--section-spacing) * 2) 0 var(--section-spacing);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: var(--section-spacing);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5em;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Article Styling */
.main-article {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.main-article p {
    margin-bottom: 1.5em;
    text-indent: 0;
    max-width: 100%;
}

.main-article p:first-of-type {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-color);
    font-weight: 400;
}

.main-article p:last-of-type {
    margin-bottom: 1em;
    font-style: italic;
    color: var(--text-color);
    font-weight: 400;
    text-align: justify;
    margin-top: 0;
    padding-top: 0;
    position: static;
}

/* Article framing bar */
.main-article::after {
    content: '';
    display: block;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 0 auto 2em auto;
    opacity: 0.6;
}



/* Skip Link Styling */
.skip-link {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    top: 20px;
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 6px 20px var(--shadow-dark);
}

.skip-link:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-dark);
}

/* Photo Styling */
.article-photo {
    width: 100%;
    height: auto;
    margin: 2em auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
}

.article-photo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    z-index: -1;
    opacity: 0.1;
}

.article-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 calc(var(--base-spacing) * 1.5);
    }
    
    .header {
        padding: var(--section-spacing) 0 calc(var(--section-spacing) * 0.75);
        margin-bottom: calc(var(--section-spacing) * 0.75);
    }
    
    .title {
        font-size: 2.2rem;
        letter-spacing: -0.03em;
    }
    
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .main-article {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .main-article p:first-of-type {
        font-size: 1.05rem;
        line-height: 1.8;
    }
    
    .article-photo {
        margin: 1.5em auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 calc(var(--base-spacing) * 1.25);
    }
    
    .header {
        padding: calc(var(--section-spacing) * 0.75) 0 calc(var(--section-spacing) * 0.5);
        margin-bottom: calc(var(--section-spacing) * 0.5);
    }
    
    .title {
        font-size: 1.8rem;
        letter-spacing: -0.02em;
    }
    
    .subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .main-article {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .main-article p:first-of-type {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-photo {
        margin: 1em auto;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .header {
        border-bottom: 2px solid #000;
    }
    
    .article-photo {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
