:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --linen: #FAF6F1;
  --bg: var(--linen);
  --bg-raised: #ffffff;
  --ink: #1a1614;
  --ink-70: rgba(26, 22, 20, 0.7);
  --ink-40: rgba(26, 22, 20, 0.4);
  --ink-20: rgba(26, 22, 20, 0.2);
  --ink-08: rgba(26, 22, 20, 0.08);

  --terracotta: #c66e4e;
  --terracotta-dim: rgba(198, 110, 78, 0.12);
  --terracotta-mid: rgba(198, 110, 78, 0.35);

  --cobalt: #0050b5;
  --cobalt-dim: rgba(0, 80, 181, 0.1);
  --cobalt-mid: rgba(0, 80, 181, 0.25);

  /* Legacy names used in a few rules — map to new scale */
  --ink-50: var(--ink-70);
  --ink-25: var(--ink-40);
  --ink-12: var(--ink-20);
  --ink-06: var(--ink-08);

  --cursor-default: rgba(198, 110, 78, 0.72);
  --cursor-size: 40px;
  --cursor-r: calc(var(--cursor-size) / 2);
}

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

/* Custom cursor (enabled via html.custom-cursor--on from cursor.js) */
html.custom-cursor--on,
html.custom-cursor--on * {
  cursor: none !important;
}

/* Wrapper: positioned with left/top only (no transform) so child can use background-attachment: fixed */
.custom-cursor-wrap {
  position: fixed;
  left: -100px;
  top: -100px;
  width: var(--cursor-size);
  height: var(--cursor-size);
  margin: 0;
  padding: 0;
  pointer-events: none;
  z-index: 10000;
  will-change: left, top, width, height;
  mix-blend-mode: normal;
}

.custom-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: top;
  mix-blend-mode: normal;
}

/* Home page: vertical accent stripes (left edge) */
.home-stripes {
  position: fixed;
  left: 0;
  top: var(--nav-h, 46px);
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: row;
  pointer-events: none;
}

.home-stripes__stripe {
  height: 100%;
  flex-shrink: 0;
  pointer-events: auto;
}

.home-stripes__stripe--terracotta {
  width: clamp(32px, 3.8vw, 56px);
  background: var(--terracotta);
}

.home-stripes__stripe--linen {
  width: clamp(20px, 2.2vw, 32px);
  background: var(--linen);
}

.home-stripes__stripe--cobalt {
  width: clamp(28px, 3vw, 44px);
  background: var(--cobalt);
}

body.has-home-stripes .page.page--home,
body.has-home-stripes .page.page--connect {
  padding-left: max(
    16px,
    calc(
      clamp(28px, 3vw, 44px) + clamp(20px, 2.2vw, 32px) + clamp(32px, 3.8vw, 56px) + 16px
    )
  );
}

@media (max-width: 480px) {
  .home-stripes {
    display: none;
  }

  body.has-home-stripes .page.page--home,
  body.has-home-stripes .page.page--connect {
    padding-left: 24px;
  }
}

::selection {
  background: var(--cobalt-mid);
  color: var(--ink);
}

html {
  background: var(--bg);
  scrollbar-color: var(--terracotta-dim) var(--bg-raised);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track {
  background: var(--bg-raised);
}

html::-webkit-scrollbar-thumb {
  background: var(--terracotta-dim);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--terracotta-mid);
}

.page > h1.pretext-host--plain {
  width: 100%;
  max-width: 100%;
}

.principle-title.pretext-host--plain {
  flex: 1;
  min-width: 0;
}

/* Atmospheric layers */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

@keyframes rackFocus {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.page > * {
  position: relative;
  z-index: 1;
  animation: rackFocus 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page > *:nth-child(1) { animation-delay: 0.05s; }
.page > *:nth-child(2) { animation-delay: 0.12s; }
.page > *:nth-child(3) { animation-delay: 0.2s; }
.page > *:nth-child(4) { animation-delay: 0.28s; }
.page > *:nth-child(5) { animation-delay: 0.36s; }
.page > *:nth-child(6) { animation-delay: 0.44s; }

/* ===== Nav ===== */
.lens-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 8px;
  padding: 12px 16px;
  background: rgba(198, 110, 78, 0.75);
  border-bottom: 2px solid rgba(198, 110, 78, 0.75);
}

body.has-home-stripes .lens-nav {
  background: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

.lens-nav a,
.lens-nav button {
  background: var(--linen);
  border: 1px solid transparent;
  color: var(--terracotta);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px 8px;
  border-radius: 16px;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.lens-nav a:hover,
.lens-nav button:hover {
  border-color: var(--cobalt-mid);
  color: var(--cobalt);
}

.lens-nav a[aria-current="page"],
.lens-nav button[aria-current="page"] {
  border-color: var(--cobalt);
  color: var(--linen);
  background: var(--cobalt);
}

.lens-nav a:focus-visible,
.lens-nav button:focus-visible {
  outline: 2px solid var(--linen);
  outline-offset: 3px;
}

/* ===== Page shell ===== */
.page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 52px);
  padding: 48px 24px 72px;
}

.page--perspectives {
  justify-content: flex-start;
}

.page--home {
  min-height: calc(100vh - 52px);
}

/* ===== Hero ===== */
.page h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 500;
  font-variation-settings: 'WONK' 1, 'opsz' 72;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
  color: var(--cobalt);
}

