* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: #1a1a1a;
    background: #f5f5f0;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #f5f5f0;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

header p {
    font-size: 1.1rem;
    opacity: 0.85;
    font-style: italic;
    letter-spacing: 1px;
}

nav {
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e0e0e0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

nav a:hover {
    color: #7f8c8d;
}

.container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.poem-card {
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e8e8e8;
}

.poem-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.poem-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.poem-card:hover .poem-cover {
    filter: grayscale(0%);
}

.poem-info {
    padding: 2rem;
    background: #fafafa;
}

.poem-title {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.poem-date {
    color: #7f8c8d;
    font-size: 0.85rem;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.poem-excerpt {
    margin-top: 1.2rem;
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.7;
    border-left: 2px solid #bdc3c7;
    padding-left: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 0;
    border-radius: 0;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideIn 0.4s;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    position: relative;
    border-bottom: 3px solid #2c3e50;
}

.modal-cover {
    width: 100%;
    height: 350px;
    object-fit: cover;
    filter: grayscale(10%);
}

.close {
    position: absolute;
    top: 25px;
    right: 25px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    background: rgba(44, 62, 80, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    line-height: 1;
}

.close:hover {
    background: rgba(44, 62, 80, 1);
}

.modal-body {
    padding: 3rem;
    background: #fafafa;
}

.modal-title {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.modal-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-poem {
    font-size: 1.25rem;
    line-height: 2.3;
    white-space: pre-line;
    color: #2c3e50;
    font-family: 'Georgia', serif;
}

footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2.5rem;
    margin-top: 5rem;
}

footer p {
    opacity: 0.85;
    letter-spacing: 0.5px;
}

footer p:first-child {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    .poems-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-body {
        padding: 2rem;
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-poem {
        font-size: 1.1rem;
    }
}