/* ============================================================
   박시현 포트폴리오 v2 — Light Mode + Soft Fonts
   배경 밝게. 강조 한 톤 네이비. 손글씨는 강조 한정.
   ============================================================ */

/* -------- 1. Reset & Tokens -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 컬러 — 라이트 모드 */
  --paper:      oklch(0.985 0.003 250);  /* 메인 배경 */
  --paper-warm: oklch(0.97  0.004 250);  /* 보조 배경 */
  --paper-card: oklch(1     0     0);    /* 카드 흰색 */
  --ink:        oklch(0.20 0.010 250);   /* 헤드라인 */
  --body:       oklch(0.30 0.008 250);   /* 본문 */
  --body-soft:  oklch(0.42 0.006 250);
  --label:      oklch(0.50 0.005 250);   /* 라벨, 캡션 */
  --line:       oklch(0.90 0.004 250);   /* 보더 */
  --line-soft:  oklch(0.94 0.003 250);

  /* 네이비 강조 — 차분한 잉크 네이비 */
  --navy:       oklch(0.32 0.075 248);   /* 강조 라벨, 링크 */
  --navy-deep:  oklch(0.24 0.060 248);   /* 호버 */
  --navy-tint:  oklch(0.96 0.012 248);   /* 강조 배경 틴팅 */
  --navy-line:  oklch(0.82 0.020 248);

  /* 리스크 등급 미세 틴팅 (라이트) */
  --tier-safe:    oklch(0.96 0.018 220);
  --tier-safe-fg: oklch(0.36 0.060 220);
  --tier-lat:     oklch(0.96 0.020 95);
  --tier-lat-fg:  oklch(0.42 0.080 75);
  --tier-warn:    oklch(0.95 0.024 55);
  --tier-warn-fg: oklch(0.45 0.100 50);
  --tier-now:     oklch(0.95 0.028 25);
  --tier-now-fg:  oklch(0.45 0.110 25);

  /* 타이포 */
  --sans:   "Gowun Dodum", "Apple SD Gothic Neo", -apple-system, "Noto Sans KR", system-ui, sans-serif;
  --script: "Gaegu", "Gowun Dodum", cursive;
  --mono:   "JetBrains Mono", "SF Mono", "Roboto Mono", ui-monospace, Menlo, monospace;

  /* 모션 */
  --t:      400ms cubic-bezier(.4,0,.2,1);
  --t-slow: 700ms cubic-bezier(.4,0,.2,1);

  /* 레이아웃 */
  --shell-max: 1080px;
  --shell-text: 720px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: -0.005em;
  color: var(--body);
  background: var(--paper);
  /* 한글 줄바꿈: 어절 단위 유지, 영문 긴 단어만 잘림 */
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 제목/짧은 라인에만 균형 줄바꿈 적용 (본문은 일반 wrap) */
h1, h2, h3, h4, h5,
.section-title, .contact-title, .section-lead,
.hero__name, .project__title, .blk__title,
.value__name, .value__quote, .strength__title,
.con__title, .lab-card__title,
.persona-detail__name, .elder-card__name {
  text-wrap: balance;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }
strong { font-weight: 700; color: var(--ink); }

/* -------- 2. Navigation -------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(2rem, calc((100vw - var(--shell-max)) / 2 + 2rem));
  background: transparent;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav__logo-mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--navy);
  margin-left: 10px;
  opacity: 0.7;
}
.nav__links {
  display: flex; list-style: none; gap: 2.2rem;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
  position: relative; padding: 6px 0;
  transition: color var(--t);
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--navy);
  transition: width var(--t);
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--ink);
}
.nav__links a:hover::after,
.nav__links a.is-active::after { width: 100%; }

.nav__burger { display: none; }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger {
    display: flex; flex-direction: column; gap: 5px; padding: 6px;
  }
  .nav__burger span {
    display: block; width: 22px; height: 1.5px;
    background: var(--ink); transition: var(--t);
  }
}
.nav__mobile {
  position: fixed; top: 72px; left: 0; right: 0;
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 1.4rem 1rem;
  display: none; flex-direction: column;
  z-index: 99;
}
.nav__mobile.is-open { display: flex; }
.nav__mobile a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem;
  color: var(--body);
}
.nav__mobile a:last-child { border-bottom: none; }

/* -------- 3. Shell / Section primitives -------- */
section { position: relative; }
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 8rem 2.4rem;
}
.shell--bordered { border-top: 1px solid var(--line); }


