:root {
  --navy: #0f1530;
  --ink: #1f2433;
  --sub: #5d6375;
  --muted: #8a8fa0;
  --line: #e4e6ef;
  --bg: #f4f5fa;
  --card: #ffffff;
  --point: #5b4fe0;
  --point-soft: #efedfd;
  --radius: 16px;
  --surface: #ffffff;
  --btn-bg: var(--navy);
  --btn-fg: #ffffff;
  --heading: var(--navy);
  --top: var(--navy);
  --shadow: 0 20px 60px rgba(15, 21, 48, 0.08);
}

/* ---------- Dark (임팩트형) ---------- */
:root[data-theme="dark"] {
  --ink: #e8e9f2;
  --sub: #a6aac0;
  --muted: #747a92;
  --line: #262b45;
  --bg: #070a18;
  --card: #0e1226;
  --surface: #151a33;
  --point: #8f85ff;
  --point-soft: rgba(143, 133, 255, 0.14);
  --btn-bg: #8f85ff;
  --btn-fg: #0a0d1c;
  --heading: #ffffff;
  --top: #8f85ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(143,133,255,.18), transparent 60%),
    radial-gradient(800px 400px at -10% 30%, rgba(80,200,255,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-theme="dark"] .stat {
  background: linear-gradient(160deg, #1a1f3d 0%, #11152b 100%);
  border: 1px solid var(--line);
}
:root[data-theme="dark"] .num {
  font-size: clamp(30px, 3.4vw, 40px);
  white-space: nowrap;
  background: linear-gradient(90deg, #b3abff, #7fd6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .photo { box-shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(143,133,255,.25); }
:root[data-theme="dark"] .btn.primary:hover { background: #fff; border-color: #fff; }
:root[data-theme="dark"] .projects a:hover,
:root[data-theme="dark"] .strengths article:hover { box-shadow: 0 0 0 1px var(--point), 0 10px 30px rgba(143,133,255,.15); }

/* 테마 토글 */
.theme-toggle {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: rotate(20deg); border-color: var(--point); }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  padding: 48px 16px;
}

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }

.card {
  max-width: 880px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 24px;
  border-top: 10px solid var(--top);
  box-shadow: var(--shadow);
  position: relative;
  transition: background .3s ease;
  padding: 56px 64px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  gap: 40px;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.photo {
  width: 160px;
  height: 213px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--line);
}
.role {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--point);
  background: var(--point-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--heading);
}
h1 .en {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--point);
  margin-left: 6px;
  vertical-align: middle;
}
.headline {
  font-size: 20px;
  color: var(--sub);
  margin: 12px 0 20px;
}
.headline strong { color: var(--heading); }
.br-m { display: none; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
  margin-bottom: 24px;
}
.meta .label {
  color: var(--muted);
  font-size: 13px;
  margin-right: 10px;
}
.copy {
  font: inherit;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 1px dashed var(--muted);
  padding: 0;
}
.copy:hover { color: var(--point); border-color: var(--point); }

.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bg); }
.btn.primary:hover { background: var(--point); border-color: var(--point); }
.btn.ghost { background: var(--surface); color: var(--heading); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--point); color: var(--point); }
.btn.small { font-size: 13px; padding: 8px 14px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 18px;
}
.num {
  font-size: 34px;
  font-weight: 800;
  color: var(--point);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.desc {
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}
.desc small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Blocks ---------- */
.block {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--point);
  line-height: 1.2;
}
h3 { font-size: 16px; font-weight: 700; color: var(--heading); }

.strengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.strengths article {
  transition: box-shadow .15s ease;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.strengths h3 { color: var(--point); margin-bottom: 8px; }
.strengths p { font-size: 14px; color: var(--sub); }

/* Timeline */
.timeline li {
  position: relative;
  padding: 0 0 24px 24px;
  border-left: 2px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--point);
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.tl-head h3 span { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 4px; }
.tl-head time { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { font-size: 13px; font-weight: 600; color: var(--point); margin: 2px 0 6px; }
.timeline p:last-child { font-size: 14px; color: var(--sub); }
.timeline b { color: var(--point); }

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.projects a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s ease, transform .15s ease;
}
.projects a:hover { border-color: var(--point); transform: translateY(-2px); }
.tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--point);
  background: var(--point-soft);
  padding: 2px 8px;
  border-radius: 6px;
}
.projects strong { font-size: 15px; color: var(--heading); margin-top: 4px; }
.kpi { font-size: 13px; color: var(--sub); }

/* Skills & edu */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-bottom: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
}
.edu li { margin-bottom: 12px; }
.edu strong { display: block; font-size: 15px; color: var(--heading); }
.edu span { font-size: 13px; color: var(--muted); }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { padding: 0; background: var(--card); }
  .card { border-radius: 0; box-shadow: none; padding: 40px 20px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 24px; }
  .photo { width: 120px; height: 160px; }
  .theme-toggle { top: 16px; right: 16px; }
  :root[data-theme="dark"] .num { font-size: 32px; }
  h1 { font-size: 36px; }
  h1 .en { display: block; margin: 6px 0 0; }
  .headline { font-size: 18px; }
  .br-m { display: inline; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .num { font-size: 28px; }
  .strengths, .projects, .two-col { grid-template-columns: 1fr; }
  .two-col { gap: 32px; }
  .tl-head { flex-direction: column; gap: 0; }
}

/* ---------- Print (A4) ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .cta, .foot .btn, .toast, .theme-toggle { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .block, .stats { padding: 20px 0; }
  .hero { padding-bottom: 24px; }
  .projects a { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
