/* ==================================================================
   SINGLE POST v2 — editorial layout
   - 2 columns: main + sticky sidebar (author card + TOC)
   - Portrait featured image, single inline image mid-article
   ================================================================== */

.h-single {
    padding: 48px 0 72px;
    background: var(--h-bg);
    color: var(--h-text);
}
/* Override the narrow 680px default .container width for editorial single posts */
.h-single > .container,
.h-single__wrap {
    max-width: 1320px;
    padding-left: 32px;
    padding-right: 32px;
}
.h-single__wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: stretch;
}
@media (max-width: 1100px) {
    .h-single > .container,
    .h-single__wrap { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 1024px) {
    .h-single__wrap { grid-template-columns: 1fr; gap: 32px; }
}

/* -------- Main column -------- */
.h-single__main { min-width: 0; }

.h-single__header { margin-bottom: 28px; }
.h-single__cat {
    display: inline-block;
    color: var(--h-primary);
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 16px;
}
.h-single__title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--h-text);
    margin: 0 0 20px;
}
.h-single__meta { display: flex; align-items: center; gap: 14px; }
.h-single__author {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.h-single__author img {
    width: 40px; height: 40px; border-radius: 9999px; object-fit: cover;
}
.h-single__author span { display: flex; flex-direction: column; }
.h-single__author strong {
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 700; font-size: 15px; color: var(--h-text);
}
.h-single__author em {
    font-style: normal;
    font-size: 13px; color: var(--h-muted);
    margin-top: 2px;
}

/* Cover — 3:4 portrait */
.h-single__cover {
    margin: 0 0 36px;
    aspect-ratio: 16/9;
    max-height: 560px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--h-border);
}
.h-single__cover picture, .h-single__cover img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}

/* -------- Article body / editorial prose -------- */
.h-single__body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.75;
    color: var(--h-text);
}
/* Cancel the 680px per-child cap that style.css applies via `.post-content > *` */
.h-single__body.post-content > *,
.h-single__body > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.h-single__body > * + * { margin-top: 1.2em; }
.h-single__body p { margin: 0; }
.h-single__body p + p { margin-top: 1.1em; }

.h-single__body h2 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 48px 0 18px;
    color: var(--h-text);
    scroll-margin-top: 120px;
}
.h-single__body h3 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 14px;
    color: var(--h-text);
}
.h-single__body h4 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 18px; font-weight: 600;
    margin: 24px 0 10px;
    color: var(--h-text);
}
.h-single__body a { color: var(--h-primary); text-decoration: underline; text-underline-offset: 3px; }
.h-single__body strong { color: var(--h-text); font-weight: 700; }
.h-single__body ul, .h-single__body ol { padding-left: 22px; margin: 0; }
.h-single__body ul li, .h-single__body ol li { margin: 8px 0; }
.h-single__body blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--h-primary);
    background: var(--h-bg-alt);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--h-text);
}
.h-single__body blockquote p { margin: 0; }
.h-single__body img { max-width: 100%; height: auto; border-radius: 10px; }
.h-single__body figure { margin: 32px 0; }
.h-single__body figure img { width: 100%; display: block; border-radius: 12px; }
.h-single__body figcaption { font-size: 13px; color: var(--h-muted); margin-top: 8px; text-align: center; }

