:root {
  --bg: #f5f5f2;
  --paper: #fcfcfa;
  --ink: #232320;
  --muted: #6b6a66;
  --line: #dedcd6;
  --line-strong: #cecbc4;
  --accent: #3465c5;
  --code-bg: #efeee9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "SUIT", "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--code-bg);
  padding: 0.12rem 0.34rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── page container ── */
.page {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 88px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

/* ── hero ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 40px;
  align-items: start;
  padding: 12px 0 10px;
}

.hero-copy {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.hero-panel {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.eyebrow,
.kicker,
.metric-label,
.panel-title,
.project-index {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: inherit;
  font-size: 40px;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 22px;
  font-weight: 630;
  line-height: 1.56;
}

.intro {
  margin: 16px 0 0;
  max-width: 38em;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}

.panel-title {
  margin-bottom: 8px;
}

.fact-list {
  margin: 0;
  padding-left: 20px;
}

.fact-list li {
  margin: 0 0 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-actions a,
.project a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 180ms ease;
}

.hero-actions a:hover,
.project a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: none;
  background: var(--paper);
}

/* ── sections ── */
.section {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ── metrics ── */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  border-top: none;
  padding-top: 0;
  margin-top: 32px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.metric-card strong {
  font-size: 1rem;
}

.metric-card span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/* ── headings ── */
.section-heading {
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 14px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 680;
}

p {
  margin: 0 0 14px;
  line-height: 1.78;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin: 0 0 8px;
  line-height: 1.78;
}

/* ── capability grid ── */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.info-card p {
  margin-bottom: 0;
  color: var(--muted);
}

/* ── projects ── */
.project {
  margin-top: 24px;
  padding: 0 0 24px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.project-featured {
  background: transparent;
}

.project:first-of-type {
  margin-top: 0;
}

.project:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.project-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.meta {
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.project-summary {
  margin-top: 8px;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── timeline ── */
.timeline-wrap {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line-strong);
  background: transparent;
  border-radius: 0;
}

.timeline-role,
.timeline-desc {
  margin: 0;
}

.timeline-role {
  font-weight: 700;
}

.timeline-desc {
  margin-top: 4px;
  color: var(--muted);
}

/* ── split layout ── */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-panel {
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* ── detail pages ── */
.detail-page {
  max-width: 880px;
}

.detail-hero {
  padding: 12px 0 10px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
}

.back-link:hover {
  color: var(--accent);
}

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

.detail-card {
  margin-top: 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.detail-card:first-of-type {
  margin-top: 0;
}

.detail-card p {
  margin-bottom: 0;
  color: var(--muted);
}

/* ── tables ── */
.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

th {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.02);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ── code blocks ── */
pre {
  overflow-x: auto;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* ── footer nav ── */
.detail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}

.detail-footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── quote card ── */
.quote-card {
  padding: 18px 0 18px 16px;
  border: none;
  border-left: 2px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.quote-card p {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

/* ── markdown content ── */
.markdown-shell {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  font-family: inherit;
  line-height: 1.34;
  letter-spacing: -0.015em;
}

.markdown-content h1 {
  margin: 4px 0 16px;
  font-size: 34px;
  font-weight: 740;
}

.markdown-content h2 {
  margin: 34px 0 14px;
  padding-top: 4px;
  font-size: 22px;
  font-weight: 700;
  border-top: 1px solid var(--line);
}

.markdown-content h3 {
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 680;
}

.markdown-content p,
.markdown-content li,
.markdown-content blockquote {
  line-height: 1.78;
}

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

.markdown-content blockquote {
  margin: 18px 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  background: transparent;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 24px;
}

.markdown-content pre {
  margin: 16px 0;
}

.markdown-content .mermaid {
  margin: 20px 0 22px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.markdown-content table {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

/* ── responsive ── */
@media (max-width: 920px) {
  .hero,
  .metrics,
  .capability-grid,
  .split,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }

  .project-head {
    flex-direction: column;
  }

  .meta {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 22px, 880px);
    padding: 20px 0 64px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 19px;
    max-width: none;
  }

  .markdown-content h1 {
    font-size: 29px;
  }

  .markdown-content h2 {
    font-size: 20px;
  }
}
