/* ==========================================================================
   Hyunjin.dev — Apple HIG–inspired design tokens (mirrors the Figma file)
   ========================================================================== */

:root {
  /* Color — Light */
  --label-primary: #1d1d1f;
  --label-secondary: rgba(60, 60, 67, 0.6);
  --label-tertiary: rgba(60, 60, 67, 0.3);
  --label-on-accent: #fff;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fff;
  --bg-material: rgba(255, 255, 255, 0.72);
  --fill-secondary: rgba(120, 120, 128, 0.16);
  --fill-tertiary: rgba(118, 118, 128, 0.12);
  --separator: rgba(60, 60, 67, 0.18);
  --accent: #0071e3;
  --accent-tint: rgba(0, 113, 227, 0.12);
  --orange: #ff9500;
  --foam: #fbf6ea;
  --device: #1d1d1f;
  --device-base: #d2d2d7;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-seg: 0 1px 3px rgba(0, 0, 0, 0.12);

  /* Spacing */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-20: 20px; --s-24: 24px;
  --s-32: 32px; --s-44: 44px; --s-64: 64px; --s-80: 80px; --s-120: 120px;

  /* Radius */
  --r-sm: 10px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Pretendard Variable", Pretendard, "Inter", system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: "Times New Roman", Times, "Nanum Myeongjo", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;

  --container: 1080px;
  --nav-h: 52px;

  color-scheme: light;
}

[data-theme="dark"] {
  --label-primary: #f5f5f7;
  --label-secondary: rgba(235, 235, 245, 0.6);
  --label-tertiary: rgba(235, 235, 245, 0.3);
  --bg-primary: #000;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --bg-material: rgba(28, 28, 30, 0.72);
  --fill-secondary: rgba(120, 120, 128, 0.32);
  --fill-tertiary: rgba(118, 118, 128, 0.24);
  --separator: rgba(84, 84, 88, 0.6);
  --accent: #0a84ff;
  --accent-tint: rgba(10, 132, 255, 0.2);
  --orange: #ff9f0a;
  --foam: #efe8d6;
  --device: #2c2c2e;
  --device-base: #48484a;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  color: var(--label-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--s-20)); margin: 0 auto; padding: 0 var(--s-20); }

/* ---------- Typography ---------- */
.t-hero { font-size: clamp(44px, 7vw, 80px); line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; }
.t-display { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.t-title1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -0.005em; }
.t-title2 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; font-weight: 600; letter-spacing: -0.003em; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.t-callout { font-size: 15px; line-height: 20px; }
.t-footnote { font-size: 13px; line-height: 18px; }
.t-caption { font-size: 12px; line-height: 16px; font-weight: 500; }
.c-secondary { color: var(--label-secondary); }
.c-tertiary { color: var(--label-tertiary); }
:lang(ko) .t-hero, :lang(ko) .t-display, :lang(ko) .t-title1 { letter-spacing: -0.025em; font-weight: 700; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--bg-material);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border-bottom: 1px solid var(--separator);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-24); }
.nav__brand { font-weight: 600; font-size: 17px; color: var(--label-primary); }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: var(--s-32); list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 13px; color: var(--label-primary); opacity: 0.8; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav__links a[aria-current="page"] { font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: var(--s-12); }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center;
  background: var(--fill-tertiary); color: var(--label-primary); font-size: 16px;
}
.icon-btn:hover { background: var(--fill-secondary); }
.nav__menu-btn { display: none; width: 44px; height: 44px; font-size: 22px; background: none; }
.theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--sun { display: block; }
[data-theme="dark"] .theme-icon--moon { display: none; }

/* Segmented control (language) */
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-pill); background: var(--fill-tertiary); }
.seg a {
  min-width: 44px; height: 28px; padding: 0 var(--s-12);
  display: inline-grid; place-items: center; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; color: var(--label-secondary);
}
.seg a:hover { text-decoration: none; color: var(--label-primary); }
.seg a[aria-current="true"] { background: var(--bg-tertiary); color: var(--label-primary); box-shadow: var(--shadow-seg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8);
  min-height: 44px; padding: var(--s-12) var(--s-24); border-radius: var(--r-pill);
  background: var(--accent); color: var(--label-on-accent); font-size: 15px;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.link-more { display: inline-flex; align-items: center; gap: var(--s-4); font-size: 15px; min-height: 44px; }
.link-more .icon { font-size: 16px; }
.link-more:hover { text-decoration: none; }
.link-more:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sections ---------- */
.section { padding: var(--s-120) 0; }
.section--alt { background: var(--bg-secondary); }
.section--page { padding-top: var(--s-80); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-24); margin-bottom: var(--s-44); }
.section__head p { margin-top: var(--s-8); }
.page-title { margin-bottom: var(--s-44); }
.page-title p { margin-top: var(--s-12); }

