/* Hallmark · checked: 2026-11-29 · genre: editorial (inferred: a personal journal of posts, photographs and a profile)
 * floor: fixed 7a, 10a, 26a, 27, 34, 40, 48, 50, 54, 63, 67, 76 · finish-review: subagent · 4 findings · 4 resolved · reflex: fixed 11, 26b, 29, 38ii · structural: 4 printed (24b, 44c, 77, 78)
 * built: the project · redesign: polish · palette 2026-11-29: near-black and warm off-white with one muted gold accent (was dark chocolate and caramel) · Playfair italic wordmark kept · v2.0.0 */
/* Hallmark · polish 2026-11-29: magazine home (ticker strip, feature, four section columns) · the feature is left out of the strip and columns so no picture repeats */
/* Hallmark · answered F15 · the profile page's photo and text split is its own composition, set apart from the post grids on purpose */

/* =========================================================
   by_yongbi — 골드 + 블랙 테마 (2026-11-29, 예전: 다크 초콜릿)
   CSS 기본 문법:  선택자 { 속성: 값; }
   [다듬기] 표시 = "AI가 만든 티"를 없애려고 고친 곳
   ========================================================= */

/* ① 색상·글꼴 변수: 여기만 바꾸면 사이트 전체가 바뀝니다
      [다듬기] 코드 곳곳에 흩어져 있던 색도 전부 여기로 모았어요 */
:root {
  /* [골드+블랙] 갈색 기운을 거의 뺀 검정 + 채도 낮은 오프화이트 + 골드 포인트 하나 */
  --bg:         #121110;   /* 거의 검정 (메인 배경) — 아주 살짝 따뜻하게 */
  --bg-soft:    #1c1a18;   /* 카드·버튼 바탕 */
  --bg-deep:    #0a0908;   /* 푸터·영상 바탕 — 배경보다 한 단계 진하게 */
  --line:       #2e2a26;   /* 구분선 */
  --field-edge: #6b645c;   /* 입력칸 테두리 (배경과 3:1 이상 대비) */
  --text:       #f5f2ec;   /* 오프화이트 글씨 */
  --text-body:  #dcd6ce;   /* 긴 본문 글씨 (살짝 부드럽게) */
  --text-dim:   #9a938a;   /* 흐린 보조 글씨 (골드와 확실히 구분되는 회갈색) */
  --accent:     #c8a04e;   /* 골드 포인트 — 링크·카테고리 등 꼭 필요한 곳에만 */
  --focus:      #c8a04e;   /* 키보드로 이동할 때 보이는 테두리 */
  --scrim:      #070605;   /* 사진 위·뒤 어두운 막 (완전 검정보다 아주 살짝 따뜻하게) */
  --shadow-photo: 0 24px 60px #00000073;   /* 사진 그림자 */
  --shadow-lift:  0 30px 80px #00000099;
  /* 양각(도드라져 보이는) 버튼: 위쪽은 빛을 받은 듯 밝게, 아래로는 그림자 */
  --emboss: inset 0 1px 0 #ffffff1f, inset 0 -1px 0 #00000080, 0 2px 6px #000000b3;
  --emboss-press: inset 0 2px 4px #000000b3;   /* 누르면 쏙 들어간 듯 */

  --logo:  "Playfair Display", serif;   /* 이탤릭 로고 "by_yongbi" 에만 (브랜드) */
  /* [폰트 교체] 명조 → 디자인·예술 블로그에 어울리는 현대적인 글꼴
     --head: 제목·라벨. 영어는 Space Grotesk, 한글은 Pretendard 가 자동으로 맡아요
     --sans: 본문. Pretendard (요즘 디자인 사이트에서 가장 많이 쓰는 한글 글꼴) */
  --head:  "Space Grotesk", "Pretendard Variable", Pretendard, sans-serif;
  --sans:  "Pretendard Variable", Pretendard, sans-serif;
  --width: 1180px;                       /* 콘텐츠 최대 너비 */
  --width-wide: 1680px;                  /* 메인의 대표 글·칼럼은 더 넓게 (긴 제목도 한 줄에) */
  --gap-col: 40px;                       /* [다듬기] 글 목록 칸 사이 간격 하나로 통일 */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --mask: #000;                          /* 가리개(mask) 전용: 검정 = 보임, 투명 = 안 보임 */
}

