:root {
  --bg: #f5f3ed;
  --surface: #ffffff;
  --surface-soft: #eaf2ee;
  --ink: #14241d;
  --muted: #526159;
  --brand: #0b5f49;
  --brand-dark: #073f32;
  --accent: #c8672a;
  --line: #d5ddd7;
  --line-strong: #aebdb4;
  --planned-bg: #fff3cf;
  --planned-ink: #754500;
  --reviewed-bg: #e0f1f7;
  --reviewed-ink: #07556d;
  --verified-bg: #dff3e6;
  --verified-ink: #155a35;
  --shadow: 0 16px 40px rgb(20 36 29 / 8%);
  --radius: 1.1rem;
  --shell: 72rem;
  --shell-narrow: 47rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--brand-dark);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid #f0a562;
  outline-offset: 4px;
  border-radius: 0.2rem;
}

img,
svg {
  max-width: 100%;
}

code,
kbd,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

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

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.shell--narrow {
  width: min(calc(100% - 2.5rem), var(--shell-narrow));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(174 189 180 / 70%);
  background: rgb(245 243 237 / 92%);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 2.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.brand__text {
  display: grid;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 0.98rem;
}

.brand__text small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--brand-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 15%, rgb(200 103 42 / 13%), transparent 21rem),
    radial-gradient(circle at 10% 85%, rgb(11 95 73 / 10%), transparent 24rem),
    var(--bg);
}

.hero__grid {
  min-height: 38rem;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--brand);
  font-style: normal;
}

.hero__lead {
  max-width: 44rem;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  margin-top: 2rem;
}

.button-row--center {
  justify-content: center;
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--brand);
  border-radius: 0.7rem;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.button--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--brand-dark);
}

.button--secondary:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.hero__panel {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 86%);
  box-shadow: var(--shadow);
}