/* ---------- Hero (full-height rounded tile) ---------- */
.stage-wrap { padding: var(--s-12) var(--s-20) var(--s-20); }
.stage {
  position: relative; overflow: hidden;
  min-height: max(600px, calc(100svh - var(--nav-h) - var(--s-32)));
  border-radius: var(--r-xl); background: var(--bg-secondary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s-80) var(--s-20); text-align: center;
}
.stage__inner { display: flex; flex-direction: column; align-items: center; gap: var(--s-24); width: 100%; }
/* Latest-post bar: titles of recent posts take turns */
.ticker {
  display: flex; align-items: center; gap: var(--s-12);
  width: min(100%, 34rem); height: 52px; margin-top: var(--s-8); padding: 0 var(--s-8) 0 var(--s-20);
  border-radius: var(--r-pill); background: var(--bg-tertiary); color: var(--label-primary); text-align: left;
  box-shadow: var(--shadow-card); transition: transform .2s ease;
}
.ticker:hover { text-decoration: none; transform: translateY(-1px); }
.ticker > .icon { font-size: 17px; color: var(--label-secondary); }
.ticker__field { position: relative; flex: 1; min-width: 0; height: 100%; }
.ticker__item {
  position: absolute; inset: 0; display: flex; align-items: center; gap: var(--s-8);
  font-size: 15px; white-space: nowrap; overflow: hidden;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease .12s, transform .4s ease .12s; pointer-events: none;
}
.ticker__item.is-visible { opacity: 1; transform: none; }
.ticker__item.is-exiting { opacity: 0; transform: translateY(-6px); transition-duration: .2s; transition-delay: 0s; }
.ticker__kind { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); }
.ticker__title { overflow: hidden; text-overflow: ellipsis; }
.ticker__go {
  flex: none; display: inline-flex; align-items: center; gap: var(--s-4); height: 36px; padding: 0 var(--s-12);
  border-radius: var(--r-pill); background: var(--fill-tertiary); color: var(--label-primary); font-size: 13px; font-weight: 500;
}
.ticker__go .icon { font-size: 14px; }
.ticker:hover .ticker__go { background: var(--fill-secondary); }

