/* =========================================================
   개인 사이트 — 공통 스타일
   ========================================================= */

:root {
  --bg: #fbfaf9;
  --bg-elev: #ffffff;
  --border: #e7e3de;
  --border-strong: #d8d2ca;
  --text: #1c1a18;
  --text-mid: #4a4540;
  --text-dim: #857d74;
  --accent: #c2603c;
  --accent-soft: #fbeee7;
  --accent-line: #eecfbe;
  --code-bg: #f3f0ec;
  --shadow: 0 1px 2px rgba(28, 26, 24, .04), 0 8px 24px -16px rgba(28, 26, 24, .18);

  /* 종류 배지 색 — 밝은 배경 위에서 4.5:1 이상 나오도록 어둡게 잡았습니다. */
  --hue-ios: #2f5f9e;
  --hue-android: #2f7a4b;
  --hue-artifact: #6b4da8;
  --hue-automation: #8a6114;
  --badge-tint: 11%;
  --badge-edge: 30%;

  --radius: 14px;
  --maxw: 1080px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171615;
    --bg-elev: #1f1e1c;
    --border: #302e2b;
    --border-strong: #413e39;
    --text: #f0ece7;
    --text-mid: #c2bbb2;
    --text-dim: #8d857b;
    --accent: #e08a63;
    --accent-soft: #2a201a;
    --accent-line: #4a352a;
    --code-bg: #262421;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -16px rgba(0, 0, 0, .7);

    /* 어두운 배경 위에서는 같은 색을 밝은 쪽으로 뒤집습니다. */
    --hue-ios: #8ab4e8;
    --hue-android: #7fc99b;
    --hue-artifact: #b8a0e8;
    --hue-automation: #d9b166;
    --badge-tint: 16%;
    --badge-edge: 36%;

    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  --bg: #fbfaf9; --bg-elev: #ffffff; --border: #e7e3de; --border-strong: #d8d2ca;
  --text: #1c1a18; --text-mid: #4a4540; --text-dim: #857d74;
  --accent: #c2603c; --accent-soft: #fbeee7; --accent-line: #eecfbe;
  --code-bg: #f3f0ec;
  --shadow: 0 1px 2px rgba(28,26,24,.04), 0 8px 24px -16px rgba(28,26,24,.18);
  --hue-ios: #2f5f9e; --hue-android: #2f7a4b;
  --hue-artifact: #6b4da8; --hue-automation: #8a6114;
  --badge-tint: 11%; --badge-edge: 30%;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #171615; --bg-elev: #1f1e1c; --border: #302e2b; --border-strong: #413e39;
  --text: #f0ece7; --text-mid: #c2bbb2; --text-dim: #8d857b;
  --accent: #e08a63; --accent-soft: #2a201a; --accent-line: #4a352a;
  --code-bg: #262421;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.7);
  --hue-ios: #8ab4e8; --hue-android: #7fc99b;
  --hue-artifact: #b8a0e8; --hue-automation: #d9b166;
  --badge-tint: 16%; --badge-edge: 36%;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 11px;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;   /* "Build log" 처럼 띄어쓰기가 있는 항목이 두 줄로 접히지 않도록 */
}

.nav a:hover { color: var(--text); background: var(--bg-elev); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.theme-toggle {
  margin-left: 6px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- 언어 ---------- */

/* 제작기 본문처럼 긴 글은 HTML 안에 두 벌로 들어 있고, 지금 언어가 아닌
   쪽을 여기서 숨깁니다. 켜고 끄는 규칙이라 다른 display 선언에 지지 않도록
   !important 로 못박았습니다.

   전환의 기준은 lang 이 아니라 data-lang 입니다. lang 으로 숨기면
   영어 글 안에서 한국어 고유명사를 표준대로 <span lang="ko"> 로 표시하는
   순간 그 글자가 사라집니다 — lang 은 "이게 무슨 언어인가"(보조기술용),
   data-lang 은 "언어를 따라 갈아끼울 덩어리인가"로 나눠 씁니다. */
html[lang="ko"] [data-lang="en"],
html[lang="en"] [data-lang="ko"] { display: none !important; }

/* 번역이 아직 없어 대신 보여주는 본문. 위의 숨김을 되돌립니다.
   (선택자가 위 규칙보다 구체적이어야 이깁니다) */
html .prose[data-lang].prose--fallback { display: block !important; }

.prose-fallback-note {
  margin: 0 0 28px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: var(--text-mid);
}

.lang-toggle {
  margin-left: 6px;
  display: flex;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-elev);
  overflow: hidden;
}

.lang-toggle button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 0 9px;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.lang-toggle button:hover { color: var(--text); }

/* 선택된 쪽: accent-soft 배경에 본문색 글자 + 아래 accent 밑줄.
   accent 색 글자를 얹으면 이 크기(12px)에서 대비가 4.5:1 아래로 떨어져서,
   색은 밑줄로 옮기고 글자는 본문색으로 뒀습니다. */
.lang-toggle button[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* 라디오 그룹이라 Tab 은 그룹에 한 번만 들어오고 그 안은 화살표로 옮깁니다.
   포커스가 어디 있는지는 그래서 더 분명히 보여야 합니다. */
.lang-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ---------- 히어로 ---------- */

.hero { padding: 76px 0 52px; }

.hero .eyebrow {
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 16px;
}

/* content.js 의 tagline 에 넣은 줄바꿈을 그대로 살립니다. pre-line 은 개행만
   보존하고 나머지 공백은 접으며, 화면이 좁으면 평소처럼 한 번 더 접힙니다.
   줄바꿈이 없는 영어 문장에는 아무 영향이 없습니다. */
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 17ch;
  white-space: pre-line;
}

.hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--text-mid);
  font-size: 17px;
  line-height: 1.75;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.hero-meta a { color: var(--accent); text-decoration: none; }