.section-eyebrow {
  font-family: var(--script);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0;
  line-height: 1.2;
  font-weight: 400;
}
.section-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 3rem;
}
.section-title + .section-lead {
  margin-top: -2.4rem; /* lead 있으면 제목 아래 간격 좁힘 */
}
.section-lead {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--body);
  margin-bottom: 4rem;
}

/* -------- 4. Reveal -------- */
/* 명시도 강화(.reveal.reveal): .lab-card나 .strength처럼 자체 transition을 가진 요소가
   reveal의 opacity transition을 덮어쓰지 않도록 보장 */
.reveal.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal.reveal[data-delay="4"] { transition-delay: 320ms; }

/* -------- 5. Hero -------- */
.hero {
  min-height: 88vh;
  background: var(--paper-warm);
  display: flex; align-items: center;
  padding: 8rem 2rem 5rem;
  position: relative;
}
.hero::before {
  content: none;
}
.hero__grid {
  position: relative; z-index: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 6rem;
  align-items: center;
}
.hero__hand {
  font-family: var(--script);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.hero__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(3.2rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.hero__name-block {
  width: fit-content;
  margin-bottom: 1.6rem;
}
.hero__name-block .hero__name { margin-bottom: 0.3rem; }
.hero__name-en {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.32em;
  color: var(--label);
  margin-bottom: 0;
  text-transform: uppercase;
  text-align: center;
}
.hero__lead {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.7;
  color: var(--ink);
  max-width: none;
  white-space: nowrap;
  margin-bottom: 2.4rem;
  font-weight: 400;
}
.hero__lead em {
  font-family: var(--script);
  font-size: 1.4em;
  font-style: normal;
  color: var(--navy);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero__meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--label);
  margin-bottom: 1.8rem;
}
.hero__meta-row {
  display: flex; gap: 12px; align-items: baseline;
  margin-bottom: 4px;
}
.hero__meta-row span:first-child {
  color: var(--navy);
  min-width: 70px;
}
.hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  cursor: pointer;
}
.btn--primary {
  background: var(--navy);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-tint);
}

/* Hero portrait */
.hero__photo {
  position: relative;
  width: 100%; max-width: 340px;
  margin-left: auto;
}
.hero__photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-warm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero__photo-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
}
.hero__photo::before {
  content: "";
  position: absolute; top: -18px; left: 18px;
  right: -18px; bottom: 18px;
  border: 1px solid var(--navy);
  z-index: -1;
}
.hero__photo-cap {
  position: absolute; bottom: -14px; right: -14px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  font-family: var(--script);
  font-size: 1.1rem;
  color: var(--navy);
}

@media (max-width: 880px) {
  .hero { min-height: auto; padding-top: 7rem; padding-bottom: 4rem; }
  .hero::before { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__photo { max-width: 240px; margin: 0; }
  .hero__lead { white-space: normal; font-size: 1.15rem; }
}

/* -------- 6. About / Values -------- */
.about { background: var(--paper); border-top: 1px solid var(--line); }
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}
.value {
  padding: 2rem 0 0;
  border-top: 2px solid var(--ink);
}
.value__num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--label);
  margin-bottom: 0.8rem;
}
.value__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.value__quote {
  font-family: var(--script);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--navy);
  margin-bottom: 1rem;
  min-height: calc(1.25rem * 1.45 * 2); /* 2-line 예약 — 본문 시작점 정렬 */
}
.value__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  text-align: justify;
  text-justify: inter-character;
  hyphens: auto;
}
@media (max-width: 880px) {
  .values { grid-template-columns: 1fr; gap: 1rem; }
  .value { padding: 1.6rem 0 0.4rem; }
}