.stage__ctas {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-12); margin-top: var(--s-24); max-width: 100%;
}
.btn .icon { font-size: 16px; }
.btn--plain { background: var(--bg-tertiary); color: var(--accent); }
.btn--plain:hover { filter: none; background: var(--fill-tertiary); }
[data-theme="dark"] .btn--plain { background: var(--bg-tertiary); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 360px 1fr; gap: var(--s-80); }
.about__intro p { margin-top: var(--s-8); }
.about__details { display: flex; flex-direction: column; gap: var(--s-24); }
.about__details > p { text-wrap: pretty; } /* avoid a lone last word in the bio */
.facts { background: var(--bg-tertiary); border-radius: var(--r-md); margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: var(--s-16); padding: 14px var(--s-16); font-size: 15px; }
.facts li + li { border-top: 1px solid var(--separator); }
.facts li span:last-child { color: var(--label-secondary); text-align: right; }
.socials { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-24); margin-top: var(--s-44); }
.social-card--sub { grid-column: 2; } /* 서브 계정은 본계정 바로 아래 */
.social-card--linkedin { grid-column: 1; grid-row: 2; } /* 링크드인은 GitHub 바로 아래 */
.social-card {
  display: flex; align-items: center; gap: var(--s-16); padding: var(--s-20) var(--s-24);
  border-radius: var(--r-lg); background: var(--bg-tertiary); box-shadow: var(--shadow-card); color: var(--label-primary);
  transition: transform .2s ease;
}
.social-card:hover { text-decoration: none; transform: translateY(-2px); }
.social-card__well { width: 48px; height: 48px; border-radius: 50%; background: var(--fill-tertiary); display: grid; place-items: center; font-size: 24px; }
.social-card__text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.social-card > .icon { color: var(--label-tertiary); font-size: 20px; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-24); }
.card {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-tertiary); box-shadow: var(--shadow-card); color: var(--label-primary);
  transition: transform .2s ease;
}
a.card:hover { text-decoration: none; transform: translateY(-3px); }
.card__thumb { aspect-ratio: 344 / 220; background: var(--fill-tertiary); display: grid; place-items: center; color: var(--label-tertiary); font-size: 40px; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-12); padding: var(--s-24); }
.card__body p { flex: 1; }
.card .link-more { min-height: auto; padding-top: var(--s-4); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.tag { display: inline-block; padding: var(--s-4) var(--s-12); border-radius: var(--r-pill); background: var(--fill-tertiary); color: var(--label-secondary); font-size: 12px; line-height: 16px; font-weight: 500; }

/* Repo cards */
.repo { padding: var(--s-20); border-radius: var(--r-md); gap: var(--s-12); }
.repo__name { display: flex; align-items: center; gap: var(--s-8); color: var(--accent); font-weight: 600; }
.repo__name .icon { color: var(--label-secondary); font-size: 16px; }
.repo__meta { display: flex; align-items: center; gap: var(--s-4); font-size: 12px; color: var(--label-secondary); }
.repo__dot { width: 10px; height: 10px; border-radius: 50%; }

/* Contribution graph */
.contrib { padding: var(--s-32); border-radius: var(--r-lg); background: var(--bg-tertiary); box-shadow: var(--shadow-card); margin-bottom: var(--s-24); }
.contrib__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-16); margin-bottom: var(--s-20); flex-wrap: wrap; }
.contrib__legend { display: flex; align-items: center; gap: 4px; }
.contrib__grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.contrib__cell, .contrib__legend i { width: 15px; height: 15px; border-radius: 4px; background: var(--fill-tertiary); display: block; }
.contrib__legend i { width: 12px; height: 12px; border-radius: 3px; }
.lv1 { background: color-mix(in srgb, var(--accent) 30%, transparent) !important; }
.lv2 { background: color-mix(in srgb, var(--accent) 55%, transparent) !important; }
.lv3 { background: color-mix(in srgb, var(--accent) 80%, transparent) !important; }
.lv4 { background: var(--accent) !important; }
.contrib[hidden] { display: none; }

/* Instagram */
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-12); }
.ig-tile { aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--fill-tertiary); display: grid; place-items: center; color: var(--label-tertiary); font-size: 28px; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ig-tile:hover img { transform: scale(1.04); }

/* ---------- Post rows (notes & chapters) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--separator); }
.row > a { display: grid; grid-template-columns: 120px 1fr auto; gap: var(--s-32); padding: var(--s-24) 0; color: var(--label-primary); }
.row > a:hover { text-decoration: none; }
.row > a:hover .row__title { color: var(--accent); }
.row__date { font-size: 13px; line-height: 18px; color: var(--label-secondary); padding-top: 2px; }
.row__content { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-8); min-width: 0; }
.row__title { transition: color .15s ease; }
.row__tags { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.tag--lang { background: var(--accent-tint); color: var(--accent); }
.row__aside { color: var(--label-tertiary); font-size: 20px; }
.row__thumb { width: 176px; height: 120px; border-radius: var(--r-md); overflow: hidden; background: var(--fill-tertiary); }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row[hidden] { display: none; }

/* List page */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-16); flex-wrap: wrap; margin-bottom: var(--s-44); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.chip {
  padding: var(--s-8) var(--s-16); min-height: 36px; border-radius: var(--r-pill);
  background: var(--fill-tertiary); color: var(--label-primary); font-size: 13px;
}
.chip:hover { background: var(--fill-secondary); }
.chip[aria-pressed="true"] { background: var(--label-primary); color: var(--bg-primary); }
.search { display: flex; align-items: center; gap: var(--s-8); width: 260px; height: 36px; padding: 0 var(--s-12); border-radius: var(--r-sm); background: var(--fill-tertiary); color: var(--label-secondary); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--label-primary); outline: none; }
.search input::placeholder { color: var(--label-secondary); }
.search:focus-within { outline: 3px solid var(--accent-tint); }
.list-layout { display: grid; grid-template-columns: 1fr 200px; gap: var(--s-64); align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-h) + var(--s-24)); display: flex; flex-direction: column; gap: var(--s-32); }
.sidebar h2 { margin-bottom: var(--s-12); }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.sidebar button { width: 100%; display: flex; justify-content: space-between; padding: var(--s-4) 0; font-size: 15px; color: var(--label-secondary); text-align: left; }
.sidebar button:hover, .sidebar button[aria-pressed="true"] { color: var(--label-primary); }
.sidebar button span:last-child { color: var(--label-tertiary); }
.empty { padding: var(--s-44) 0; text-align: center; color: var(--label-secondary); }