/* ② 기본 초기화 */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* [다듬기] 가로 스크롤이 절대 생기지 않게 (hidden 대신 clip) */
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;            /* [다듬기] 300(가는 글씨) → 400: 어두운 바탕에서 더 잘 읽혀요 */
  line-height: 1.7;
  word-break: keep-all;        /* 한글이 단어 중간에서 줄바꿈되지 않게 */
  /* [다듬기] 글이 짧은 페이지에서도 푸터가 화면 맨 아래에 붙게: 세로로 쌓고 본문(main)이 남는 공간을 채워요 */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

/* [다듬기] 키보드(Tab)로 이동할 때 지금 어디 있는지 또렷하게 — 바로 나타나게 */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* ③ 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;             /* 화면이 좁으면 메뉴가 다음 줄로 */
  gap: 16px;
  padding: 20px 5vw;
  background: var(--bg);       /* [다듬기] 반투명 유리 효과 → 단단한 바탕 */
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--logo);
  font-style: italic;          /* 이탤릭체 — by_yongbi 의 얼굴이라 그대로 */
  font-weight: 500;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav > a {
  position: relative;
  font-size: 0.95rem;          /* [다듬기] 글자 사이 벌림(자간) 없애고 본문 글씨 그대로 */
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.nav > a:hover, .nav > a.active { color: var(--text); }
.nav > a:active { opacity: 0.7; }

/* 메뉴 밑줄: ::after = 요소 뒤에 가짜 요소를 하나 만들어 꾸미기
   [다듬기] 너비(width)를 움직이던 것 → 크기 배율(transform)로: 더 부드럽고 가벼워요 */
.nav > a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav > a:hover::after, .nav > a.active::after { transform: scaleX(1); }

/* 검색창 */
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--field-edge);   /* [다듬기] 잘 안 보이던 테두리를 또렷하게 */
  border-radius: 999px;
  transition: border-color 0.2s var(--ease);
}
.search:focus-within { border-color: var(--accent); outline: 2px solid var(--focus); outline-offset: 2px; }
.search svg { width: 15px; height: 15px; fill: none; stroke: var(--text-dim); stroke-width: 2; }
.search input {
  width: 120px;
  background: none; border: none; outline: none;   /* 테두리는 바깥 .search 가 대신 보여 줘요 */
  color: var(--text);
  caret-color: var(--accent);
  font: inherit; font-size: 0.9rem;
}
.search input::placeholder { color: var(--text-dim); }

/* 관리자 글쓰기 아이콘 (관리자 서버로 열었을 때만 나타남) */
/* [골드+블랙] 글쓰기 버튼: 속은 검정 + 살짝 도드라진 양각
   색은 상단 메뉴와 통일 → 테두리는 검색창과 같은 선, 연필은 메뉴 글씨색. 마우스를 올리면 메뉴처럼 밝아지기만 해요 (움직임 없음) */
.write {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--bg-soft);
  border: 1px solid var(--field-edge);
  border-radius: 50%;
  box-shadow: var(--emboss);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.write:hover { border-color: var(--text); }
.write:active { transform: scale(0.94); box-shadow: var(--emboss-press); }
.write svg { width: 18px; height: 18px; fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linejoin: round; transition: stroke 0.2s var(--ease); }
.write:hover svg { stroke: var(--text); }
.nav > a.write::after { display: none; }   /* 메뉴 글씨용 밑줄은 동그란 버튼에는 안 그려요 */

/* ④ 공통 영역 */
main { flex: 1; }
.curation, .more-stories, .page {
  max-width: var(--width);
  margin: 0 auto;
  padding: 64px 5vw 40px;
}

/* [다듬기] 메인 맨 위 "CURATED · LATEST" 장식 줄은 없앴어요 — 대표 글 날짜가 바로 아래 이미 있어서 */