/* -------- 7. Projects -------- */
.projects { background: var(--paper-warm); border-top: 1px solid var(--line); }
.project {
  background: var(--paper-card);
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.project:hover {
  border-color: color-mix(in oklab, var(--navy) 35%, var(--line));
}
.project__head {
  padding: 2.6rem 3rem 2rem;
}
.project__num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.project__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.project__sub {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 1.6rem;
}

.project__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
}
.project__meta-item {
  padding: 1rem 0;
  border-right: 1px solid var(--line-soft);
}
.project__meta-item:last-child { border-right: none; }
.project__meta-item:nth-child(n+1):not(:first-child) { padding-left: 1rem; }
.project__meta-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--label);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.project__meta-value {
  font-size: 0.95rem;
  color: var(--ink);
}
@media (max-width: 760px) {
  .project__meta { grid-template-columns: repeat(2, 1fr); }
  .project__meta-item { border-right: none; border-bottom: 1px solid var(--line-soft); padding-left: 0 !important; }
  .project__meta-item:nth-last-child(-n+2) { border-bottom: none; }
}

.project__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  background: var(--navy-tint);
  color: var(--navy);
  border: 1px solid color-mix(in oklab, var(--navy) 20%, var(--line));
}

.project__toggle {
  width: 100%;
  padding: 1.1rem 2.6rem;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  transition: background var(--t), color var(--t);
}
.project__toggle:hover {
  background: var(--navy-tint);
  color: var(--navy);
}
.project__toggle-icon {
  width: 24px; height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
  transition: transform var(--t);
}
.project__toggle-icon::before,
.project__toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: var(--label);
  transition: background var(--t);
}
.project__toggle:hover .project__toggle-icon::before,
.project__toggle:hover .project__toggle-icon::after {
  background: var(--navy);
}
.project__toggle-icon::before {
  width: 10px; height: 1.5px;
  transform: translate(-50%, -50%);
}
.project__toggle-icon::after {
  width: 1.5px; height: 10px;
  transform: translate(-50%, -50%);
}
.is-open .project__toggle-icon { transform: rotate(45deg); }

.project__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms cubic-bezier(.4,0,.2,1);
  border-top: 1px solid transparent;
}
.is-open .project__body {
  max-height: 8000px;
  border-top-color: var(--line);
}
.project__inner {
  padding: 3rem 3rem;
}
@media (max-width: 760px) {
  .project__head { padding: 1.8rem 1.4rem 1.4rem; }
  .project__toggle { padding: 1rem 1.4rem; }
  .project__inner { padding: 2rem 1.4rem; }
  .shell { padding: 5rem 1.4rem; }
}

/* Project body subsections */
.blk { margin-bottom: 2.2rem; }
.blk:last-child { margin-bottom: 0; }
.blk__label {
  font-family: var(--script);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.blk__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  line-height: 1.4;
}
.blk__text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--body);
  text-align: justify;
}
.blk__text p + p { margin-top: 0.9rem; }

/* "왜? 왜? 왜?" style — question + answer block */
.why-list {
  display: flex; flex-direction: column;
  gap: 0;
  margin-top: 0.4rem;
  border-top: 1px solid var(--line);
}
.why-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.why-item__q {
  font-family: var(--script);
  font-size: 1.35rem;
  color: var(--navy);
  line-height: 1.35;
}
.why-item__a {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--body);
  text-align: justify;
}