/* ---------- Detail pages: list | content | on this page ---------- */
.doc { padding: var(--s-44) 0 var(--s-120); }
.doc__grid {
  max-width: calc(1280px + 2 * var(--s-20)); margin: 0 auto; padding: 0 var(--s-20);
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: var(--s-64); align-items: start;
}
.doc__main { width: 100%; max-width: 760px; justify-self: center; min-width: 0; }
.doc-side, .doc-toc {
  position: sticky; top: calc(var(--nav-h) + var(--s-32));
  max-height: calc(100vh - var(--nav-h) - var(--s-64)); overflow-y: auto;
}
.doc-side ul, .doc-toc ul { list-style: none; margin: 0; padding: 0; }
.doc-side__group, .doc-toc__title {
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label-secondary);
}
.doc-side__group { margin: var(--s-24) 0 var(--s-4); padding: 0 var(--s-12); }
.doc-side__group:first-child { margin-top: 0; }
.doc-side a {
  display: block; padding: var(--s-8) var(--s-12); border-radius: var(--r-sm);
  font-size: 15px; line-height: 1.35; color: var(--label-primary);
}
.doc-side a:hover { text-decoration: none; background: var(--fill-tertiary); }
.doc-side a[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.doc-toc__title { margin-bottom: var(--s-12); }
.doc-toc li + li { margin-top: var(--s-4); }
.doc-toc a { display: block; padding: var(--s-4) 0; font-size: 14px; line-height: 1.4; color: var(--label-secondary); }
.doc-toc a:hover { text-decoration: none; color: var(--label-primary); }
.doc-toc a.is-active { color: var(--accent); font-weight: 500; }
.doc-toc[hidden] { display: none; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-4); font-size: 14px; color: var(--label-secondary); }
.crumbs a { color: var(--label-secondary); }
.crumbs a:hover { color: var(--label-primary); text-decoration: none; }
.crumbs .icon { font-size: 12px; color: var(--label-tertiary); }
.doc__title { margin-top: var(--s-16); font-size: clamp(30px, 3.6vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.doc-meta {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: var(--s-8);
  margin-top: var(--s-20); padding-bottom: var(--s-20); border-bottom: 1px solid var(--separator); font-size: 15px; font-weight: 600;
}
.doc-meta > span { display: inline-flex; align-items: center; padding: 0 var(--s-16); }
.doc-meta > span:first-child { padding-left: 0; }
.doc-meta > span + span { border-left: 1px solid var(--separator); }
.doc-meta__k { margin-right: var(--s-8); font-weight: 400; color: var(--label-secondary); }
.doc-meta__links { gap: var(--s-8); flex-wrap: wrap; }
.doc-meta__links .doc-meta__k { margin-right: 0; }
.doc .prose { margin-top: var(--s-32); }
.doc .prose h2, .doc .project__label { scroll-margin-top: calc(var(--nav-h) + var(--s-24)); }
.doc .project__facts { margin-top: var(--s-32); }

/* ---------- Cheers (beer) blocks ---------- */

.bx-glass {
  --beer: #e0a43a;
  display: inline-block; flex: none; width: 40px; height: 56px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  background:
    linear-gradient(90deg, transparent 18%, rgba(255, 255, 255, 0.28) 26%, transparent 34%),
    linear-gradient(to bottom, var(--foam) 0 20%, var(--beer) 20% 100%);
}
.bx-glass--lg { width: 56px; height: 80px; }

.doc .bx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-32) var(--s-44); }
.doc .bx-tile { padding-top: var(--s-20); border-top: 1px solid var(--separator); }
.doc .bx-tile p { margin: 0; }
.doc .bx-tile__k { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label-secondary); }
.doc .bx-tile__big { margin-top: var(--s-4) !important; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.doc .bx-tile__text { margin-top: var(--s-8) !important; font-size: 15px; line-height: 1.55; color: var(--label-secondary); }

.doc .bx-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc .bx-vs__col { padding: var(--s-8) var(--s-32); text-align: center; }
.doc .bx-vs__col + .bx-vs__col { border-left: 1px solid var(--separator); }
.doc .bx-vs__col p { margin: 0; }
.doc .bx-vs__name { margin-top: var(--s-16) !important; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.doc .bx-vs__tag { margin-top: var(--s-4) !important; font-size: 15px; line-height: 1.5; color: var(--label-secondary); }
.doc .bx-vs dl { margin: var(--s-24) 0 0; }
.doc .bx-vs dl div { padding: var(--s-12) 0; border-top: 1px solid var(--separator); }
.doc .bx-vs dt { font-size: 12px; line-height: 16px; color: var(--label-secondary); }
.doc .bx-vs dd { margin: 2px 0 0; font-size: 17px; line-height: 1.4; font-weight: 600; }

.doc .bx-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-44) var(--s-32); }
.doc .bx-style { display: flex; flex-direction: column; }
.doc .bx-style p { margin: 0; }
.doc .bx-style .bx-glass { margin-bottom: var(--s-12); }
.doc .bx-style__name { font-size: 19px; line-height: 1.25; font-weight: 700; }
.doc .bx-style__family { font-size: 13px; line-height: 18px; color: var(--label-secondary); }
.doc .bx-style__taste { flex: 1; margin-top: var(--s-8) !important; font-size: 15px; line-height: 1.5; }
.doc .bx-meter { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px var(--s-8); margin-top: var(--s-12); font-size: 12px; }
.doc .bx-meter__k { color: var(--label-secondary); font-weight: 600; }
.doc .bx-meter__v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc .bx-meter__bar { grid-column: 1 / -1; position: relative; height: 6px; border-radius: var(--r-pill); background: var(--fill-secondary); }
.doc .bx-meter__bar i { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--accent); }