/* ===== Section meta + headings ===== */
.section-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 500;
  font-variation-settings: 'WONK' 1, 'opsz' 36;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  text-align: center;
  color: var(--ink);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cobalt-mid);
}

.page--principles .section-heading,
.page--principles .section-heading .pretext-lines,
.page--principles .section-heading .pretext-line { color: var(--terracotta); }

.page--opinions .section-heading,
.page--opinions .section-heading .pretext-lines,
.page--opinions .section-heading .pretext-line { color: var(--cobalt); }

.page--perspectives .section-heading,
.page--perspectives .section-heading .pretext-lines,
.page--perspectives .section-heading .pretext-line { color: var(--terracotta); }

.page--bookshelf .section-heading,
.page--bookshelf .section-heading .pretext-lines,
.page--bookshelf .section-heading .pretext-line { color: var(--cobalt); }

.page--connect .section-heading,
.page--connect .section-heading .pretext-lines,
.page--connect .section-heading .pretext-line { color: var(--terracotta); }

.page--builds .section-heading,
.page--builds .section-heading .pretext-lines,
.page--builds .section-heading .pretext-line { color: var(--terracotta); }

/* Welcome page: intro line in terracotta (after .section-heading so it wins; PreTeXt wraps copy in .pretext-line) */
.page--home .bio-content > h2.section-heading,
.page--home .bio-content > h2.section-heading .pretext-lines,
.page--home .bio-content > h2.section-heading .pretext-line {
  color: var(--cobalt);
}

.page--home .bio-content > h2.section-heading {
  margin-bottom: 24px;
  text-align: center;
}

/* ===== Who I am ===== */
/* Narrow column centered in main; left-aligned copy inside the column */
.bio-content {
  width: min(100%, 520px, 80vw);
  margin-inline: auto;
  text-align: left;
}

.bio-content p {
  font-size: clamp(15px, 1.65vw, 17px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink-70);
  margin-bottom: 16px;
}

/* PreTeXt: .pretext-lines is flex column; align-items: inherit was centering each line block */
.bio-content p.pretext-host--rich {
  text-align: left;
}

.bio-content p.pretext-host--rich .pretext-lines {
  align-items: flex-start;
  width: 100%;
}

.bio-content p.pretext-host--rich .pretext-line {
  width: 100%;
  text-align: left;
}

.bio-content p:last-of-type { margin-bottom: 0; }

.bio-content a,
.principle-body .pretext-host--rich a {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-color: var(--terracotta-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.bio-content a:hover,
.principle-body .pretext-host--rich a:hover {
  text-decoration-color: var(--terracotta);
  color: var(--terracotta);
}

/* ===== Operating Principles ===== */
.principles-content {
  width: 100%;
  /* ~58–65ch: comfortable measure for long-form reading (Newsreader) */
  max-width: min(62ch, 92vw);
  max-height: none;
}

.principle-block {
  position: relative;
  overflow: hidden;
  text-align: left;
  margin-bottom: 20px;
  border: 1px solid var(--ink-08);
  border-left: 3px solid var(--terracotta);
  border-radius: 8px;
  padding: 24px 28px;
  background: var(--terracotta-dim);
  transition: border-color 0.35s ease, border-left-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, backdrop-filter 0.35s ease;
}

.principle-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--principle-bg);
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.principle-block.open::after {
  opacity: 0.07;
}

.principle-header,
.principle-preview,
.principle-expand {
  position: relative;
  z-index: 1;
}

.principle-block:last-child { margin-bottom: 0; }

.principle-block:hover {
  border-color: var(--ink-20);
  box-shadow: 0 2px 12px rgba(26, 22, 20, 0.06);
}

.principle-block.open {
  border-color: var(--cobalt-mid);
  border-left-color: var(--cobalt);
  box-shadow: 0 4px 20px rgba(0, 80, 181, 0.15);
  background: color-mix(in srgb, var(--bg-raised) 80%, var(--cobalt-dim));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.principle-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  row-gap: 6px;
  max-width: 100%;
  -webkit-user-select: none;
  user-select: none;
}

.principle-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 500;
  font-variation-settings: 'WONK' 1, 'opsz' 72;
  line-height: 1;
  color: var(--ink-08);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.35s ease;
}

