/* ===== Reset / base ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

:root {
  /* Backgrounds */
  --bg: #FFFCF3;            /* cream paper */
  --bg-alt: #FFF6E2;        /* warmer cream for alt sections */
  --bg-pop: #FFE9CF;        /* peachy pop for marquee sections */
  --surface: #FFFFFF;       /* pure white cards */

  /* Lines */
  --line: #ECE2C8;
  --line-strong: #D8CBA9;

  /* Text */
  --text: #1A1410;          /* warm near-black */
  --muted-strong: #4A4239;
  --muted: #8A7F6E;

  /* Accents - happy palette */
  --accent: #FF6B35;        /* coral - primary */
  --accent-dim: #E04A12;    /* darker coral for hover */
  --accent-2: #0EA5E9;      /* sky blue */
  --accent-3: #F5C518;      /* sunshine yellow */
  --accent-4: #14B884;      /* mint green */
  --accent-5: #B95CDB;      /* berry */

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

html, body { background: var(--bg); color: var(--text); }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 500px at 80% -100px, rgba(255, 107, 53, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 30%, rgba(14, 165, 233, 0.08), transparent 60%),
    radial-gradient(700px 400px at 60% 70%, rgba(245, 197, 24, 0.07), transparent 60%);
}

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

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

::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute;
  top: -40px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  z-index: 1000;
}
.skip:focus { top: 1rem; }

/* ===== Layout ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 252, 243, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 0.95rem;
  color: var(--text);
}
.nav__brand:hover { color: var(--text); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18);
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted-strong);
}
.nav__links a { color: var(--muted-strong); transition: color 150ms ease; }
.nav__links a:hover { color: var(--accent); }

.nav__cta {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  transition: all 150ms ease;
}
.nav__cta:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }

@media (max-width: 880px) { .nav__links { display: none; } }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

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

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-bottom: 2rem;
}
.hero__copy { min-width: 0; }
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__photo {
  margin: 0;
  width: clamp(180px, 22vw, 240px);
  display: grid;
  gap: 0.75rem;
  justify-self: end;
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px -18px rgba(255, 107, 53, 0.35), 0 6px 16px -8px rgba(0,0,0,0.12);
}
.hero__photo figcaption {
  display: grid;
  gap: 0.15rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted-strong);
}
.hero__photoName { font-weight: 500; color: var(--text); }
.hero__photoRole {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.hero__photoRole--muted { color: var(--muted); }

@media (max-width: 880px) {
  .hero__photo { width: 140px; justify-self: start; margin-bottom: 0.5rem; }
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 2rem;
  max-width: 22ch;
  color: var(--text);
}
.hero__title em { font-style: italic; color: var(--accent); }

.hero__lede {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  color: var(--muted-strong);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}
.hero__lede strong { color: var(--text); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.stat {
  padding: 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}
.stat:nth-child(2)::before { background: var(--accent-3); }
.stat:nth-child(3)::before { background: var(--accent-2); }
.stat:nth-child(4)::before { background: var(--accent-4); }

.stat:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(26, 20, 16, 0.15);
}
.stat__v {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.6vw, 2.9rem);
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.015em;
}
.stat:nth-child(1) .stat__v { color: var(--accent); }
.stat:nth-child(2) .stat__v { color: var(--accent-3); }
.stat:nth-child(3) .stat__v { color: var(--accent-2); }
.stat:nth-child(4) .stat__v { color: var(--accent-4); }

.stat__k {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hero__loc {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 200ms ease;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dim); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(255, 107, 53, 0.45); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-pop); }  /* light pop now, name preserved */

.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 60ch; }
.section__head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--text);
}
.section__lede { color: var(--muted-strong); font-size: 1.05rem; margin: 0; }

/* ===== Receipts table ===== */
.receipts-grid {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px -16px rgba(26, 20, 16, 0.12);
}
.receipts-grid__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.receipts-grid__head > div {
  padding: 1rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.receipts-grid__head > div + div { border-left: 1px solid var(--line); }

.receipts-grid__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  transition: background 150ms ease;
}
.receipts-grid__row:last-child { border-bottom: none; }
.receipts-grid__row:hover { background: var(--bg-alt); }

