/* =========================================================
   POST PAGE STYLES
   Extends ../styles.css — place both links in post pages:
     <link rel="stylesheet" href="../styles.css">
     <link rel="stylesheet" href="post.css">
   ========================================================= */

/* ── Back Navigation ─────────────────────────────────── */
.post-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2.5rem;
    position: relative;
    z-index: 3;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s ease, gap 0.3s ease;
}

.back-link:hover {
    color: #ff00ff;
    gap: 0.8rem;
}

.back-link svg {
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-4px);
}

.post-site-name {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff00ff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* ── Post Wrapper ────────────────────────────────────── */
.post-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
    position: relative;
    z-index: 3;
}

/* ── Post Header ─────────────────────────────────────── */
.post-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.post-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff00ff;
    border: 1px solid rgba(255, 0, 255, 0.35);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    background: rgba(255, 0, 255, 0.07);
}

.post-read-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
}

.post-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.post-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 1.8rem;
    font-weight: 300;
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.3);
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.post-author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.post-date {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* horizontal rule under header */
.post-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.5), rgba(255, 0, 255, 0.4), transparent);
    margin: 2rem 0;
}

/* ── Post Hero Image ──────────────────────────────────── */
.post-hero {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.2);
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(138,43,226,0.25) 0%, rgba(255,0,255,0.1) 50%, rgba(10,10,20,0.95) 100%);
    position: relative;
}

.post-hero-text {
    font-size: 4rem;
    opacity: 0.25;
    user-select: none;
}

/* ── Post Body Typography ─────────────────────────────── */
.post-body {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.85;
    user-select: text;
}

.post-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 2.5rem 0 1rem;
    letter-spacing: 0.02em;
}

.post-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 2rem 0 0.8rem;
}

.post-body p {
    margin-bottom: 1.3rem;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.3rem 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body a {
    color: #ff00ff;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.post-body a:hover {
    color: #8a2be2;
}

.post-body strong {
    color: #fff;
    font-weight: 600;
}

.post-body em {
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}

/* Blockquote */
.post-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid #ff00ff;
    background: rgba(255, 0, 255, 0.05);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Code inline */
.post-body code {
    background: rgba(138, 43, 226, 0.18);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 4px;
    padding: 0.15em 0.45em;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    color: #e0aaff;
}

/* Code block */
.post-body pre {
    background: rgba(10, 5, 20, 0.85);
    border: 1px solid rgba(138, 43, 226, 0.25);
    border-radius: 10px;
    padding: 1.4rem 1.6rem;
    overflow-x: auto;
    margin: 1.8rem 0;
    position: relative;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

.post-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: #c9b8ff;
    line-height: 1.7;
}

/* Code block header label */
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 0.5rem 1.2rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-header + pre {
    border-radius: 0 0 10px 10px;
    margin-top: 0;
}

/* Callout / tip box */
.post-callout {
    border: 1px solid rgba(138, 43, 226, 0.35);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    background: rgba(138, 43, 226, 0.07);
    margin: 2rem 0;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.97rem;
    line-height: 1.7;
}

.post-callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ── Tags Footer ─────────────────────────────────────── */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 3rem;
}

.post-tag {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.post-tag:hover {
    border-color: rgba(255, 0, 255, 0.4);
    color: #ff00ff;
    background: rgba(255, 0, 255, 0.06);
}

/* ── Post Footer / Bottom CTA ─────────────────────────── */
.post-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 3;
}

.post-footer-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 0, 255, 0.35);
    background: rgba(255, 0, 255, 0.07);
    color: #ff00ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.post-back-btn:hover {
    background: rgba(255, 0, 255, 0.14);
    border-color: rgba(255, 0, 255, 0.6);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
    transform: translateY(-2px);
}

.post-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .post-nav {
        padding: 0.9rem 1.2rem;
    }

    .post-site-name {
        font-size: 0.85rem;
    }

    .post-wrapper {
        padding: 1.5rem 1.2rem 5rem;
    }

    .post-title {
        font-size: 1.65rem;
    }

    .post-subtitle {
        font-size: 1rem;
    }

    .post-hero {
        aspect-ratio: 16 / 8;
        margin-bottom: 2rem;
    }

    .post-hero-text {
        font-size: 2.5rem;
    }

    .post-body {
        font-size: 1rem;
    }

    .post-body h2 {
        font-size: 1.3rem;
    }

    .post-body h3 {
        font-size: 1.1rem;
    }

    .post-body pre {
        padding: 1rem 1rem;
        font-size: 0.82rem;
    }

    .post-body blockquote {
        padding: 0.9rem 1.1rem;
        font-size: 0.97rem;
    }

    .post-callout {
        padding: 1rem 1.1rem;
        font-size: 0.93rem;
    }

    .post-footer {
        margin-top: 3rem;
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    .post-nav {
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }

    .back-link {
        font-size: 0.78rem;
    }

    .post-wrapper {
        padding: 1.2rem 1rem 4rem;
    }

    .post-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .post-subtitle {
        font-size: 0.93rem;
    }

    .post-meta-top {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .post-body {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .post-body h2 {
        font-size: 1.2rem;
        margin: 2rem 0 0.8rem;
    }

    .post-body pre {
        padding: 0.9rem;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    .code-header {
        font-size: 0.68rem;
        padding: 0.4rem 0.9rem;
    }

    .post-author-avatar {
        width: 34px;
        height: 34px;
    }

    .post-author-name {
        font-size: 0.82rem;
    }

    .post-date {
        font-size: 0.72rem;
    }

    .post-tags {
        gap: 0.45rem;
        margin-top: 2rem;
    }

    .post-tag {
        font-size: 0.68rem;
        padding: 0.25rem 0.65rem;
    }

    .post-back-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.8rem;
    }
}
