/* ==========================================================================
   인블로그 (miracle/inblog.php · assets/js/sx/inblog.js) — 밝은 노트 톤
   목록: 제목 + 썸네일 카드 3열 (포트폴리오 목록과 같은 형식) · 글: 본문 + 옆 목차
   ========================================================================== */
.sub--inblog { --mono: "SFMono-Regular", Consolas, monospace; }

/* ---------- 목록 ---------- */
.ib-head { padding: calc(var(--hd-h) + 64px) 0 round(clamp(40px, 5vw, 72px), 4px); }
.ib-head__in { display: grid; gap: 28px; }
.ib-head__title { display: grid; gap: 14px; margin-top: 24px; }
.ib-head__title span { font-family: var(--f-display); font-size: clamp(64px, 10vw, 168px); font-weight: 800; line-height: .82; letter-spacing: -.06em; }
.ib-head__title small { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.02em; }
.ib-head__lead { max-width: 520px; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink2); }
.ib-list { padding-bottom: round(clamp(112px, 12vw, 192px), 4px); }
.ib-bar { display: flex; align-items: center; margin-bottom: round(clamp(32px, 4vw, 52px), 4px); padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.ib-bar b { margin-right: 8px; font-family: var(--f-display); font-size: var(--fs-xl); letter-spacing: -.03em; color: var(--ink); }
.ib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: round(clamp(36px, 3.6vw, 56px), 4px) round(clamp(16px, 1.8vw, 28px), 4px); }
.ib-card { display: block; }
.ib-card__media { position: relative; display: block; aspect-ratio: 800 / 520; overflow: hidden; background: var(--paper2); }
.ib-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .6s; }
.ib-card:is(:hover, :focus-visible) .ib-card__media img { transform: scale(1.05); filter: brightness(1.04); }
.ib-card__meta { position: relative; display: grid; gap: 6px; padding: 16px 48px 0 0; }
.ib-card__meta small { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--ink2); }
.ib-card__meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-lg); line-height: 1.4; letter-spacing: -.03em; word-break: keep-all; }
.ib-card__meta em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: var(--fs-sm); line-height: 1.65; color: var(--ink2); }
.ib-card__meta i { position: absolute; right: 0; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink2); transition: background .3s, color .3s, border-color .3s, transform .5s var(--ease); }
.ib-card__meta i::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 7h9M7.5 3l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 7h9M7.5 3l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.ib-card:is(:hover, :focus-visible) .ib-card__meta i { background: var(--y); border-color: var(--y); color: var(--k); transform: rotate(-12deg); }
.ib-more { display: flex; justify-content: center; margin-top: round(clamp(56px, 6vw, 88px), 4px); }
.ib-empty { padding: 48px 0; color: var(--ink2); }

/* ---------- 글 ---------- */
.ib-progress { position: fixed; left: 0; right: 0; top: 0; z-index: calc(var(--z-header) + 1); height: 3px; pointer-events: none; }
.ib-progress i { display: block; width: 100%; height: 100%; background: var(--k); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.ib-phero { padding: calc(var(--hd-h) + 64px) 0 48px; }
.ib-phero__in { max-width: 1100px; }
.ib-phero__q { margin: 36px 0 12px; font-family: var(--f-display); font-size: clamp(72px, 9vw, 150px); font-weight: 800; line-height: .9; letter-spacing: -.06em; }
.ib-phero__q i { display: inline-block; width: .2em; height: .2em; margin-left: .04em; border-radius: 50%; background: var(--y); font-size: inherit; color: transparent; overflow: hidden; vertical-align: baseline; }
.ib-phero__title { font-family: var(--f-display); font-size: max(var(--fs-3xl), min(var(--fs-4xl), (100vw - 960px) * 999), min(var(--fs-5xl), (100vw - 1280px) * 999)); font-weight: 800; line-height: 1.2; letter-spacing: -.045em; word-break: keep-all; }
.ib-phero__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink2); }

.ib-read { display: grid; grid-template-columns: 240px minmax(0, 780px); justify-content: center; gap: round(clamp(40px, 5vw, 88px), 4px); padding-bottom: round(clamp(88px, 9vw, 140px), 4px); }
.ib-read:not(:has(.ib-toc)) { grid-template-columns: minmax(0, 780px); }
.ib-toc { position: sticky; top: calc(var(--hd-h) + 32px); align-self: start; padding-top: 8px; }
.ib-toc p { margin-bottom: 14px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.ib-toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.ib-toc a { position: relative; display: grid; grid-template-columns: 26px 1fr; padding: 8px 0 8px 16px; font-size: var(--fs-xs); line-height: 1.55; color: var(--ink2); transition: color .3s; }
.ib-toc a b { font-family: var(--mono); font-weight: 600; }
.ib-toc a::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--k); transform: scaleY(0); transition: transform .4s var(--ease); }
.ib-toc a:hover, .ib-toc a.is-on { color: var(--ink); }
.ib-toc a.is-on::before { transform: scaleY(1); }

/* 본문: 자동 글쓰기 HTML의 인라인 스타일을 그대로 두고, 넘치는 것만 잡음 */
.ib-body { min-width: 0; font-size: 17px; line-height: 1.85; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.ib-body img { max-width: 100%; height: auto; }
.ib-body iframe { max-width: 100%; }
.ib-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.ib-body :is(h2, h3) { scroll-margin-top: calc(var(--hd-h) + 24px); }
.ib-body a { text-decoration: underline; text-underline-offset: 3px; }
.ib-body > :first-child { margin-top: 0 !important; }
.sx-motion .ib-body img { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform 1s var(--ease); }
.sx-motion .ib-body img.is-in { opacity: 1; transform: none; }

.ib-pn { padding-bottom: round(clamp(100px, 10vw, 160px), 4px); }
.ib-pn__in { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ib-pn__link { display: grid; align-content: start; gap: 10px; min-height: 220px; padding: 40px 32px; transition: background .4s; }
.ib-pn__link.is-r { text-align: right; border-left: 1px solid var(--line); }
.ib-pn__link small { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink2); }
.ib-pn__link b { font-size: var(--fs-xl); line-height: 1.4; letter-spacing: -.03em; word-break: keep-all; }
.ib-pn__link b span { font-family: var(--f-display); font-weight: 800; }
.ib-pn__link em { font-style: normal; font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink2); }
a.ib-pn__link:hover { background: var(--white); }
.ib-pn__list { display: flex; justify-content: center; margin-top: 48px; }

@media (max-width: 1180px) {
  .ib-read { grid-template-columns: minmax(0, 780px); }
  .ib-toc { display: none; }
}
@media (max-width: 960px) {
  .ib-grid { grid-template-columns: repeat(2, 1fr); }
  .ib-pn__in { grid-template-columns: 1fr; }
  .ib-pn__link.is-r { text-align: left; border-left: 0; border-top: 1px solid var(--line); }
  .ib-pn__link { min-height: 0; padding: 28px 4px; }
  .ib-pn__link.is-empty { display: none; }
}
@media (max-width: 640px) {
  .ib-body { font-size: 16px; }
  .ib-grid { grid-template-columns: 1fr; }
  .ib-card__meta b { font-size: var(--fs-md); }
}