.receipts-grid__quote,
.receipts-grid__proof {
  padding: 1.25rem 1.5rem;
  font-size: 0.97rem;
  line-height: 1.55;
}
.receipts-grid__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted-strong);
  border-right: 1px solid var(--line);
}
.receipts-grid__proof { color: var(--text); }

@media (max-width: 720px) {
  .receipts-grid__head { display: none; }
  .receipts-grid__row { grid-template-columns: 1fr; }
  .receipts-grid__quote { border-right: none; border-bottom: 1px dashed var(--line); }
}

/* ===== Catalogue ===== */
.fn {
  margin-bottom: 4.5rem;
  padding-top: 2rem;
  border-top: 4px solid var(--accent);
  position: relative;
}
.fn:first-of-type { padding-top: 0; border-top: none; }
.fn:last-child { margin-bottom: 0; }

/* Per-function accent color cycling */
.fn:nth-of-type(8n+1) { border-top-color: var(--accent); }
.fn:nth-of-type(8n+2) { border-top-color: var(--accent-2); }
.fn:nth-of-type(8n+3) { border-top-color: var(--accent-4); }
.fn:nth-of-type(8n+4) { border-top-color: var(--accent-5); }
.fn:nth-of-type(8n+5) { border-top-color: var(--accent-3); }
.fn:nth-of-type(8n+6) { border-top-color: var(--accent); }
.fn:nth-of-type(8n+7) { border-top-color: var(--accent-2); }
.fn:nth-of-type(8n)   { border-top-color: var(--accent-4); }

.fn__head {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
}

.fn__id {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  align-self: start;
  justify-self: start;
  box-shadow: 0 6px 14px -8px rgba(255, 107, 53, 0.45);
}
.fn:nth-of-type(8n+2) .fn__id { background: var(--accent-2); box-shadow: 0 6px 14px -8px rgba(14, 165, 233, 0.45); }
.fn:nth-of-type(8n+3) .fn__id { background: var(--accent-4); box-shadow: 0 6px 14px -8px rgba(20, 184, 132, 0.45); }
.fn:nth-of-type(8n+4) .fn__id { background: var(--accent-5); box-shadow: 0 6px 14px -8px rgba(185, 92, 219, 0.45); }
.fn:nth-of-type(8n+5) .fn__id { background: var(--accent-3); color: var(--text); box-shadow: 0 6px 14px -8px rgba(245, 197, 24, 0.55); }
.fn:nth-of-type(8n+6) .fn__id { background: var(--accent); }
.fn:nth-of-type(8n+7) .fn__id { background: var(--accent-2); box-shadow: 0 6px 14px -8px rgba(14, 165, 233, 0.45); }
.fn:nth-of-type(8n)   .fn__id { background: var(--accent-4); box-shadow: 0 6px 14px -8px rgba(20, 184, 132, 0.45); }

.fn__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  line-height: 1.2;
  margin: 0.5rem 0 0;
  color: var(--text);
}
.fn__blurb {
  color: var(--muted-strong);
  margin: 0 0 1.75rem;
  font-size: 1.02rem;
  max-width: 60ch;
}

.agents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
}
.agent {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.agent:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(26, 20, 16, 0.15);
}
.agent h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.agent p {
  font-size: 0.92rem;
  color: var(--muted-strong);
  margin: 0 0 0.9rem;
  line-height: 1.55;
}
.agent dl {
  display: grid;
  gap: 0.5rem;
  font-size: 0.84rem;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}
.agent dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.agent dd { margin: 0 0 0.25rem; color: var(--text); font-size: 0.88rem; }

