:root {
  --ink: #20242a;
  --muted: #5a626e;
  --line: #d8dde3;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e5f3f1;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

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

a:hover {
  text-decoration: underline;
}

.resume {
  width: min(980px, calc(100% - 40px));
  margin: 32px auto;
  padding: 56px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(32, 36, 42, 0.08);
}

.resume-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 6px;
  font-size: 2.7rem;
  line-height: 1;
}

.role {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 800;
}

.contact {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}

.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

h2 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

h2::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--accent);
  content: "";
  vertical-align: 0.08em;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.06rem;
  line-height: 1.35;
}

h4 {
  margin-bottom: 8px;
  font-size: 0.98rem;
  line-height: 1.35;
}

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

li {
  margin: 4px 0;
}

li::marker {
  color: var(--accent);
}

.summary-list {
  display: grid;
  gap: 4px;
}

.item {
  padding-top: 2px;
}

.item + .item {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px dashed var(--line);
}

.item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin-bottom: 16px;
}

.item-head time {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.item-subtitle,
.compact-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.role-block + .role-block {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

th {
  color: var(--ink);
  background: var(--accent-soft);
  font-weight: 900;
}

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

td:first-child {
  width: 240px;
  white-space: nowrap;
}

td:last-child {
  width: 54px;
  font-weight: 800;
}

td:nth-child(3) {
  width: 110px;
  font-weight: 800;
}

.status-head,
.pr-status {
  text-align: center;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.status-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.status-icon.merged {
  color: #8250df;
  background: #fbefff;
}

.status-icon.open {
  color: #1a7f37;
  background: #dafbe1;
}

.project-name {
  font-weight: 800;
}

.repo-stars {
  display: inline-flex;
  width: 76px;
  padding-left: 6px;
  gap: 4px;
  color: #946200;
  font-size: 0.88rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.star-count {
  display: inline-block;
  min-width: 4.2ch;
  text-align: right;
}

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

.skill-grid div {
  padding: 16px;
  background: #f9fafb;
  border: 1px solid var(--line);
}

.skill-grid h3 {
  color: var(--accent);
  font-size: 0.98rem;
}

.skill-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.plain-list {
  display: grid;
  gap: 6px;
}

.compact-item ul {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .resume {
    width: 100%;
    margin: 0;
    padding: 32px 22px;
    border: 0;
    box-shadow: none;
  }

  .resume-header,
  .item-head,
  .two-column,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .contact {
    text-align: left;
    white-space: normal;
  }

  h1 {
    font-size: 2.28rem;
  }

  .item-head {
    gap: 4px;
  }
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  .resume {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  a {
    color: var(--ink);
  }

  .section {
    break-inside: avoid;
  }
}