.doc .bx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
.doc .bx-stat { padding: var(--s-8) var(--s-12); }
.doc .bx-stat + .bx-stat { border-left: 1px solid var(--separator); }
.doc .bx-stat p { margin: 0; }
.doc .bx-stat__big { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.doc .bx-stat__k { margin-top: var(--s-8) !important; font-size: 15px; line-height: 1.4; font-weight: 600; }
.doc .bx-stat__text { margin-top: var(--s-4) !important; font-size: 13px; line-height: 1.45; color: var(--label-secondary); }

.doc .bx-steps { list-style: none; margin: var(--s-24) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-32) var(--s-32); counter-reset: step; }
.doc .bx-steps li { margin: 0; padding-top: var(--s-16); border-top: 1px solid var(--separator); counter-increment: step; }
.doc .bx-steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: var(--s-8);
  font-size: 13px; font-weight: 600; color: var(--label-secondary); font-variant-numeric: tabular-nums;
}
.doc .bx-steps b { display: block; font-size: 17px; line-height: 1.3; }
.doc .bx-steps span { display: block; margin-top: var(--s-4); font-size: 14px; line-height: 1.5; color: var(--label-secondary); }


/* One beer: one-line review, photos */
.doc .prose .bx-quote { margin: var(--s-24) 0 0; padding: 0; background: none; border-radius: 0; text-align: center; }
.doc .prose .bx-quote p { font-size: clamp(22px, 3vw, 30px); line-height: 1.45; font-weight: 700; letter-spacing: -0.015em; }
.doc .prose .bx-quote p::before { content: "\201C"; }
.doc .prose .bx-quote p::after { content: "\201D"; }
.doc .bx-photos { display: grid; gap: var(--s-12); margin: var(--s-24) 0 0; }
.doc .bx-photos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc .bx-photos figure { margin: 0; }
.doc .bx-photos img { width: 100%; border-radius: var(--r-lg); }
.doc .bx-photos--1 img { width: auto; max-width: 100%; max-height: 640px; margin: 0 auto; }
.doc .bx-text > * + * { margin-top: var(--s-24); }
.doc .bx-text { margin-top: var(--s-24); }
.doc .bx-photos--2 img { aspect-ratio: 4 / 5; object-fit: cover; }
.doc .bx-photos figcaption { margin-top: var(--s-8); text-align: center; font-size: 13px; color: var(--label-secondary); }

