/* ABOUTME: Tumblr-inspired dark gallery theme for the kawaii art blog. */
/* ABOUTME: Single-column layout, serif typography, warm accents on charcoal. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #141214;
    --card-bg: #1e1c1f;
    --card-border: #2a272c;
    --text: #e8e0d8;
    --text-muted: #9a918a;
    --accent: #c89b7b;
    --accent-soft: rgba(200, 155, 123, 0.15);
    --serif: 'Cormorant Garamond', 'Georgia', serif;
    --sans: 'Inter', -apple-system, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */

.site-header {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    border-bottom: 1px solid var(--card-border);
}

.header-inner {
    max-width: 600px;
    margin: 0 auto;
}

.site-title {
    font-family: var(--serif);
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.site-subtitle {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Gallery / Posts --- */

.gallery {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image posts */

.post-image-wrap {
    position: relative;
    background: #0a0a0a;
    cursor: pointer;
}

.post-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.4s ease;
}

.post-image-wrap img.loading {
    opacity: 0;
    min-height: 400px;
}

.post-image-wrap img.loaded {
    opacity: 1;
}

.post-info {
    padding: 1.2rem 1.5rem;
}

.post-artist {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.post-artist-ja {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.post-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.post-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--card-border);
}

/* Text / essay posts */

.post.post-essay {
    border-left: 3px solid var(--accent);
}

.post-essay-body {
    padding: 2rem 1.8rem;
}

.post-essay-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.post-essay-title-ja {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.post-essay-author {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.post-essay-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.9;
}

.post-essay-text p {
    margin-bottom: 1rem;
}

.post-essay-text p:last-child {
    margin-bottom: 0;
}

/* Section divider posts */

.post.post-section {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    text-align: center;
    padding: 3rem 2rem;
}

.post-section-title {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.post-section-subtitle {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
}

/* --- Lightbox --- */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 2px;
}

/* --- Loader --- */

.loader {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 2rem;
}

.loader.hidden {
    display: none;
}

.loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.2s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

/* --- Footer --- */

.site-footer {
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-jp {
    font-family: var(--serif);
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.5rem;
    letter-spacing: 0.15em;
}

/* --- Responsive --- */

@media (max-width: 720px) {
    .site-title {
        font-size: 3.5rem;
    }

    .gallery {
        padding: 1.5rem 0.5rem;
    }

    .post-info {
        padding: 1rem 1.2rem;
    }

    .post-essay-body {
        padding: 1.5rem 1.2rem;
    }
}
