/* 올곧이 블로그 · 영상 페이지(build.py 가 /blog/blog.css 로 복사). 홈페이지와 같은 종이 · 잉크 · 빨간 연필.
   블로그는 종이 위 작업 일지, 영상은 홈페이지 밤 장면과 같은 어두운 바탕 */
:root {
  --paper: #f4f1ea; --snow: #f6f3ec; --ink: #141a24; --ink-2: #4a5262; --ink-3: #6b7383; --rule: #d9d2c3;
  --red: #c8161d; --night: #0a0e18; --night-2: #151b28; --mute: #a9b1c1;
  --sans: "IBM Plex Sans KR", system-ui, sans-serif; --hah: "Hahmlet", serif; --cond: "Anton", Impact, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
/* 종이 결 */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .42  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--ink); color: var(--snow); text-decoration: none; border-radius: 4px; }
.skip:focus { top: 12px; }

/* 머리: 홈페이지 위 메뉴줄과 같은 줄. 바탕 · 선 없이 글자만, 글을 내리면 같이 올라간다(글자와 겹치지 않게) */
.top { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 4vw, 40px); }
.wm { display: flex; align-items: baseline; gap: .55em; color: var(--ink); text-decoration: none; font: 700 1.14rem/1 var(--sans); letter-spacing: -.04em; }
.wm small { font: 400 .74rem/1 var(--cond); letter-spacing: .22em; opacity: .72; }
.nav { display: flex; gap: clamp(18px, 3vw, 34px); }
.nav a { position: relative; padding: 6px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1; letter-spacing: -.01em; }
.nav a:hover { text-decoration: underline 1px; text-underline-offset: 7px; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: -3px; right: -3px; bottom: -3px; height: 3px; border-radius: 2px; background: var(--red); transform: rotate(-1.5deg); }

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* 목록 머리 */
/* 목록 머리: 제목 한 줄 + 설명 한 줄 + 편 수. 크게 띄우지 않는다 */
.mast { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; padding: clamp(28px, 5vw, 56px) 0 18px; border-bottom: 1px solid var(--ink); }
.mast h1 { margin: 0; font-family: var(--sans); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -.03em; }
.mast .lead { max-width: 34em; margin: 8px 0 0; color: var(--ink-2); font-size: .95rem; }
.count { margin: 0; color: var(--ink-2); font-size: .95rem; white-space: nowrap; }