.section-head {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 18px; margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
/* [다듬기] 영어 제목은 로고와 같은 Playfair 글꼴로 (기울이지 않고 똑바로 — 로고만 이탤릭) */
.section-head h2 {
  font-family: var(--head); font-weight: 600; font-size: 2.2rem; letter-spacing: -0.02em;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
}
.section-head p  { color: var(--text-dim); font-size: 0.9rem; }

/* ⑤ 카드 (기본 = 작은 카드) */
.card { cursor: pointer; }
.card-img { overflow: hidden; border-radius: 3px; }
/* [다듬기] 사진은 가만히 — 마우스를 올려도 커지거나 색이 바뀌지 않아요 (반응은 제목이 해요) */
.card-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body { padding: 18px 2px 8px; }
.card h3 {
  font-family: var(--head); font-weight: 600;
  font-size: 1.15rem; line-height: 1.45;
  margin: 6px 0 8px;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
  transition: color 0.2s var(--ease);
}
.card:hover h3 { color: var(--accent); }
.card:active h3 { opacity: 0.75; }
.excerpt { color: var(--text-dim); font-size: 0.95rem; }

.meta { display: flex; gap: 12px; align-items: center; font-size: 0.85rem; color: var(--text-dim); }
.cat {
  font-family: var(--head); font-weight: 500;
  font-size: 0.9rem;
  color: var(--accent);
}

/* 대표 글(feature): 사진 왼쪽 크게 + 글 오른쪽 */
.card.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);   /* 6 : 4 비율 (minmax: 사진이 칸을 밀어내지 않게) */
  gap: var(--gap-col);
  align-items: center;
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.card.feature .card-img img { aspect-ratio: 16 / 10; }
.card.feature h3 { font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.3; margin: 14px 0 18px; }
.card.feature .excerpt { font-size: 1rem; }
/* [다듬기] "Read more →" (화살표 붙은 영어) → "글 읽기" */
.more {
  display: inline-block; margin-top: 28px;
  font-size: 1rem; font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.more:active { opacity: 0.7; }

/* 중간 카드(wide) 2개 */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-col); }
.card.wide .card-img img { aspect-ratio: 16 / 9; }
.card.wide h3 { font-size: 1.45rem; font-weight: 400; }

/* 작은 카드 3열 */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 48px var(--gap-col); }

/* ⑤-2 [매거진 구조] 메인: 대표 글 아래 선은 띠가 대신해요 */
/* 대표 글: 왼쪽 3:4 사진(글씨 높이에 맞춘 크기) + 오른쪽 글씨(왼쪽 정렬) */
.feature-split {
  max-width: var(--width-wide); margin: 0 auto;   /* 넓은 칸 (아래 칼럼과 같은 폭) */
  padding: 64px 5vw 96px;   /* 아래 여백을 넉넉히 → 공간감 */
  display: grid;
  /* 사진 칸: 화면 폭의 30% (최소 300px, 최대 400px) → 1280px 화면에서 약 384×512 (3:4) */
  grid-template-columns: minmax(0, clamp(300px, 30vw, 400px)) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 96px);   /* 사진과 글 사이도 넓게 */
  align-items: start;
}
/* 사진은 화면 높이를 넘지 않게: 폭을 (화면 높이 − 헤더 등 140px) × 3/4 까지만 → 스크롤하면 사진 전체가 한 화면에 들어와요 */
.feature-photo { display: block; width: min(100%, calc((100svh - 140px) * 3 / 4)); }
.feature-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; }
/* 글씨: 사진 위쪽에서 조금 내려온 곳부터 → 첫 화면에 제목과 "글 읽기"가 다 보이게 */
.feature-text { display: grid; justify-items: start; gap: 16px; padding-top: 48px; }   /* 모두 왼쪽 정렬 */
.feature-text h2 {
  font-family: var(--head); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2rem, 2.9vw, 3.2rem); line-height: 1.25;   /* 화면 폭에 맞춰 크기 조절 → 웬만한 제목은 한 줄 */
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
  transition: color 0.2s var(--ease);
}
.feature-text h2 a:hover { color: var(--accent); }
.feature-lead { font-size: 1.05rem; color: var(--text-body); max-width: 32em; }
.feature-text time { font-size: 0.85rem; color: var(--text-dim); }
.feature-text .more { margin-top: 8px; }

