/* Blog CSS — matches huyhungstory.com design system */
/* Dark theme, Playfair+Inter, glassmorphism, orbs */

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

:root {
    --bg: #050507;
    --bg-secondary: #0a0a0f;
    --text: #f5f5fa;
    --text-muted: #8888a0;
    --accent: #a78bfa;
    --accent-light: #c4b5fd;
    --accent-dark: #7c3aed;
    --warm: #d4a574;
    --warm-light: #e8c9a0;
    --border: rgba(255,255,255,0.08);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 1000;
}

/* Background orbs */
.bg-effects {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
    filter: blur(140px);
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px; height: 500px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    top: -200px; right: -200px;
}

.orb-2 {
    width: 400px; height: 400px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3), rgba(245, 87, 108, 0.3));
    bottom: 10%; left: -200px;
    animation-delay: -10s;
}

.orb-3 {
    width: 300px; height: 300px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.3), rgba(0, 242, 254, 0.3));
    top: 40%; right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(50px, -50px) scale(1.1) rotate(5deg); }
    50% { transform: translate(-30px, 30px) scale(0.95) rotate(-5deg); }
    75% { transform: translate(-50px, -30px) scale(1.05) rotate(3deg); }
}

/* Navigation — glassmorphism */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 24px;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }

/* Language toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 3px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.lang-btn:hover:not(.active) { color: var(--text); }
.lang-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: white;
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Containers */
section { position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: white;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 0 6px 25px rgba(167, 139, 250, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.12);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.2);
}

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* Blog Hero */
.blog-hero {
    padding: 140px 24px 60px;
    text-align: center;
}

.blog-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.blog-hero-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Category nav */
.category-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.category-pill:hover, .category-pill.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
}

/* Post card grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.post-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
    opacity: 0.7;
}

/* Category badges */
.post-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-decoration: none;
    width: fit-content;
}

.cat-letter { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.cat-photo { background: rgba(79, 172, 254, 0.15); color: #4facfe; }
.cat-travel { background: rgba(67, 233, 123, 0.15); color: #43e97b; }
.cat-story { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cat-ngoiday { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.cat-photoshoot { background: rgba(240, 147, 251, 0.15); color: #f093fb; }
.cat-share { background: rgba(212, 165, 116, 0.15); color: #d4a574; }
.cat-ai { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.cat-default { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 80px;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Article styles */
.post-article {
    padding-top: 120px;
    padding-bottom: 60px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-hero-image {
    margin: 0 -24px 40px;
    border-radius: 16px;
    overflow: hidden;
}

.post-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Prose content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
}

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

.post-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin: 2em 0 0.8em;
}

.post-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin: 1.5em 0 0.6em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    display: block;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin: 2em 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: var(--accent-light);
}

.post-content strong { font-weight: 600; }

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

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

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3em 0;
}

/* Post footer — share buttons */
.post-footer {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 60px;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.share-buttons span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.share-buttons a, .share-buttons button {
    color: var(--accent);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.share-buttons a:hover, .share-buttons button:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: var(--accent);
}

/* Newsletter */
.newsletter-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin: 48px 0;
    text-align: center;
}

.newsletter-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.newsletter-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--accent);
}

/* Comments */
.comments-section {
    margin-top: 48px;
}

.comments-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 24px;
}

/* Related posts */
.related-posts {
    padding: 80px 24px;
    background: var(--bg-secondary);
}

.related-posts h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Footer */
footer {
    padding: 60px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content { max-width: 600px; margin: 0 auto; }

.footer-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-links span { color: var(--border); }

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
}

.search-modal.open { display: flex; justify-content: center; padding-top: 15vh; }

.search-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.search-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 60vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.search-header input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.search-header input:focus { border-color: var(--accent); }

.search-close {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-close:hover { color: var(--text); border-color: var(--text-muted); }

.search-results {
    overflow-y: auto;
    padding: 16px;
}

.search-result {
    display: block;
    padding: 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
    margin-bottom: 4px;
}

.search-result:hover { background: rgba(255,255,255,0.05); }
.search-result h4 { font-size: 1rem; margin-bottom: 4px; }
.search-result p { font-size: 0.85rem; color: var(--text-muted); }

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Blog listing section */
.blog-listing {
    padding: 0 24px 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(5, 5, 7, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 16px;
    }
    .nav-links.open { display: flex; }
    .lang-toggle { padding: 2px; }
    .lang-btn { padding: 5px 10px; font-size: 0.7rem; }

    .blog-hero-title { font-size: 2.2rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }

    .post-header h1 { font-size: 2rem; }
    .post-content { font-size: 1rem; }
    .newsletter-form { flex-direction: column; }
    .share-buttons { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .blog-hero { padding: 120px 16px 40px; }
    .blog-hero-title { font-size: 1.8rem; }
    .post-card-body { padding: 16px; }
    .post-card-body h3 { font-size: 1.1rem; }
}
