/* BSIDE MELB — Modern Editorial Luxury × Melbourne Lifestyle
   색은 모두 아래 토큰에서만 정한다 (docs/DESIGN_GUIDE.md). 대비: 잉크/아이보리 13.9, 에스프레소 버튼 흰 글자 11.4, 보조 글자 4.8 (AA) */
:root {
  /* 브랜드 토큰 (운영자 지정) */
  --brand-primary: #49362e;      /* Deep Espresso: 주요 버튼·링크·강조·선택 메뉴 */
  --brand-primary-hover: #382820;
  --brand-dark: #2c2420;         /* Dark Ink: 제목·본문·어두운 섹션 */
  --brand-secondary: #a88365;    /* Muted Bronze: 장식·구분선 전용 (작은 글자 금지, 아이보리 위 3.1:1) */
  --background: #f7f4ee;         /* Ivory Paper */
  --foreground: #2c2420;
  --surface: #ffffff;
  --surface-muted: #e9e0d5;      /* Pale Sand */
  --text-primary: #2c2420;
  --text-secondary: #746a63;     /* 아이보리 4.8 · 흰 5.3 */
  --text-secondary-on-sand: #655b55; /* 샌드 위 보조 글자 (4.9:1) */
  --border: #ded5cb;
  --button-primary-bg: #49362e;
  --button-primary-text: #ffffff;
  --button-primary-hover: #382820;

  /* 기존 컴포넌트·관리자 화면이 쓰는 이름 → 브랜드 토큰으로 연결 */
  --bg: var(--background);
  --sunk: var(--surface-muted);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --sig: var(--brand-primary);
  --sig-hover: var(--brand-primary-hover);
  --sig-glow: var(--brand-secondary);
  --sig-soft: var(--surface-muted);
  --accent: var(--brand-primary);
  --accent-soft: var(--surface-muted);
  --on-ink: var(--background);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgb(44 36 32 / .05), 0 8px 24px rgb(44 36 32 / .06);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px; --s9: 120px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--background) url("/assets/grain.svg"); color: var(--text-primary); font: 400 16px/1.7 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.02em; color: var(--brand-dark); text-wrap: balance; }
p { margin: 0; }
/* 문장 단위 줄바꿈: 한 문장(구절)씩 줄을 나누고, 줄 안에서는 낱말이 혼자 남지 않게 */
p, dd, li { text-wrap: pretty; }
.lines > span { display: block; }
.lines > span + span { margin-top: 2px; }
.ic { flex: none; }
.muted { color: var(--text-secondary); font-size: 14px; }
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--surface-muted); color: var(--brand-dark); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand-dark); color: var(--background); padding: 8px 16px; z-index: 99; }
.skip:focus { left: 16px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* 에디토리얼 장식: 짧은 브론즈 선 + 대문자 라벨 */
.eyebrow, .section-label { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: var(--s4); }
.eyebrow::before, .section-label::before { content: ""; width: 40px; height: 1px; background: var(--brand-secondary); }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

/* 버튼: 주요 CTA 하나만 에스프레소 (Von Restorff), 높이 48px (Fitts) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 50px; padding: 0 var(--s5); border-radius: 2px; font-weight: 600; font-size: 15px; letter-spacing: .01em; text-decoration: none; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--button-primary-bg); color: var(--button-primary-text); }
.btn-primary:hover { background: var(--button-primary-hover); }
.btn-primary .arrow { transition: transform .25s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost { border-color: var(--brand-dark); color: var(--brand-dark); background: transparent; }
.btn-ghost:hover { background: var(--brand-dark); color: var(--background); }
.btn-sm { min-height: 44px; padding: 0 var(--s4); font-size: 14px; background: var(--button-primary-bg); color: var(--button-primary-text); }
.btn-sm:hover { background: var(--button-primary-hover); }

/* 상단 바 */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--background) 86%, transparent); backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--s4); }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; line-height: 1; }
.brand-word { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .04em; color: var(--brand-dark); }
.brand-sub { margin-top: 5px; font-size: 9.5px; font-weight: 600; letter-spacing: .28em; color: var(--text-secondary); }
.nav-links { display: flex; align-items: center; gap: var(--s1); }
.nav-links a:not(.btn) { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); text-decoration: none; color: var(--text-primary); font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 10px; height: 1px; background: var(--brand-primary); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links .btn-sm { margin-left: var(--s3); }