.principle-block.open .principle-num {
  color: var(--cobalt);
}

.principle-title {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 500;
  color: var(--ink-70);
  color: color-mix(in srgb, var(--ink) 88%, transparent);
}

.principle-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-40);
  transition: transform 0.35s ease, color 0.35s ease;
  margin-left: auto;
}

.principle-chevron::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.principle-block.open .principle-chevron {
  transform: rotate(180deg);
  color: var(--ink-70);
}

.principle-preview {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(13px, 1.5vw, 15px);
  font-variation-settings: 'WONK' 0, 'opsz' 18;
  color: var(--ink-40);
  line-height: 1.65;
  margin-top: 8px;
  padding-left: 0;
  max-height: 60px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}

.principle-block.open .principle-preview {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.principle-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.principle-block.open .principle-expand {
  grid-template-rows: 1fr;
}

.principle-body {
  overflow: hidden;
  min-height: 0;
  font-size: clamp(15px, 1.55vw, 17px);
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink-70);
  padding-left: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition: opacity 0.35s ease, margin 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
}

.principle-block.open .principle-body {
  opacity: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top-color: var(--ink-08);
}

.principle-body p + p { margin-top: 1.05em; }

/* PreTeXt: keep long paragraphs left-aligned and full-width for measurement (see .bio-content) */
.principle-body p.pretext-host--rich .pretext-lines {
  align-items: flex-start;
  width: 100%;
}

.principle-body p.pretext-host--rich .pretext-line {
  width: 100%;
  text-align: left;
}

.principle-body li.pretext-host--rich .pretext-lines {
  align-items: flex-start;
  width: 100%;
}

.principle-body li.pretext-host--rich .pretext-line {
  width: 100%;
  text-align: left;
}

.principle-body ul {
  margin: 1.05em 0;
  padding-left: 0;
  margin-left: 1.15em;
  list-style: disc;
  list-style-position: outside;
}

.principle-body li {
  margin-bottom: 0.65em;
  padding-left: 0.35em;
}

.principle-body li:last-child { margin-bottom: 0; }

/* ===== Builder ===== */
.builder-content {
  max-width: min(900px, 92vw);
  width: 100%;
  text-align: center;
}

.builder-content .section-heading { margin-bottom: 28px; }

/* Same horizontal span as `.project-card` (full width of `.builder-content`). */
.builds-intro {
  margin: 0 auto 28px;
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.builds-intro .builds-intro__p {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05rem, 17px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-70);
  margin: 0 0 12px;
}

.builds-intro .builds-intro__p:last-child {
  margin-bottom: 0;
}

.builds-intro .builds-intro__p a {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.builds-intro .builds-intro__p a:hover {
  color: var(--ink);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-raised);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(26, 22, 20, 0.14);
}

.project-card__media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 320px);
  overflow: hidden;
  background: var(--ink-08);
  background-size: cover;
  background-position: center;
}

.project-card-stretch {
  position: absolute;
  inset: 0;
  z-index: 2;
  text-indent: -9999px;
  overflow: hidden;
}

.project-card .card-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .card-text {
  flex: 1 1 auto;
  padding: 20px 22px 22px;
  color: var(--ink);
  text-align: left;
  background: var(--bg-raised);
  border-top: 1px solid var(--ink-08);
}

.project-card .card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  font-variation-settings: 'WONK' 1, 'opsz' 28;
  margin-bottom: 8px;
  color: var(--ink);
}

.project-card .card-summary {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-70);
}

.project-card .card-summary.pretext-host--plain {
  width: 100%;
}

.project-card .card-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.project-card .card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--ink-40);
  transition: color 0.2s ease;
}

.project-card .card-link:hover {
  color: var(--cobalt);
}

.project-card .card-link svg {
  width: 16px;
  height: 16px;
}

/* ===== Written ===== */
.opinions-content {
  max-width: min(440px, 80vw);
  text-align: center;
}

.opinions-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.opinions-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--ink-08);
  border-left: 2px solid var(--cobalt-dim);
  border-radius: 2px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.opinions-item:nth-child(even) {
  border-left-color: var(--terracotta-dim);
}

.opinions-item:hover {
  border-bottom-color: var(--terracotta-mid);
  background: var(--terracotta-dim);
}

.opinions-item .essay-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  font-variation-settings: 'WONK' 0, 'opsz' 24;
  color: var(--terracotta);
  transition: color 0.2s ease;
}

.opinions-item:hover .essay-title { color: var(--terracotta); }

.opinions-item .essay-desc {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-40);
  line-height: 1.5;
}

/* ===== Perspectives (two-column grid) ===== */
.perspectives-section {
  text-align: center;
  width: 100%;
  max-width: min(720px, 92vw);
}

.perspectives-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0 auto;
  text-align: left;
  align-items: start;
}