@media (max-width: 800px) {
  /* 좁은 화면: 한 줄로 쌓기 — 사진(조금 작게) 위, 글씨 아래 */
  .feature-split { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 48px 5vw 64px; }
  .feature-photo { max-width: 280px; }
  .feature-text { padding-top: 0; }
}

/* 흘러가는 최신 글 띠 — 화면 양끝까지 꽉 차게 */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);   /* 위쪽 선은 헤더 아래 선이 대신해요 */
  padding: 20px 0;
  /* 양쪽 끝이 배경색으로 스르르 사라지게 */
  mask-image: linear-gradient(to right, transparent, var(--mask) 6%, var(--mask) 94%, transparent);
}
.ticker-track {
  display: flex; gap: 24px;
  width: max-content;
  list-style: none;
  animation: ticker var(--duration, 50s) linear infinite;
}
/* 마우스를 올리거나 키보드로 들어오면 잠깐 멈춰서 읽을 수 있게 */
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* 띠의 절반 = 한 줄 길이만큼 왼쪽으로 */
}
/* 글 하나 = 세로로 긴 3:4 사진. 제목은 평소엔 숨어 있다가 마우스를 올리면 사진 위로 떠올라요 */
.tick {
  position: relative; display: block;
  width: 180px; aspect-ratio: 3 / 4;
  overflow: hidden; border-radius: 2px;
}
.tick img { width: 100%; height: 100%; object-fit: cover; }
/* 사진 위 어두운 막 + 제목: 기본은 "보이는 상태" (휴대폰·태블릿처럼 마우스가 없으면 이대로) */
.tick::after {
  content: ""; position: absolute; inset: 0;
  background: var(--scrim);
  opacity: 0.5;
  transition: opacity 0.4s var(--ease);
}
.tick-title {
  position: absolute; inset: auto 0 0; z-index: 1;   /* 사진 아래쪽에 겹쳐 놓기 (어두운 막보다 위) */
  padding: 16px;
  font-family: var(--head); font-weight: 600; font-size: 1rem; line-height: 1.45;
  color: var(--text);
  text-wrap: balance; overflow-wrap: break-word;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
/* 마우스가 있는 컴퓨터에서만: 평소엔 사진만 → 마우스를 올리면 살짝 어두워지고 제목이 12px 아래에서 "떠올라요" */
/* .js = app.js 가 붙이는 표시. 스크립트가 안 돌면 제목은 그냥 계속 보여요 */
@media (hover: hover) {
  .js .tick::after { opacity: 0; }
  .js .tick-title { opacity: 0; transform: translateY(12px); }
  .js .tick:hover::after, .js .tick:focus-visible::after { opacity: 0.6; }
  .js .tick:hover .tick-title, .js .tick:focus-visible .tick-title { opacity: 1; transform: none; }
}

/* 카테고리별 칼럼 — 신문처럼 칸 사이에 세로줄 */
.columns-wrap { max-width: var(--width-wide); margin: 0 auto; padding: 0 5vw 40px; }
/* [다듬기] 큰 "Sections" 제목 대신 대표 글과 칼럼 사이에 가는 선 하나 */
.columns {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 48px;
  padding-top: 48px; border-top: 1px solid var(--line);   /* 대표 글과 칼럼 사이 가는 선 */
}   /* 칸 너비는 모두 똑같이 */
.column { position: relative; display: flex; flex-direction: column; }
/* 칸 사이 세로줄: 간격(48px)의 한가운데에 그려요 */
.column + .column::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -24px;
  border-left: 1px solid var(--line);
}
.column-head {
  font-family: var(--head); font-weight: 600; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em;
  padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--text);   /* [다듬기] 주황 두꺼운 줄 4개 → 크림색 가는 줄: 주황은 마우스 반응에만 */
}
.column-head a:hover { color: var(--accent); }
.column-lead { display: grid; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.column-lead img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; margin-bottom: 8px; }
.column-lead strong {
  font-family: var(--head); font-weight: 600; font-size: 1.1rem; line-height: 1.45;
  text-wrap: balance; transition: color 0.2s var(--ease);
}
.column-lead:hover strong { color: var(--accent); }
.column time { font-size: 0.8rem; color: var(--text-dim); }
.column-list { list-style: none; }
.column-list li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.column-list a { font-family: var(--head); font-size: 0.98rem; line-height: 1.5; transition: color 0.2s var(--ease); }
.column-list a:hover { color: var(--accent); }
.column-more { margin-top: auto; padding-top: 16px; font-size: 0.85rem; color: var(--accent); }   /* [다듬기] 칸마다 글 수가 달라도 "전체 보기"는 같은 높이(맨 아래)에 */
.column-more:hover { text-decoration: underline; }
.column-empty { color: var(--text-dim); font-size: 0.9rem; }

