/* Essay-specific styles for optimal reading */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    line-height: 1.8;
    color: #2c3e50;
    background-color: #fefefe;
    font-size: 18px;
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-container h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.nav-container h1 a {
    color: #2c3e50;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0.5rem 0;
}

nav ul li a:hover {
    color: #3498db;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown > a {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 160px;
    z-index: 1000;
    list-style: none;
    margin-top: 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #2c3e50;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 1rem;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

/* Essay Container */
.essay {
    padding: 2rem 0 4rem 0;
}

.essay-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Essay Header */
.essay-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.essay-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.essay-subtitle {
    font-size: 1.3rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0;
}

/* Essay Content Typography */
.essay-content {
    max-width: 650px;
    margin: 0 auto;
}

.essay-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
}

.essay-content p:first-child {
    font-size: 1.2rem;
    line-height: 1.7;
}

.essay-content p:first-child::first-letter {
    font-size: 3.5rem;
    font-weight: 600;
    float: left;
    line-height: 1;
    margin-right: 8px;
    margin-top: 4px;
    color: #3498db;
}

.essay-content h2 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 2.5rem 0 1.5rem 0;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.essay-content h3 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin: 2rem 0 1rem 0;
    color: #2c3e50;
    font-weight: 600;
}

.essay-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.essay-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.essay-content li strong {
    color: #2c3e50;
}

.essay-content em {
    font-style: italic;
    color: #2c3e50;
}

/* Equation Box */
.equation-box {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    font-family: 'Georgia', serif;
}

.equation-box p {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Quotes and Emphasis */
.essay-content blockquote {
    border-left: 4px solid #3498db;
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: #f8f9fa;
    font-style: italic;
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Links */
.essay-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.essay-content a:hover {
    border-bottom-color: #3498db;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .essay-container {
        padding: 0 15px;
    }
    
    .essay-header h1 {
        font-size: 2.2rem;
    }
    
    .essay-subtitle {
        font-size: 1.1rem;
    }
    
    .essay-content {
        max-width: 100%;
    }
    
    .essay-content p {
        font-size: 1rem;
        text-align: left;
        hyphens: none;
    }
    
    .essay-content p:first-child {
        font-size: 1.1rem;
    }
    
    .essay-content p:first-child::first-letter {
        font-size: 2.8rem;
        margin-right: 6px;
    }
    
    .essay-content h2 {
        font-size: 1.6rem;
        margin: 2rem 0 1rem 0;
    }
    
    .essay-content h3 {
        font-size: 1.3rem;
    }
    
    .essay-content li {
        font-size: 1rem;
    }
    
    .equation-box {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .equation-box p {
        font-size: 1.1rem;
    }
    
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem 15px;
    }
    
    nav ul {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .essay-header h1 {
        font-size: 1.8rem;
    }
    
    .essay-content ul {
        padding-left: 1.5rem;
    }
}