.hero-meta a:hover { text-decoration: underline; }

/* ---------- 섹션 ---------- */

section { padding: 8px 0 56px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 24px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-head .more {
  margin-left: auto;
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
}
.section-head .more:hover { color: var(--accent); }

.section-head .count {
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 필터 ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.chip {
  font: inherit;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-mid);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 라디오 그룹이라 Tab 은 그룹에 한 번만 들어오고 그 안은 화살표로 옮깁니다.
   포커스가 어디 있는지는 그래서 더 분명히 보여야 합니다. */
.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 프로젝트 카드 ---------- */

/* 트랙 최솟값을 min(320px, 100%) 로 두는 건, 화면이 320px보다 좁을 때
   트랙이 화면보다 넓어지는 걸 막기 위해서입니다. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: border-color .18s, transform .18s, box-shadow .18s;

  /* 그리드 항목의 min-width 기본값 auto 는 "내용의 min-content 보다 좁아지지
     않는다"는 뜻이라, 카드 안에 가로로 긴 것(스크린샷 줄)이 있으면 트랙을
     화면 밖까지 밀어냅니다. 0 으로 풀어야 카드가 화면에 맞고, 넘치는 건
     아래 .shot-strip 이 자기 안에서 스크롤로 처리합니다. */
  min-width: 0;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 종류 배지 — 색은 --badge-hue 하나로 정해지고, 배경/테두리는 거기서 파생됩니다.
   새 종류를 추가하려면 (1) 테마별 --hue-* 를 정의하고 (2) .badge--* 규칙을 한 줄 추가한 뒤
   (3) app.js 의 BADGE_VARIANT 에 매핑을 넣으면 됩니다. */
.badge {
  --badge-hue: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--badge-hue);
  background: color-mix(in srgb, var(--badge-hue) var(--badge-tint), transparent);
  border: 1px solid color-mix(in srgb, var(--badge-hue) var(--badge-edge), transparent);
  white-space: nowrap;
  flex: none;
}

.badge--ios        { --badge-hue: var(--hue-ios); }
.badge--android    { --badge-hue: var(--hue-android); }
.badge--artifact   { --badge-hue: var(--hue-artifact); }
.badge--automation { --badge-hue: var(--hue-automation); }

.badge.plain {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
  font-weight: 600;
}

.card .status {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  flex: none;
  padding-top: 3px;
}

.card p.blurb {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--text-mid);
}

.card ul.points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}

.card ul.points li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-mid);
  padding-left: 15px;
  position: relative;
}
.card ul.points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}

/* ---------- 결과물 미리보기 ---------- */

/* min-width: 0 이 없으면 이 줄의 min-content(썸네일 5장을 늘어놓은 폭)가
   그대로 카드의 최소 폭이 되어, 카드가 화면 밖으로 삐져나갑니다. */