/* 화면이 좁으면 4칸 → 2칸 → 1칸 */
@media (max-width: 1000px) {
  .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .column:nth-child(odd)::before { display: none; }   /* 줄 맨 앞 칸에는 세로줄 없음 */
}
@media (max-width: 600px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .column::before { display: none; }
  .tick { width: 140px; }
}

/* "움직임 줄이기"를 켠 사람: 저절로 흐르지 않고, 손가락·마우스로 옆으로 밀어서 봐요 */
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; mask-image: none; }
  .ticker-track { animation: none; padding: 0 5vw; }
  .ticker-track li[aria-hidden="true"] { display: none; }
}

/* ⑥ 소개 페이지 */
/*   사진(5) : 글(7) 비율의 잡지형 배치. 사진은 자르지 않고 원래 비율 그대로 보여요. */
.about {
  display: grid;
  grid-template-columns: minmax(240px, 5fr) minmax(0, 7fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
  max-width: 1080px;
  padding-top: 110px;
  padding-bottom: 60px;
}
.about.no-photo { grid-template-columns: minmax(0, 1fr); max-width: 720px; }

/* 사진: [다듬기] 뒤에 어긋나 있던 장식 액자선은 없애고, 사진 자체를 깔끔하게 보여 줘요 */
.portrait { justify-self: end; width: 100%; max-width: 340px; }
.portrait-frame { position: relative; }
.portrait img {
  width: 100%;
  height: auto;                            /* 높이 자동 = 사진 전체가 원래 비율로 */
  border-radius: 2px;
  box-shadow: var(--shadow-photo);
}
/* [다듬기] 사진 설명(캡션): 이름 + 그 아래 한 줄 소개 (예전엔 제목 위 작은 장식 줄이었어요) */
.portrait figcaption {
  margin-top: 34px;
  color: var(--text-dim);
}
.portrait figcaption .who { display: block; font-family: var(--head); font-weight: 600; font-size: 1.2rem; color: var(--text); }
.portrait figcaption .role { display: block; margin-top: 4px; font-size: 0.95rem; }

/* 글 */
.about-text { max-width: 560px; min-width: 0; }
.about h2 {
  font-family: var(--head); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.35;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
}
.about-rule { display: block; width: 44px; height: 1px; margin: 28px 0; background: var(--accent); }
.about .bio { color: var(--text-dim); font-size: 1.02rem; line-height: 1.95; }
/* [다듬기] "Interests"/"Links" 기울어진 영어 라벨 → 한글 소제목 */
.about h3 {
  margin: 40px 0 12px;
  font-family: var(--sans); font-weight: 500;
  font-size: 1rem;
  color: var(--text);
}

/* 소개글 안의 마크다운 (굵게, 링크, 목록 등) */
.md > * + * { margin-top: 0.9em; }
.md strong, .md em { color: var(--text); }
.md a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.md ul, .md ol { padding-left: 20px; }
.md blockquote { padding-left: 14px; border-left: 2px solid var(--accent); font-style: italic; }
.md img, .md video { max-width: 100%; border-radius: 4px; }

/* 관심사 태그 */
.interests { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.interests li {
  padding: 3px 14px;
  border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-size: 0.85rem;
}

/* 링크 버튼 (SNS 등) */
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-links a {
  padding: 8px 18px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.9rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.profile-links a:hover { border-color: var(--accent); color: var(--accent); }
.profile-links a:active { opacity: 0.75; }

/* ⑦ 푸터 */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 80px;
  padding: 44px 5vw;
  background: var(--bg-deep);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer .logo { font-size: 1.4rem; }

/* ⑧ 작은 화면 (4단계에서 자세히 배울 부분 — 맛보기) */
@media (max-width: 800px) {
  .card.feature, .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 64px; text-align: center; }   /* minmax(0,1fr): 내용이 길어도 화면 밖으로 안 넘치게 */
  .portrait { justify-self: center; max-width: 260px; }
  .about-text { margin: 0 auto; }
  .about-rule { margin: 24px auto; }
  .interests, .profile-links { justify-content: center; }
  .nav { gap: 18px; }
  .site-footer { flex-direction: column; gap: 10px; text-align: center; }
}

/* =========================================================
   [3단계] 미디어 — 글 상세 페이지 / 영상 / 음악 / 유튜브 / 사진 크게 보기
   ========================================================= */

/* 카드: 영상·음악 글 표시 — [다듬기] 반투명 유리 → 단단한 원 */
.card-img { position: relative; }
.play-badge {
  position: absolute; right: 14px; bottom: 14px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--bg);
  border: 1px solid var(--field-edge);
  border-radius: 50%;
  color: var(--text); font-size: 0.85rem;
}
.card h3 a { color: inherit; }

/* 상세 페이지: 글은 읽기 편한 좁은 폭(720px), 맨 위 미디어는 넓게(960px) */
.post { max-width: 960px; margin: 0 auto; padding: 72px 5vw 40px; }

/* [사이드바] 글 상세: 가운데 글(960px) + 왼쪽 빈 곳에 카테고리 메뉴
   칸 3개 = 왼쪽 여백 | 글 | 오른쪽 여백 → 글은 지금처럼 화면 가운데, 메뉴는 왼쪽 여백 칸의 오른쪽 끝에 */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 960px) minmax(0, 1fr); }