/* Pipeline diagram — clear bordered cards with arrows */
.pipeline {
  display: flex; flex-direction: column;
  gap: 32px;
}
.pipeline__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 38px;
  position: relative;
}
.pipeline__cell {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 1.1rem 1rem;
  min-height: 120px;
  display: flex; flex-direction: column; gap: 6px;
}
.pipeline__cell:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1;
  z-index: 2;
}
.pipeline__row:not(:last-child)::after {
  content: "↓";
  position: absolute;
  right: 12.5%;
  bottom: -28px;
  transform: translateX(50%);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1;
}
.pipeline__row--reverse {
  direction: rtl;
}
.pipeline__row--reverse .pipeline__cell {
  direction: ltr;
}
.pipeline__row--reverse .pipeline__cell:not(:last-child)::after {
  content: "←";
  right: auto;
  left: -28px;
}
.pipeline__stage {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--navy);
  text-transform: uppercase;
}
.pipeline__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.pipeline__note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--body-soft);
  margin-top: auto;
  line-height: 1.5;
}
.pipeline__cell--accent {
  background: var(--navy-tint);
  border-color: color-mix(in oklab, var(--navy) 25%, var(--line));
}
@media (max-width: 760px) {
  .pipeline__row { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .pipeline__cell:nth-child(2n)::after { display: none; }
  .pipeline__cell:nth-child(2n)::before {
    content: "↓"; position: absolute; left: 50%; bottom: -22px;
    transform: translateX(-50%);
    font-family: var(--mono); font-size: 1.05rem; color: var(--navy);
  }
}

/* Persona explorer */
.persona-set {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 0;
}
.persona-btn {
  background: var(--paper-card);
  padding: 1rem 0.8rem;
  text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  transition: background var(--t);
  min-height: 105px;
}
.persona-btn:hover { background: var(--paper-warm); }
.persona-btn.is-active {
  background: var(--navy-tint);
}
.persona-btn__code {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.persona-btn__name {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink);
}
.persona-btn__share {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--body-soft);
  margin-top: auto;
}
@media (max-width: 760px) {
  .persona-set { grid-template-columns: repeat(2, 1fr); }
}

.persona-detail {
  border: 1px solid var(--line);
  border-top: none;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.4rem;
  background: var(--paper-card);
}
.persona-detail__tier {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid currentColor;
  margin-bottom: 1.1rem;
}
.persona-detail__tier::before { content: none; }
.tier-safe { color: var(--tier-safe-fg); background: var(--tier-safe); }
.tier-lat  { color: var(--tier-lat-fg);  background: var(--tier-lat); }
.tier-warn { color: var(--tier-warn-fg); background: var(--tier-warn); }
.tier-now  { color: var(--tier-now-fg);  background: var(--tier-now); }

.persona-detail__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}
.persona-detail__def {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--body);
  margin-bottom: 1.4rem;
}
.persona-detail__strategy {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink);
  padding: 1.1rem 1.2rem;
  background: var(--navy-tint);
}
.persona-detail__strategy-label {
  font-family: var(--script);
  font-size: 1.05rem;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.persona-detail__metrics {
  display: flex; flex-direction: column;
  gap: 14px;
}
.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.metric__label {
  font-size: 0.92rem;
  color: var(--body);
}
.metric__value {
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}
.metric__bar {
  grid-column: 1 / -1;
  height: 5px;
  background: var(--line);
  overflow: hidden;
}
.metric__bar-fill {
  height: 100%;
  width: var(--v, 0%);
  background: var(--navy);
  transition: width 600ms cubic-bezier(.4,0,.2,1);
}
.metric__bar-fill.is-zero { background: var(--line); }
@media (max-width: 880px) {
  .persona-detail { grid-template-columns: 1fr; gap: 1.6rem; padding: 1.6rem; }
}

/* Risk spectrum — equal columns, n number inside */
.risk-spectrum {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.risk-spectrum__seg {
  padding: 1.2rem 1rem;
  background: var(--seg-bg, var(--paper-card));
  display: flex; flex-direction: column;
  gap: 6px;
  min-height: 130px;
}
.risk-spectrum__seg .stier {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seg-fg);
}
.risk-spectrum__seg .scode {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: auto;
}
.risk-spectrum__seg .scount {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--seg-fg);
}
.risk-spectrum__seg .sshare {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--body-soft);
}
.seg-safe { --seg-bg: var(--tier-safe); --seg-fg: var(--tier-safe-fg); }
.seg-lat  { --seg-bg: var(--tier-lat);  --seg-fg: var(--tier-lat-fg); }
.seg-warn { --seg-bg: var(--tier-warn); --seg-fg: var(--tier-warn-fg); }
.seg-now  { --seg-bg: var(--tier-now);  --seg-fg: var(--tier-now-fg); }
@media (max-width: 760px) {
  .risk-spectrum { grid-template-columns: 1fr; }
  .risk-spectrum__seg { min-height: auto; }
}

