:root {
  --paper: #f6f0e8;
  --paper-strong: #ede3d7;
  --ink: #191512;
  --muted: #6f6258;
  --line: #d7cabd;
  --card: #fffdf9;
  --orange: #e4571e;
  --orange-dark: #b6380d;
  --green: #2f7258;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -6%, rgba(228, 87, 30, 0.12), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(215, 202, 189, 0.85);
  background: rgba(246, 240, 232, 0.9);
  backdrop-filter: blur(18px);
}

.site-header__inner,
.directory-hero,
.directory-layout,
.site-footer > div {
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 20px;
  height: 25px;
}

.brand span span {
  color: var(--orange);
}

.site-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--orange-dark);
}

.directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 44px 72px;
  padding-block: 92px 70px;
}

.eyebrow,
.directory-index > p,
.section-heading > div > p,
.project-kind {
  margin: 0;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.directory-hero h1 {
  max-width: 780px;
  margin: 14px 0 22px;
  font-size: clamp(46px, 7.6vw, 104px);
  font-weight: 780;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.directory-hero h1 em {
  color: var(--orange);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.directory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-self: end;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.directory-stats div {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
}

.directory-stats div:last-child {
  border-right: 0;
}

.directory-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.directory-stats dd {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.directory-search {
  grid-column: 1 / -1;
  max-width: 840px;
}

.directory-search > label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 750;
}

.search-field {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  box-shadow: 7px 7px 0 var(--ink);
}

.search-field:focus-within {
  outline: 3px solid rgba(228, 87, 30, 0.26);
  outline-offset: 4px;
}

.search-field svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input {
  min-width: 0;
  padding: 18px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-field input::placeholder {
  color: #9a8e84;
}

.search-field button,
.empty-state button {
  border: 0;
  color: var(--orange-dark);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.search-status {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.directory-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 70px;
  align-items: start;
  padding-bottom: 112px;
}

.directory-index {
  position: sticky;
  top: 100px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}

.directory-index > p {
  color: var(--muted);
}

.directory-index nav {
  margin-top: 16px;
}

.directory-index nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.directory-index nav a:hover span {
  color: var(--orange-dark);
}

.directory-index nav span {
  font-size: 14px;
  font-weight: 680;
}

.directory-index nav strong {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.index-note {
  display: flex;
  gap: 8px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.index-note p {
  margin: 0;
}

.catalog-section {
  scroll-margin-top: 100px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}

.catalog-section + .catalog-section {
  margin-top: 84px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.8fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-heading__meta {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  align-items: start;
}

.section-heading__meta span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.section-heading__meta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 360px;
  flex-direction: column;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.68);
  transition: background 160ms ease, transform 160ms ease;
}

.project-card:hover {
  z-index: 1;
  background: var(--card);
}

.project-card[hidden],
.catalog-section[hidden] {
  display: none;
}

.project-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 20px;
}

.project-kind {
  color: var(--muted);
}

.project-card h3 {
  margin: 26px 0 12px;
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.project-card h3 a {
  text-decoration: none;
}

.project-card h3 a::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
}

.project-card h3 a:focus-visible::before {
  outline: 3px solid var(--orange);
  outline-offset: -4px;
}

.external-mark {
  display: inline-block;
  margin-left: 7px;
  color: var(--orange-dark);
  font-size: 0.65em;
  vertical-align: top;
}

.project-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.project-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags--tech {
  margin-top: 8px;
}

.project-tag {
  padding: 5px 9px;
  border: 1px solid rgba(228, 87, 30, 0.3);
  border-radius: 999px;
  color: var(--orange-dark);
  background: rgba(228, 87, 30, 0.08);
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
}

.project-tag:hover,
.project-tag:focus-visible {
  border-color: var(--orange-dark);
  outline: 0;
  background: rgba(228, 87, 30, 0.16);
}

.project-tag--tech {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.project-open {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 24px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.project-open span {
  color: var(--orange-dark);
  font-size: 18px;
  transition: transform 160ms ease;
}

.project-open:hover span {
  transform: translateX(4px);
}

.empty-state {
  padding: 72px 24px;
  border-top: 2px solid var(--ink);
  text-align: center;
}

.empty-state p {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-strong);
}

.site-footer > div {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .directory-hero {
    grid-template-columns: 1fr;
    padding-block: 68px 56px;
  }

  .directory-stats {
    max-width: 520px;
  }

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

  .directory-index {
    position: static;
  }

  .directory-index nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .directory-index nav a {
    padding: 12px;
    border: 1px solid var(--line);
    border-right: 0;
  }

  .directory-index nav a:last-child {
    border-right: 1px solid var(--line);
  }

  .index-note {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header__inner,
  .directory-hero,
  .directory-layout,
  .site-footer > div {
    width: min(100% - 28px, 1240px);
  }

  .site-header__inner {
    min-height: 62px;
  }

  .site-nav a:first-child,
  .site-nav a:nth-child(2) {
    display: none;
  }

  .directory-hero {
    gap: 34px;
    padding-block: 50px 46px;
  }

  .directory-hero h1 {
    font-size: clamp(46px, 16vw, 70px);
  }

  .directory-hero h1 > span {
    display: inline-block;
    font-size: 0.66em;
    letter-spacing: -0.065em;
    white-space: nowrap;
  }

  .search-field {
    min-height: 58px;
    padding-inline: 14px;
    box-shadow: 5px 5px 0 var(--ink);
  }

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

  .directory-index nav a:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .project-card {
    min-height: 0;
    padding: 22px;
  }

  .project-open {
    margin-top: 28px;
  }

  .site-footer > div {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 24px;
  }
}

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

  * {
    transition: none !important;
  }
}
