:root {
  color-scheme: light;
  --white: #ffffff;
  --black: #212529;
  --dark: #222222;
  --gray: #f5f5f5;
  --yellow: #f9c51d;
  --red: #f94148;
  --blue: #2f74c0;
  --green: #30a26e;
  --orange: #f79b26;
  --purple: #8869ee;
  --line: #e7e7e7;
  --muted: #6c757d;
  --radius: 16px;
  --pill-radius: 8px;
  --shadow: 16px 16px 16px rgba(68, 68, 68, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(204, 204, 204, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #495057;
  font-weight: 700;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--red);
}

.hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 88px;
  text-align: center;
  color: var(--white);
  background:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
    radial-gradient(circle at 25% 20%, rgba(249, 197, 29, 0.42), transparent 28%),
    linear-gradient(135deg, #2b2b2b, #121212);
}

.hero-copy {
  width: min(900px, 100%);
}

.hero h1,
.page-title {
  margin: 0;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero p {
  margin: 44px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--pill-radius);
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  cursor: pointer;
}

.button.secondary {
  background: var(--dark);
  color: var(--white);
}

.section {
  padding: 72px 0 84px;
}

.section-white {
  background: var(--white);
}

.section-yellow {
  background: var(--yellow);
}

.section-gray {
  background: var(--gray);
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

.section-title {
  display: table;
  margin: 0 auto 48px;
  color: inherit;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.section-heading {
  position: relative;
}

.section-heading .section-title {
  margin-bottom: 48px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.skill-card,
.timeline-item,
.career-card {
  min-width: 0;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card h3,
.timeline-item h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.4;
}

.card p,
.timeline-item p {
  margin: 0;
  color: #495057;
}

.project-summary-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #495057;
}

.project-summary-list li {
  line-height: 1.55;
}

.card .eyebrow,
.timeline-item .eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 800;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
}

.project-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.major-project-mark {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 0.9em;
  line-height: 1;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-kind {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  background: #2f74c0;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-kind[data-project-type="팀 프로젝트"] {
  background: #2f8f5b;
}

.project-filter-list {
  position: absolute;
  right: 0;
  top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--black);
  border-radius: var(--pill-radius);
  background: transparent;
  color: var(--black);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.project-filter-button[data-project-type="회사 프로젝트"] {
  border-color: #2f74c0;
  color: #2f74c0;
}

.project-filter-button[data-project-type="팀 프로젝트"] {
  border-color: #2f8f5b;
  color: #2f8f5b;
}

.project-filter-button[data-project-type="주요 프로젝트"] {
  border-color: var(--red);
  color: var(--red);
}

.project-filter-button[aria-pressed="true"] {
  background: var(--black);
  color: var(--white);
}

.project-filter-button[data-project-type="회사 프로젝트"][aria-pressed="true"] {
  background: #2f74c0;
}

.project-filter-button[data-project-type="팀 프로젝트"][aria-pressed="true"] {
  background: #2f8f5b;
}

.project-filter-button[data-project-type="주요 프로젝트"][aria-pressed="true"] {
  background: var(--red);
}

.card-actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 24px;
}

.project-detail-button {
  width: min(220px, 100%);
  min-height: 44px;
  padding: 0 24px;
  font-size: 0.9rem;
  text-align: center;
}

.project-detail-button.disabled {
  background: #d7d7d7;
  color: #5f6368;
  cursor: default;
}

.project-more {
  margin-top: 24px;
}

.project-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.project-modal[hidden] {
  display: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.72);
}

.project-modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1160px, 100%);
  height: min(780px, calc(100vh - 48px));
  max-height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  box-shadow: 24px 24px 40px rgba(0, 0, 0, 0.36);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--pill-radius);
  background: var(--black);
  color: var(--white);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.project-modal-header {
  padding: 42px 42px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--gray);
}

.project-modal-header h2 {
  margin: 0;
  max-width: 760px;
  font-size: 2rem;
  line-height: 1.35;
}

.project-modal-header p {
  margin: 16px 0 0;
  max-width: 760px;
  color: #495057;
}

.project-modal-header .eyebrow {
  margin-top: 0;
  color: var(--red);
  font-weight: 800;
}

.project-modal-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 240px;
  gap: 24px;
  padding: 32px 42px 42px;
  align-items: start;
  min-height: 0;
  overflow: hidden;
}

.project-modal-body-empty {
  min-height: 240px;
}

