:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #252420;
  --muted: #5c5851;
  --accent: #a53222;
  --accent-hover: #86261a;
  --line: #dad4c9;
  --panel: #efebe2;
  --card: #fbf9f4;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

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

[id] { scroll-margin-top: 1.5rem; }

.site-width {
  width: min(calc(100% - 2 * clamp(1.25rem, 5.8vw, 6rem)), 74rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-160%);
  padding: 0.625rem 1rem;
  background: var(--ink);
  color: white;
}

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

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 5rem;
  padding-block: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  padding-right: 0.07rem;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.09em;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 0.125rem clamp(0.65rem, 3.2vw, 2.5rem); }

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover, .wordmark:hover { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  gap: clamp(2rem, 5.4vw, 5rem);
  align-items: center;
  padding-block: clamp(3.75rem, 6.1vw, 6rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 5.15vw, 4.65rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.075em;
}

.hero p {
  max-width: 25rem;
  margin-top: 1.45rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.125rem);
  line-height: 1.75;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 3.125rem;
  margin-top: 1.9rem;
  padding: 0.65rem 1.05rem 0.65rem 1.15rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.hero-link:hover { background: var(--accent-hover); }

.arrow-down {
  position: relative;
  width: 0.875rem;
  height: 0.875rem;
}

.arrow-down::before, .arrow-down::after {
  position: absolute;
  left: 50%;
  content: "";
}

.arrow-down::before {
  top: 0;
  width: 1.5px;
  height: 0.75rem;
  background: currentColor;
  transform: translateX(-50%);
}

.arrow-down::after {
  bottom: 0.1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: translateX(-50%) rotate(45deg);
}

.hero-art {
  aspect-ratio: 6 / 5;
  border: 1px solid #e2dbd0;
  border-radius: 4px;
  background: #e9e2d8 url("assets/archive-hero.jpg") 50% 65% / cover;
}

.projects-section {
  padding-block: clamp(1.9rem, 3.6vw, 3rem) clamp(3.75rem, 6.5vw, 6rem);
  border-top: 1px solid var(--line);
}

.projects-section h2 {
  width: fit-content;
  margin-bottom: 1.55rem;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.065em;
}

.projects-section:focus-visible { outline: none; }
.projects-section:focus-visible h2 { outline: 2px solid var(--accent); outline-offset: 5px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-empty {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(7rem, 0.27fr) minmax(0, 1fr);
  min-height: 10.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}

.empty-illustration {
  display: grid;
  place-items: center;
  min-height: 6rem;
  border-right: 1px solid var(--line);
  background-color: var(--panel);
  background-image: linear-gradient(to right, #e3ddd1 1px, transparent 1px), linear-gradient(to bottom, #e3ddd1 1px, transparent 1px);
  background-position: center;
  background-size: 18px 18px;
}

.empty-sleeves { position: relative; width: 3.6rem; height: 3.2rem; }

.empty-sleeves span {
  position: absolute;
  width: 2.65rem;
  height: 1.95rem;
  border: 1px solid #918679;
  border-radius: 3px;
  background: #f5f1e9;
}

.empty-sleeves span:nth-child(1) { top: 0.2rem; left: 0.75rem; transform: rotate(12deg); }
.empty-sleeves span:nth-child(2) { top: 0.65rem; left: 0.45rem; }
.empty-sleeves span:nth-child(3) { top: 1rem; left: 0.15rem; transform: rotate(-10deg); }

.empty-copy {
  align-self: center;
  padding: clamp(1.05rem, 3.25vw, 2.4rem);
}

.empty-copy h3 { margin-bottom: 0.25rem; font-size: 1.2rem; letter-spacing: -0.035em; }
.empty-copy p, .site-footer p { color: var(--muted); }
.pending-copy { color: var(--accent); font-weight: 750; }

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.project-card-image--placeholder { display: grid; place-items: center; color: var(--muted); }

.project-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1rem, 3vw, 1.9rem);
}

.project-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-block: 0 0.5rem; }
.project-meta:empty { display: none; }
.project-type, .project-status, .project-pricing { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.project-status--upcoming, .project-status--unknown { color: var(--accent); }
.project-title { font-size: 1.5rem; letter-spacing: -0.05em; line-height: 1.25; }
.project-summary { margin: 0.45rem 0 0.9rem; color: var(--muted); }

.project-link, .contact-link, .detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--accent);
  font-weight: 750;
  text-underline-offset: 0.2em;
}

.project-link { margin-top: auto; }
.project-link:hover, .contact-link:hover, .detail-back:hover { color: var(--accent-hover); }

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5.4vw, 5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer h2 { margin-bottom: 0.45rem; font-size: 1.2rem; letter-spacing: -0.04em; }
.site-footer p { max-width: 31rem; }

.detail-page { max-width: 54rem; padding-block: clamp(2rem, 5vw, 4.5rem); }
.detail-header { margin-block: 1.2rem 1.85rem; }
.detail-title { margin-block: 0.65rem; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.15; letter-spacing: -0.065em; }
.detail-summary { color: var(--muted); font-size: 1.125rem; }
.detail-cover, .detail-screenshot img { width: 100%; border-radius: 4px; background: var(--panel); }
.detail-cover { max-height: 42rem; object-fit: contain; }
.detail-section { margin-top: 2.4rem; }
.detail-section h2 { margin-bottom: 0.5rem; font-size: 1.4rem; letter-spacing: -0.035em; }
.detail-section p { white-space: pre-line; }
.detail-screenshots { display: grid; gap: 1.25rem; }
.detail-screenshot figcaption { margin-top: 0.4rem; color: var(--muted); }
.detail-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; }

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 3.25rem; }
  .hero h1 { font-size: clamp(2.1rem, 8.65vw, 4.2rem); }
  .hero p { margin-top: 1.15rem; }
  .hero-link { margin-top: 1.5rem; }
  .hero-art { aspect-ratio: 16 / 10; }
}

@media (max-width: 37rem) {
  .header-inner { min-height: 4rem; gap: 0.15rem 0.75rem; flex-wrap: wrap; }
  .site-nav { column-gap: 0.75rem; }
  .site-nav a { font-size: 0.875rem; }
  .wordmark { font-size: 1.1rem; }
  .brand-mark { width: 1.8rem; height: 1.8rem; font-size: 0.8rem; }
  .hero { padding-block: 2.6rem; }
  .hero-art { aspect-ratio: 4 / 3; }
  .project-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .project-empty { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .empty-sleeves { transform: scale(0.8); }
}