.post-layout > .post { grid-column: 2; margin: 0; max-width: none; min-width: 0; }
.post-side {
  grid-column: 1; grid-row: 1;
  justify-self: end; align-self: start;
  position: sticky; top: 132px;   /* 스크롤해도 헤더(92px) 바로 아래에 붙어 따라와요 */
  margin-top: 80px; padding-right: 24px;   /* 처음 값. app.js 의 alignSide() 가 본문 맨 윗단에 맞춰 다시 정해요 */
  width: 140px;   /* 1280px 화면의 왼쪽 빈 칸(약 150px)에도 들어가게 */
}
.post-side nav { display: grid; gap: 4px; }
.post-side nav a {
  padding: 8px 0;
  font-family: var(--head); font-size: 1.05rem; color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s var(--ease);
}
.post-side nav a:first-child { padding-top: 0; }   /* 첫 메뉴 글씨 윗선 = 본문 사진 윗선 */
.post-side nav a:hover { color: var(--text); }
.post-side nav a.active { color: var(--accent); }

/* [검색 키워드] 사이드바 아래 "많이 검색된 태그" 박스 */
.side-box {
  margin-top: 40px; padding: 16px;
  background: var(--bg-soft); border-radius: 6px;   /* 이전/다음 글 박스와 같은 바탕 */
}
.side-box h2 { font-family: var(--head); font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 12px; }
.side-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.side-tags a {
  display: inline-block; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.8rem; color: var(--text-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.side-tags a:hover { border-color: var(--accent); color: var(--accent); }
.side-empty { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
@media (max-width: 1240px) {
  .post-side { display: none; }   /* 화면이 좁으면 왼쪽 빈 곳이 없어서 숨겨요 (상단 메뉴는 그대로) */
}
.post-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.post-head .meta { justify-content: center; }
.post-head h1 {
  font-family: var(--head); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);   /* [본문 제목] 긴 제목도 본문 폭(720px) 안에 한 줄로 */
  line-height: 1.3;
  margin: 14px 0 18px;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
}
.post-lead { color: var(--text-dim); font-size: 1.05rem; }

.post-hero { margin: 0 0 56px; }
.post-hero img, .post-hero video {
  display: block; width: 100%;
  max-height: 600px; object-fit: cover;
  border-radius: 4px;
  background: var(--bg-deep);
  color: var(--text);
}
.post-hero img[data-zoom] { cursor: zoom-in; }

/* 음악 글: "지금 듣는 곡" 플레이어 카드 — [썸네일 숨기기] 사진 없이 카드만 */
.audio-hero figcaption {
  display: grid; gap: 6px;
  padding: 18px 22px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* [다듬기] "NOW PLAYING" 띄엄띄엄 대문자 → "지금 듣는 곡" */
.now-playing { font-size: 0.85rem; color: var(--accent); }
.audio-hero strong { font-family: var(--head); font-weight: 600; letter-spacing: -0.02em; font-size: 1.2rem; }
.audio-hero audio { width: 100%; margin-top: 6px; }

/* 본문 */
.post-content { max-width: 720px; margin: 0 auto; font-size: 1.05rem; line-height: 1.95; color: var(--text-body); }
.post-content h1, .post-content h2, .post-content h3 {
  font-family: var(--head); font-weight: 600; line-height: 1.4; color: var(--text);
  margin-top: 2em;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0;
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content hr { border: none; border-top: 1px solid var(--line); margin: 2.5em 0; }
.post-content code { padding: 1px 6px; background: var(--bg-soft); border-radius: 4px; font-size: 0.9em; }
.post-content img { cursor: zoom-in; }

/* 본문 속 사진·영상·음악 (<figure> + <figcaption>) */
.md figure { margin: 2em 0; }
.md figure img, .md figure video { display: block; width: 100%; border-radius: 4px; }
.md figure figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.md .md-audio {
  padding: 16px 20px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
}
.md .md-audio figcaption { margin: 0 0 8px; text-align: left; color: var(--accent); }
.md audio { width: 100%; }

/* 유튜브: 16:9 비율 상자에 꽉 차게 */
.embed { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; }
.post-hero .embed { margin: 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; }

/* 이전 글 / 다음 글 */
.post-nav {
  max-width: 720px; margin: 80px auto 0; padding-top: 32px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  border-top: 1px solid var(--line);
}
.nav-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid transparent; border-radius: 6px;
  transition: border-color 0.2s var(--ease);
}
.nav-card:hover { border-color: var(--accent); }
.nav-card:active { opacity: 0.8; }
.nav-card.next { flex-direction: row-reverse; text-align: right; }
.nav-card img { width: 72px; height: 54px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.nav-card span { font-family: var(--head); font-size: 0.95rem; line-height: 1.4; min-width: 0; }
.nav-card small { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--accent); margin-bottom: 2px; }

/* [더 읽을거리] 이전/다음 글 아래: 같은 모양의 박스가 한 줄에 하나씩 (폭 = 이전 글 + 다음 글 두 칸을 합친 만큼) */
.post-more { max-width: 720px; margin: 16px auto 0; display: grid; gap: 16px; }

/* 사진 크게 보기 (라이트박스) */
.lightbox {
  max-width: 100%; max-height: 100%; width: 100%; height: 100%;
  margin: 0; padding: 4vh 4vw;
  background: transparent; border: none;
  display: none; place-items: center;
  cursor: zoom-out;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: var(--scrim); opacity: 0.94; }   /* [다듬기] 흐림 효과 없이 단단한 어두운 막 */
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 3px; box-shadow: var(--shadow-lift); }
.lightbox figcaption { margin-top: 14px; color: var(--text-dim); font-size: 0.9rem; }
.lightbox-close {
  position: fixed; top: 20px; right: 24px;
  width: 44px; height: 44px;
  background: var(--bg); border: 1px solid var(--field-edge); border-radius: 50%;
  color: var(--text); font-size: 1rem; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent); }
.lightbox-close:active { opacity: 0.75; }
.lightbox-close:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 800px) {
  .post { padding-top: 40px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
}

/* [다듬기] "움직임 줄이기"를 켜 둔 사람에게는 움직이는 효과를 모두 멈춰요
   (윈도우 설정 > 접근성 > 시각 효과 > 애니메이션 효과 끄기) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* [편집기 업그레이드] 글 아래 태그 */
.post-tags { max-width: 720px; margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.post-tags a {
  display: inline-block; padding: 4px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; color: var(--text-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.post-tags a:hover { border-color: var(--accent); color: var(--accent); }
.post-tags a:active { opacity: 0.75; }