.modal-loading {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.modal-toc {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill-radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  box-shadow: 8px 8px 16px rgba(68, 68, 68, 0.12);
}

.modal-toc:empty {
  display: none;
}

.modal-toc strong {
  margin-bottom: 4px;
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 900;
}

.modal-toc a,
.modal-toc span {
  display: block;
  border-radius: 6px;
  color: #495057;
  padding: 7px 8px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.modal-toc a:hover {
  background: var(--gray);
  color: var(--red);
}

.markdown-body {
  min-width: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: var(--black);
  line-height: 1.35;
  scroll-margin-top: 24px;
}

.markdown-body h1 {
  margin: 0 0 24px;
  font-size: 2rem;
}

.markdown-body h2 {
  margin: 44px 0 20px;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 12px;
  font-size: 1.45rem;
}

.markdown-body h2:first-child {
  margin-top: 0;
}

.markdown-body h3 {
  margin: 32px 0 16px;
  border-left: 3px solid var(--red);
  border-radius: 0 6px 6px 0;
  background: #f5f6f8;
  padding: 12px 16px;
  font-size: 1.125rem;
  font-weight: 800;
}

.markdown-body p,
.markdown-body li {
  color: #343a40;
  font-size: 1rem;
  line-height: 1.85;
}

.markdown-body p {
  margin: 0 0 16px;
}

.markdown-body ul,
.markdown-body ol {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 22px;
}

.markdown-body code {
  border-radius: 6px;
  background: var(--gray);
  color: var(--red);
  padding: 2px 5px;
  font-size: 0.92em;
}

.modal-skill-list {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.modal-fact h3 {
  margin: 0 0 6px;
  color: var(--black);
  font-size: 0.88rem;
  font-weight: 900;
}

.modal-fact p {
  margin: 0;
  color: #495057;
  line-height: 1.65;
}

.modal-links {
  display: grid;
  gap: 8px;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  border-bottom: 2px solid var(--red);
  color: var(--black);
  font-weight: 800;
}

.modal-link:hover {
  color: var(--red);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag,
.filter-button {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--pill-radius);
  background: var(--tag-color, var(--blue));
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
}

.skill-card {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.skill-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.skill-row h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.skill-row .meta {
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.filter-button {
  cursor: pointer;
}

.filter-button[aria-pressed="true"] {
  background: var(--red);
}

.empty-state {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 32px;
  text-align: center;
}

.empty-state p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.section-white .empty-state,
.section-gray .empty-state {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.section-white .empty-state p,
.section-gray .empty-state p {
  color: var(--muted);
}

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

.career-timeline {
  position: relative;
  display: grid;
  gap: 32px;
}

.career-timeline::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 72px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(var(--red), var(--yellow), var(--green));
}

.career-card {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.company-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 4px solid var(--white);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 8px 8px 14px rgba(68, 68, 68, 0.18);
}

.company-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.career-card-body {
  min-width: 0;
}

.company-header h3 {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
}

.career-period {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 0.98rem;
  font-weight: 800;
}

.company-summary {
  margin: 18px 0 0;
  color: #495057;
}

.career-skill-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 18px;
  margin-top: 22px;
}

.career-skill-card.is-collapsed .career-skill-row:nth-child(n + 2) {
  display: none;
}

.career-skill-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.career-skill-row h4 {
  margin: 0;
  color: #343a40;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
}

.career-skill-row .meta {
  margin: 0;
}

.career-skill-toggle {
  display: table;
  margin: 12px auto 0;
  min-height: 36px;
  border: 0;
  border-radius: var(--pill-radius);
  background: var(--yellow);
  color: var(--black);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.career-projects {
  display: grid;
  margin-top: 32px;
}

.career-projects.is-collapsed .career-project-row:nth-child(n + 5) {
  display: none;
}

.career-project-row {
  position: relative;
  display: grid;
  min-width: 0;
  border-bottom: 1px solid #d7d7d7;
  padding: 0 0 16px 24px;
}

.career-project-row + .career-project-row {
  padding-top: 16px;
}

.career-project-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 6px;
  height: 30px;
  border-radius: 999px;
  background: var(--dark);
}

.career-project-row + .career-project-row::before {
  top: 20px;
}

.career-project-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.career-project-row strong {
  min-width: 0;
  color: var(--black);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.45;
}

.career-project-row .project-period {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

.career-project-row p {
  margin: 0;
  color: #343a40;
  font-size: 1rem;
  line-height: 1.7;
  white-space: normal;
}

.career-project-toggle {
  display: table;
  margin: 14px auto 0;
  min-height: 36px;
  border: 0;
  border-radius: var(--pill-radius);
  background: var(--dark);
  color: var(--white);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.site-footer {
  background: var(--dark);
  color: var(--gray);
  padding: 48px 0;
}

.project-diagram {
  margin: 24px 0;
}

.project-diagram img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
}

main > section {
  scroll-margin-top: 96px;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 4px;
}

.app-error {
  margin-top: 24px;
  border: 1px solid #b42318;
  border-radius: var(--pill-radius);
  background: #fff1f0;
  color: #7a271a;
  padding: 16px 20px;
  font-weight: 800;
}

.hero-eyebrow {
  margin: 0 0 20px !important;
  color: var(--yellow) !important;
  font-size: 0.82rem !important;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;
  text-wrap: balance;
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.snapshot-card {
  min-height: 168px;
}

.snapshot-links {
  display: grid;
  gap: 8px;
}

.snapshot-links a {
  display: grid;
  gap: 2px;
  color: #343a40;
  overflow-wrap: anywhere;
}

.snapshot-links a span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-row-copy p {
  margin: 6px 0 0;
  color: #495057;
  font-size: 0.92rem;
}

.project-metric {
  display: grid;
  gap: 4px;
  margin: 4px 0 18px !important;
  border-left: 4px solid var(--yellow);
  background: #fff8dc;
  color: #212529 !important;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.5;
}

.project-metric span {
  color: #8a5b00;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.career-positions {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.career-positions p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  color: var(--red);
}

.career-positions span {
  font-weight: 800;
}

.career-positions strong {
  color: #343a40;
}

main.site-shell .hero {
  width: auto;
  margin-left: calc((100% - 100vw) / 2);
  margin-right: calc((100% - 100vw) / 2);
}

main.site-shell > .section,
main.site-shell > .hero + .section {
  border-top: 0;
}

main.site-shell .section {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 900px) {
  .grid.three,
  .grid.two,
  .career-skill-row,
  .career-project-row,
  .project-modal-body {
    grid-template-columns: 1fr;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }

  .project-filter-list {
    position: static;
    justify-content: center;
    margin: -28px 0 32px;
  }

  .modal-toc,
  .modal-skill-list {
    position: static;
  }

  .modal-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .modal-toc strong {
    width: 100%;
  }

  .modal-skill-list {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-modal-body {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .markdown-body {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 28px 0;
  }

  .modal-toc {
    display: grid;
    overflow: visible;
    margin-bottom: 24px;
  }

  .modal-toc strong {
    width: auto;
  }
}

@media (max-width: 640px) {
  .site-shell,
  .skill-card {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main > section {
    scroll-margin-top: 116px;
  }

  .hero {
    min-height: 520px;
    padding: 96px 18px 72px;
  }

  .hero h1,
  .page-title {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .hero h1 span {
    white-space: normal;
  }

  .section {
    padding: 56px 0 64px;
  }

  .section-title {
    margin-bottom: 36px;
    font-size: 2rem;
  }

  .card,
  .skill-card,
  .timeline-item,
  .career-card,
  .empty-state {
    padding: 24px;
  }

  .grid.four {
    grid-template-columns: 1fr;
  }

  .career-timeline::before {
    left: 51px;
  }

  .career-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
  }

  .company-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 0.9rem;
  }

  .company-header h3 {
    font-size: 1.55rem;
  }

  .career-skill-card {
    padding: 18px;
  }

  .career-project-row {
    padding: 0 0 16px 22px;
  }

  .career-project-row + .career-project-row {
    padding-top: 16px;
  }

  .career-project-row + .career-project-row::before {
    top: 20px;
  }

  .career-project-row p {
    white-space: normal;
  }

  .project-modal {
    padding: 14px;
  }

  .project-modal-panel {
    height: calc(100vh - 28px);
    max-height: calc(100vh - 28px);
  }

  .project-modal-header,
  .project-modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .project-modal-header {
    padding-top: 58px;
  }

  .project-modal-header h2 {
    font-size: 1.55rem;
  }

  .markdown-body h1 {
    font-size: 1.65rem;
  }

  .markdown-body h2 {
    font-size: 1.28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