/* 블로그 목록: 날짜를 크게 찍은 장부 */
.ledger { margin: 0 0 40px; padding: 0; list-style: none; }
.ledger li { border-bottom: 1px solid var(--rule); animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.ledger a { display: grid; grid-template-columns: 7.4rem 1fr 6.6rem; align-items: center; gap: clamp(14px, 3vw, 40px); padding: clamp(20px, 3.2vw, 30px) 0; text-decoration: none; }
.ledger time, .stamp time, .reel time { font-family: var(--cond); line-height: .85; letter-spacing: .01em; }
.ledger time { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
.ledger time small, .stamp time small { display: block; margin-top: 8px; font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .24em; color: var(--ink-3); }
.ledger .t { font-family: var(--hah); font-weight: 600; font-size: clamp(1.12rem, 2.4vw, 1.5rem); line-height: 1.38; letter-spacing: -.035em; text-wrap: balance; }
.ledger .x { display: -webkit-box; margin-top: 9px; overflow: hidden; color: var(--ink-2); font-size: .94rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ledger img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; background: var(--snow);
  box-shadow: 0 12px 26px -16px rgba(20, 26, 36, .55), 0 0 0 1px rgba(20, 26, 36, .07); transform: rotate(1.6deg); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.ledger a:hover img { transform: rotate(0) scale(1.04); }
.ledger a:hover .t { text-decoration: underline 2px var(--red); text-underline-offset: 6px; }

/* 글 */
.post { max-width: 720px; margin: 0 auto; padding: clamp(30px, 6vw, 64px) 0 20px; }
.crumb { margin: 0 0 28px; color: var(--ink-3); font-size: .86rem; }
.crumb a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.crumb a:hover { text-decoration: underline 2px var(--red); text-underline-offset: 4px; }
.stamp { margin-bottom: 20px; }
.stamp time { display: inline-block; font-size: clamp(4rem, 12vw, 6.2rem); color: var(--ink); }
.post h1 { margin: 0 0 18px; font-family: var(--hah); font-weight: 600; font-size: clamp(1.85rem, 5.2vw, 2.75rem); line-height: 1.24; letter-spacing: -.05em; text-wrap: balance; }
.byline { margin: 0 0 40px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); color: var(--ink-2); font-size: .9rem; }
.byline a { text-decoration: underline 1px var(--ink-3); text-underline-offset: 4px; }
.prose { font-size: 1.07rem; line-height: 1.95; }
.prose p { margin: 0 0 1.55em; }
.prose h2 { position: relative; margin: 2.5em 0 .9em; padding-left: .85em; font-family: var(--hah); font-weight: 600; font-size: clamp(1.3rem, 3.4vw, 1.5rem); line-height: 1.42; letter-spacing: -.04em; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .26em; bottom: .26em; width: 4px; border-radius: 2px; background: var(--red); transform: rotate(2.5deg); }
.prose strong { font-weight: 700; }
.prose mark { padding: 0 .08em; color: inherit; background: linear-gradient(transparent 56%, rgba(200, 22, 29, .2) 56%, rgba(200, 22, 29, .2) 90%, transparent 90%); }
.prose h2 { scroll-margin-top: 90px; }
.prose ul.check { margin: 0 0 1.55em; padding: 16px 20px; list-style: none; border: 1px dashed rgba(20, 26, 36, .25); border-radius: 4px; background: var(--snow); }
.prose ul.check li { padding-left: 1.3em; text-indent: -1.3em; }   /* 줄이 넘어가도 □ 뒤에 맞춘다 */
.prose ul.check li + li { margin-top: .35em; }
/* 핵심 정리: 글을 맺는 문단을 맨 위에(답이 먼저). 영수증 종이처럼 */
.tldr { margin: 0 0 40px; padding: 20px 22px; border-left: 4px solid var(--red); background: #fbf9f4; box-shadow: 0 10px 24px -18px rgba(20, 26, 36, .45); }
.tldr b { display: block; margin-bottom: 6px; font-weight: 700; font-size: .86rem; letter-spacing: .06em; color: var(--red); }
.tldr p { margin: 0; font-size: 1.04rem; line-height: 1.8; }
/* 누가 정리했는지 */
.about { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 18px; margin: 34px 0 0; padding: 20px 0 0; border-top: 1px dashed var(--rule); color: var(--ink-2); font-size: .9rem; }
.about b { grid-column: 1 / -1; color: var(--ink); font-family: var(--hah); font-weight: 600; font-size: 1.02rem; letter-spacing: -.03em; }
.about p { margin: 0; line-height: 1.7; }
.about .home { color: var(--ink); font-weight: 600; white-space: nowrap; text-decoration: underline 2px var(--red); text-underline-offset: 5px; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; } }
.prose figure { margin: 2.4em auto; }
.prose figure.cover { max-width: 330px; }
.prose figure.card { max-width: 560px; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--snow); box-shadow: 0 22px 44px -28px rgba(20, 26, 36, .6), 0 0 0 1px rgba(20, 26, 36, .07); }
.short { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 48px 0 30px; padding: 20px 22px; border-radius: 6px; background: var(--night); color: var(--snow); text-decoration: none; transition: transform .25s; }
.short:hover { transform: translateY(-2px); }
.short b { display: block; font-family: var(--hah); font-weight: 600; font-size: 1.12rem; letter-spacing: -.03em; }
.short small { display: block; margin-top: 3px; color: var(--mute); font-size: .86rem; }
.short i, .reel .play i { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--red); }
.short i::after, .reel .play i::after { content: ""; position: absolute; left: 54%; top: 50%; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; transform: translate(-50%, -50%); }
.refs { margin: 0 0 14px; color: var(--ink-2); font-size: .88rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.tags li { padding: 4px 11px; border: 1px solid var(--rule); border-radius: 999px; background: var(--snow); color: var(--ink-2); font-size: .8rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 52px; padding-top: 22px; border-top: 2px solid var(--ink); }
.pager a { text-decoration: none; }
.pager small { color: var(--ink-3); font-size: .74rem; font-weight: 600; letter-spacing: .18em; }
.pager span { display: block; margin-top: 6px; font-family: var(--hah); font-weight: 600; line-height: 1.45; letter-spacing: -.03em; }
.pager a:hover span { text-decoration: underline 2px var(--red); text-underline-offset: 5px; }
.pager .newer { text-align: right; }

/* 영상: 밤 바탕에 세로 표지 */
body.video { background: var(--night); color: var(--snow); }
body.video::before { mix-blend-mode: screen; opacity: .18; }
body.video .wm { color: var(--snow); }
body.video .nav a { color: var(--snow); }
body.video .mast { border-color: var(--snow); }
body.video .mast .lead { color: var(--mute); }
body.video .count { color: var(--mute); }
.reel { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(44%, 200px), 1fr)); gap: clamp(22px, 3vw, 34px) clamp(14px, 2.4vw, 28px); margin: 40px 0 40px; padding: 0; list-style: none; }
.reel li { scroll-margin-top: 96px; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.reel .play { position: relative; display: block; overflow: hidden; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--night-2); }
.reel .play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.reel .play:hover img { transform: scale(1.04); filter: brightness(.82); }
.reel .play i { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; box-shadow: 0 10px 30px rgba(200, 22, 29, .5); transition: transform .25s; }
.reel .play:hover i { transform: scale(1.08); }
.reel li:target .play { outline: 3px solid var(--red); outline-offset: 4px; }
.reel time { display: block; margin-top: 14px; font-size: 1.7rem; }
.reel time small { display: inline-block; margin-left: 8px; font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .22em; color: var(--mute); }
.reel b { display: block; margin-top: 6px; font-family: var(--hah); font-weight: 600; font-size: 1.02rem; line-height: 1.42; letter-spacing: -.035em; }
.reel p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--mute); font-size: .86rem; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.reel .read { display: inline-block; margin-top: 10px; font-size: .88rem; font-weight: 600; text-decoration: underline 2px var(--red); text-underline-offset: 5px; }

