:root {
  --bg: #f1ece5;
  --surface: #fffdf9;
  --surface-muted: #f5efe8;
  --line: #ded4c9;
  --line-soft: #ebe2d8;
  --text: #100c0d;
  --text-mid: #4d4540;
  --text-dim: #70655d;

  --primary: #013328;
  --primary-ink: #013328;
  --primary-soft: #e7efe9;
  --primary-line: #b4cbbc;

  --cyan: #cc8b65;
  --cyan-ink: #8b4e30;

  --success: #3d785c;
  --success-ink: #255a43;
  --success-soft: #e7f0e7;

  --warning-ink: #874b31;
  --warning-soft: #f8eadf;

  --danger-ink: #9b4e3d;
  --danger-soft: #f8eae4;

  --purple-ink: #765442;
  --purple-soft: #f2e9e2;

  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow: 0 4px 16px rgba(27, 38, 31, 0.06);

  --sans: "Pretendard", "Noto Sans KR", -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul { padding-left: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary-ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(1, 51, 40, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #fffaf4;
}

.brand small {
  font-size: 13px;
  font-weight: 500;
  color: #d5c9bd;
}

.navlinks { display: flex; gap: 2px; flex-wrap: wrap; }

.navlinks a {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #f2e7db;
  text-decoration: none;
}

.navlinks a:hover, .navlinks a:focus-visible { background: #cc8b65; color: #100c0d; }

/* ---------- hero ---------- */

.hero { padding: 32px 0 0; }
.hero-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 30px; padding: 24px; background: linear-gradient(120deg, #013328, #08483a); border: 1px solid #013328; border-radius: var(--radius-lg); box-shadow: var(--shadow); color: #fffaf4; }
.hero-profile-photo { width: 190px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.hero-content { min-width: 0; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255, 250, 244, 0.25); }
.hero-links a { display: inline-flex; flex-wrap: wrap; gap: 5px; color: #fffaf4; font-size: 12.5px; text-decoration: none; }
.hero-links a:hover strong { color: #e4ae8e; text-decoration: underline; }
.hero-links span { color: #d5c9bd; }
.hero-links strong { overflow-wrap: anywhere; font-weight: 600; }
.hero.hero-plain .hero-card { padding: 20px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--text); }
.hero.hero-plain .eyebrow { color: var(--primary-ink); font-size: 16px; }
.hero.hero-plain h1 span { color: var(--text-mid); }
.hero.hero-plain .hero-links { border-color: var(--line); }
.hero.hero-plain .hero-links a { color: var(--text); }
.hero.hero-plain .hero-links span { color: var(--text-dim); }
.hero.hero-plain .hero-links a:hover strong { color: var(--primary-ink); }
.hero.hero-plain .hero-links .pdf-download { padding: 7px 11px; border: 1px solid var(--primary-ink); border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary-ink); }
.hero-links { align-items: center; }
.hero.hero-plain .chip.blue { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-ink); }
.hero.hero-plain .chip.green { background: var(--success-soft); border-color: var(--primary-line); color: var(--success-ink); }
@media (min-width: 621px) {
  .hero.hero-plain .eyebrow { font-size: 17px; position: relative; top: -10px; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #cc8b65;
}

.hero h1 {
  margin: 8px 0 0;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -1.2px;
}

.hero h1 span {
  margin-left: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: #e3dcd2;
}

.hero .chip { background: rgba(255, 250, 244, 0.11); border-color: rgba(255, 250, 244, 0.3); color: #fffaf4; }
.hero .chip.green { background: #cc8b65; border-color: #cc8b65; color: #100c0d; }

.lede {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.55;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-mid);
}

.chip.blue { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-ink); }
.chip.green { background: var(--success-soft); border-color: #c5dbca; color: var(--success-ink); }
.chip.amber { background: var(--warning-soft); border-color: #e7c3aa; color: var(--warning-ink); }
.chip.purple { background: var(--purple-soft); border-color: #ddc7b9; color: var(--purple-ink); }
.chip.gray { background: var(--surface-muted); }

.factlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.fact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

a.fact:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.fact .k { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.fact .mono { font-family: var(--mono); font-size: 13.5px; }

/* ---------- sections ---------- */

section.block { padding: 44px 0 4px; }
#projects { margin-top: 28px; padding: 32px 0 36px; background: #e3dcd2; border-top: 1px solid #d7c9bb; border-bottom: 1px solid #d7c9bb; }
#projects .sec-head { border-bottom-color: #cdbeb0; }
#projects .sec-head h2 { font-size: 26px; color: var(--primary-ink); }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sec-head h2 { font-size: 22px; letter-spacing: -0.5px; }
.sec-head p { font-size: 14px; color: var(--text-dim); }

/* ---------- education ---------- */

.education-grid { display: block; }
.education-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.education-entry { display: flex; align-items: center; padding: 8px 0; }
.education-entry + .education-entry { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.education-entry h3 { margin: 3px 0; font-size: 14px; line-height: 1.45; }
.education-status { display: inline-block; margin-left: 4px; padding: 1px 7px; border: 1px solid #e7c3aa; border-radius: 999px; background: var(--warning-soft); color: var(--warning-ink); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.education-entry .label { margin-bottom: 4px; }
.institution { display: flex; align-items: center; gap: 11px; }
.institution > div { min-width: 0; }
.institution-logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.kcci-logo { width: 38px; height: 38px; object-fit: cover; }
.institution p, .education-topics { font-size: 12.5px; color: var(--text-mid); }
.institution .education-gpa { margin-top: 4px; color: var(--text); }
.education-gpa strong { color: var(--primary-ink); font-family: var(--mono); }
.education-documents { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.education-documents a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--primary-line); border-radius: 6px; background: var(--primary-soft); color: var(--primary-ink); font-size: 11.5px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.education-documents a:hover, .education-documents a:focus-visible { border-color: var(--primary); background: #dbe9dd; }
.education-topics { margin-top: 4px; }

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

.card h3 { font-size: 16px; }

.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-dim);
}

/* ---------- stack ---------- */

.stack {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.stack-row { display: grid; gap: 8px; }
.stack-row h3 { font-size: 13px; font-weight: 700; color: var(--text-dim); }

.badges { display: flex; flex-wrap: wrap; gap: 7px; }

.badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-mid);
}

.badge.exp::before {
  content: "\25CF";
  margin-right: 6px;
  font-size: 8px;
  vertical-align: 2px;
  opacity: 0.55;
}

.stack-note {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.stack-note::before {
  content: "\25CF";
  margin-right: 6px;
  font-size: 8px;
  vertical-align: 2px;
  opacity: 0.55;
}

.b-c, .b-api, .b-ros, .b-stm, .b-sql { background: #e7efe9; color: #164938; }
.b-php, .b-pg, .b-docker, .b-proto, .b-jira { background: #eee5da; color: #66503f; }
.b-lar, .b-js, .b-git { background: #f5e5d9; color: #8b4e30; }
.b-react, .b-tool, .b-py { background: #f2ede7; color: #4d4540; }

/* ---------- project index cards ---------- */

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

.projcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.projcard { transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.projcard:hover, .projcard:focus-visible { border-color: var(--primary); box-shadow: 0 10px 26px rgba(1, 51, 40, 0.16); transform: translateY(-3px); }

.projcard img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line-soft);
}

.projcard .body { flex: 1; padding: 18px 20px 20px; display: grid; align-content: start; gap: 7px; }
.projcard .no { font-family: var(--mono); font-size: 12px; color: var(--primary); font-weight: 600; }
.projcard h3 { font-size: 20px; line-height: 1.3; }
.projcard p { font-size: 14px; line-height: 1.5; color: var(--text-mid); }
.projcard .body::after { content: "프로젝트 보기 ↗"; margin-top: 10px; color: var(--primary-ink); font-size: 12px; font-weight: 700; }
.projcard.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); background: var(--primary); border-color: var(--primary); color: #fffaf4; }
.projcard.featured img { height: 100%; min-height: 240px; aspect-ratio: auto; object-fit: contain; background: #100c0d; border-right: 1px solid rgba(255, 250, 244, 0.18); border-bottom: 0; }
.projcard.featured .body { align-content: center; padding: 26px 30px; }
.projcard.featured .no { color: #e7a984; }
.projcard.featured h3 { font-size: 27px; }
.projcard.featured p { color: #e9e1d7; }
.projcard.featured .body::after { color: #e7a984; }
.other-project-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-mid); font-size: 13px; text-decoration: none; }
.other-project-link span:first-child { color: var(--text-dim); font-weight: 700; }
.other-project-link strong { color: var(--primary-ink); }
.other-project-link:hover { border-color: var(--primary-line); background: var(--primary-soft); }

/* ---------- career ---------- */

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

.job {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.job.a { border-left-color: var(--cyan); }
.job.b { border-left-color: var(--primary); }
.job.c { border-left-color: #b9a18b; }
.job.d { border-left-color: #9b715c; }

.job .when { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.job.a .when { color: var(--cyan-ink); }
.job.b .when { color: var(--primary-ink); }
.job.c .when { color: var(--text-dim); }
.job.d .when { color: var(--purple-ink); }

.job h3 { margin-top: 3px; font-size: 17px; }
.job .role { margin-top: 2px; font-size: 13.5px; color: var(--text-dim); }
.job .detail { display: grid; gap: 6px; align-content: start; }
.job .detail p { font-size: 14.5px; line-height: 1.5; }
.job .detail .sub { font-size: 13px; color: var(--text-dim); }

.tag-dev {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 1px;
}

.tag-edu {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--purple-soft);
  border: 1px solid #ddc7b9;
  color: var(--purple-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 1px;
}

.tag-non {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 1px;
}

.note {
  margin-top: 12px;
  padding: 14px 18px;
  background: #f4e8db;
  border: 1px solid #e4c6ad;
  border-left: 4px solid #cc8b65;
  border-radius: var(--radius-lg);
  color: #4d362b;
  font-size: 14.5px;
  line-height: 1.55;
}
.note b { color: #713f2c; }

/* ---------- project sections ---------- */

.proj { padding: 46px 0 6px; border-top: 1px solid var(--line); margin-top: 40px; }
.proj:first-of-type { border-top: none; margin-top: 0; }

.proj-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.proj-eyebrow .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--primary);
}

.proj h2 { margin-top: 8px; font-size: 27px; line-height: 1.3; letter-spacing: -0.8px; }
.proj .sub { margin-top: 8px; font-size: 15px; color: var(--text-mid); line-height: 1.55; }
.proj-detail-heading { font-size: 17px; line-height: 1.4; }
.proj-detail-heading.standalone { margin-top: 26px; }

.proj-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.proj-body.plc-body { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
.fms-role-grid, .fms-media-grid, .kickcan-card-grid, .kickcan-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.fms-media-grid { grid-template-columns: minmax(0, 1fr); }
.fms-role-grid .theirs { grid-column: 1 / -1; }
.fms-purpose { margin-top: 16px; padding: 18px 20px; border-left: 4px solid var(--primary-ink); border-radius: var(--radius-lg); background: var(--primary-soft); }
.fms-purpose > strong { display: block; margin-bottom: 6px; color: var(--primary-ink); font-size: 16px; }
.fms-purpose p { color: var(--text-mid); font-size: 14.5px; line-height: 1.65; }
.fms-purpose b { color: var(--primary-ink); }
.fms-media-grid > * { min-width: 0; }
.fms-media-grid figure { display: flex; flex-direction: column; }
.fms-media-grid figure > a { display: block; }
.fms-media-grid figure img { width: 100%; height: auto; background: var(--surface-muted); }
.fms-media-grid figure figcaption { flex: 1; }
.fms-media-grid .demo-video-card { margin-top: 0; }
.kickcan-team-card .label { margin-bottom: 8px; }
.kickcan-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.kickcan-hardware { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kickcan-hardware .label { margin-bottom: 4px; }
.kickcan-media-grid figure { min-width: 0; display: flex; flex-direction: column; }
.kickcan-media-grid figure > img, .kickcan-media-grid figure > a > img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--surface-muted); }
.kickcan-media-grid figure > a > .kickcan-real-photo { object-fit: cover; }
.kickcan-media-grid figure figcaption { flex: 1; min-height: 38px; }

.col { display: grid; min-width: 0; width: 100%; gap: 12px; align-content: start; }

.mine {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.mine .label { color: var(--primary-ink); }
.mine-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.mine-heading .chip { padding: 2px 9px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.mine p { font-size: 15px; line-height: 1.5; }
.mine .big { font-size: 16.5px; font-weight: 700; margin-top: 4px; }
.mine .pills { margin-top: 12px; }
.mine .pill { max-width: 100%; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-ink); }
.mine.ai { background: #f6eee5; border-color: #e0c8b4; border-left-color: #cc8b65; }
.mine.ai .label { color: #865033; }
.mine.ai .pill { background: #fffdf9; border-color: #dec7b3; color: #694732; }
.mine.ai .pill.planned { background: #cc8b65; border-color: #cc8b65; color: #100c0d; }

.desktop-sentence-break { display: none; }

.theirs {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-left: 4px solid #c6b8aa;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-mid);
}

.kv { display: grid; gap: 7px; }
.kv p { font-size: 14.5px; line-height: 1.5; }

.steps { display: grid; gap: 9px; }

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
}

.step .n {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: 5px;
  text-align: center;
  padding: 3px 0;
}

.step h4 { font-size: 14.5px; }
.step p { font-size: 13.5px; color: var(--text-mid); line-height: 1.45; }

.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }

.flow .node {
  flex: 1 1 130px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
}

.flow .node b { display: block; font-size: 14px; margin-bottom: 2px; }
.flow .node.hl { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-ink); }
.flow .node.ok { background: var(--success-soft); border-color: #b4cbbc; color: var(--success-ink); }
.flow .arrow { align-self: center; color: #b8a99b; font-size: 15px; }

.nodetable { display: grid; gap: 8px; }

.noderow {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 62px;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
}

.noderow .name { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.noderow .who { font-size: 12px; text-align: center; padding: 3px 0; border-radius: 5px; background: var(--surface-muted); color: var(--text-dim); }
.noderow.hl { background: var(--primary-soft); border-color: var(--primary-line); }
.noderow.hl .name, .noderow.hl .desc { color: var(--primary-ink); font-weight: 700; }
.noderow.hl .who { background: var(--primary); color: #fff; font-weight: 700; }

.pills { display: flex; flex-wrap: wrap; gap: 7px; }

.pill {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.pill.red { background: var(--danger-soft); color: var(--danger-ink); }
.pill.green { background: var(--success-soft); color: var(--success-ink); }
.pill.gray { background: var(--surface-muted); color: var(--text-mid); }

.stage { display: grid; gap: 8px; }

.stage .row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
}

.stage .row .s { font-size: 12.5px; font-weight: 700; }
.stage .row.now .s { color: var(--success-ink); }
.stage .row.wip .s { color: var(--warning-ink); }
.stage .row.plan .s { color: var(--text-dim); }

/* ---------- figures ---------- */

figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 12px;
}

figure img { width: 100%; border-radius: var(--radius-sm); }
.proj-body figure { width: 100%; min-width: 0; }
figure.plain { padding: 0; overflow: hidden; }
figure.plain img { border-radius: 0; }
figure.plain figcaption { padding: 0 14px 12px; margin-top: 10px; }

.safekick-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.safekick-media figure { min-width: 0; display: flex; flex-direction: column; }
.safekick-media figure > img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--surface-muted); }
.safekick-media figcaption { flex: 1; min-height: 38px; }
.safekick-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #100c0d; }
.safekick-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.umjoo-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin-top: 18px; align-items: stretch; }
.umjoo-cards .kv { align-content: start; }
.umjoo-cards .theirs { display: flex; align-items: center; }
.umjoo-media figure > img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-muted); }

figcaption { margin-top: 9px; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

.figs { display: grid; gap: 12px; }
.figs.two { grid-template-columns: minmax(0, 1fr); }

.repo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--primary-ink);
  text-decoration: none;
}

.repo:hover { background: var(--primary-soft); border-color: var(--primary-line); }

/* ---------- FMS presentation summary ---------- */

.fms-presentation-layout { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); }
.fms-presentation-summary { min-width: 0; padding: 24px 22px; border-right: 1px solid var(--line); }
.fms-presentation-label { display: inline-block; padding: 5px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-ink); font-size: 11px; font-weight: 800; }
.fms-presentation-summary h3 { margin-top: 11px; font-size: 20px; }
.fms-presentation-lead { margin-top: 3px; color: var(--text-dim); font-size: 13px; }
.fms-presentation-points { display: grid; gap: 13px; margin-top: 20px; }
.fms-presentation-points li { padding-left: 13px; border-left: 3px solid var(--primary-line); font-size: 13px; line-height: 1.5; color: var(--text-mid); }
.fms-presentation-points strong { display: block; margin-bottom: 2px; color: var(--primary-ink); font-size: 12px; }
.fms-presentation-scope { margin-top: 21px; padding: 11px 12px; border-radius: var(--radius-sm); background: var(--primary-soft); font-size: 12px; line-height: 1.55; color: var(--text-mid); }
.fms-presentation-scope strong { display: block; color: var(--primary-ink); }
.fms-presentation-scope p + p { margin-top: 7px; }
.fms-presentation-media { min-width: 0; }
.fms-presentation-media .presentation-header { padding: 16px 16px 13px; }
.fms-presentation-media .presentation-header h3 { font-size: 16px; }
.fms-presentation-media .presentation-hint { padding: 0 16px 14px; }
.fms-presentation-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.fms-ongoing { margin-top: 18px; }
.fms-presentation-detail p { font-size: 12.5px; line-height: 1.55; color: var(--text-mid); }
.fms-presentation-detail strong { display: block; margin-bottom: 2px; color: var(--primary-ink); }

/* ---------- presentation carousel ---------- */

.demo-video-card { margin-top: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.demo-video-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px 14px; }
.demo-video-heading h3 { font-size: 18px; }
.demo-video-heading a { color: var(--primary-ink); font-size: 13px; font-weight: 700; }
.demo-video-frame { aspect-ratio: 16 / 9; background: #100c0d; }
.demo-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.presentation-card {
  margin-top: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.presentation-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px 14px; }
.presentation-header h3 { font-size: 18px; }
.presentation-header p, .presentation-hint { font-size: 13px; color: var(--text-dim); }
.presentation-controls { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.presentation-controls button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary-ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.presentation-controls button:hover:not(:disabled), .presentation-controls button:focus-visible { background: var(--primary-soft); border-color: var(--primary-line); }
.presentation-controls button:disabled { color: var(--text-dim); opacity: 0.45; cursor: default; }
.presentation-controls span { min-width: 54px; text-align: center; font: 600 13px var(--mono); }
.presentation-viewport { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; border-top: 1px solid var(--line-soft); }
.presentation-viewport:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.presentation-track { display: flex; }
.presentation-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; padding: 12px 12px 0; border: 0; border-radius: 0; box-shadow: none; }
.presentation-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #100c0d; }
.presentation-slide video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #100c0d; }
.presentation-slide figcaption { padding: 2px 4px 12px; }
.presentation-hint { padding: 0 20px 16px; }
.plc-carousel { min-width: 0; margin-top: 0; align-self: start; }
.collaboration-layout { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 18px; margin-top: 18px; align-items: stretch; }
.collaboration-overview { display: flex; flex-direction: column; min-width: 0; align-self: start; }
.collaboration-diagram { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 300px; min-height: 0; margin: 0 auto; padding: 68px 12px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.collaboration-diagram-kicker { position: absolute; top: 11px; left: 13px; color: var(--cyan-ink); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.collaboration-diagram h3 { position: absolute; top: 29px; left: 13px; color: var(--primary-ink); font-size: 16px; }
.collaboration-node { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 100px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf9; box-shadow: var(--shadow); text-align: center; }
.collaboration-node strong { color: var(--text); font-size: 13px; line-height: 1.25; }
.collaboration-node > span:last-child { color: var(--text-dim); font-size: 10px; line-height: 1.35; }
.collaboration-node img { flex: none; width: 38px; height: 38px; object-fit: contain; }
.collaboration-node-slack, .collaboration-node-github { grid-column: 1 / -1; justify-self: center; width: min(100%, 174px); }
.collaboration-node-slack { border-color: var(--primary-line); }
.collaboration-overview figcaption { align-self: center; max-width: 300px; margin-top: 9px; text-align: center; }
.collaboration-layout .collaboration-card { min-width: 0; margin-top: 0; }
.collaboration-heading { display: flex; align-items: center; gap: 16px; flex: 1 1 430px; }
.collaboration-heading > div:first-child { flex: 1 1 auto; }
.collaboration-card .presentation-slide img { background: #100c0d; }

/* ---------- method + footer ---------- */

.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.method .card p { font-size: 14.5px; line-height: 1.55; color: var(--text-mid); margin-top: 6px; }
.method .card h3 { font-size: 15.5px; }

.scope { display: grid; gap: 14px; margin-top: 14px; }

footer.site { margin-top: 56px; padding: 30px 0 46px; border-top: 1px solid var(--line); }

footer.site .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

footer.site p { font-size: 13.5px; color: var(--text-dim); }

/* ---------- responsive ---------- */

@media (min-width: 760px) {
  .desktop-sentence-break { display: block; }
  .stack-row { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; }
  .stack-row h3 { text-align: right; padding-top: 6px; }
  .figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .collaboration-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fms-role-grid, .fms-media-grid, .kickcan-card-grid, .kickcan-media-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fms-role-grid .theirs { grid-column: auto; }
  .kickcan-step-grid { grid-template-columns: minmax(0, 1fr); }
  .safekick-media { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .umjoo-cards { grid-template-columns: minmax(0, 1fr); }
  .fms-presentation-layout { grid-template-columns: minmax(0, 1fr); }
  .fms-presentation-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar .wrap { display: block; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .brand { white-space: nowrap; }
  .navlinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .navlinks::-webkit-scrollbar { display: none; }
  .navlinks a { flex: 0 0 auto; white-space: nowrap; }
  .proj-body { grid-template-columns: minmax(0, 1fr); }
  .proj-body.plc-body { grid-template-columns: minmax(0, 1fr); }
  .job { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .education-card { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .education-entry + .education-entry { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-soft); }
}

@media (max-width: 620px) {
  #projects { margin-top: 20px; padding: 26px 0 30px; }
  .projgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .projcard.featured { grid-template-columns: minmax(0, 1fr); }
  .projcard.featured img { height: auto; min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid rgba(255, 250, 244, 0.18); }
  .projcard.featured .body { padding: 20px; }
  .projcard.featured h3 { font-size: 23px; }
  .fms-presentation-summary { padding: 18px 16px; }
  .fms-presentation-detail { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 20px; }
  .hero-card { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px; }
  .hero-profile-photo { width: min(240px, 76vw); justify-self: center; }
  .hero.hero-plain .hero-card { gap: 18px; padding: 12px 0 20px; text-align: center; }
  .hero.hero-plain .hero-content { display: contents; }
  .hero.hero-plain .eyebrow { order: 1; font-size: 14px; letter-spacing: 1.3px; }
  .hero.hero-plain h1 { order: 2; margin-top: 0; font-size: 38px; }
  .hero.hero-plain .lede { order: 3; margin-top: 0; font-size: 15px; }
  .hero.hero-plain .chips { order: 4; justify-content: center; margin-top: 0; }
  .hero.hero-plain .hero-profile-photo { order: 5; width: min(240px, 76vw); border-radius: var(--radius-lg); }
  .hero.hero-plain .hero-links { order: 6; justify-content: center; margin-top: 0; padding-top: 16px; }
  .hero h1 { font-size: 32px; }
  .hero h1 span { display: block; margin: 6px 0 0; }
  .brand small { display: none; }
  .proj h2 { font-size: 22px; }
  .flow .arrow { display: none; }
  .noderow { grid-template-columns: minmax(0, 1fr) 62px; }
  .noderow .name { grid-column: 1 / -1; }
  .stage .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .institution { align-items: center; }
  .presentation-header { padding: 16px 14px 12px; }
  .presentation-slide { padding: 8px 8px 0; }
  .presentation-hint { padding: 0 14px 14px; }
  .collaboration-heading { flex-wrap: wrap; }
}
/* Full-size presentation viewer */
.presentation-slide img[role="button"] { cursor: zoom-in; }
.presentation-slide img[role="button"]:focus-visible { outline: 3px solid var(--primary-ink, #526b91); outline-offset: -3px; }
.slide-image-dialog { width: min(96vw, 1600px); max-width: 96vw; height: 92vh; height: 92dvh; max-height: 94dvh; padding: 0; border: 0; border-radius: 12px; background: #11161d; color: #fff; }
.slide-image-dialog::backdrop { background: rgba(0,0,0,.82); }
.slide-image-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #202b38; }
.slide-image-title { min-width: 0; font-size: 14px; }
.slide-image-toolbar > div { display: flex; gap: 6px; flex-shrink: 0; }
.slide-image-toolbar button { min-height: 40px; min-width: 40px; padding: 7px 12px; border: 1px solid #69788a; border-radius: 6px; background: #fff; color: #172b43; cursor: pointer; font: inherit; font-size: 13px; }
.slide-image-stage { height: calc(100% - 65px); overflow: auto; padding: 16px; box-sizing: border-box; touch-action: pan-x pan-y pinch-zoom; }
.slide-image-stage img { display: block; max-width: none; max-height: none; margin: 0 auto; object-fit: contain; }
@media (max-width: 600px) { .slide-image-toolbar { flex-direction: column; align-items: stretch; gap: 8px; } .slide-image-title { font-size: 12px; } .slide-image-toolbar > div { justify-content: flex-end; } .slide-image-stage { height: calc(100% - 110px); } }
.slide-image-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
.slide-image-dialog[open] { display: flex; flex-direction: column; }
.slide-image-toolbar { flex: 0 0 auto; }
.slide-image-toolbar > div { align-items: center; flex-wrap: wrap; }
.slide-image-stage { flex: 1 1 auto; min-height: 0; height: auto; }
.slide-image-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }
.slide-image-stage [hidden] { display: none; }
.slide-image-toolbar button:disabled { opacity: .4; cursor: default; }
.presentation-controls { flex-wrap: wrap; }
.presentation-controls button:last-child { width: auto; padding-inline: 10px; white-space: nowrap; font-size: 12px; }
.fms-presentation-media { display: flex; flex-direction: column; }
.fms-final-results { margin: auto 16px 16px; }
@media(max-width:600px) { .slide-image-toolbar > div { justify-content: center; gap: 4px; } .slide-image-toolbar button { min-width: 32px; padding-inline: 8px; } .fms-final-results { margin-top: 4px; } }
.fms-purpose { display: grid; gap: 15px; }
.fms-purpose strong { display: block; margin-bottom: 4px; }
.fms-purpose p { margin: 0; }
.fms-presentation-card > .fms-final-results { margin: 0; border-radius: 0; border-top: 1px solid var(--line); padding: 18px 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 24px; }
.fms-final-results > strong, .fms-final-results > p:last-child { grid-column: 1 / -1; }
.fms-presentation-card > .fms-final-results p { margin: 0; }
@media(max-width:600px) { .fms-presentation-card > .fms-final-results { grid-template-columns: minmax(0,1fr); padding: 16px; } }

/* Private visitor analytics */
#admin-password { width: 100%; font: inherit; color: var(--text); padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.community-dialog button { font: inherit; cursor: pointer; padding: 10px 16px; border: 1px solid var(--primary-line); border-radius: 8px; background: var(--primary); color: white; }
.analytics-note { color: var(--text-dim); font-size: 13px; }
.community-dialog { width: min(620px, calc(100% - 32px)); max-height: 85vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.community-dialog::backdrop { background: #100c0d88; }
#admin-login { display: grid; gap: 12px; }
#admin-close { float: right; }
.admin-link { background: none; border: 0; padding: 4px; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
#admin-stats table { width: 100%; border-collapse: collapse; margin: 16px 0; }
#admin-stats td, #admin-stats th { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.route-rules { margin: 16px 0; font-size: 14px; }
.route-rules summary { cursor: pointer; font-weight: 600; }
[hidden] { display: none !important; }