.shots { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* 카드 폭을 넘는 만큼만 가로로 흐르게 두고, 페이지 자체는 절대 가로로
   밀리지 않도록 이 안에서만 스크롤합니다. */
.shot-strip {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.shot-strip::-webkit-scrollbar { height: 6px; }
.shot-strip::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.shot {
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  overflow: hidden;
  cursor: zoom-in;
  scroll-snap-align: start;
  line-height: 0;
  transition: border-color .15s, transform .15s;
}
.shot:hover { border-color: var(--accent); transform: translateY(-1px); }
.shot img { height: 132px; width: auto; display: block; }

.shot-caption {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shot-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  white-space: nowrap;
}

/* ---------- 크게 보기 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 11, 10, .88);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 56px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .75);
  font-variant-numeric: tabular-nums;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  cursor: pointer;
  padding: 0 0 3px;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

@media (max-width: 700px) {
  .lightbox { padding: 20px 12px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 22px; }
  .lightbox-nav.prev { left: 4px; }
  .lightbox-nav.next { right: 4px; }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--text-dim);
  white-space: nowrap;
}

/* 좁은 화면에서는 버튼·링크·경로가 한 줄에 다 못 들어갑니다.
   줄바꿈을 허용하지 않으면 이 줄이 카드를 옆으로 늘려버립니다. */
.card-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  min-width: 0;
}
.card-foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.card-foot a:hover { text-decoration: underline; }

/* 스토어로 나가는 링크는 카드 안에서 유일하게 "누를 것"이라 버튼으로 세웁니다. */
.card-foot .store-link {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  border: 1px solid var(--accent);
}
.card-foot .store-link:hover {
  text-decoration: none;
  filter: brightness(1.08);
}
.card-foot .src {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: right;
}

/* ---------- 글 목록 ---------- */

.posts { display: flex; flex-direction: column; }

.post-row {
  display: block;
  text-decoration: none;
  padding: 22px 4px;
  border-top: 1px solid var(--border);
  transition: background .15s;
  border-radius: 8px;
}
.post-row:first-child { border-top: none; }
.post-row:hover { background: var(--bg-elev); }
.post-row:hover h3 { color: var(--accent); }

.post-row .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.post-row .meta time { font-variant-numeric: tabular-nums; }
.post-row .meta .sep { opacity: .4; }

.post-row h3 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.4;
  transition: color .15s;
}

.post-row p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-mid);
  max-width: 68ch;
  line-height: 1.7;
}

.empty {
  padding: 40px 0;
  color: var(--text-dim);
  font-size: 14.5px;
  text-align: center;
}

/* ---------- 글 본문 ---------- */

.article { max-width: 720px; margin: 0 auto; padding: 56px 0 40px; }

.article-head { margin-bottom: 40px; }

.article-head .back {
  display: inline-block;
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 26px;
}
.article-head .back:hover { color: var(--accent); }

.article-head h1 {
  margin: 0 0 16px;
  font-size: clamp(27px, 4.4vw, 37px);
  line-height: 1.3;
  letter-spacing: -0.032em;
  font-weight: 800;
}

.article-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
}
.article-head .meta .sep { opacity: .4; }

.prose { font-size: 16.5px; line-height: 1.85; color: var(--text-mid); }

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin: 2.4em 0 .1em;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.4;
}

.prose h3 {
  margin: 1.9em 0 .1em;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.prose strong { color: var(--text); font-weight: 700; }

.prose a { color: var(--accent); text-underline-offset: 3px; }

.prose ul, .prose ol { padding-left: 1.35em; margin-top: .8em; }
.prose li { margin-top: .5em; }
.prose li::marker { color: var(--text-dim); }

.prose code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text);
}

.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 17px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }

.prose blockquote {
  margin-left: 0; margin-right: 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent-line);
  color: var(--text-dim);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.6em 0;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-mid);
}
.callout strong { color: var(--text); }

.article-foot {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
}
.article-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.article-foot a:hover { text-decoration: underline; }

/* ---------- 페이지 헤더 ---------- */

.page-head { padding: 62px 0 34px; }
.page-head h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.6vw, 40px);
  letter-spacing: -0.033em;
  font-weight: 800;
  line-height: 1.2;
}
.page-head p {
  margin: 0;
  color: var(--text-mid);
  max-width: 58ch;
  font-size: 16px;
}

/* ---------- 푸터 ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 30px 0 50px;
  font-size: 13px;
  color: var(--text-dim);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .right { margin-left: auto; }

/* ---------- 반응형 ---------- */

@media (max-width: 700px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 52px 0 40px; }
  /* 1fr 은 minmax(auto, 1fr) 이라 내용의 min-content 아래로 안 줄어듭니다.
     한 칸짜리 모바일에서는 그게 곧 가로 스크롤이라 최솟값을 0 으로 둡니다. */
  .grid { grid-template-columns: minmax(0, 1fr); }
  .nav a { padding: 6px 8px; font-size: 13.5px; }
  .nav { gap: 2px; }
  .brand span.name { display: none; }
  .lang-toggle { margin-left: 4px; }
  .lang-toggle button { padding: 0 7px; }
  .theme-toggle { margin-left: 4px; }
  .card .status { margin-left: 0; width: 100%; padding-top: 0; }
  .card-top { flex-wrap: wrap; }
  .site-footer .right { margin-left: 0; }
}

/* 아주 좁은 기기(320px대). 메뉴 3개 + 한/영 + 테마 버튼이 한 줄에 안 들어가
   헤더만 가로로 삐져나갑니다. 여백을 깎아 들어가게 합니다. */
@media (max-width: 400px) {
  .site-header .wrap { gap: 10px; }
  .nav a { padding: 6px 5px; font-size: 13px; }
  .lang-toggle button { padding: 0 6px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover { transform: none; }
}