/* Weight toggle */
.weight-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  margin-bottom: 1.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.weight-toggle button {
  padding: 0.6rem 1.1rem;
  color: var(--label);
  background: transparent;
  transition: background var(--t), color var(--t);
}
.weight-toggle button.is-active {
  background: var(--navy);
  color: var(--paper);
}
.weight-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 0.95rem;
  background: var(--paper-card);
}
.weight-table th,
.weight-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.weight-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  background: var(--paper-warm);
}
.weight-table td { color: var(--ink); }
.weight-table td .num {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  transition: color var(--t);
}
.weight-table td .delta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--label);
  margin-left: 8px;
}
.weight-table td .delta.up   { color: var(--tier-warn-fg); }
.weight-table td .delta.down { color: var(--tier-safe-fg); }
.weight-table tr:last-child td { border-bottom: none; }

/* Senior 3 cards */
.elder-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.elder-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 1.6rem 1.4rem;
  display: flex; flex-direction: column;
  gap: 0.6rem;
}
.elder-card__code {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--navy);
  text-transform: uppercase;
}
.elder-card__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.elder-card__share {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--body);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}
.elder-card__pattern ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.7;
}
.elder-card__pattern li {
  padding-left: 14px;
  position: relative;
  margin-bottom: 2px;
}
.elder-card__pattern li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 1px; background: var(--navy);
}
.elder-card__profile {
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--ink);
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
  line-height: 1.6;
}
@media (max-width: 880px) {
  .elder-cards { grid-template-columns: 1fr; }
}

/* Stat table — 결과 정량 성과 표 */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--paper-card);
  font-size: 0.95rem;
}
.stat-table th,
.stat-table td {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.stat-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
.stat-table tr:last-child td { border-bottom: none; }
.stat-table td.stat-label {
  width: 32%;
  font-weight: 700;
  color: var(--ink);
}
.stat-table td.stat-label small {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--label);
  margin-top: 4px;
  text-transform: none;
}
.stat-table td.stat-num {
  width: 24%;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.stat-table td.stat-num small {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--body-soft);
  margin-top: 4px;
  letter-spacing: 0;
}
.stat-table td.stat-desc {
  font-size: 0.96rem;
  color: var(--body);
  line-height: 1.7;
}
@media (max-width: 760px) {
  .stat-table thead { display: none; }
  .stat-table, .stat-table tbody, .stat-table tr, .stat-table td { display: block; width: 100%; }
  .stat-table tr { border-bottom: 1px solid var(--line); }
  .stat-table tr:last-child { border-bottom: none; }
  .stat-table td { border-bottom: none; padding: 0.4rem 1.2rem; }
  .stat-table td:first-child { padding-top: 1.2rem; }
  .stat-table td:last-child { padding-bottom: 1.2rem; }
}

/* Results — readable, no color-only emphasis */
.results-stack {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper-card);
}
.result-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.4rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.result-row:last-child { border-bottom: none; }
.result-row__label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
}
.result-row__value {
  font-size: 1rem;
  color: var(--body);
  line-height: 1.7;
}
.result-row__value .num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  display: inline-block;
  margin-right: 6px;
}
.result-row__value .unit {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--body);
  margin-right: 12px;
}
@media (max-width: 760px) {
  .result-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* Learning — number + headline + body */
.learnings {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 0.6rem;
}
.learning {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.4rem;
}
.learning__num {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--navy);
  line-height: 1;
}
.learning__core {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}
.learning__body {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--body);
  text-align: justify;
}
@media (max-width: 760px) {
  .learning { grid-template-columns: 1fr; gap: 0.4rem; }
  .learning__num { font-size: 1.5rem; }
}

