/* lab.cens.space 랜딩 — Henry's Gaze 모던 디자인과 같은 토큰. 순수 CSS, 외부 요청 없음. 라이트 기본, data-theme="dark" 또는 시스템 다크. */
:root {
    --bg: #FFFFFF; --surface: #F2F4FA; --text: #0A0F1F; --muted: #46506A; --line: #D3D8E6; --hover-line: #B8BFD0;
    --brand: #2D3CF5; --brand-soft: #E4E7FF; --on-brand: #FFFFFF; --on-image: #FFFFFF; --hero-overlay: rgba(10, 15, 31, .62);
    --topic: #0B5FD0; --topic-soft: #DCE9FF; --shadow-hover: 0 8px 24px rgba(10, 15, 31, .14);
    --radius: 6px; --tap: 44px; --header-h: 64px; --container: 1280px; --gutter: 32px;
    --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "D2Coding", Consolas, monospace;
}
:root[data-theme="dark"] {
    --bg: #22252C; --surface: #2B2F38; --text: #F1F3FB; --muted: #A7B0CA; --line: #40454F; --hover-line: #5E6575;
    --brand: #8E9BFF; --brand-soft: #1D2358; --on-brand: #080B16; --topic: #7DB2FF; --topic-soft: #1F3358;
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #22252C; --surface: #2B2F38; --text: #F1F3FB; --muted: #A7B0CA; --line: #40454F; --hover-line: #5E6575;
        --brand: #8E9BFF; --brand-soft: #1D2358; --on-brand: #080B16; --topic: #7DB2FF; --topic-soft: #1F3358;
        --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
    }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

/* 머리말 */
.top { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand svg { width: 28px; height: 28px; color: var(--brand); }
.brand small { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.top .sp { flex: 1; }
.top a.back { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 12px; border: 2px solid var(--hover-line); border-radius: var(--radius); font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none; }
.top a.back:hover { border-color: var(--text); }
.theme-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--text); cursor: pointer; }
.theme-btn:hover { background: var(--brand-soft); }
.theme-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
    :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* 상단 영역: 블로그 목록 화면과 같은 이미지 없는 색 면 + 작은 제목 */
.intro { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 220px; margin-block: 24px 32px; padding: 48px 32px; border-radius: var(--radius); background: #0E1224; border: 1px solid var(--line); color: #FFFFFF; overflow: hidden; }
.intro h1 { margin: 0; font-size: clamp(19px, 1.9vw, 24px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; overflow-wrap: anywhere; }
.intro p { margin: 0; max-width: 40em; font-size: 14px; opacity: .85; }

/* 그룹 제목과 카드 */
.group { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 32px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.group small { font-size: 14px; font-weight: 400; color: var(--muted); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; color: inherit; border-radius: var(--radius); background: var(--surface); }
.card:hover { box-shadow: var(--shadow-hover); }
.card .cover { display: grid; place-items: center; height: 132px; background: var(--topic-soft); color: var(--topic); }
.card .cover svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card .body { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 20px; }
.card .kind { font-size: 14px; font-weight: 700; color: var(--topic); }
.card h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.35; }
.card p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.card .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 0 8px; border: 1px solid var(--hover-line); border-radius: var(--radius); font-size: 12px; line-height: 20px; color: var(--muted); }

.foot { margin-top: 64px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
    :root { --gutter: 16px; }
    .intro { min-height: 180px; padding: 32px 20px; }
    .top a.back span { display: none; }
}

/* ---- 블로그 모던 디자인과 같은 처리 (카드, 스티커 칩, 사진 프레임, 롤오버) ---- */
:root { --sticker-rim: #FFFFFF; --sticker-shadow: 0 0 0 1px rgba(10, 15, 31, .16), 0 3px 7px rgba(10, 15, 31, .22); --hover-bg: color-mix(in srgb, var(--muted) 18%, var(--bg)); --frame: 8px; }
:root[data-theme="dark"] { --sticker-rim: #454A57; --sticker-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 3px 8px rgba(0, 0, 0, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sticker-rim: #454A57; --sticker-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 3px 8px rgba(0, 0, 0, .6); } }

/* 상단 영역: 사진 프레임 */
.intro { position: relative; padding: calc(48px + var(--frame)) calc(32px + var(--frame)); box-shadow: 0 0 0 1px var(--line), 0 10px 26px rgba(10, 15, 31, .16); }
.intro > * { position: relative; z-index: 1; }
.intro::after { content: ""; position: absolute; inset: 0; z-index: 4; box-sizing: border-box; border: var(--frame) solid var(--surface); border-radius: inherit; pointer-events: none; box-shadow: inset 0 5px 16px rgba(10, 15, 31, .45), inset 0 0 0 1px rgba(10, 15, 31, .22); }
:root[data-theme="dark"] .intro::after { box-shadow: inset 0 5px 18px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(0, 0, 0, .6); }

/* 카드: 바닥에 눌려 들어간 모양, 롤오버하면 위로 떠오른다 */
.card { position: relative; }
.card::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 3px 10px rgba(10, 15, 31, .2), inset 0 0 0 1px rgba(10, 15, 31, .06); transition: opacity .25s ease; }
:root[data-theme="dark"] .card::after { box-shadow: inset 0 3px 12px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.card .cover { position: relative; margin: 8px 8px 0; border-radius: calc(var(--radius) - 2px); }
.card .cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 3px 10px rgba(10, 15, 31, .3), inset 0 0 0 1px rgba(10, 15, 31, .1); }
:root[data-theme="dark"] .card .cover::after { box-shadow: inset 0 3px 12px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .08); }
@media (hover: hover) {
    .card { transition: transform .25s ease, box-shadow .25s ease; }
    .card:hover, .card:focus-visible { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(10, 15, 31, .26), 0 0 0 1px rgba(10, 15, 31, .06); }
    :root[data-theme="dark"] .card:hover { box-shadow: 0 16px 32px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .1); }
    .card:hover::after, .card:focus-visible::after { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }

/* 작은 박스(태그, 돌아가기 버튼): 사진 스티커 칩, 롤오버는 같은 회색 */
.tag, .top a.back { border: 3px solid var(--sticker-rim); box-shadow: var(--sticker-shadow); background: var(--surface); color: var(--text); }
.tag { line-height: 18px; }
.top a.back { border-width: 3px; }
.top a.back:hover { background: var(--hover-bg); border-color: var(--sticker-rim); }
.theme-btn:hover { background: var(--hover-bg); }

/* 상단 이미지 배너(2000x355): 이미지가 제목 역할을 하므로 글자는 화면 읽기용으로만 둔다 */
.intro.intro-banner { display: block; min-height: 0; padding: 0; aspect-ratio: 2000 / 355; background: #F4EAD5; }
.intro-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 560px) { .intro.intro-banner { aspect-ratio: 2.2 / 1; min-height: 0; padding: 0; } }