/* 여는 화면: 왼쪽 이름·한 줄·행동, 오른쪽 실제 대표 글 카드 (12열 격자) */
.hero-grid { display: grid; gap: var(--s7); padding-block: var(--s6) var(--s8); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-copy h1 { font-size: clamp(56px, 10vw, 112px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.hero-line { margin-top: var(--s4); font-size: clamp(18px, 2.2vw, 22px); color: var(--text-secondary); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); margin-top: var(--s6); }
.hero-channels { display: flex; gap: var(--s4); }
.hero-channels a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-primary); font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 1px solid transparent; }
.hero-channels a:hover { color: var(--brand-primary); border-bottom-color: var(--brand-secondary); }
.stage { position: relative; isolation: isolate; padding: var(--s5) 0 var(--s5) var(--s5); }
.stage .leaf-shadow { position: absolute; inset: -20% -30% -20% -10%; width: 140%; height: 140%; z-index: -1; pointer-events: none; }
.tpost { position: relative; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgb(44 36 32 / .06), 0 24px 48px -16px rgb(44 36 32 / .22); text-decoration: none; color: var(--text-primary); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
a.tpost:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgb(44 36 32 / .06), 0 32px 56px -18px rgb(44 36 32 / .28); }
.tpost-behind { position: absolute; top: 0; right: var(--s6); left: var(--s8); padding: var(--s4) var(--s5); opacity: .55; transform: rotate(-3deg) translateY(-18px); box-shadow: none; }
.tp-badge { align-self: flex-start; padding: 4px 10px; background: var(--surface-muted); color: var(--brand-primary); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.tp-head { display: flex; align-items: center; gap: var(--s3); font-size: 14px; color: var(--text-secondary); }
.tp-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.tp-head strong { color: var(--text-primary); }
.tp-title { display: block; font-size: clamp(20px, 2.2vw, 24px); font-weight: 700; line-height: 1.4; color: var(--brand-dark); }
.tp-body { display: block; font-size: 15.5px; line-height: 1.85; color: var(--text-primary); }
.tp-meta { display: flex; align-items: center; gap: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tp-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.tp-more { margin-left: auto; color: var(--brand-primary); font-weight: 600; }
.loc { position: absolute; left: var(--s4); top: var(--s4); display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgb(44 36 32 / .72); color: var(--background); font-size: 12px; font-weight: 600; letter-spacing: .06em; }

/* 여는 화면 등장: JS 없이 바로 재생 (스크롤 등장과 별개) */
.rise { animation: rise .8s cubic-bezier(.2, .65, .3, 1) both; }
.rise-2 { animation-delay: .08s; } .rise-3 { animation-delay: .16s; } .rise-4 { animation-delay: .24s; } .rise-5 { animation-delay: .2s; animation-duration: 1s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

/* 숫자 */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--brand-dark); border-bottom: 1px solid var(--border); }
.stats div { padding: var(--s5) var(--s2) var(--s5) 0; display: flex; flex-direction: column; gap: 4px; }
.stats strong { font-family: var(--serif); font-size: clamp(38px, 6vw, 56px); font-weight: 500; line-height: 1; letter-spacing: -0.02em; color: var(--brand-dark); font-variant-numeric: lining-nums tabular-nums; }
.stats span { color: var(--text-secondary); font-size: 13px; font-weight: 600; letter-spacing: .08em; }

/* 흐르는 띠: 주제 키워드 (어두운 섹션) */
.marquee { margin-top: var(--s8); padding-inline: 0; background: var(--brand-dark); color: var(--background); overflow: hidden; padding-block: var(--s4); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-size: clamp(16px, 1.8vw, 19px); font-weight: 600; white-space: nowrap; padding-inline: var(--s5); }
.marquee span::after { content: "✦"; font-style: normal; font-size: .5em; color: var(--brand-secondary); margin-left: var(--s6); vertical-align: middle; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* 섹션 */
main > section + section, main > .marquee + section { margin-top: var(--s8); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); }
.section-head h2, .about h2, .collab h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
.section-head .section-label { margin-bottom: var(--s3); }
.section-head .serif-title { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.01em; line-height: 1; }
.section-head .ko { display: block; margin-top: var(--s2); font-size: 15px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0; font-family: var(--font); }

/* 대표 글: 매거진 인용 레이아웃 */
.feature-card { position: relative; display: grid; gap: var(--s5); padding: clamp(28px, 6vw, 72px); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; }
.feature-card::before { content: "\201C"; position: absolute; top: clamp(4px, 2vw, 20px); right: clamp(16px, 4vw, 48px); font-family: var(--serif); font-size: clamp(120px, 18vw, 220px); line-height: 1; color: var(--surface-muted); pointer-events: none; }
.feature-no { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--brand-primary); }
.feature-card h2 { position: relative; font-size: clamp(26px, 4vw, 40px); font-weight: 700; max-width: 22em; }
.feature-card h2 a { text-decoration: none; }
.feature-card .body { position: relative; font-size: 17px; line-height: 1.9; color: var(--text-primary); max-width: 44em; }
.fold { position: relative; max-height: 13.3em; overflow: hidden; }
.fold::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5em; background: linear-gradient(to bottom, transparent, var(--surface)); }
.fold.is-open { max-height: none; }
.fold.is-open::after { display: none; }
.unfold { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--brand-primary); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand-secondary); text-underline-offset: 5px; cursor: pointer; }