/* One beer: spec card under the title */
.bx-spec { margin-top: var(--s-32); padding: var(--s-32); border-radius: var(--r-xl); background: var(--bg-secondary); }
.bx-spec p { margin: 0; }
.bx-spec__head { display: flex; align-items: center; gap: var(--s-20); }
.bx-spec__brewery { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--accent); }
.bx-spec__name { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.bx-spec__style { margin-top: 2px !important; font-size: 15px; color: var(--label-secondary); }
.bx-spec__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s-20) var(--s-24); margin: var(--s-32) 0 0; }
.bx-spec__grid div { padding-top: var(--s-12); border-top: 1px solid var(--separator); }
.bx-spec__grid dt { font-size: 12px; line-height: 16px; color: var(--label-secondary); }
.bx-spec__grid dd { margin: var(--s-4) 0 0; font-size: 20px; line-height: 1.2; font-weight: 700; }
.bx-spec__row { margin-top: var(--s-20); }
.bx-spec__k { font-size: 12px; line-height: 16px; color: var(--label-secondary); }
.bx-spec__v { margin-top: var(--s-4) !important; font-size: 15px; line-height: 1.5; }
.bx-stars { letter-spacing: 2px; }
.bx-star { color: var(--fill-secondary); }
.bx-star.is-full { color: var(--orange); }
.bx-star.is-half { background: linear-gradient(90deg, var(--orange) 50%, var(--fill-secondary) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bx-chips { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-8) !important; }
.bx-chips span { padding: var(--s-4) var(--s-12); border-radius: var(--r-pill); background: var(--bg-tertiary); font-size: 14px; font-weight: 500; }

/* ---------- "Full story" link: MacBook-style frame with a capture of the original post ---------- */
.doc .mac { max-width: 640px; margin: var(--s-32) auto 0; }
.doc .mac__lid { display: block; padding: 12px 12px 16px; border-radius: 22px 22px 6px 6px; background: var(--device); box-shadow: var(--shadow-card); }
.doc .mac__lid:hover { text-decoration: none; }
.doc .mac__screen { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #fff; }
.doc .mac__bar { position: absolute; inset: 0 0 auto; z-index: 1; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #f2f2f7; border-bottom: 1px solid #e5e5ea; }
.doc .mac__bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.doc .mac__bar i:nth-child(2) { background: #febc2e; }
.doc .mac__bar i:nth-child(3) { background: #28c840; }
.doc .mac__url { flex: 1; margin: 0 40px 0 14px; padding: 2px 10px; border-radius: var(--r-pill); background: #fff; color: #6e6e73; font-size: 11px; line-height: 16px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .mac__shot { position: absolute; top: 28px; left: 0; width: 100%; height: calc(100% - 28px); object-fit: cover; object-position: top; border-radius: 0; }
.doc .mac__screen::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); }
.doc .mac__hover {
  position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(29, 29, 31, 0.78); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap;
  opacity: 0; transition: opacity .2s ease;
}
.doc .mac__lid:hover .mac__hover, .doc .mac__lid:focus-visible .mac__hover { opacity: 1; }
.doc .mac__base { display: block; position: relative; width: 116%; margin-left: -8%; height: 14px; border-radius: 0 0 14px 14px; background: var(--device-base); }
.doc .mac__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 6px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: rgba(0, 0, 0, 0.12); }
.doc .prose .mac__cta { margin-top: var(--s-32); text-align: center; }

/* ---------- Story posts: key message line and key-value facts ---------- */
.doc .prose .kv { margin: var(--s-32) 0 0; border-top: 1px solid var(--separator); }
.doc .prose .kv div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-16); padding: var(--s-12) 0; border-bottom: 1px solid var(--separator); }
.doc .prose .kv dt { font-size: 15px; color: var(--label-secondary); }
.doc .prose .kv dd { margin: 0; font-size: 16px; font-weight: 600; }

/* ---------- Article ---------- */
.article__cover { margin-top: var(--s-32); border-radius: var(--r-lg); overflow: hidden; }
.prose { margin-top: var(--s-44); }
.prose > * + * { margin-top: var(--s-24); }
.prose h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 600; margin-top: var(--s-44); }
.prose h3 { font-size: 22px; line-height: 1.3; font-weight: 600; margin-top: var(--s-32); }
.prose p, .prose li { font-size: 17px; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--s-8); }
.prose img { border-radius: var(--r-lg); }
.prose figure { margin: var(--s-32) 0 0; }
.prose figcaption { margin-top: var(--s-8); font-size: 13px; color: var(--label-secondary); }
.prose .fig--narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.prose .fig--narrow figcaption { text-align: center; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: var(--s-20) var(--s-24); border-radius: var(--r-md); background: var(--accent-tint); }
.prose blockquote p { font-size: 17px; font-weight: 600; line-height: 1.6; }
.prose code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--fill-tertiary); }
.prose pre { padding: var(--s-20) var(--s-24); border-radius: var(--r-md); background: var(--bg-secondary); overflow-x: auto; font-size: 14px; line-height: 22px; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: var(--s-8) var(--s-12); border-bottom: 1px solid var(--separator); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--separator); margin: var(--s-44) 0; }
/* Project detail: header, overview / role / skills, then Problem / Solution sections */
.link-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s-12); border-radius: var(--r-pill); background: var(--fill-tertiary); color: var(--label-primary); font-size: 13px; font-weight: 500; }
.link-chip .icon { font-size: 14px; }
.link-chip .icon:last-child { font-size: 12px; color: var(--label-secondary); }
.link-chip:hover { text-decoration: none; background: var(--fill-secondary); }
.project__cover { margin: var(--s-32) 0 0; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-secondary); }
.project__cover img { width: 100%; }
.project__facts { margin-top: var(--s-44); display: flex; flex-direction: column; gap: var(--s-32); }
.project__label { font-size: 20px; line-height: 1.3; font-weight: 600; margin-bottom: var(--s-12); }
.project__text p { font-size: 17px; line-height: 1.75; }
.project__text p + p { margin-top: var(--s-12); }
.project__text strong, .project__body strong { color: var(--label-primary); font-weight: 600; }
.spark-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.spark-list li { position: relative; padding-left: 20px; font-size: 17px; line-height: 1.6; }
.spark-list li::before { content: ""; position: absolute; left: 4px; top: 0.66em; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--accent); }
.project__body { margin-top: var(--s-64); }
.project__body h2 { padding-top: var(--s-32); border-top: 1px solid var(--separator); margin-top: var(--s-64); }
.project__body > h2:first-child { margin-top: 0; }
.project__body h3 { margin-top: var(--s-44); }
.project__body .case-label + * { margin-top: var(--s-4); }
.project__body .case-label { margin-top: var(--s-20); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--label-secondary); }
.project__body .case-label--after { color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-16); }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.comments { margin-top: var(--s-64); padding-top: var(--s-32); border-top: 1px solid var(--separator); }
.comments__title { margin: 0 0 var(--s-24); font-size: 22px; font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: var(--s-24); margin-top: var(--s-64); padding-top: var(--s-32); border-top: 1px solid var(--separator); }
.pager > * { display: flex; flex-direction: column; gap: 4px; max-width: 48%; }
.pager__next { text-align: right; margin-left: auto; }