/* ===== Featured systems ===== */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5rem;
}
.feature {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 20px -16px rgba(26, 20, 16, 0.18);
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}
.feature:nth-child(2)::before { background: linear-gradient(90deg, var(--accent-2), var(--accent-4)); }
.feature:nth-child(3)::before { background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.feature:nth-child(4)::before { background: linear-gradient(90deg, var(--accent-5), var(--accent-2)); }
.feature:nth-child(5)::before { background: linear-gradient(90deg, var(--accent-4), var(--accent-3)); }
.feature:nth-child(6)::before { background: linear-gradient(90deg, var(--accent), var(--accent-5)); }

.feature h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.feature__why { color: var(--muted-strong); font-size: 0.95rem; margin: 0 0 1.25rem; }

.feature__arch { margin: 0 0 1.25rem; }
.feature__archHead {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.feature__arch ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.feature__arch li {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 107, 53, 0.08);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.feature:nth-child(2) .feature__arch li { background: rgba(14, 165, 233, 0.08); border-left-color: var(--accent-2); }
.feature:nth-child(3) .feature__arch li { background: rgba(245, 197, 24, 0.10); border-left-color: var(--accent-3); }
.feature:nth-child(4) .feature__arch li { background: rgba(185, 92, 219, 0.08); border-left-color: var(--accent-5); }
.feature:nth-child(5) .feature__arch li { background: rgba(20, 184, 132, 0.08); border-left-color: var(--accent-4); }
.feature:nth-child(6) .feature__arch li { background: rgba(255, 107, 53, 0.08); border-left-color: var(--accent); }

.feature__meta {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.feature__meta dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline;
}
.feature__meta dd { margin: 0 0 0.5rem; color: var(--text); display: inline; }
.feature__meta dt::after { content: " "; }
.feature__meta dd::after { content: "\A"; white-space: pre; }

/* ===== Impact table ===== */
.impact-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 3rem;
  background: var(--surface);
  box-shadow: 0 6px 20px -16px rgba(26, 20, 16, 0.18);
}
.impact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}
.impact-table thead {
  background: var(--bg-alt);
}
.impact-table th {
  text-align: left;
  padding: 0.95rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-strong);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.impact-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  vertical-align: top;
}
.impact-table tr:last-child td { border-bottom: none; }
.impact-table td:first-child { color: var(--text); font-weight: 500; }
.impact-table td:nth-child(4) { color: var(--accent); font-weight: 600; }
.impact-table__total td {
  background: rgba(255, 107, 53, 0.08);
  color: var(--text);
  font-weight: 600;
  border-top: 2px solid var(--accent);
}
.impact-table__total td:nth-child(4) { color: var(--accent-dim); }

.numbers__head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  color: var(--text);
}
.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.numbers__col {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.numbers__col::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.numbers__col:nth-child(2)::before { background: var(--accent-2); }
.numbers__col:nth-child(3)::before { background: var(--accent-3); }
.numbers__col:nth-child(4)::before { background: var(--accent-4); }
.numbers__col:nth-child(5)::before { background: var(--accent-5); }
.numbers__col:nth-child(6)::before { background: var(--accent-dim); }

.numbers__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.numbers__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

/* ===== Side build ===== */
.side {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 2rem;
}
@media (max-width: 880px) { .side { grid-template-columns: 1fr; } }
.side__main h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
  color: var(--text);
}
.side__main > p {
  margin: 0 0 1.25rem;
  color: var(--muted-strong);
  font-size: 1rem;
  max-width: 60ch;
}
.side__main em { color: var(--accent); font-style: italic; font-weight: 500; }
.side__main code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  background: rgba(255, 107, 53, 0.10);
  color: var(--accent-dim);
  border-radius: 4px;
}

.side__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.8rem;
}
.side__steps li {
  position: relative;
  padding-left: 2.6rem;
  font-size: 0.95rem;
  color: var(--muted-strong);
  line-height: 1.55;
  counter-increment: step;
}
.side__steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.side__steps li:nth-child(2)::before { background: var(--accent-3); color: var(--text); }
.side__steps li:nth-child(3)::before { background: var(--accent-2); }
.side__steps li:nth-child(4)::before { background: var(--accent-4); }
.side__steps li:nth-child(5)::before { background: var(--accent-5); }
.side__steps li:nth-child(6)::before { background: var(--accent); }
.side__steps li:nth-child(7)::before { background: var(--accent-3); color: var(--text); }
.side__steps li:nth-child(8)::before { background: var(--accent-2); }

