/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffffff;
    --text-landing: #ffffff;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
    height: 100%;
}

body {
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    background-image: url('images/background-image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Main content */
main {
    flex: 1;
    padding-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Posts container */
#posts-container {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.post-card {
    background-color: transparent;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: none;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.post-card:hover img {
    transform: scale(1.02);
}

.post-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.post-card .post-date {
    color: var(--primary-color--);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-card .post-excerpt {
    color: var(--primary-color);
    line-height: 1.6;
}

/* Post page */
#post-container {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 3rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.post-header .post-date {
    color: var(--primary-color);
    font-size: 1rem;
}

.post-content {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #ffffff;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.post-content h1 {
    font-size: 2rem;
}

.post-content h2 {
    font-size: 1.75rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.post-content a:hover {
    border-bottom-color: var(--primary-color);
}

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

.back-link {
    margin-top: 0;
    padding-top: 2rem;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-link a img {
    display: block;
    width: auto;
    height: auto;
    max-width: 200px;
    transition: transform 0.3s ease;
}

.back-link a:hover img,
.back-link a:focus img {
    transform: translateY(-2px);
    outline: none;
}

.back-link a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.back-link a:active img {
    transform: translateY(0);
}

/* Loading state */
.loading {
    text-align: center;
    color: var(--primary-color);
    padding: 2rem;
}

/* Footer */
footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Landing page styles */
.landing-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-landing);
    letter-spacing: 0.05em;
}

.landing-button {
    display: inline-block;
    padding: 0;
    background: none;
    text-decoration: none;
    transition: all 0.3s ease;
}

.landing-button img {
    display: block;
    width: auto;
    height: auto;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.landing-button:hover img,
.landing-button:focus img {
    transform: translateY(-2px);
    outline: none;
}

.landing-button:focus {
    outline: 2px solid var(--text-landing);
    outline-offset: 4px;
    border-radius: 4px;
}

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

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .post-card,
    #post-container {
        padding: 1.5rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    main {
        min-height: 100vh;
        padding: 2rem 0;
    }

    #posts-container {
        gap: 1.5rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .landing-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .landing-button img {
        max-width: 225px;
    }

    /* Fix background image on mobile */
    html {
        height: 100%;
    }

    body {
        background-attachment: scroll;
        background-size: cover;
        height: 100%;
    }
}

