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

:root {
    --bg: #0f1a0a;
    --bg-card: #1a2812;
    --text: #d4d4c8;
    --text-dim: #8a8a7a;
    --accent: #7cb342;
    --accent-dim: #558b2f;
    --border: #2a3a1e;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
}

.header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.1rem;
    font-weight: normal;
}

header h1 a {
    color: var(--text);
}

nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

nav a {
    color: var(--text-dim);
}

.login-link {
    color: var(--bg) !important;
    font-size: 0.5rem;
    user-select: none;
}

.login-link:hover {
    color: var(--text-dim) !important;
    text-decoration: none;
}

/* Hero */
.hero {
    padding: 4rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

.hero h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #e8e8d8;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Posts */
.posts {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.post {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.post:last-child {
    border-bottom: none;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.post h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #e8e8d8;
    line-height: 1.4;
}

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

.post ul, .post ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

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

.facts-list li {
    margin-bottom: 0.8rem;
}

.post-footer {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-dim);
}

/* Gallery */
.gallery {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    overflow: visible;
}

.gallery h3 {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    color: #e8e8d8;
}

/* 3D Cylinder Carousel */
.carousel-container {
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    overflow: hidden;
    cursor: default;
    -webkit-user-select: none;
    user-select: none;
}

.carousel-ring {
    position: relative;
    width: 240px;
    height: 340px;
    transform-style: preserve-3d;
}

.carousel-card {
    position: absolute;
    width: 240px;
    height: 340px;
    transform-style: preserve-3d;
}

.carousel-card-front,
.carousel-card-back {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(124, 179, 66, 0.15);
}

.carousel-card-front {
    position: relative;
}

.carousel-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(124, 179, 66, 0.4);
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: auto;
}

.carousel-card:hover .carousel-expand-btn {
    opacity: 1;
}

.carousel-expand-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.carousel-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #1a2812 0%, #0f1a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 179, 66, 0.2);
}

.carousel-card-monogram {
    font-size: 48px;
    opacity: 0.3;
}

.carousel-expanded-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: carousel-overlay-in 0.3s ease;
}

@keyframes carousel-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.carousel-expanded-card {
    width: min(85vw, 500px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    animation: carousel-expand-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    background: var(--bg-card);
}

.carousel-expanded-card img {
    width: 100%;
    display: block;
}

.carousel-expanded-caption {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: center;
}

@keyframes carousel-expand-in {
    from { transform: scale(0.5) rotateY(30deg); opacity: 0; }
    to { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.carousel-collapse-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(124, 179, 66, 0.4);
    color: var(--accent);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 5;
}

.carousel-collapse-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* About */
.about {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
}

.about h3 {
    margin-bottom: 1rem;
    color: #e8e8d8;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding: 2rem 0;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-small {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h2 {
        font-size: 1.5rem;
    }

    nav {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .carousel-container {
        height: 360px;
    }

    .carousel-ring {
        width: 180px;
        height: 260px;
    }

    .carousel-card {
        width: 180px;
        height: 260px;
    }

    .carousel-expand-btn {
        opacity: 0.7;
    }
}