/* 재생 창: 화면 가운데 세로 영상. 넓은 화면은 높이의 88%, 휴대폰은 폭에 맞춘다 */
#player { width: min(calc(100vw - 32px), calc(88vh * 9 / 16), 560px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; overflow: visible; background: transparent; }
#player::backdrop { background: rgba(10, 14, 24, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#player .frame { aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
#player iframe { display: block; width: 100%; height: 100%; border: 0; }
#player .x { position: absolute; top: -14px; right: -14px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--snow); color: var(--ink); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
#player .x::before, #player .x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
#player .x::after { transform: translate(-50%, -50%) rotate(-45deg); }
#player .x:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
body.playing { overflow: hidden; }
@media (max-width: 640px) { #player .x { top: -56px; right: 0; } }

/* 꼬리 */
.foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; max-width: 1080px; margin: 70px auto 0; padding: 26px clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: .84rem; }
body.video .foot { border-color: #232a3a; color: var(--mute); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 640px) {
  .foot { padding-bottom: 120px; }   /* 오른쪽 아래 상담 쪽지에 가리지 않게 */
  .ledger a { grid-template-columns: 4.5rem 1fr 4.6rem; gap: 14px; }
  .ledger .x { display: none; }
  .ledger time small { letter-spacing: .12em; }
  .pager { grid-template-columns: 1fr; }
  .pager .newer { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