/* 글 카드: 첫 카드 크게 (매거진 그리드) */
.grid { display: grid; gap: var(--s5); }
.post { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.post:hover { border-color: var(--brand-secondary); transform: translateY(-4px); box-shadow: var(--shadow); }
.post-label { display: flex; align-items: center; gap: var(--s2); font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-secondary); }
.post-label::before { content: ""; width: 20px; height: 1px; background: var(--brand-secondary); }
.post h3 { font-size: 19px; font-weight: 700; line-height: 1.4; }
.post h3 a { text-decoration: none; }
.post h3 a::after { content: ""; position: absolute; inset: 0; } /* 카드 전체 클릭 */
.excerpt { color: var(--text-secondary); line-height: 1.75; }
.meta { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s4); margin-top: auto; padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .more { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; text-decoration: none; font-weight: 600; color: var(--brand-primary); }
.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--text-secondary-on-sand); background: var(--surface-muted); }

/* 하는 일: 준비 중인 프로젝트를 크게 */
.work { display: grid; gap: var(--s4); }
.work-item { position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; text-decoration: none; color: var(--text-primary); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
a.work-item:hover { transform: translateY(-4px); border-color: var(--brand-primary); box-shadow: var(--shadow); }
.work-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border: 1px solid var(--border); color: var(--text-secondary); }
.work-tag.is-live { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
.work-name { font-size: 20px; font-weight: 700; color: var(--brand-dark); letter-spacing: -0.01em; }
.work-desc { color: var(--text-secondary); font-size: 15px; line-height: 1.75; }
.work-go { margin-top: auto; padding-top: var(--s3); display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-primary); }
.work-main { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--background); }
.work-main .work-name { color: var(--background); font-family: var(--serif); font-size: clamp(30px, 3.6vw, 40px); font-weight: 600; letter-spacing: .02em; }
.work-main .work-desc { color: #d9cfc6; font-size: 16px; max-width: 34em; }
.work-main .work-go { color: var(--background); }
.work-main .work-tag.is-live { background: var(--background); color: var(--brand-dark); border-color: var(--background); }
a.work-main:hover { border-color: var(--brand-dark); }
.work-main { overflow: hidden; }
.work-img { width: calc(100% + 48px); max-width: none; margin: -24px -24px var(--s3); aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 62%; transition: transform .8s var(--ease); }
a.work-main:hover .work-img { transform: scale(1.04); }

/* 채널: 공식 로고 모양을 브랜드 톤(단색)으로 */
.channels { display: grid; gap: var(--s4); }
.channel { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-areas: "logo name" "logo desc" "logo go"; column-gap: var(--s4); row-gap: 2px; padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; text-decoration: none; transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
a.channel:hover { transform: translateY(-4px); border-color: var(--brand-primary); box-shadow: var(--shadow); }
.ch-logo { grid-area: logo; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-primary); color: var(--background); transition: background .25s; }
a.channel:hover .ch-logo { background: var(--brand-dark); }
.ch-name { grid-area: name; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: var(--s2); color: var(--brand-dark); }
.ch-desc { grid-area: desc; color: var(--text-secondary); font-size: 14px; }
.ch-go { grid-area: go; margin-top: var(--s2); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--brand-primary); }
.is-soon { background: transparent; border-style: dashed; }
.is-soon .ch-logo { background: var(--surface-muted); color: var(--brand-primary); }
.soon { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border: 1px solid var(--brand-secondary); color: var(--brand-primary); }