.perspectives-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.perspectives-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.perspectives-caption {
  padding: 10px 0 2px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink);
  line-height: 1.4;
  text-align: left;
}

/* ===== Bookshelf ===== */
.bookshelf-content {
  text-align: center;
  width: 100%;
  max-width: min(900px, 92vw);
}

.book-rack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 32px clamp(28px, 4vw, 56px);
  justify-items: center;
  padding: 8px 0 72px;
}

.rack-book {
  position: relative;
  z-index: 1;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  animation: rackFocus 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rack-book:hover {
  transform: scale(1.07) translateY(-8px);
}

.rack-book::after {
  content: '';
  position: absolute;
  top: -18px;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  background: linear-gradient(
    to bottom,
    var(--terracotta-mid),
    var(--terracotta)
  );
  z-index: -1;
  pointer-events: none;
}

.rack-book::before {
  content: '';
  display: block;
  width: 18px;
  height: 5px;
  background: var(--cobalt);
  border-radius: 0 0 2px 2px;
  margin: 0 auto 3px;
  box-shadow: 0 1px 2px rgba(26, 22, 20, 0.08);
  position: relative;
  z-index: 2;
}

.rack-book__cover {
  width: clamp(90px, 11vw, 136px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink-08);
  position: relative;
  z-index: 1;
  box-shadow:
    0 1px 4px rgba(26, 22, 20, 0.08),
    0 6px 20px rgba(26, 22, 20, 0.06);
  transition: box-shadow 0.4s ease;
}

.rack-book:hover .rack-book__cover {
  box-shadow:
    0 8px 24px rgba(26, 22, 20, 0.14),
    0 20px 48px rgba(26, 22, 20, 0.08);
}

.rack-book__placeholder {
  width: clamp(90px, 11vw, 136px);
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, var(--ink-08), var(--terracotta-dim));
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  padding: 16px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-variation-settings: 'WONK' 0, 'opsz' 18;
  line-height: 1.4;
  color: var(--ink-40);
  font-style: italic;
  position: relative;
  z-index: 1;
  box-shadow:
    0 1px 4px rgba(26, 22, 20, 0.08),
    0 6px 20px rgba(26, 22, 20, 0.06);
  transition: box-shadow 0.4s ease;
}

.rack-book:hover .rack-book__placeholder {
  box-shadow:
    0 8px 24px rgba(26, 22, 20, 0.14),
    0 20px 48px rgba(26, 22, 20, 0.08);
}

/* ===== Contact ===== */
.contact-content { text-align: center; }

.contact-tagline {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  font-variation-settings: 'WONK' 1, 'opsz' 28;
  color: var(--cobalt);
  margin-bottom: 36px;
  max-width: min(420px, 90vw);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px 40px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
}

.contact-links a.contact-links__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 52px;
  height: 44px;
  min-width: 52px;
  min-height: 44px;
  padding: 0;
  color: #fff;
  background: var(--terracotta);
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.contact-links__pill .contact-links__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.contact-links a.contact-links__pill:hover {
  background: color-mix(in srgb, var(--terracotta) 85%, #000);
  box-shadow: 0 4px 12px rgba(198, 110, 78, 0.3);
}

/* ===== Site footer bar (tricolor stripe) ===== */
.site-footer-bar {
  display: flex;
  width: 100%;
}

.site-footer-bar__stripe {
  flex: 1;
  height: 4px;
}

.site-footer-bar__stripe--cobalt { background: var(--cobalt); }
.site-footer-bar__stripe--linen { background: var(--linen); }
.site-footer-bar__stripe--terracotta { background: var(--terracotta); }

@media (prefers-reduced-motion: reduce) {
  .page > *,
  .rack-book,
  .principle-block {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .lens-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .lens-nav::-webkit-scrollbar { display: none; }
  .lens-nav a,
  .lens-nav button { font-size: 8px; padding: 5px 8px 7px; letter-spacing: 0.04em; flex-shrink: 0; }
  .page { padding: 32px 16px 56px; }
  @media (min-width: 481px) {
    body.has-home-stripes .page.page--home,
    body.has-home-stripes .page.page--connect {
      padding-left: max(
        16px,
        calc(
          clamp(28px, 3vw, 44px) + clamp(20px, 2.2vw, 32px) + clamp(32px, 3.8vw, 56px) + 12px
        )
      );
    }
  }
  .principle-block { padding: 18px 16px; }
  .principle-num { font-size: clamp(36px, 10vw, 48px); }
  .principle-body { padding-left: 0; }
  .perspectives-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .perspectives-card { padding: 0; }
  .perspectives-section { max-width: min(480px, 94vw); }
  .projects-grid { grid-template-columns: 1fr; }
  .book-rack {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 24px 20px;
    padding: 8px 0 48px;
  }
  .contact-tagline { margin-bottom: 28px; }
}
