/* post.css — blog post layout. Shared chrome lives in theme.css. */

/* Long-form reading: brighter body text than the shared default */
:root { --ink-dim: #b7b7c4; }
:root[data-theme="light"] { --ink-dim: #3f3f4a; }

body { line-height: 1.7; padding: clamp(20px, 4vw, 44px); }

/* aurora blobs */
.aurora span { opacity: 0.38; filter: blur(100px); }
.aurora .b1 { width: 42vw; height: 42vw; left: -10vw; top: -12vw; background: #5b3bff; animation: drift1 26s ease-in-out infinite; }
.aurora .b2 { width: 38vw; height: 38vw; right: -10vw; top: 30vw; background: #0e7490; animation: drift2 30s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(5vw,4vw) scale(1.1); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vw,5vw) scale(1.12); } }

/* Reading progress bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 50; background: var(--grad); box-shadow: 0 0 12px rgba(139,123,255,0.6); }

.container { max-width: 820px; margin: 0 auto 90px; }

.back-link { margin-bottom: 26px; }

header.post-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.flags { display: flex; gap: 10px; flex-wrap: wrap; }
.flag-dev {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    padding: 7px 12px; border-radius: 999px;
    background: rgba(255,176,32,0.14); border: 1px solid rgba(255,176,32,0.4); color: #ffcd6b;
}
header.post-head h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 600;
    letter-spacing: -0.02em; line-height: 1.08;
}
.post-head .meta { gap: 18px; font-size: 0.85rem; color: var(--ink-dimmer); }

/* Hero gallery */
.hero {
    margin: 8px 0 40px; border-radius: 22px; overflow: hidden;
    border: 1px solid var(--border);
}
.gallery {
    display: flex; gap: 16px; padding: 18px;
    background:
        radial-gradient(circle at 18% 10%, rgba(139,123,255,0.4) 0, transparent 34%),
        radial-gradient(circle at 82% 0%, rgba(34,211,238,0.32) 0, transparent 30%),
        linear-gradient(135deg, #0d1224 0%, #0a0f1e 50%, #0b0d1f 100%);
    overflow-x: auto; scroll-snap-type: x mandatory;
}
.gallery figure { flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gallery img {
    width: auto; height: min(560px, 64vh); max-width: 78vw;
    object-fit: contain; border-radius: 18px;
    border: 1px solid var(--border-hi);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.gallery figcaption { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--ink-dimmer); letter-spacing: 0.05em; }
.gallery::-webkit-scrollbar { height: 10px; }
.gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.swipe-hint { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--ink-dimmer); margin-top: -28px; margin-bottom: 40px; }

article { display: flex; flex-direction: column; gap: 20px; }
.section {
    padding: 26px 28px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--border);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.section h2 {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 600;
    margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.section h2 ion-icon { color: var(--cyan); font-size: 1.3rem; }
.section p { color: var(--ink-dim); }
.section p + p { margin-top: 12px; }
.section strong { color: var(--ink); font-weight: 600; }
.section ul { padding-left: 4px; margin-top: 12px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.section li { position: relative; padding-left: 26px; color: var(--ink-dim); }
.section li::before {
    content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px;
    background: var(--grad);
}

.lead-section { border-left: 2px solid transparent; border-image: var(--grad) 1; }
.lead-section p:first-child { font-size: 1.12rem; color: var(--ink); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pillar h3 {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 600; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.pillar h3 ion-icon { font-size: 1.15rem; }
.pillar.student h3 ion-icon { color: var(--mint); }
.pillar.sensei h3 ion-icon { color: var(--violet); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.end-note { text-align: center; color: var(--ink-dimmer); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; margin-top: 12px; }
.end-note a { color: var(--cyan); text-decoration: none; }

/* --- Light mode --- */
:root[data-theme="light"] .section h2 { color: var(--violet); }
:root[data-theme="light"] .pillar.student h3 { color: #0f7a53; }
:root[data-theme="light"] .pillar.sensei h3 { color: var(--violet); }
:root[data-theme="light"] .lead-section p:first-child { color: #241a4d; }

@media (max-width: 720px) {
    .split { grid-template-columns: 1fr; }
    .post-head .meta { gap: 12px; }
}