/* 협업 섹션 (어두운 배경, 큰 글자만 브론즈) */
.collab { background: var(--brand-dark); color: var(--background); padding-block: var(--s8); margin-top: var(--s8); }
.collab .section-label { color: #cbbfb4; }
.collab h2 { color: var(--background); max-width: 18em; }
.collab-head .section-label { margin-bottom: var(--s3); }
.collab-lead { margin-top: var(--s4); color: #d9cfc6; font-size: 17px; }
.collab-grid { display: grid; gap: 1px; margin-top: var(--s7); background: rgb(247 244 238 / .14); border: 1px solid rgb(247 244 238 / .14); }
.collab-item { background: var(--brand-dark); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.collab-item .no { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--brand-secondary); }
.collab-item h3 { color: var(--background); font-size: 18px; }
.collab-item p { color: #cbbfb4; font-size: 14.5px; }
.collab-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); margin-top: var(--s7); }
.collab-facts { display: flex; flex-wrap: wrap; gap: var(--s6); }
.collab-facts div { display: flex; flex-direction: column; }
.collab-facts strong { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1; color: var(--background); font-variant-numeric: lining-nums tabular-nums; }
.collab-facts span { margin-top: 6px; font-size: 12.5px; letter-spacing: .08em; color: #cbbfb4; }
.btn-light { background: var(--background); color: var(--brand-dark); }
.btn-light:hover { background: var(--surface-muted); }

/* 소개 */
.about { display: grid; gap: var(--s6); align-items: center; }
.about-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 2px; background: var(--surface-muted); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; transform-origin: 60% 40%; }
.about-text .section-label { margin-bottom: var(--s3); }
.about-body { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s5); font-size: 17px; line-height: 1.85; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }

/* 문의·푸터 */
.site-foot { margin-top: var(--s8); padding-block: var(--s7) calc(var(--s8) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; }
.contact { display: grid; gap: var(--s5); align-items: center; padding-bottom: var(--s7); margin-bottom: var(--s6); border-bottom: 1px solid var(--border); }
.contact h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; margin-bottom: var(--s2); }
.mail-cta { display: inline-flex; align-items: center; gap: var(--s3); min-height: 60px; padding: 0 var(--s5); border-radius: 2px; background: var(--button-primary-bg); color: var(--button-primary-text); text-decoration: none; font-weight: 600; font-size: clamp(15px, 2vw, 18px); transition: background .2s; justify-self: start; max-width: 100%; }
.mail-cta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-cta:hover { background: var(--button-primary-hover); }
.mail-cta .ic:last-child { transition: transform .25s var(--ease); }
.mail-cta:hover .ic:last-child { transform: translate(3px, -3px); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); }
.foot-in a { display: inline-flex; min-height: 44px; align-items: center; color: var(--text-primary); text-decoration: none; }
.foot-in a:hover { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.foot-word { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .04em; color: var(--brand-dark); }

/* 모바일 하단 고정 CTA: 엄지 닿는 곳 (Fitts) */
.mobile-cta { position: fixed; inset: auto 0 0 0; z-index: 20; padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--background) 62%, transparent); transform: translateY(110%); transition: transform .35s var(--ease); }
.mobile-cta.is-shown { transform: none; }
.mobile-cta .btn { width: 100%; }

/* 글 원문·AI·문서 페이지 */
.doc { max-width: 760px; padding-block: var(--s6) var(--s8); }
.doc h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: var(--s3); }
.doc h2 { font-size: 20px; margin: var(--s7) 0 var(--s3); }
.doc p, .doc li { color: var(--text-secondary); }
.doc ul { padding-left: 1.2em; }
.doc-wide { max-width: 880px; }
.doc .lead { margin: var(--s3) 0 var(--s5); }
.doc .btn { margin-top: var(--s5); }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--text-secondary); text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--brand-primary); }
.post-full { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s4); }
.post-full h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; }
.post-full .body { font-size: 18px; line-height: 1.9; color: var(--text-primary); }
.post-full .btn { align-self: flex-start; }
.facts { margin: 0; display: grid; border-top: 1px solid var(--brand-dark); background: var(--surface); }
.facts div { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.facts dt { color: var(--text-secondary); font-weight: 600; font-size: 14px; }
.facts dd { margin: 0; }
.doc .facts dd, .doc .faq p { color: var(--text-primary); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; font-weight: 600; color: var(--brand-dark); }
.faq p { padding-bottom: var(--s4); }

/* ── 피드형 홈 ── */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home .nav:not(.is-scrolled) { background: var(--brand-dark); border-bottom-color: transparent; }
.home .nav:not(.is-scrolled) .brand-word, .home .nav:not(.is-scrolled) .nav-links a:not(.btn) { color: var(--background); }
.home .nav:not(.is-scrolled) .brand-sub { color: #cbbfb4; }
.home .nav:not(.is-scrolled) .nav-links a:not(.btn)::after { background: var(--brand-secondary); }
.home .nav:not(.is-scrolled) .btn-sm { background: var(--background); color: var(--brand-dark); }

/* 여는 화면: 어두운 배경 + 큰 소개 문장 */
.opening { position: relative; overflow: hidden; background: var(--brand-dark); color: var(--background); min-height: min(86svh, 820px); display: flex; align-items: center; }
.opening .leaf-shadow { position: absolute; inset: -10% -20% auto auto; width: 120%; height: 120%; filter: invert(1); opacity: .09; pointer-events: none; animation: breeze 22s ease-in-out infinite; }
.opening-in { position: relative; z-index: 1; padding-block: var(--s8); }
.opening .eyebrow { color: #cbbfb4; }
.opening-title { color: var(--background); font-size: clamp(52px, 10.5vw, 136px); font-weight: 800; line-height: 1.02; letter-spacing: -0.05em; }
.opening-title .ln { display: block; }
.opening-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgb(247 244 238 / .18); }
.who { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--background); min-height: 48px; }
.who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.who strong { display: block; font-size: 16px; }
.who span span { display: block; font-size: 13.5px; color: #cbbfb4; }
.opening-cta { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn-outline-light { border-color: rgb(247 244 238 / .5); color: var(--background); background: transparent; }
.btn-outline-light:hover { background: var(--background); color: var(--brand-dark); }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgb(247 244 238 / .45); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--background); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes breeze { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); } 50% { transform: translate3d(-14px, 10px, 0) rotate(1deg); } }
.home .marquee { margin-top: 0; background: var(--brand-primary); }