/* Inline image — the mid-article figure (moved from top) */
.h-single__body .post-inline-figure {
    margin: 40px 0;
    border-radius: 14px;
    overflow: hidden;
}
.h-single__body .post-inline-figure img {
    width: 100%; height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

/* FAQ accordion */
.h-single__body details {
    border: 1px solid var(--h-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 10px 0;
    background: var(--h-bg-alt);
}
.h-single__body details + details { margin-top: 8px; }
.h-single__body details summary {
    cursor: pointer;
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 600;
    color: var(--h-text);
}
.h-single__body details[open] summary { margin-bottom: 8px; }

/* Tags */
.h-single__tags { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.h-single__tag {
    font-size: 13px;
    color: var(--h-muted);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--h-border);
    border-radius: 9999px;
    background: var(--h-bg-alt);
}
.h-single__tag:hover { color: var(--h-primary); border-color: var(--h-primary); }

/* ==================================================================
   Bottom author card
   ================================================================== */
.h-author-card {
    margin-top: 56px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    padding: 32px;
    background: var(--h-bg-alt);
    border-radius: 16px;
}
@media (max-width: 720px) {
    .h-author-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
}
.h-author-card__avatar {
    width: 84px; height: 84px;
    border-radius: 9999px;
    object-fit: cover;
    margin-bottom: 14px;
    display: block;
}
.h-author-card__label {
    font-size: 13px;
    color: var(--h-muted);
    font-family: 'Outfit', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
}
.h-author-card__name {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 22px; font-weight: 700;
    margin: 0 0 10px;
}
.h-author-card__name a { color: var(--h-text); text-decoration: none; }
.h-author-card__name a:hover { color: var(--h-primary); }
.h-author-card__bio {
    color: var(--h-muted);
    line-height: 1.6;
    font-size: 15px;
    margin: 0 0 18px;
}
.h-author-card__btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--h-border);
    border-radius: 8px;
    color: var(--h-text);
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.h-author-card__btn:hover { border-color: var(--h-primary); color: var(--h-primary); }

.h-author-card__head {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 15px;
    color: var(--h-muted);
    margin: 0 0 16px;
}
.h-author-card__list { list-style: none; margin: 0; padding: 0; }
.h-author-card__list li + li { margin-top: 12px; }
.h-author-card__post {
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.h-author-card__post img {
    width: 92px; height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.h-author-card__post span { display: flex; flex-direction: column; min-width: 0; }
.h-author-card__post strong {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 15px; font-weight: 600;
    color: var(--h-text);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.h-author-card__post em {
    font-style: normal;
    font-size: 12px;
    color: var(--h-muted);
}
.h-author-card__post:hover strong { color: var(--h-primary); }

/* ==================================================================
   Sticky sidebar
   ================================================================== */
.h-single__side { min-width: 0; }
.h-single__sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.h-aboutme__label {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--h-text);
    position: relative;
    padding-bottom: 10px;
}
.h-aboutme__label::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 44px; height: 3px;
    background: var(--h-primary);
    border-radius: 2px;
}
.h-aboutme__card {
    border: 1px solid var(--h-border);
    border-radius: 14px;
    padding: 20px;
    background: var(--h-bg);
}
.h-aboutme__hello {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--h-text);
}
.h-aboutme__bio {
    color: var(--h-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}
.h-aboutme__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.h-aboutme__follow { flex: 1; }
.h-aboutme__follow-label {
    display: inline-block;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--h-text);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--h-border);
    margin-bottom: 10px;
}
.h-aboutme__socials { display: flex; gap: 6px; }
.h-aboutme__socials a {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--h-border);
    border-radius: 5px;
    color: var(--h-text);
    transition: all 0.2s;
}
.h-aboutme__socials a:hover { background: var(--h-primary); color: #fff; border-color: var(--h-primary); }
.h-aboutme__socials svg { width: 13px; height: 13px; }
.h-aboutme__avatar {
    width: 90px; height: 90px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* TOC */
.h-toc__label {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--h-text);
    position: relative;
    padding-bottom: 10px;
}
.h-toc__label::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 44px; height: 3px;
    background: var(--h-primary);
    border-radius: 2px;
}
.h-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--h-border);
}
.h-toc li { margin: 0; }
.h-toc a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--h-text);
    font-size: 14px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all 0.2s;
}
.h-toc a:hover { color: var(--h-primary); }
.h-toc a.is-active {
    border-left-color: var(--h-primary);
    color: var(--h-primary);
    font-weight: 600;
    background: var(--h-bg-alt);
}
.h-toc__n {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 12px;
    color: var(--h-muted);
    font-weight: 600;
    min-width: 20px;
    padding-top: 1px;
}
.h-toc a.is-active .h-toc__n { color: var(--h-primary); }
.h-toc__t { flex: 1; min-width: 0; }

/* ==================================================================
   Related posts
   ================================================================== */
