:root {
  --arpp-ink: #09090b;
  --arpp-paper: #f2f3f7;
  --arpp-blue: #60a5fa;
  --arpp-link-on-paper: #1d4ed8;

  --bg: var(--arpp-paper);
  --bg-2: #e8eaf1;
  --surface: #ffffff;
  --border: rgba(9, 9, 11, 0.14);
  --border-strong: rgba(9, 9, 11, 0.28);
  --text: var(--arpp-ink);
  --muted: #565a66;
  --link: var(--arpp-link-on-paper);
  --radius: 14px;
  --font-ui: "IBM Plex Sans", Segoe UI, Helvetica Neue, Arial, sans-serif;
  --font-display: "Space Grotesk", Segoe UI, Helvetica Neue, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --shadow: 0 14px 34px rgba(9, 9, 11, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--arpp-ink);
    --bg-2: #101014;
    --surface: #14141a;
    --border: rgba(242, 243, 247, 0.14);
    --border-strong: rgba(242, 243, 247, 0.3);
    --text: var(--arpp-paper);
    --muted: #a2a6b3;
    --link: var(--arpp-blue);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

h1,
h2,
h3,
.brand-name,
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

img {
  max-width: 100%;
  height: auto;
}

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

.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
}

.section-lead {
  margin: 0 0 2.2rem;
  max-width: 60ch;
  color: var(--muted);
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.brand .brand-mark-dark,
.hero-mark .hero-mark-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .brand .brand-mark-light,
  .hero-mark .hero-mark-light {
    display: none;
  }

  .brand .brand-mark-dark,
  .hero-mark .hero-mark-dark {
    display: block;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

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

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
}

.brand-name {
  font-size: 1.15rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-sm {
  min-height: 2.3rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
}

.btn-solid {
  background: var(--text);
  color: var(--bg);
}

.btn-solid:hover {
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.hero-title {
  margin: 0 0 1.1rem;
  max-width: 22ch;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.02;
}

.hero-lead {
  margin: 0 0 1.9rem;
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-note {
  margin: 2rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--arpp-blue);
  max-width: 46ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-mark img {
  display: block;
  width: 100%;
  max-width: 290px;
  margin-left: auto;
  filter: drop-shadow(0 18px 34px rgba(9, 9, 11, 0.22));
}

.section {
  padding: clamp(3.2rem, 7vw, 5.5rem) 0;
}

.section-ink {
  background: var(--arpp-ink);
  color: var(--arpp-paper);
}

.section-ink .eyebrow,
.section-ink .section-lead {
  color: rgba(242, 243, 247, 0.66);
}

.section-close {
  border-top: 1px solid var(--border);
  text-align: center;
}

.close-inner .section-lead {
  margin-inline: auto;
}

.close-inner .hero-cta {
  justify-content: center;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.stack-group {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stack-label {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-list,
.tag-list,
.work-grid,
.principle-list,
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.stack-group.is-accent .chip {
  background: var(--arpp-blue);
  border-color: var(--arpp-blue);
  color: var(--arpp-ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.6rem;
  background: rgba(242, 243, 247, 0.04);
  border: 1px solid rgba(242, 243, 247, 0.14);
  border-radius: var(--radius);
  transition: border-color 180ms ease, transform 180ms ease;
}

.work-item:hover {
  border-color: var(--arpp-blue);
  transform: translateY(-2px);
}

.work-kind {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--arpp-blue);
}

.work-name {
  margin: 0;
  font-size: 1.3rem;
}

.work-summary {
  margin: 0;
  color: rgba(242, 243, 247, 0.72);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(242, 243, 247, 0.62);
}

.tag + .tag::before {
  content: "· ";
}

.section-ink .text-link {
  color: var(--arpp-paper);
}

.principle-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  counter-reset: principle;
}

.principle-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.principle-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.principle-item p {
  margin: 0;
  color: var(--muted);
}

.principle-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--arpp-blue);
  color: var(--arpp-ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.error-main {
  padding: clamp(4rem, 12vw, 8rem) 0;
}

.page-title {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.site-footer {
  padding: 2.2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.footer-brand {
  margin: 0;
  font-size: 1.05rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-mark {
    order: -1;
  }

  .hero-mark img {
    max-width: 124px;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .nav {
    gap: 0.85rem;
  }

  .nav a:not(.btn) {
    font-size: 0.9rem;
  }
}

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

  .btn:hover,
  .work-item:hover {
    transform: none;
  }
}
