:root {
  --paper: #f4f1ea;
  --surface: rgba(255, 255, 255, 0.42);
  --ink: #151d2e;
  --muted: #626b7b;
  --line: rgba(21, 29, 46, 0.14);
  --line-strong: rgba(21, 29, 46, 0.3);
  --accent: #315fc8;
  --accent-soft: rgba(49, 95, 200, 0.07);
  --sans: "Helvetica Neue", "Noto Sans KR", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page-width: min(980px, calc(100vw - 64px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--accent);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  color: #fff;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.directory-page {
  width: var(--page-width);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 72px) 0 34px;
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(54px, 9vw, 110px);
  align-items: start;
}

.identity {
  position: sticky;
  top: 54px;
  animation: enter 500ms ease-out both;
}

.identity-avatar {
  display: block;
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  object-fit: cover;
}

.identity h1 {
  margin: 0;
  font-size: clamp(3rem, 5.6vw, 4.6rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 0.88;
}

.identity h1 span {
  display: block;
}

.identity h1 .name-ko {
  margin-top: 0.48em;
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.identity-summary {
  max-width: 270px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.directory {
  min-width: 0;
  animation: enter 500ms 80ms ease-out both;
}

.directory-header {
  display: flex;
  min-height: 92px;
  padding: 4px 0 22px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-strong);
}

.directory-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.directory-group {
  margin-top: 34px;
}

.group-label {
  display: flex;
  margin: 0 0 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.directory-list {
  border-top: 1px solid var(--line);
}

.directory-link {
  position: relative;
  display: grid;
  min-height: 78px;
  padding: 17px 8px;
  grid-template-columns: 34px minmax(0, 1fr) minmax(120px, auto) 24px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition:
    color 160ms ease,
    background 160ms ease,
    padding 180ms ease;
}

.directory-link:hover,
.directory-link:focus-visible {
  padding-right: 13px;
  padding-left: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}

.link-number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}

.link-copy {
  min-width: 0;
}

.link-name {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.link-description {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.link-destination {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: -0.01em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: transform 160ms ease;
}

.directory-link:hover .link-arrow,
.directory-link:focus-visible .link-arrow {
  transform: translate(3px, -3px);
}

.work-page {
  width: var(--page-width);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 60px) 0 42px;
  animation: enter 450ms ease-out both;
}

.work-topbar {
  display: flex;
  min-height: 44px;
  padding-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 160ms ease;
}

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

.work-header {
  display: grid;
  padding: clamp(58px, 9vw, 96px) 0 clamp(62px, 9vw, 92px);
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: clamp(50px, 9vw, 110px);
  align-items: end;
}

.work-header h1 {
  margin: 10px 0 0;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 650;
  letter-spacing: -0.08em;
  line-height: 0.86;
}

.work-intro {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.6;
}

.work-summary {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work-group {
  display: grid;
  padding: 46px 0 58px;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 38px;
  border-top: 1px solid var(--line-strong);
}

.work-group-header {
  padding-top: 2px;
}

.work-group-header h2 {
  margin: 8px 0 0;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.work-list {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.work-item {
  display: grid;
  min-height: 112px;
  padding: 21px 7px;
  grid-template-columns:
    32px minmax(130px, 0.65fr) minmax(220px, 1.35fr)
    minmax(100px, 0.55fr) 22px;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  transition:
    color 160ms ease,
    background 160ms ease,
    padding 180ms ease;
}

a.work-item:hover,
a.work-item:focus-visible {
  padding-right: 12px;
  padding-left: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}

.work-number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
}

.work-name {
  display: block;
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.work-type {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.025em;
  line-height: 1.4;
  text-transform: uppercase;
}

.work-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.work-detail {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.55rem;
  line-height: 1.55;
}

.work-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.025em;
  line-height: 1.55;
  text-transform: uppercase;
}

.work-arrow {
  font-family: var(--mono);
  font-size: 0.73rem;
  transition: transform 160ms ease;
}

a.work-item:hover .work-arrow,
a.work-item:focus-visible .work-arrow {
  transform: translate(3px, -3px);
}

.work-private {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.55;
}

.work-footer {
  display: flex;
  margin-top: 20px;
  padding-top: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.work-footer a {
  transition: color 160ms ease;
}

.work-footer a:hover,
.work-footer a:focus-visible {
  color: var(--accent);
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  :root {
    --page-width: min(100% - 40px, 660px);
  }

  .directory-page {
    padding-top: 34px;
  }

  .directory-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .identity {
    position: static;
  }

  .identity-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    border-radius: 18px;
  }

  .identity h1 {
    max-width: 7ch;
    font-size: clamp(3.2rem, 14vw, 5rem);
  }

  .identity-summary {
    max-width: 360px;
    margin-top: 24px;
  }

  .identity-meta {
    width: min(360px, 100%);
    margin-top: 28px;
  }

  .directory-header {
    min-height: 76px;
  }

  .work-header {
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
  }

  .work-group {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .work-group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
  }
}

@media (max-width: 620px) {
  :root {
    --page-width: calc(100% - 32px);
  }

  .directory-link {
    min-height: 76px;
    grid-template-columns: 26px minmax(0, 1fr) 20px;
    gap: 10px;
  }

  .link-destination {
    display: none;
  }

  .work-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-page {
    padding-top: 24px;
  }

  .work-header {
    padding: 54px 0 64px;
  }

  .work-header h1 {
    font-size: clamp(4rem, 22vw, 6rem);
  }

  .work-group {
    padding: 38px 0 48px;
  }

  .work-item {
    grid-template-columns: 25px minmax(0, 1fr) 20px;
    gap: 10px;
  }

  .work-description,
  .work-meta {
    grid-column: 2 / 4;
  }

  .work-description {
    margin-top: 2px;
  }

  .work-arrow,
  .work-private {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
