/* ======================== BLOG STYLES ======================== */
:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --pure-white: #ffffff;
    --pure-black: #000000;
    --gray: #667085;
    --gray-light: #475467;
    --gray-dark: #98a2b3;
    --dim: #f7faff;
    --card: rgba(255, 255, 255, 0.82);
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --font: 'PP Neue Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url('../ppneuemontreal-thin.otf') format('opentype');
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../ppneuemontreal-book.otf') format('opentype');
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../ppneuemontreal-medium.otf') format('opentype');
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../ppneuemontreal-bold.otf') format('opentype');
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../ppneuemontreal-italic.otf') format('opentype');
}

@font-face {
    font-family: 'PP Neue Montreal';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('../ppneuemontreal-semibolditalic.otf') format('opentype');
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--white);
    color: #101828;
    line-height: 1.6;
    overflow-x: clip;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: 8%;
    left: -8%;
    width: 52%;
    height: 48%;
    background:
        radial-gradient(ellipse at 35% 35%, rgba(190, 140, 255, 0.16) 0%, transparent 58%),
        radial-gradient(ellipse at 70% 60%, rgba(80, 190, 255, 0.12) 0%, transparent 52%);
}

body::after {
    right: -8%;
    bottom: 4%;
    width: 48%;
    height: 48%;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(255, 170, 100, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse at 30% 55%, rgba(130, 240, 200, 0.12) 0%, transparent 52%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ======================== NAV ======================== */
.blog-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between;
    transition: var(--transition);
}
.blog-nav.scrolled {
    background: rgba(255,255,255,0.78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.blog-nav-back {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem;
    color: var(--gray-light); transition: color 0.3s;
}
.blog-nav-back:hover { color: #101828; }
.blog-nav-back svg { width: 18px; height: 18px; }
.blog-nav-logo img { height: 28px; }
.blog-nav-contact {
    font-size: 0.85rem; color: var(--gray-light); padding: 0.4rem 1rem;
    border: 1px solid var(--border); border-radius: 999px; transition: all 0.3s;
    background: rgba(255,255,255,0.72);
}
.blog-nav-contact:hover { color: #101828; border-color: rgba(59,130,246,0.22); }

/* ======================== HERO ======================== */
.blog-hero {
    padding: 10rem 0 4rem; text-align: center;
}
.blog-hero-label {
    display: inline-block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--accent); margin-bottom: 1rem;
}
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; margin-bottom: 1rem; color: #101828; }
.blog-hero-desc { max-width: 600px; margin: 0 auto; color: var(--gray-light); font-size: 1.05rem; }

/* ======================== BLOG GRID ======================== */
.blog-grid-section { padding: 2rem 0 6rem; }
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}
.blog-loading, .blog-empty { grid-column: 1 / -1; padding: 3rem; text-align: center; color: var(--gray-light); }

.blog-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.blog-card:hover { border-color: rgba(59,130,246,0.16); transform: translateY(-4px); }
.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.blog-card-tag {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--accent); background: rgba(59,130,246,0.1); padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.blog-card-title {
    font-size: 1.15rem; font-weight: 500; margin-bottom: 0.5rem; line-height: 1.4; color: #101828;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
    font-size: 0.9rem; color: var(--gray-light); flex: 1; margin-bottom: 1rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--gray); }
.blog-card-read {
    color: var(--accent-light); font-weight: 500; display: flex; align-items: center; gap: 0.3rem;
    transition: color 0.3s;
}
.blog-card:hover .blog-card-read { color: var(--accent-dark); }

/* Load more */
.blog-load-more { display: none; text-align: center; margin-top: 2rem; }
.blog-load-btn {
    padding: 0.75rem 2rem; background: rgba(255,255,255,0.82); border: 1px solid var(--border);
    border-radius: 10px; color: #101828; font-family: var(--font); font-size: 0.9rem;
    cursor: pointer; transition: all 0.3s;
}
.blog-load-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ======================== POST PAGE ======================== */
.post-hero { padding: 10rem 0 3rem; text-align: center; }
.post-hero-label { display: inline-block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 1rem; }
.post-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; margin-bottom: 1rem; max-width: 800px; margin-left: auto; margin-right: auto; color: #101828; }
.post-hero-meta { color: var(--gray-light); font-size: 0.9rem; }
.post-hero-meta span + span::before { content: '·'; margin: 0 0.5rem; }

.post-content {
    max-width: 720px; margin: 0 auto; padding: 0 2rem 6rem; font-size: 1.05rem; line-height: 1.9; color: #101828;
}
.post-content h2 { font-size: 1.5rem; font-weight: 600; margin: 2.5rem 0 1rem; color: #101828; }
.post-content h3 { font-size: 1.2rem; font-weight: 500; margin: 2rem 0 0.75rem; color: #101828; }
.post-content p { margin-bottom: 1.5rem; color: var(--gray-light); }
.post-content a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--gray-light); }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote { border-left: 3px solid var(--accent); padding: 1rem 1.5rem; margin: 1.5rem 0; background: rgba(59,130,246,0.06); border-radius: 0 8px 8px 0; color: var(--gray-light); }
.post-content pre { background: #f5f7fb; padding: 1.5rem; border-radius: 10px; overflow-x: auto; margin-bottom: 1.5rem; font-size: 0.9rem; border: 1px solid var(--border); }
.post-content img { border-radius: 12px; margin: 2rem 0; box-shadow: var(--shadow); }

/* CTA at end of post */
.post-cta {
    max-width: 720px; margin: 0 auto 4rem; padding: 2.5rem; text-align: center;
    background: rgba(255,255,255,0.82); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.post-cta h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 0.5rem; color: #101828; }
.post-cta p { color: var(--gray-light); margin-bottom: 1.5rem; }
.post-cta-btn {
    display: inline-block; padding: 0.75rem 2rem; background: var(--accent);
    color: var(--pure-white); border-radius: 10px; font-weight: 500; transition: background 0.3s;
}
.post-cta-btn:hover { background: var(--accent-dark); }

/* ======================== FOOTER ======================== */
.blog-footer { padding: 2rem 0; border-top: 1px solid var(--border); }
.blog-footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--gray); }
.blog-footer-links { display: flex; gap: 1.5rem; }
.blog-footer-links a { color: var(--gray-light); transition: color 0.3s; }
.blog-footer-links a:hover { color: #101828; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }

    .blog-nav { padding: 1rem 1.25rem; }
    .blog-nav-back svg { width: 16px; height: 16px; }
    .blog-nav-contact { min-height: 44px; display: inline-flex; align-items: center; -webkit-tap-highlight-color: transparent; }

    .blog-hero { padding: 8rem 0 3rem; }
    .blog-hero h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); }
    .blog-hero-desc { font-size: 0.95rem; padding: 0 0.5rem; }

    .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    .blog-card { border-radius: 14px; }
    .blog-card-body { padding: 1.25rem; }
    .blog-card-title { font-size: 1.05rem; }
    .blog-card-excerpt { font-size: 0.85rem; }

    .blog-load-btn { min-height: 48px; padding: 0.85rem 2rem; -webkit-tap-highlight-color: transparent; }

    /* Post page */
    .post-hero { padding: 8rem 0 2.5rem; }
    .post-hero h1 { font-size: clamp(1.4rem, 5vw, 2.2rem); padding: 0 0.5rem; }
    .post-hero-meta { font-size: 0.82rem; }

    .post-content { padding: 0 1.25rem 4rem; font-size: 1rem; line-height: 1.85; }
    .post-content h2 { font-size: 1.3rem; }
    .post-content h3 { font-size: 1.1rem; }
    .post-content pre { font-size: 0.82rem; padding: 1.25rem; }
    .post-content blockquote { padding: 0.85rem 1.25rem; }

    .post-cta { margin: 0 1.25rem 3rem; padding: 2rem 1.5rem; }
    .post-cta h3 { font-size: 1.15rem; }
    .post-cta-btn { min-height: 48px; display: inline-flex; align-items: center; }

    .blog-footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
    .blog-hero { padding: 7rem 0 2.5rem; }
    .blog-hero h1 { font-size: clamp(1.4rem, 7vw, 2rem); }

    .blog-card-body { padding: 1rem; }
    .blog-card-tag { font-size: 0.65rem; }

    .post-content { font-size: 0.95rem; line-height: 1.8; }
    .post-content h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
}