.h-related {
    padding: 64px 0;
    background: var(--h-bg-alt);
}
.h-related > .container { max-width: 1320px; padding-left: 32px; padding-right: 32px; }
.h-related__title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.015em;
    margin: 0 0 32px;
    color: var(--h-text);
}
.h-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .h-related__grid { grid-template-columns: 1fr; } }
.h-related__card { display: flex; flex-direction: column; gap: 12px; }
.h-related__img {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 12px;
    background: var(--h-border);
    position: relative;
}
.h-related__img picture, .h-related__img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s;
}
.h-related__card:hover .h-related__img img { transform: scale(1.05); }
.h-related__name {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}
.h-related__name a { color: var(--h-text); text-decoration: none; }
.h-related__name a:hover { color: var(--h-primary); }
.h-related__date { font-size: 13px; color: var(--h-muted); }

/* ==================================================================
   Comment form (guest-enabled)
   ================================================================== */
.h-commentform {
    margin-top: 32px;
    background: var(--h-bg-alt);
    border-radius: 16px;
    padding: 28px;
    max-width: 880px;
}
.h-commentform__title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--h-text);
}
.h-commentform__note {
    font-size: 13px;
    color: var(--h-muted);
    margin: 0 0 20px;
}
.h-commentform__req { color: var(--h-primary); }
.h-commentform__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 640px) { .h-commentform__row { grid-template-columns: 1fr; } }
.h-commentform__field { display: flex; flex-direction: column; margin-bottom: 16px; }
.h-commentform__row .h-commentform__field { margin-bottom: 0; }
.h-commentform__field label {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--h-text);
    margin-bottom: 6px;
}
.h-commentform__field input,
.h-commentform__field textarea {
    padding: 12px 14px;
    background: var(--h-bg);
    border: 1px solid var(--h-border);
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: var(--h-text);
    transition: border-color 0.2s;
    outline: none;
    resize: vertical;
}
.h-commentform__field input:focus,
.h-commentform__field textarea:focus { border-color: var(--h-primary); }
.h-commentform__submit {
    display: inline-block;
    padding: 12px 26px;
    margin-top: 4px;
    background: var(--h-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.h-commentform__submit:hover { background: var(--h-accent); }

html[data-theme="dark"] .h-commentform { background: var(--h-bg-alt) !important; }
html[data-theme="dark"] .h-commentform__title,
html[data-theme="dark"] .h-commentform__field label { color: var(--h-text) !important; }
html[data-theme="dark"] .h-commentform__field input,
html[data-theme="dark"] .h-commentform__field textarea {
    background: var(--h-bg) !important;
    border-color: var(--h-border) !important;
    color: var(--h-text) !important;
}

/* ==================================================================
   Dark mode
   ================================================================== */
html[data-theme="dark"] .h-single { background: var(--h-bg) !important; }
html[data-theme="dark"] .h-single__title,
html[data-theme="dark"] .h-single__author strong,
html[data-theme="dark"] .h-single__body,
html[data-theme="dark"] .h-single__body h2,
html[data-theme="dark"] .h-single__body h3,
html[data-theme="dark"] .h-single__body h4,
html[data-theme="dark"] .h-single__body strong,
html[data-theme="dark"] .h-aboutme__label,
html[data-theme="dark"] .h-aboutme__hello,
html[data-theme="dark"] .h-aboutme__follow-label,
html[data-theme="dark"] .h-toc__label,
html[data-theme="dark"] .h-toc a,
html[data-theme="dark"] .h-author-card__name a,
html[data-theme="dark"] .h-author-card__post strong,
html[data-theme="dark"] .h-author-card__btn,
html[data-theme="dark"] .h-related__title,
html[data-theme="dark"] .h-related__name a { color: var(--h-text) !important; }

html[data-theme="dark"] .h-author-card,
html[data-theme="dark"] .h-single__body blockquote,
html[data-theme="dark"] .h-single__body details,
html[data-theme="dark"] .h-single__tag,
html[data-theme="dark"] .h-related { background: var(--h-bg-alt) !important; }

html[data-theme="dark"] .h-aboutme__card { background: var(--h-bg-alt) !important; border-color: var(--h-border) !important; }
html[data-theme="dark"] .h-toc ol { border-color: var(--h-border) !important; }
html[data-theme="dark"] .h-toc a.is-active { background: var(--h-bg) !important; }