/* -------- 8. Lab / Toy projects -------- */
.lab { background: var(--paper); border-top: 1px solid var(--line); }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 980px) {
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .lab-grid { grid-template-columns: 1fr; }
}
.lab-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 0;
  display: flex; flex-direction: column;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  overflow: hidden;
}
.lab-card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -22px color-mix(in oklab, var(--navy) 50%, transparent);
}
.lab-card__visual {
  aspect-ratio: 16 / 7;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-warm) 0,
      var(--paper-warm) 6px,
      color-mix(in oklab, var(--paper-warm) 60%, var(--line)) 6px,
      color-mix(in oklab, var(--paper-warm) 60%, var(--line)) 12px
    );
  border-bottom: 1px solid var(--line);
  position: relative;
}
.lab-card__visual > .lab-card__status {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.lab-card__body {
  padding: 0.9rem 0.95rem 1rem;
  display: flex; flex-direction: column; gap: 0.45rem;
  flex: 1;
}
.lab-card__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lab-card__status {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid currentColor;
  white-space: nowrap;
  background: var(--paper);
}
.status-live { color: var(--tier-safe-fg); background: var(--tier-safe); }
.status-wip  { color: var(--tier-warn-fg); background: var(--tier-warn); }
.status-idea { color: var(--label); background: var(--paper-warm); }
.lab-card__desc {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--body);
  flex: 1;
  text-align: justify;
  text-justify: inter-character;
  hyphens: auto;
}
.lab-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 0.4rem;
}

/* -------- 9. Strengths -------- */
.strengths { background: var(--paper-warm); border-top: 1px solid var(--line); }
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 880px) {
  .strengths-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .strengths-grid { grid-template-columns: 1fr; }
}
.strength {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: border-color var(--t), transform var(--t);
}
.strength:hover {
  transform: translateY(-2px);
  border-color: var(--navy);
}
.strength__index {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--navy);
}
.strength__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.4;
}
.strength__desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--body);
  text-align: justify;
  text-justify: inter-character;
  hyphens: auto;
}

/* -------- 10. Cons -------- */
.cons { background: var(--paper); border-top: 1px solid var(--line); }
.con {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
}
.con:last-child { border-bottom: 1px solid var(--line); }
.con__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 0.8rem;
}
.con__text {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--body);
  margin-bottom: 1rem;
  text-align: justify;
}
.con__fix {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center;
  padding: 1rem 1.2rem;
  background: var(--navy-tint);
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--body);
}
.con__fix-label {
  font-family: var(--script);
  font-size: 1.1rem;
  color: var(--navy);
  white-space: nowrap;
  line-height: 1.3;
}
@media (max-width: 600px) {
  .con__fix { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* -------- 11. Contact -------- */
.contact { background: var(--paper-warm); border-top: 1px solid var(--line); text-align: center; }
.contact .shell { max-width: 720px; }
.contact-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1rem;
}
.contact-sub {
  font-family: var(--script);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 3rem;
}
.contact-list {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line);
  background: var(--paper-card);
  text-align: left;
  margin-bottom: 2rem;
}
.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  text-align: center;
}
.contact-row:last-child { border-bottom: none; }
.contact-row__label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
}
.contact-row__value {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--ink);
}
.contact-row__action {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--navy);
  text-transform: uppercase;
  transition: color var(--t);
}
.contact-row__action:hover { color: var(--navy-deep); }

.contact-cta {
  display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 3rem;
}
.contact-footer {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--label);
}

/* -------- 12. Toast -------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.4rem;
  font-family: var(--script);
  font-size: 1.05rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
  z-index: 9999;
  white-space: nowrap;
}
.toast.is-show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* -------- 13. To-top button -------- */
.to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  border: none;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease, visibility 0s linear 220ms;
  box-shadow: 0 6px 18px -8px rgba(20, 30, 60, 0.5);
}
.to-top.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease, visibility 0s linear 0s;
}
.to-top:hover {
  background: var(--navy-deep);
}
.to-top__arrow {
  font-size: 1.1rem;
  line-height: 1;
  font-family: var(--sans);
  font-weight: 700;
}
.to-top__label {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
}
@media (max-width: 760px) {
  .to-top { right: 1rem; bottom: 1rem; width: 2.8rem; height: 2.8rem; }
  .to-top__arrow { font-size: 1rem; }
  .to-top__label { font-size: 0.45rem; }
}

/* -------- 14. Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
