:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #8a8a8a;
  --rule: #1a1a1a;
  --hairline: #e5e5e5;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 26px;
  --tracking: -0.005em;

  --col-max: 920px;
  --read-max: 360px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui,
    sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  letter-spacing: var(--tracking);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; letter-spacing: inherit; }

/* ─────────── Shell ─────────── */
.page {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 112px 36px 112px;
}

/* ─────────── Grid ─────────── */
.layout {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: 48px;
  align-items: start;
}

/* ─────────── Portrait ─────────── */
.portrait {
  aspect-ratio: 3 / 4;
  background: url("images/portrait.png") center / contain no-repeat;
  position: sticky;
  top: 28px;
}
.portrait .label { display: none; }

/* ─────────── Content ─────────── */
.content { min-width: 0; max-width: 400px; }

/* Nav */
.nav {
  display: flex;
  gap: 20px;
  margin-bottom: 48px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav a::before {
  content: "";
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: transparent;
  margin-right: 6px;
  vertical-align: middle;
  transition: background 0.2s;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::before { background: var(--fg); }

/* Panels */
.panel {
  display: block;
  animation: fadeUp 0.5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.section-head { margin-bottom: 28px; }
.section-head:not(:has(.sub)) { margin-bottom: 14px; }
.section-head h2 {
  margin: 0;
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.section-head .sub {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
}

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 500;
}
.description + .eyebrow { margin-top: 36px; }

/* Profile description */
.description {
  font-size: var(--fs-base);
  line-height: 1.7;
  white-space: pre-line;
  color: #2a2a2a;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.timeline li:first-child { border-top: 1px solid var(--hairline); }
.timeline .idx {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline .title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--fg);
}
.timeline .desc {
  margin: 4px 0 0;
  font-size: var(--fs-base);
  color: #666666;
  line-height: 1.7;
}

/* Icon tabs */
.icon-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.icon-tabs button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: opacity 0.25s;
  opacity: 0.5;
}
.icon-tabs button:hover { opacity: 0.85; }
.icon-tabs .dot {
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.icon-tabs button[aria-selected="true"] { opacity: 1; }
.icon-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--c);
}

.item-content { display: none; }
.item-content[data-active="true"] {
  display: block;
  animation: fadeUp 0.4s cubic-bezier(.2,.8,.2,1) both;
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.item-head-text { min-width: 0; }
.item-head h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.item-meta {
  margin: 4px 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.item-body {
  margin: 0;
  padding: 16px 18px;
  background: #1a1a1a;
  color: #f0f0f0;
  font-size: var(--fs-base);
  line-height: 1.95;
  letter-spacing: var(--tracking);
  border-left: 3px solid var(--c, #eef3f9);
  border-radius: 2px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.item-body p { margin: 0; }
.item-body p + p { margin-top: 10px; }

/* Footer */
footer.site {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  letter-spacing: 0;
  color: var(--muted);
}

/* ─────────── Mobile ─────────── */
@media (max-width: 900px) {
  :root {
    --fs-2xl: 24px;
    --col-max: 480px;
  }
  .page { padding: 72px 24px 72px; }
  .layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .portrait {
    position: static;
    aspect-ratio: 4 / 3;
    max-width: 100%;
    width: 100%;
    margin: 0;
    background-image: url("images/portrait-mobile.png");
  }
  .content { max-width: 100%; width: 100%; }
  .nav {
    gap: 14px;
    overflow-x: auto;
    margin-bottom: 32px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px 4px;
  }
  .nav a {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .section-head { margin-bottom: 20px; }
  .timeline li {
    grid-template-columns: 28px 1fr;
    gap: 10px;
    padding: 10px 0;
  }
}

@media (max-width: 480px) {
  footer.site { flex-direction: column; gap: 8px; align-items: flex-start; }
}