/* 프로필(고정) + 피드 */
.layout { display: grid; gap: var(--s7); padding-top: var(--s8); }
.profile-in { display: flex; flex-direction: column; align-items: flex-start; }
.profile-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.profile-name { margin-top: var(--s4); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--brand-dark); }
.profile-handle { color: var(--text-secondary); font-size: 14.5px; }
.profile-bio { margin-top: var(--s4); font-size: 15.5px; line-height: 1.75; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; margin: var(--s5) 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.profile-stats div { padding: var(--s3) 0; }
.profile-stats div + div { padding-left: var(--s3); border-left: 1px solid var(--border); }
.profile-stats dt { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.profile-stats dd { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--brand-dark); font-variant-numeric: lining-nums tabular-nums; }
.profile-cta { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s5); width: 100%; }
.profile-cta .btn { flex: 1; }
.icon-link { display: inline-grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--border); border-radius: 2px; color: var(--brand-primary); background: var(--surface); text-decoration: none; transition: border-color .2s, background .2s; }
a.icon-link:hover { border-color: var(--brand-primary); }
.icon-link.is-soon { color: #b3a89e; border-style: dashed; background: transparent; }
.side-block { width: 100%; margin-top: var(--s6); }
.side-title { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--text-secondary); margin-bottom: var(--s3); }
.ss-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius); text-decoration: none; color: #fff; aspect-ratio: 4 / 3; background: var(--brand-dark); }
.ss-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; transition: transform .8s var(--ease); }
.ss-card:hover img { transform: scale(1.05); }
.ss-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(20 14 12 / .88), rgb(20 14 12 / .1) 62%); }
.ss-body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: var(--s4); display: flex; flex-direction: column; gap: 4px; }
.ss-tag { align-self: flex-start; padding: 2px 8px; background: var(--background); color: var(--brand-dark); font-size: 11.5px; font-weight: 700; }
.ss-name { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .03em; }
.ss-desc { font-size: 13.5px; line-height: 1.6; color: #efe7df; }
.work-list { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.work-list li { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.work-list strong { font-size: 15px; color: var(--brand-dark); }
.work-list span { font-size: 14px; color: var(--text-secondary); }
.side-mail { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; margin-top: var(--s4); color: var(--brand-primary); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.side-mail:hover { text-decoration: underline; text-underline-offset: 4px; }

.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-bottom: var(--s4); border-bottom: 1px solid var(--brand-dark); }
.feed-head h2 { font-size: clamp(28px, 3.6vw, 36px); font-weight: 800; }
.tcard { position: relative; padding: var(--s6) 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s3); }
.tc-head { display: flex; align-items: center; gap: var(--s3); font-size: 14px; color: var(--text-secondary); }
.tc-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.tc-who strong { color: var(--brand-dark); font-size: 15px; }
.tc-head time { margin-left: auto; font-size: 13px; }
.tc-badge { align-self: flex-start; padding: 4px 10px; background: var(--brand-primary); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.tc-title { font-size: clamp(21px, 2.4vw, 26px); font-weight: 800; line-height: 1.4; letter-spacing: -0.025em; }
.tc-title a { text-decoration: none; }
.tc-title a:hover { text-decoration: underline; text-decoration-color: var(--brand-secondary); text-underline-offset: 5px; }
.tc-body { font-size: 16.5px; line-height: 1.9; color: var(--text-primary); }
.tc-body.fold::after { background: linear-gradient(to bottom, transparent, var(--background)); }
.tcard .unfold { margin-top: -4px; align-self: flex-start; }
.tcard.is-top .tc-body.fold::after { background: linear-gradient(to bottom, transparent, var(--surface)); }
.tc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); margin-top: var(--s2); color: var(--text-secondary); font-size: 14px; font-variant-numeric: tabular-nums; }
.tc-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.tc-open { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--brand-primary); font-weight: 600; text-decoration: none; }
.tc-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.tcard.is-top { padding: var(--s6); margin: var(--s5) 0; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand-primary); }
.feed-more { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 56px; margin-top: var(--s6); border: 1px solid var(--brand-dark); color: var(--brand-dark); font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.feed-more:hover { background: var(--brand-dark); color: var(--background); }

/* 반응형 */
@media (max-width: 639px) {
  .opening { min-height: auto; }
  .opening-in { padding-block: var(--s7) var(--s8); }
  .opening-cta, .opening-cta .btn { width: 100%; }
  .scroll-cue { display: none; }
  .layout { padding-top: var(--s7); }
  .tcard.is-top { padding: var(--s5); margin-inline: -4px; }
  .tc-meta { gap: var(--s4); }
  .hero-grid { padding-block: var(--s5) var(--s4); gap: var(--s6); }
  .stage { padding-left: 0; }
  .tpost-behind { display: none; }
  .about-photo { aspect-ratio: 4 / 3.4; }
  .about-photo img { object-position: 50% 28%; }
  main > section + section, main > .marquee + section { margin-top: 64px; }
  .stats div:nth-child(2n) { padding-left: var(--s4); border-left: 1px solid var(--border); }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .nav-links a:not(.btn) { padding: 0 6px; font-size: 13.5px; }
  .nav-links a:not(.btn)::after { left: 6px; right: 6px; }
  .brand-sub { display: none; }
  .nav-links a:not(.btn)::after { left: var(--s2); right: var(--s2); }
  .brand-word { font-size: 22px; }
}
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats div + div { padding-left: var(--s5); border-left: 1px solid var(--border); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .channels { grid-template-columns: repeat(3, 1fr); }
  .channel { grid-template-columns: 1fr; grid-template-areas: "logo" "name" "desc" "go"; row-gap: var(--s2); }
  .collab-grid { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: repeat(3, 1fr); }
  .work-main { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .layout { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); align-items: start; }
  .profile { grid-column: 1 / span 4; position: sticky; top: 96px; max-height: calc(100svh - 112px); overflow-y: auto; scrollbar-width: none; padding-bottom: var(--s4); }
  .profile::-webkit-scrollbar { display: none; }
  .feed { grid-column: 6 / span 7; }
  .hero-grid, .about { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); }
  .hero-copy { grid-column: 1 / span 6; }
  .stage { grid-column: 7 / span 6; }
  .hero-grid { min-height: min(720px, calc(100svh - 72px)); padding-block: var(--s7); }
  .about-photo { grid-column: 1 / span 5; }
  .about-text { grid-column: 7 / span 6; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .post:first-child { grid-column: span 2; padding: var(--s6); }
  .grid .post:first-child h3 { font-size: 26px; }
  .collab-grid { grid-template-columns: repeat(4, 1fr); }
  .work { grid-template-columns: repeat(3, 1fr); }
  .work-main { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto; column-gap: var(--s5); row-gap: var(--s3); padding: var(--s7) var(--s6); min-height: 400px; align-content: center; }
  .work-main { position: relative; }
  .work-main .work-img { position: absolute; top: 0; right: 0; bottom: 0; width: 42%; height: 100%; margin: 0; aspect-ratio: auto; object-position: 50% 72%; }
  .work-main .work-tag { grid-column: 1 / span 6; grid-row: 1; justify-self: start; }
  .work-main .work-name { grid-column: 1 / span 6; grid-row: 2; }
  .work-main .work-desc { grid-column: 1 / span 6; grid-row: 3; }
  .work-main .work-go { grid-column: 1 / span 6; grid-row: 4; padding-top: var(--s3); }
  .contact { grid-template-columns: 1fr auto; }
  .mobile-cta { display: none; }
  .site-foot { padding-bottom: var(--s6); }
}
@media (max-width: 959px) {
  .nav-links .btn-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mobile-cta { transform: none; }
}
