/* ── 토큰 ─────────────────────────────────────────── */
:root {
  --ink: #2c251d;
  --ink-soft: #766e62;
  --paper: #f7f0e6;
  --surface: #fffcf6;
  --line: #e6dcc8;
  --accent: #e76d58;
  --accent-strong: #d4573f;
  --accent-soft: #fbe4de;

  --font-body: "Pretendard", "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max-width: 960px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

main {
  position: relative;
  overflow: hidden;
  flex: 1 0 auto;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent 40px);
  opacity: 0.22;
  pointer-events: none;
}

.site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── 헤더 ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 240, 230, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link-current {
  color: var(--ink);
}

.nav-link-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ── 히어로 ───────────────────────────────────────── */
.hero-grid {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
}

.hero-rail {
  padding-top: 6px;
}

.hero-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line);
  overflow: hidden;
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-content {
  min-width: 0;
}

.hero-name {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-role {
  margin: 6px 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.hero-title {
  margin: 20px 0 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 100%;
}

.hero-desc {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 100%;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ── 소개 페이지 ──────────────────────────────────── */
.about-top {
  padding-top: 56px;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.page-title {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.about-quote {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  word-break: keep-all;
}

.doc-notice {
  margin: 0 0 28px;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  word-break: keep-all;
}

.about-lead {
  margin: 20px 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  word-break: keep-all;
}

.about-axis-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-axis {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.about-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink-soft);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.about-axis .about-body {
  margin-top: 10px;
}

.detail-impression {
  margin: 0 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.75;
  color: var(--accent-strong);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.detail-impression + .detail-impression {
  margin-top: 16px;
}

.detail-impression-highlight {
  color: #c0392b;
}

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

.text-red {
  font-weight: inherit;
  color: #c0392b;
}

.plan-point-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-body + .plan-point-list {
  margin-top: 20px;
}

.plan-point {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
}

.plan-point-title {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  word-break: keep-all;
}

a.plan-point-title.doc-link {
  display: inline-block;
  text-decoration: none;
}

a.plan-point-title.doc-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.plan-point .about-body {
  margin: 0;
}

.section .about-body + .about-body {
  margin-top: 16px;
}

/* ── AI 배너 ──────────────────────────────────────── */
.ai-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--surface) 55%, var(--paper) 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 44px;
}

.ai-banner::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
}

.ai-banner-text {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.ai-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.ai-banner-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ai-banner h2 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ai-banner h2 .accent {
  color: var(--accent-strong);
}

.ai-banner-text p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.ai-banner-text p:last-child {
  margin-bottom: 0;
}

.ai-banner-text p.ai-banner-contact {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.ai-banner-contact a {
  color: var(--accent-strong);
  text-decoration: none;
}

.ai-banner-contact a:hover {
  text-decoration: underline;
}

.ai-banner-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-banner-icon .ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--accent);
  opacity: 0.4;
  border-radius: 50%;
  animation: ai-banner-spin 18s linear infinite;
}

@keyframes ai-banner-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .ai-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .ai-banner-text {
    max-width: 100%;
  }

  .ai-banner-eyebrow {
    justify-content: center;
  }

  .ai-banner h2 {
    font-size: 1.25rem;
  }

  .ai-banner-icon {
    width: 96px;
    height: 96px;
  }
}

/* ── 포트폴리오 페이지 ────────────────────────────── */
.portfolio-top {
  padding-top: 56px;
}

.filter-row {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.filter-chip:hover {
  color: var(--ink);
}

.filter-chip.active {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio-period {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.portfolio-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

.portfolio-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}

.portfolio-link:hover {
  text-decoration: underline;
}

/* ── 포트폴리오 상세 페이지 ────────────────────────── */
.detail-breadcrumb {
  margin: 0;
  padding: 20px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.detail-breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.detail-breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.detail-hero {
  padding-top: 16px;
}

.detail-tagline {
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  word-break: keep-all;
}

.detail-meta-row {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.detail-meta-row dt {
  display: inline;
  font-weight: 600;
  color: var(--ink);
}

.detail-meta-row dt::after {
  content: " ";
}

.detail-meta-row dd {
  display: inline;
  margin: 0;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.detail-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* 임시 이미지 자리 (실제 스크린샷/커버 이미지로 교체 예정) */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    var(--surface) 0,
    var(--surface) 12px,
    var(--paper) 12px,
    var(--paper) 24px
  );
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

.media-placeholder-cover {
  margin-top: 28px;
  aspect-ratio: 16 / 7;
}

.detail-cover {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
}

.detail-cover-img {
  display: block;
  width: 100%;
  height: auto;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-gallery .media-placeholder {
  aspect-ratio: 4 / 3;
}

.detail-gallery-item {
  margin: 0;
}

.detail-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line);
}

.detail-gallery-item figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ── 케이스 스터디 보조 컴포넌트 (axis/IA/swatch/stat) ─ */
.axis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}

.axis-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
}

.axis-chip .axis-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.axis-chip .axis-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 4px;
}

.axis-chip .axis-desc {
  font-size: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.ia-tree {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  overflow-x: auto;
  margin: 16px 0 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ia-tree .fade {
  color: rgba(247, 240, 230, 0.55);
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 0;
}

.swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.swatch-color {
  height: 46px;
}

.swatch-info {
  padding: 8px 10px;
  background: var(--surface);
}

.swatch-info .swatch-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.swatch-info .swatch-hex {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

.feature-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.feature-list li::before {
  content: "\203A";
  position: absolute;
  left: 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.feature-list li strong {
  color: var(--ink);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 14px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.timeline-date {
  flex-shrink: 0;
  width: 130px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-strong);
}

.timeline-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink);
}

.detail-prevnext {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.detail-prevnext > :first-child {
  justify-self: start;
}

.detail-prevnext > :nth-child(2) {
  justify-self: center;
}

.detail-prevnext > :last-child {
  justify-self: end;
}

.detail-prevnext a {
  color: var(--ink-soft);
  text-decoration: none;
}

.detail-prevnext a:hover {
  color: var(--accent-strong);
}

/* ── 섹션 공통 ────────────────────────────────────── */
.section {
  padding-bottom: 56px;
}

.section-heading {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ── 핵심 역량 칩 ─────────────────────────────────── */
.chip-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
}

/* ── 대표 경력 카드 ───────────────────────────────── */
.career-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.career-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.career-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.career-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.career-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.career-title a {
  text-decoration: none;
}

.career-title a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.career-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.career-more {
  margin: 20px 0 0;
  text-align: center;
}

.career-more a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}

.career-more a:hover {
  text-decoration: underline;
}

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink-soft);
}

/* ── 푸터 ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  word-break: keep-all;
}

/* ── 마크다운 문서 렌더링 (문서 뷰어 페이지 공용) ──── */
.doc-loading {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.markdown-content h1 {
  font-size: 1.375rem;
  margin: 0 0 16px;
  color: var(--ink);
}

.markdown-content h2 {
  font-size: 1.125rem;
  margin: 32px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.markdown-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.markdown-content h3 {
  font-size: 1rem;
  margin: 24px 0 10px;
  color: var(--ink);
}

.markdown-content p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.markdown-content strong {
  color: var(--ink);
}

.markdown-content ul,
.markdown-content ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.markdown-content li {
  margin-bottom: 4px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.markdown-content blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.markdown-content code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--paper);
  padding: 2px 5px;
  border-radius: 4px;
}

.markdown-content pre {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.markdown-content pre code {
  background: none;
  padding: 0;
  color: var(--paper);
}

.markdown-content table {
  display: block;
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
}

.markdown-content thead,
.markdown-content tbody {
  display: table;
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
  word-break: keep-all;
}

.markdown-content th {
  background: var(--paper);
  color: var(--ink);
}

.markdown-content .mermaid-diagram {
  margin: 16px 0;
  padding: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.markdown-content .mermaid-diagram svg {
  max-width: 100%;
  height: auto;
}

.markdown-content figure {
  margin: 16px 0;
  padding: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.markdown-content figure img {
  max-width: 100%;
  height: auto;
}

.markdown-content hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--line);
}

/* ── 블로그 전용 팔레트 (인디고 + 스톤) ────────────── */
body.blog-theme {
  --ink: #1c1917;
  --ink-soft: #6e6b63;
  --paper: #f5f4f0;
  --surface: #ffffff;
  --line: #e4e1d9;
  --accent: #4338ca;
  --accent-strong: #3730a3;
  --accent-soft: #e0e7ff;
}

body.blog-theme .site-header {
  background: rgba(245, 244, 240, 0.92);
}

body.blog-theme {
  background-image: url('/assets/images/blog-tigrelli.webp');
  background-repeat: no-repeat;
  background-position: left 24px bottom 0;
  background-size: 200px auto;
  background-attachment: fixed;
}

@media (max-width: 1439px) {
  body.blog-theme {
    background-image: none;
  }

  body.blog-theme .site-footer {
    background-image: url('/assets/images/blog-tigrelli.webp');
    background-repeat: no-repeat;
    background-position: left 16px bottom 0;
    background-size: 120px auto;
  }

  body.blog-theme .site-footer-inner {
    padding-left: 150px;
    min-height: 128px;
    align-items: flex-end;
  }
}

/* ── 블로그 헤더 보조 ─────────────────────────────── */
.site-header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.wordmark-text {
  margin-left: -2px;
}

.blog-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-strong);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.blog-home-link:hover {
  background: var(--accent-soft);
}

/* ── 블로그 히어로 / 카테고리 ─────────────────────── */
.blog-top {
  padding-top: 56px;
}

.blog-category-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── 블로그 검색 ──────────────────────────────────── */
.blog-search {
  position: relative;
  margin-bottom: 28px;
}

.blog-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease;
}

.blog-search input:focus {
  border-color: var(--accent);
}

.blog-search input::placeholder {
  color: var(--ink-soft);
}

.blog-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.blog-empty {
  padding: 64px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ── 블로그 글 카드 ───────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.08);
}

.post-card-thumb {
  aspect-ratio: 16 / 10;
  background: var(--paper);
  overflow: hidden;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
}

.post-category {
  font-family: var(--font-mono);
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.post-card-readtime {
  color: var(--ink-soft);
}

.post-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  word-break: keep-all;
}

.post-card:hover .post-card-title {
  color: var(--accent-strong);
}

.post-card-excerpt {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* ── 블로그 글 상세 ───────────────────────────────── */
.post-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.post-byline strong {
  color: var(--ink);
  font-weight: 600;
}

.post-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.post-share-btn:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.post-body {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-body p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.post-quote {
  margin: 8px 0;
  padding: 16px 20px;
  background: var(--paper);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.7;
  word-break: keep-all;
}

/* ── 반응형 ───────────────────────────────────────── */
@media (max-width: 640px) {
  .blog-home-link,
  .wordmark-text {
    display: none;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding: 40px 20px 56px;
  }

  .hero-rail {
    width: 120px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .site-nav {
    gap: 16px;
  }

  .career-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    flex-direction: column;
    gap: 4px;
  }

  .timeline-date {
    width: auto;
  }

  .axis-grid,
  .swatch-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}
