:root {
  color-scheme: light;
  --bg: #f5f2eb;
  --surface: #fbf9f4;
  --ink: #171716;
  --muted: #65635e;
  --line: #d8d3c9;
  --accent: #ffb000;
  --content: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(100% - 48px, var(--content));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.site-header nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-header nav a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.site-header nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--ink);
}

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

.eyebrow,
.section-label,
.feature-number {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  font-weight: 570;
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-wrap: balance;
}

.hero-copy {
  max-width: 740px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.button,
.text-link {
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
}

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

.button-dark:hover {
  background: #353532;
}

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

.feature figure,
.style-card figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.image-link {
  display: block;
  cursor: zoom-in;
}

.image-link:focus-visible {
  outline-offset: -4px;
}

.feature figcaption,
.style-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 44px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
}

figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
  text-decoration: none;
}

figcaption a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.principles,
.skills,
.workflow,
.install {
  border-top: 1px solid var(--line);
}

.principles {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px 56px;
  padding: 64px 0;
}

.principles h2,
.section-heading h2,
.workflow h2,
.install h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.4;
}

.section-intro {
  align-self: end;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.principle-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.principle-grid article {
  padding: 24px 24px 0 0;
}

.principle-grid article + article {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.principle-grid span,
.feature-number {
  color: var(--muted);
  font-size: 0.72rem;
}

.principle-grid h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.principle-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.skills {
  padding: 40px 0 64px;
}

.section-heading {
  margin-bottom: 32px;
}

.skill-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.skill-index a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.skill-index a:hover {
  background: var(--surface);
  color: var(--ink);
}

.skill-index span {
  color: #8b887e;
  font-size: 0.7rem;
}

.feature {
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
}

.feature:last-child {
  padding-bottom: 0;
}

.feature-copy {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 20px;
  margin-bottom: 24px;
}

.feature-copy .feature-number {
  grid-area: 1 / 1 / 3 / 2;
  padding-top: 3px;
  margin: 0;
}

.feature-copy h3 {
  grid-area: 1 / 2;
}

.feature-copy h3,
.style-copy h3 {
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 750;
}

.feature-copy h4 {
  grid-area: 2 / 2;
  margin-bottom: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.5;
}

.feature-copy p:last-child {
  grid-area: 1 / 3 / 3 / 4;
  align-self: end;
  font-size: 0.92rem;
  line-height: 1.85;
}

.feature-copy p:last-child,
.style-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.feature figure,
.style-card figure {
  border-radius: 12px;
}

.feature figure img,
.style-card figure img {
  width: 100%;
  height: auto;
}

.style-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
}

.style-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 38%);
}

.style-card figure {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.style-copy {
  padding: 24px;
  font-size: 0.92rem;
}

.style-copy .feature-number {
  margin-bottom: 10px;
}

.workflow {
  padding: 64px 0;
}

.workflow h2 {
  max-width: 820px;
}

.workflow ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.workflow li {
  padding: 24px 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.workflow li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.workflow li span {
  display: block;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px 48px;
  padding: 64px 0;
}

.install-copy p:last-child {
  max-width: 470px;
  margin: 24px 0 0;
  color: var(--muted);
}

.command {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  align-self: end;
  min-width: 0;
  padding: 18px 18px 18px 22px;
  border: 1px solid #373735;
  border-radius: 14px;
  background: var(--ink);
  color: #f8f5ee;
}

.command code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
}

.command button {
  min-width: 68px;
  min-height: 44px;
  border: 1px solid #5c5b56;
  border-radius: 9px;
  background: #292927;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.command button:hover {
  background: #3b3a37;
}

.install-note {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}

.site-footer strong {
  font-size: 0.78rem;
  letter-spacing: 0.17em;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 36px, var(--content));
  }

  .hero {
    padding: 48px 0;
  }

  .principles,
  .install {
    grid-template-columns: 1fr;
  }

  .principle-grid,
  .workflow ol {
    grid-template-columns: repeat(2, 1fr);
  }

  .principle-grid article:nth-child(3),
  .workflow li:nth-child(3) {
    border-left: 0;
  }

  .principle-grid article:nth-child(n + 3),
  .workflow li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .principle-grid article:nth-child(3),
  .workflow li:nth-child(3) {
    padding-left: 0;
  }

  .feature-copy {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px 14px;
  }

  .feature-copy p:last-child {
    grid-area: 3 / 2;
    margin-top: 12px;
  }

  .install-note {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 76px;
    gap: 12px;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .site-header nav {
    gap: 12px;
  }

  .site-header nav a {
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 8.8vw, 3rem);
  }

  .hero-actions {
    gap: 12px 20px;
  }

  .principles,
  .skills,
  .workflow,
  .install {
    padding-top: 40px;
    padding-bottom: 44px;
  }

  .principle-grid,
  .style-pair,
  .workflow ol {
    grid-template-columns: 1fr;
  }

  .principle-grid article + article,
  .workflow li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .principle-grid article,
  .workflow li {
    min-height: 0;
    padding: 24px 0;
  }

  .principle-grid h3,
  .workflow li span {
    margin-top: 24px;
    margin-bottom: 8px;
  }

  .feature {
    padding: 28px 0 32px;
  }

  .feature-copy {
    display: block;
    margin-bottom: 20px;
  }

  .feature-copy .feature-number {
    margin-bottom: 10px;
  }

  .feature-copy p:last-child {
    margin-top: 12px;
  }

  .feature figcaption,
  .style-card figcaption {
    padding-inline: 12px;
    font-size: 0.7rem;
  }

  .style-pair {
    gap: 18px;
    padding: 28px 0 32px;
  }

  .style-copy {
    padding: 20px;
  }

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

  .command button {
    justify-self: start;
  }

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

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