.hero__panel::before {
  content: "";
  position: absolute;
  inset: -0.5rem 1rem auto;
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.hero__panel > p:first-child {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__panel dl {
  margin: 0;
}

.hero__panel dl > div {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.hero__panel dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero__panel dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section--soft {
  border-block: 1px solid var(--line);
  background: #eef1ec;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(16rem, 1.28fr);
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: 2.25rem;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 48rem;
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.about-copy {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.about-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
}

.about-copy p {
  color: #d7e2dc;
}

.about-copy strong {
  color: #f6c391;
}

.principles {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  position: relative;
  padding: 1rem 1rem 1rem 3.1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.principles li::before {
  content: attr(data-index);
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--brand);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 900;
}

.principles strong {
  display: block;
  margin-bottom: 0.15rem;
}

.principles span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.case-card,
.post-card,
.link-card,
.project-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(20 36 29 / 4%);
}

.case-card,
.post-card,
.link-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.case-card {
  display: flex;
  flex-direction: column;
  min-height: 19rem;
}

.case-card__topline,
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.case-card__id,
.post-card time {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.case-card h3,
.post-card h3,
.link-card h3 {
  margin: 1.35rem 0 0.7rem;
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.case-card h3 a,
.post-card h3 a,
.link-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.case-card h3 a:hover,
.post-card h3 a:hover,
.link-card h3 a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.case-card > p,
.post-card > p,
.link-card > p {
  color: var(--muted);
}

.case-card__focus {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.case-card .text-link,
.post-card .text-link {
  margin-top: auto;
  padding-top: 1rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent);
}

.status-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.25;
}

.status-badge code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.status-badge--planned {
  background: var(--planned-bg);
  color: var(--planned-ink);
}

.status-badge--source-reviewed,
.status-badge--tested-component {
  background: var(--reviewed-bg);
  color: var(--reviewed-ink);
}

.status-badge--sample-verified {
  background: var(--verified-bg);
  color: var(--verified-ink);
}

.project-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr);
  overflow: hidden;
}

.project-panel__main,
.project-panel__flow {
  padding: clamp(1.5rem, 5vw, 3.25rem);
}

.project-panel__main h3 {
  margin: 1rem 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.project-panel__main > p {
  color: var(--muted);
}

.project-panel__flow {
  background: var(--brand-dark);
  color: #fff;
}

.project-panel__flow h4 {
  margin: 0 0 1.5rem;
  color: #b9dace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.7rem;
  color: #e7f0ec;
  counter-increment: flow;
}

.flow-list li::before {
  content: counter(flow, decimal-leading-zero);
  color: #f6c391;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 900;
}

.status-note {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid rgb(246 195 145 / 45%);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 7%);
  color: #f5ddd0;
  font-size: 0.88rem;
}

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

.link-card h3 {
  margin-top: 0;
}

.link-card__label {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero {
  padding-block: clamp(4rem, 8vw, 7rem) 3rem;
}

.page-hero p:not(.eyebrow) {
  max-width: 47rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.post-list {
  display: grid;
  gap: 1rem;
  padding-bottom: 6rem;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
}

.post-card__meta {
  justify-content: flex-start;
  align-content: center;
}

.post-card h3,
.post-card > p,
.post-card .text-link {
  margin: 0;
  padding: 0;
}

.post-card > p {
  grid-column: 2;
}

.post-card .text-link {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.breadcrumbs {
  display: flex;
  gap: 0.55rem;
  padding-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.document {
  padding-bottom: 6rem;
}

.document__status {
  margin-top: 2.5rem;
}

.case-disclosure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
}

.case-disclosure p {
  flex: 1 1 24rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.article {
  padding-bottom: 6rem;
}

.article__header {
  padding-block: clamp(3rem, 8vw, 6rem) 2.5rem;
  border-bottom: 1px solid var(--line);
}

.article__header h1 {
  margin: 1.2rem 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.article__lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.prose {
  padding-block: 2.5rem;
  font-size: 1.02rem;
}

.prose h2,
.prose h3 {
  scroll-margin-top: 6rem;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.prose h2 {
  margin: 3.2rem 0 1rem;
  font-size: 1.75rem;
}

.prose h3 {
  margin: 2.2rem 0 0.7rem;
  font-size: 1.25rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-block: 1rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 0.32rem solid var(--accent);
  background: #fff7ed;
  color: #4d4139;
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  background: #e5ebe7;
  font-size: 0.88em;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1.2rem;
  border-radius: 0.8rem;
  background: var(--ink);
  color: #eaf2ee;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.5rem;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface-soft);
}

.article__footer {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.article__footer > p {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding-block: 2.5rem;
}

.site-footer p {
  max-width: 38rem;
  margin: 0.35rem 0 0;
  color: #b9c8c0;
  font-size: 0.88rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.not-found {
  min-height: 65vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found__code {
  margin: 0;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.not-found h1 {
  margin: 0.6rem 0;
  font-size: clamp(2rem, 6vw, 4rem);
}

.not-found p {
  color: var(--muted);
}

@media (max-width: 52rem) {
  .site-header {
    position: static;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding-block: 0.85rem;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .hero__grid,
  .about-grid,
  .project-panel,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero__grid {
    min-height: auto;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .card-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .case-card {
    min-height: 0;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card > p,
  .post-card .text-link {
    grid-column: 1;
    grid-row: auto;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 32rem) {
  .shell,
  .shell--narrow {
    width: min(calc(100% - 1.5rem), var(--shell));
  }

  body {
    word-break: normal;
  }

  .brand__text small {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding-inline: 0.62rem;
    font-size: 0.84rem;
  }

  .hero__grid {
    padding-block: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 12vw, 3.3rem);
  }

  .case-card__topline,
  .post-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .prose table {
    display: block;
    overflow-x: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .button-row,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .shell,
  .shell--narrow {
    width: 100%;
  }

  .case-card,
  .post-card,
  .project-panel {
    break-inside: avoid;
    box-shadow: none;
  }
}