/* Rouge syntax colors (subtle) */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kc { color: #ad3da4; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #d12f1b; }
.highlight .c, .highlight .c1, .highlight .cm { color: #707f8c; font-style: italic; }
.highlight .mi, .highlight .mf { color: #272ad8; }
.highlight .nf, .highlight .nb { color: #3e8087; }
[data-theme="dark"] .highlight .k, [data-theme="dark"] .highlight .kd, [data-theme="dark"] .highlight .kn { color: #ff7ab2; }
[data-theme="dark"] .highlight .s, [data-theme="dark"] .highlight .s1, [data-theme="dark"] .highlight .s2 { color: #ff8170; }
[data-theme="dark"] .highlight .mi, [data-theme="dark"] .highlight .mf { color: #d9c97c; }
[data-theme="dark"] .highlight .nf, [data-theme="dark"] .highlight .nb { color: #78c2b3; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-secondary); padding: var(--s-32) 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s-16); padding-top: var(--s-20); border-top: 1px solid var(--separator); }
.footer__social { display: flex; gap: var(--s-8); }
.footer__social a { width: 36px; height: 36px; display: grid; place-items: center; color: var(--label-secondary); font-size: 20px; border-radius: 50%; }
.footer__social a:hover { color: var(--label-primary); background: var(--fill-tertiary); }

/* ---------- Responsive ---------- */
/* ---------- CV (Word 원본처럼: Times New Roman, A4 종이, 날짜 열 + 내용 열) ---------- */
.cv-paper {
  max-width: 794px; margin: 0 auto; padding: var(--s-80);
  background: var(--bg-primary); color: var(--label-primary);
  border: 1px solid var(--separator); border-radius: var(--r-sm); box-shadow: var(--shadow-card);
  font-family: var(--serif); font-size: 15px; line-height: 1.35;
}
.cv-paper a { color: inherit; text-decoration: none; }
.cv-paper a:hover { text-decoration: underline; }
.cv-head { text-align: right; margin-bottom: var(--s-16); }
.cv-name { text-align: center; font-size: 27px; font-weight: 700; letter-spacing: 0; margin-bottom: var(--s-8); }
.cv-contact { margin: 0; }
.cv-tagline { text-align: left; font-style: italic; margin-top: var(--s-12); }
.cv-section { margin-top: var(--s-16); }
.cv-section__title {
  font-size: 16px; font-weight: 700; letter-spacing: 0;
  border-bottom: 1px solid currentColor; padding-bottom: 1px; margin-bottom: var(--s-4);
}
.cv-entry { display: grid; grid-template-columns: 160px 1fr; margin-top: var(--s-4); }
.cv-entry + .cv-entry { margin-top: var(--s-8); }
.cv-line { margin: 0; }
.cv-line--b { font-weight: 700; margin-top: var(--s-4); }
.cv-line--i { font-style: italic; }
.cv-entry__body > :first-child { margin-top: 0; }
.cv-list { margin: 0; padding-left: var(--s-24); list-style: disc; }

@media (max-width: 1023px) {
  .doc__grid { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-44); }
  .doc-toc { display: none !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: var(--s-32); }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .list-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--s-44); }
}

@media (max-width: 767px) {
  .doc .bx-tiles, .doc .bx-vs, .doc .bx-styles, .doc .bx-steps { grid-template-columns: minmax(0, 1fr); }
  .doc .bx-stats { grid-template-columns: minmax(0, 1fr); gap: var(--s-24); }
  .doc .bx-stat + .bx-stat, .doc .bx-vs__col + .bx-vs__col { border-left: 0; }
  .doc .bx-vs { gap: var(--s-44); }
  .doc .bx-vs__col + .bx-vs__col { padding-top: var(--s-44); border-top: 1px solid var(--separator); }
  .doc .bx-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-spec { padding: var(--s-24) var(--s-20); }
  .doc { padding-top: var(--s-24); }
  .doc__grid { grid-template-columns: minmax(0, 1fr); }
  .doc-side { display: none; }
  .doc-meta { column-gap: var(--s-20); }
  .doc-meta > span, .doc-meta > span:first-child { padding: 0; }
  .doc-meta > span + span { border-left: 0; }
  body { font-size: 17px; }
  .section { padding: var(--s-64) 0; }
  .section--page { padding-top: var(--s-44); }
  .nav__links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: var(--s-8) var(--s-20) var(--s-16);
    background: var(--bg-primary); box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    border-bottom: 1px solid var(--separator);
  }
  .nav__links a { display: block; padding: var(--s-12) 0; font-size: 17px; opacity: 1; }
  .nav.is-open .nav__links { display: flex; }
  .nav__menu-btn { display: inline-grid; }
  .stage-wrap { padding: var(--s-8) var(--s-12) var(--s-12); }
  .stage { min-height: calc(100svh - var(--nav-h) - var(--s-20)); padding: var(--s-64) var(--s-16); }
  .stage__inner { gap: var(--s-16); }
  .stage br { display: none; }
  .ticker { height: 48px; padding-left: var(--s-16); }
  .ticker__kind { display: none; }
  .stage__ctas { flex-direction: column; align-items: stretch; width: 100%; gap: var(--s-8); margin-top: var(--s-16); }
  .section__head { flex-direction: column; align-items: flex-start; gap: var(--s-8); margin-bottom: var(--s-24); }
  .socials { grid-template-columns: 1fr; gap: var(--s-12); margin-top: var(--s-24); }
  .social-card--sub, .social-card--linkedin { grid-column: auto; grid-row: auto; }
  .grid-3 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-16); margin: 0 calc(-1 * var(--s-20)); padding: 4px var(--s-20) var(--s-24); }
  .grid-3 > * { flex: 0 0 300px; scroll-snap-align: start; }
  .grid-3.grid-3--stack { display: flex; flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .grid-3.grid-3--stack > * { flex: none; }
  .contrib { padding: var(--s-20); }
  .ig-grid { gap: 4px; }
  .row > a { grid-template-columns: 1fr auto; gap: var(--s-16); padding: var(--s-16) 0; }
  .row__date { grid-column: 1 / -1; order: -1; padding: 0; }
  .row__summary { display: none; }
  .row__thumb { width: 72px; height: 72px; }
  .search { width: 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .ticker__item { transform: none !important; }
}

@media (max-width: 767px) {
  .cv-paper { padding: var(--s-24) var(--s-20); font-size: 14px; }
  .cv-name { font-size: 24px; }
  .cv-head { text-align: left; }
  .cv-name { text-align: left; }
  .cv-entry { grid-template-columns: 1fr; }
  .cv-entry__date { color: var(--label-secondary); }
}
