/* ─────────────────────────────────────────────
   WIN SHEIN's Diary — Single Post Page
   Aesthetic: Warm Editorial × Literary Journal
   Pairs with: style.css
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,600&family=Lora:ital,wght@0,400;0,500;1,400;1,500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Tokens ── */
:root {
    --primary:      #8B5E3C;
    --accent:       #C9956A;
    --accent-deep:  #A0714A;
    --accent-light: rgba(201,149,106,0.10);

    --text-main:    #2C1A0E;
    --text-body:    #3D2A1A;
    --text-muted:   #9C7B63;
    --text-faint:   #C2A98A;

    --bg-body:      #FBF5EC;
    --bg-card:      #FFFDF8;
    --border:       rgba(139,94,60,0.12);

    --shadow-sm:    0 2px 12px rgba(44,26,14,0.07);
    --shadow-md:    0 8px 32px rgba(44,26,14,0.10);

    --radius-lg:    18px;
    --radius-md:    10px;
    --transition:   0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reading Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    z-index: 1000;
    transition: width 0.1s linear;
}

/* ── Sticky Header ── */
.post-header {
    position: sticky;
    top: 0; z-index: 100;
    background: rgba(251, 245, 236, 0.92);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), padding var(--transition);
    padding: 0 24px;
}

.post-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.post-header-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.back-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.back-btn:hover {
    color: var(--primary);
    background: var(--accent-light);
    border-color: var(--border);
}

/* Header meta badges */
.header-meta { display: flex; align-items: center; gap: 8px; }

.read-time-badge,
.view-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    background: rgba(139,94,60,0.06);
    border: 1px solid var(--border);
    padding: 5px 11px;
    border-radius: 20px;
}

/* ── Main Layout ── */
.post-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 100px;
}

/* ── Article ── */
.post-article {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Eyebrow: category + date */
.article-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-family: 'DM Sans', sans-serif;
}

.article-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid rgba(201,149,106,0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.eyebrow-dot { color: var(--text-faint); font-size: 14px; }

.article-date {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* Title */
.article-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin-bottom: 18px;
}

/* Subtitle / Excerpt */
.article-excerpt {
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    font-style: italic;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    padding-left: 18px;
    border-left: 2px solid rgba(201,149,106,0.4);
}

/* Ornamental rule */
.article-rule {
    text-align: center;
    margin: 28px 0 36px;
    position: relative;
}

.article-rule::before,
.article-rule::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border);
}

.article-rule::before { left: 0; }
.article-rule::after  { right: 0; }

.rule-ornament {
    font-size: 20px;
    color: var(--text-faint);
    display: inline-block;
    line-height: 1;
    position: relative;
    z-index: 1;
    background: var(--bg-body);
    padding: 0 12px;
}

/* Cover Image */
.article-cover {
    margin: 0 0 48px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.article-cover img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-cover:hover img { transform: scale(1.02); }

/* ── Article Body Typography ── */
.article-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.9;
    color: var(--text-body);
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    margin: 1.8em 0 0.6em;
    line-height: 1.3;
}

.article-body h2 { font-size: 26px; font-weight: 600; }
.article-body h3 { font-size: 21px; font-weight: 600; }

.article-body blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(201,149,106,0.06);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.8;
}

.article-body blockquote p { margin-bottom: 0; }

.article-body a {
    color: var(--accent-deep);
    text-decoration: underline;
    text-decoration-color: rgba(160,113,74,0.35);
    text-underline-offset: 3px;
    transition: color var(--transition), text-decoration-color var(--transition);
}

.article-body a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

.article-body img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}

.article-body ul,
.article-body ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.article-body li { margin-bottom: 0.4em; }

.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5em 0;
}

.article-body strong { color: var(--text-main); font-weight: 600; }

/* ── Tags ── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.atag {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    background: rgba(139,94,60,0.06);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
    transition: all var(--transition);
    cursor: default;
}

.atag:hover {
    background: var(--accent-light);
    border-color: rgba(201,149,106,0.25);
    color: var(--accent-deep);
}

/* ── Author Bar ── */
.author-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding: 22px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.author-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9956A 0%, #8B5E3C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-style: italic;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(139,94,60,0.25);
}

.author-name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 3px;
}

.author-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
}

/* ── Prev / Next Navigation ── */
.post-nav {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.post-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.nav-post {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.nav-post:hover {
    border-color: rgba(201,149,106,0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.nav-prev { text-align: left; }
.nav-next { text-align: right; }

.nav-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.nav-next .nav-label { flex-direction: row-reverse; }

.nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .post-main { padding: 40px 18px 80px; }
    .article-cover img { height: 240px; }
    .article-body { font-size: 16px; }
    .article-title { font-size: 28px; }
    .post-nav-inner { grid-template-columns: 1fr; }
    .nav-next { text-align: left; }
    .nav-next .nav-label { flex-direction: row; }
}