.side__steps li strong { color: var(--text); font-weight: 600; }

.side__meta {
  display: grid;
  gap: 1rem;
  align-self: start;
}
.side__metaBlock {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.side__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.side__metaBlock:nth-child(2) .side__label { color: var(--accent-2); }

.side__metaBlock ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

/* ===== Public artifacts ===== */
.artifacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}
.artifacts__group { min-width: 0; }
.artifacts__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.artifacts__group:nth-child(2) .artifacts__label { color: var(--accent-2); }

.artifacts__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.artifacts__list a {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.artifacts__list a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -14px rgba(255, 107, 53, 0.4);
  color: var(--text);
}
.artifacts__group:nth-child(2) .artifacts__list a:hover {
  border-color: var(--accent-2);
  box-shadow: 0 10px 20px -14px rgba(14, 165, 233, 0.4);
}
.art__name {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 500;
}
.artifacts__group:nth-child(2) .art__name { color: var(--accent-2); }
.art__desc { font-size: 0.88rem; color: var(--muted-strong); line-height: 1.5; }

/* ===== Stack ===== */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.stack__col {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.stack__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.stack__col:nth-child(2n) .stack__label { color: var(--accent-2); }
.stack__col:nth-child(3n) .stack__label { color: var(--accent-4); }
.stack__col:nth-child(4n) .stack__label { color: var(--accent-5); }

.stack__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
}

/* ===== Why ===== */
.why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.why__card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}
.why__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}
.why__card:nth-child(2)::before { background: var(--accent-3); }
.why__card:nth-child(3)::before { background: var(--accent-2); }
.why__card:nth-child(4)::before { background: var(--accent-4); }
.why__card:nth-child(5)::before { background: var(--accent-5); }
.why__card:nth-child(6)::before { background: var(--accent-dim); }

.why__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(26, 20, 16, 0.15);
}
.why__card h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: var(--text);
}
.why__card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted-strong);
  line-height: 1.55;
}
.why__card em { color: var(--accent); font-style: italic; }

/* ===== Timeline ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-4));
  opacity: 0.35;
}
.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2rem;
  position: relative;
  padding-left: 0;
}
.timeline__when {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
  text-align: right;
}
.timeline__what { position: relative; padding-left: 1.5rem; }
.timeline__what::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline li:nth-child(2) .timeline__what::before { background: var(--accent-3); box-shadow: 0 0 0 1px var(--accent-3); }
.timeline li:nth-child(3) .timeline__what::before { background: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.timeline li:nth-child(4) .timeline__what::before { background: var(--accent-4); box-shadow: 0 0 0 1px var(--accent-4); }
.timeline li:nth-child(5) .timeline__what::before { background: var(--accent-5); box-shadow: 0 0 0 1px var(--accent-5); }

.timeline__what h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
  color: var(--text);
}
.timeline__what p { margin: 0; font-size: 0.95rem; color: var(--muted-strong); }
.timeline__what strong { color: var(--text); }

@media (max-width: 720px) {
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 0.4rem; padding-left: 1.5rem; }
  .timeline__when { text-align: left; }
  .timeline__what { padding-left: 0; }
  .timeline__what::before { left: -1.45rem; }
}

/* ===== Contact ===== */
.contact {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-pop) 100%);
}
.contact__h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  max-width: 30ch;
  letter-spacing: -0.01em;
  color: var(--text);
}
.contact__sub {
  color: var(--muted-strong);
  font-size: 1.05rem;
  margin: 0 0 2.5rem;
  max-width: 60ch;
}
.contact__rows {
  display: grid;
  gap: 0;
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}
.contact__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: padding 200ms ease, background 200ms ease;
  color: var(--text);
}
.contact__row:hover:not(.contact__row--static) {
  background: rgba(255, 107, 53, 0.06);
  color: var(--accent-dim);
}
.contact__row .k {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__row .v { font-size: 1.05rem; color: inherit; }

.contact__close {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted-strong);
  max-width: 60ch;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px dashed var(--line-strong);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  background: var(--bg-alt);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
