/* CSS Style Sheet */

/* ============================================================
   THEME TOKENS
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f5f8f5;
  --bg-elevated: #ffffff;
  --bg-subtle: #e8f0ef;
  --bg-chip: #edf3f1;
  --text: #16313a;
  --text-strong: #0e272f;
  --text-muted: #53666b;
  --text-narrative: #2d4850;
  --text-subtle: #61757a;
  --text-company: #6f8084;
  --text-figcap: #718388;
  --text-faint: #7b8d91;
  --text-very-faint: #9aabaa;
  --footer-text: #61757a;
  --border: #cad8d5;
  --border-card: #d5e0dd;
  --border-soft: #b7cac5;
  --brand: #3157d5;
  --brand-dark: #233fa3;
  --brand-light: #9fd8c0;
  --brand-bg: #e5eefc;
  --brand-text-on-bg: #1d3f84;
  --signal: #d7643b;
  --metrics-bg: #16313a;
  --metrics-fg: #f8fbf9;
  --metrics-fg-soft: rgba(248,251,249,0.76);
  --shadow-card: rgba(22,49,58,0.08);
  --shadow-card-strong: rgba(22,49,58,0.13);
  --font-display: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d2026;
  --bg-elevated: #132b32;
  --bg-subtle: #19373f;
  --bg-chip: #1d3b43;
  --text: #e4efeb;
  --text-strong: #f4faf7;
  --text-muted: #b2c5c2;
  --text-narrative: #cfddda;
  --text-subtle: #a8bcb9;
  --text-company: #9eb2af;
  --text-figcap: #93a8a5;
  --text-faint: #8ca29f;
  --text-very-faint: #718a87;
  --footer-text: #91a6a3;
  --border: #294850;
  --border-card: #2a4a52;
  --border-soft: #3b5c63;
  --brand: #8da9ff;
  --brand-dark: #b3c4ff;
  --brand-light: #76bea6;
  --brand-bg: #1b3953;
  --brand-text-on-bg: #c9d7ff;
  --signal: #f08a64;
  --metrics-bg: #07191e;
  --metrics-fg: #f2f8f5;
  --metrics-fg-soft: rgba(242,248,245,0.72);
  --shadow-card: rgba(0,0,0,0.26);
  --shadow-card-strong: rgba(0,0,0,0.38);
}

/* ============================================================
   PM PORTFOLIO STYLES
   ============================================================ */

/* Container */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.site-nav .nav-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin: 0;
}

.site-nav .nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
}

.site-nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0;
}

.site-nav .nav-links a:hover {
  color: var(--brand);
}

/* Hero */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 3rem 0 2rem;
  margin: 0;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0;
}

.hero-webgl {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  margin: 0;
  border-radius: 8px;
  background: var(--bg-elevated);
  box-shadow: 0 10px 28px var(--shadow-card);
}

.hero-content {
  margin: 0;
}

.hero-content h1 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 2.5rem;
}

.hero-title {
  font-size: 1.1rem;
  color: var(--brand);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-narrative);
  max-width: 620px;
  margin: 0 0 0.5rem;
  line-height: 1.7;
  background: transparent;
}

.hero-narrative {
  font-size: 0.95rem;
  color: var(--text-subtle);
  font-style: italic;
  max-width: 620px;
  margin: 0 0 1.25rem;
  line-height: 1.6;
  background: transparent;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.hero-links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  margin: 0;
}

.blog-hero {
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.75rem);
  margin: 2.5rem 0 2rem;
  border-radius: 8px;
}

.blog-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.blog-hero p:not(.section-label) {
  max-width: 610px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.transparency-hero {
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  margin: 2.5rem 0 2rem;
  border-radius: 8px;
}

.transparency-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.transparency-hero p:not(.section-label) {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.btn-primary {
  background: var(--brand);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand) !important;
}

/* Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--metrics-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 0 0 3rem;
}

.metric {
  text-align: center;
  margin: 0;
}

.metric-number {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--metrics-fg);
  line-height: 1.1;
}

.metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--metrics-fg-soft);
  margin-top: 0.3rem;
  line-height: 1.35;
}

/* Section Labels */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.4rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px var(--shadow-card);
  border-color: var(--brand-light);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: transparent;
  line-height: 1.5;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: var(--brand-bg);
  color: var(--brand-text-on-bg);
  margin: 0;
}

/* Project Cards (work.html) */
.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 1.75rem;
  margin: 0 0 1.5rem;
}

.project-card:hover {
  box-shadow: 0 4px 16px var(--shadow-card-strong);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-strong);
}

.project-company {
  font-size: 0.78rem;
  color: var(--text-company);
  font-weight: 600;
  background: var(--bg-chip);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

.project-section {
  margin: 0 0 0.9rem;
}

.project-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.3rem;
  display: block;
}

.project-section p,
.project-section ul {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-narrative);
  background: transparent;
  line-height: 1.6;
}

.project-section ul {
  padding-left: 1.2rem;
}

.project-section ul li {
  margin: 0 0 0.25rem;
}

.impact-box {
  background: var(--brand-bg);
  border-left: 3px solid var(--brand);
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1.1rem;
  margin: 0 0 0.9rem;
}

.impact-box p,
.impact-box ul {
  margin: 0;
  font-size: 0.9rem;
  color: var(--brand-text-on-bg);
  background: transparent;
  line-height: 1.6;
}

.impact-box ul {
  padding-left: 1.2rem;
}

.impact-box ul li {
  margin: 0 0 0.2rem;
}

/* Screenshot */
.project-screenshot {
  margin: 1rem 0 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.project-screenshot img {
  width: 100%;
  display: block;
  margin: 0;
}

.project-screenshot figcaption {
  font-size: 0.78rem;
  color: var(--text-figcap);
  padding: 0.4rem 0.75rem;
  background: var(--bg-subtle);
  margin: 0;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 0 0 3rem;
}

.skill-category {
  margin: 0;
}

.skill-category h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--brand-light);
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-category ul li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.15rem 0;
  margin: 0;
}

/* Language Switcher */
/* Right-hand nav cluster: page links (which collapse to the hamburger on
   mobile) sit beside the always-visible actions — language globe, theme,
   and the hamburger toggle. */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Hamburger toggle — hidden on desktop, shown in the mobile nav media query */
.nav-toggle {
  display: none;
  width: 40px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  cursor: pointer;
  grid-auto-rows: 2px;
  gap: 4px;
  place-content: center;
  place-items: center;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

/* Always-visible globe language switcher (button + dropdown menu) */
.lang-switcher { position: relative; }
/* Neutralise the global `* { margin: 10px }` on the switcher's inner bits */
.lang-current svg,
.lang-current-label,
.lang-menu li,
.lang-opt span,
.lang-opt svg { margin: 0; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.55rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-current:hover,
.lang-switcher.lang-open .lang-current {
  border-color: var(--brand);
  color: var(--brand);
}
.lang-globe { width: 17px; height: 17px; flex: 0 0 auto; }
.lang-caret {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  opacity: 0.75;
  transition: transform 0.2s ease;
}
.lang-switcher.lang-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px var(--shadow-card);
  display: none;
  z-index: 60;
}
.lang-switcher.lang-open .lang-menu { display: block; }
.lang-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  white-space: nowrap;
}
.lang-opt:hover { background: var(--bg-subtle); color: var(--text); }
.lang-opt.is-current { font-weight: 700; }
.lang-check { width: 16px; height: 16px; flex: 0 0 auto; color: var(--brand); }

/* Theme Toggle */
.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  font: inherit;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  display: block;
  margin: 0;
}

.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }

/* Divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* See all link */
.see-all-link {
  display: inline-block;
  margin-bottom: 3rem;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.see-all-link:hover {
  text-decoration: underline;
}

/* Work-page filter bar */
.work-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0.25rem 0 0;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.32rem 0.85rem;
  border-radius: 100px;
  border: 1px solid #d6d6d6;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin: 0;
  line-height: 1.3;
}

.filter-btn:hover {
  border-color: #2a9d8f;
  color: #2a9d8f;
}

.filter-btn:focus-visible {
  outline: 2px solid #2a9d8f;
  outline-offset: 2px;
}

.filter-btn.active {
  background: #2a9d8f;
  border-color: #2a9d8f;
  color: #fff;
}

.filter-count {
  font-size: 0.78rem;
  color: #888;
  margin: 0 0 0 auto;
  font-style: italic;
}

.filter-empty {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
  padding: 2rem 1rem;
  margin: 0 0 1.5rem;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
}

.project-card.filtered-out {
  display: none;
}

/* Responsive */
@media screen and (max-width: 767px) {
  .hero {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 0 1.5rem;
  }

  .blog-hero {
    min-height: 230px;
    margin-top: 1.5rem;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .site-nav .nav-links {
    gap: 0.75rem;
  }

  .project-header {
    flex-direction: column;
  }

  .filter-count {
    width: 100%;
    margin: 0.25rem 0 0;
    text-align: left;
  }
}

@media screen and (max-width: 500px) {
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================ */

* {
  margin: 10px;
}

a {
  margin: 0;
}

em {
  margin: 0 !important;
}

strong {
  margin: 0;
}

sup {
  margin: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  font-size: 1rem;
  line-height: 1.5;
  animation: fadeInAnimation ease 1s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
     }
}

h1 {
  font-size: 2.25rem;
  /* equals 36px */
  font-weight: bold;
  text-align: left;
  margin-top: 2.5rem;
  /* equals 40px */
  margin-bottom: 1.5rem;
  /* equals 24px */
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  text-align: left;
  margin-top: 2.5rem;
  /* equals 40px */
  margin-bottom: 1.5rem;
  /* equals 24px */
}

p {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  font-size: 1rem;
  /* equals 16px */
  line-height: 1.5;
  margin-bottom: 1rem;
}

blockquote {
  border-left: 3px solid var(--border);
  margin: 1.5rem 0 1.5rem 1rem;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-muted, #555);
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.5rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

footer {
  color: var(--footer-text);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
}

.newsletter-signup {
  max-width: 1040px;
  margin: 4rem auto 1rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: center;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.newsletter-signup h2 {
  margin: 0.2rem 0 0.5rem;
}

.newsletter-signup p {
  margin: 0;
  color: var(--text-muted);
}

.newsletter-embed {
  width: 100%;
  height: 150px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: #fff;
}

@media screen and (max-width: 767px) {
  .newsletter-signup {
    margin: 3rem 1rem 1rem;
    padding: 1.4rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .newsletter-embed {
    height: 170px;
  }
}

@media screen and (max-width: 767px) {
  body {
    font-size: 0.875rem;
    /* equals 14px */
  }

  h1 {
    font-size: 1.875rem;
    /* equals 30px */
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  p {
    font-size: 0.875rem;
    /* equals 14px */
    margin-bottom: 0.5rem;
  }
}


.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out
}

@keyframes octocat-wave {

  0%,
  100% {
    transform: rotate(0)
  }

  20%,
  60% {
    transform: rotate(-25deg)
  }

  40%,
  80% {
    transform: rotate(10deg)
  }
}

@media (max-width:500px) {
  .github-corner:hover .octo-arm {
    animation: none
  }

  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out
  }
}

/* ============================================================
   COMMAND PALETTE (⌘K)
   ============================================================ */

.cmdk-trigger {
  font-family: inherit;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.22rem 0.5rem;
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  line-height: 1;
  color: var(--text-muted);
}

.cmdk-trigger:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.cmdk-trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.cmdk-shortcut {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: inherit;
  margin: 0;
}

.cmdk-dialog {
  margin: 12vh auto auto;
  padding: 0;
  border: none;
  border-radius: 12px;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(70vh, 540px);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  font-family: 'Open Sans', sans-serif;
  overflow: hidden;
}

.cmdk-dialog::backdrop {
  background: rgba(15, 20, 25, 0.55);
  backdrop-filter: blur(2px);
}

.cmdk-container {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  margin: 0;
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.cmdk-search-icon {
  font-size: 1.1rem;
  color: var(--text-figcap);
  margin: 0;
  line-height: 1;
}

.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 1rem;
  color: var(--text-strong);
  background: transparent;
  margin: 0;
  padding: 0;
}

.cmdk-input::placeholder {
  color: var(--text-very-faint);
}

.cmdk-esc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  color: var(--text-figcap);
  background: var(--bg-chip);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  margin: 0;
}

.cmdk-list {
  list-style: none;
  padding: 0.35rem;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
}

.cmdk-item.is-active {
  background: var(--brand-bg);
}

.cmdk-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-item.is-active .cmdk-label {
  color: var(--brand-text-on-bg);
}

.cmdk-hint {
  font-size: 0.78rem;
  color: var(--text-figcap);
  margin: 0;
  text-align: right;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-empty {
  text-align: center;
  color: var(--text-figcap);
  font-size: 0.88rem;
  padding: 2rem 1rem;
  margin: 0;
}

.cmdk-footer {
  display: flex;
  gap: 1rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-figcap);
  margin: 0;
  flex-wrap: wrap;
}

.cmdk-footer span {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.cmdk-footer kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  background: var(--bg-chip);
  border: 1px solid var(--border-card);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  margin: 0 0.1rem 0 0;
  color: var(--text-muted);
}

.cmdk-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1a5c55;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  margin: 0;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cmdk-toast.is-out {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

@media screen and (max-width: 767px) {
  .cmdk-trigger { display: none; }
  .cmdk-dialog { margin-top: 8vh; }
}

/* ============================================================
   TRANSPARENCY DASHBOARD
   ============================================================ */

.td-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 2.5rem 0 1rem;
}

.td-intro { margin-bottom: 2rem; }

.td-callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.td-callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.td-callout h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.td-callout p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.td-dashboard {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1rem 0 2rem;
  box-shadow: 0 2px 10px var(--shadow-card);
}

.td-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

.td-filters {
  display: grid;
  grid-template-columns: repeat(6, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 1rem;
}

.td-filter { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
/* `.td-filter`'s display:flex would otherwise beat the UA [hidden] rule, so a
   hidden filter (e.g. Surface when not Google-scoped) must opt back out. */
.td-filter[hidden] { display: none; }
.td-filter-wide { grid-column: span 1; }

.td-filter label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
}

.td-filter select {
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  min-width: 0;
  width: 100%;
}

.td-filter select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.td-reset {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 5px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  align-self: end;
  white-space: nowrap;
}

.td-reset:hover {
  background: var(--brand);
  color: #fff;
}

.td-range-line {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.td-range-line strong { color: var(--text-strong); }

.td-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.td-metric {
  background: var(--brand-bg);
  border-radius: 6px;
  padding: 0.7rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.td-metric-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-text-on-bg);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.td-metric-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-text-on-bg);
  opacity: 0.85;
  line-height: 1.25;
}

.td-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.td-chart-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.95rem 1rem;
  min-width: 0;
}

.td-chart-card-wide { grid-column: span 2; }

.td-chart-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.td-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.td-chart-head h3 { margin: 0; }

.td-breakdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.td-breakdown label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
}

.td-breakdown select {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.3rem 0.45rem;
  font: inherit;
  font-size: 0.82rem;
}

.td-breakdown select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.td-metric-num.td-trend-up    { color: #1e7268; }
.td-metric-num.td-trend-down  { color: #b13b2e; }
.td-metric-num.td-trend-flat  { color: var(--brand-text-on-bg); }
[data-theme="dark"] .td-metric-num.td-trend-down { color: #ff8a7a; }
[data-theme="dark"] .td-metric-num.td-trend-up   { color: #6ed3c4; }

.td-metric-hint {
  display: block;
  font-size: 0.6rem;
  color: var(--brand-text-on-bg);
  opacity: 0.7;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.td-chart-wrap {
  position: relative;
  height: 240px;
}

.td-chart-tall { height: 280px; }

.td-table-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.95rem 1rem;
}

.td-table-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.td-table-head h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.td-row-count {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.td-table-scroll {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}

.td-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.td-table th, .td-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.td-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-strong);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.td-table .td-num { text-align: right; font-variant-numeric: tabular-nums; }
.t11-expand { background: none; border: none; padding: 0 0 0 0.4em; color: var(--accent, #4e79a7); cursor: pointer; font-size: inherit; font-family: inherit; }
.td-table .td-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-faint);
  font-style: italic;
}

.td-desig-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.td-table tr.desig-inactive td { color: var(--text-faint); }

.td-readme {
  margin: 2rem 0;
}

.td-bullets {
  padding-left: 1.2rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.td-bullets li { margin-bottom: 0.5rem; }
.td-bullets strong { color: var(--text-strong); }

@media screen and (max-width: 880px) {
  .td-callouts { grid-template-columns: 1fr; }
  .td-filters { grid-template-columns: 1fr 1fr; }
  .td-filters .td-reset { grid-column: 1 / -1; width: 100%; }
  .td-metrics { grid-template-columns: repeat(2, 1fr); }
  .td-chart-grid { grid-template-columns: 1fr; }
  .td-chart-card-wide { grid-column: span 1; }
}

@media screen and (max-width: 600px) {
  .td-chart-wrap { height: 280px; }
  .td-chart-tall { height: 320px; }
}

@media screen and (max-width: 480px) {
  .td-filters { grid-template-columns: 1fr; }
}

/* ============================================================
   CAREER TIMELINE
   ============================================================ */

.career-timeline-section {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
}

.career-timeline {
  position: relative;
  margin: 0;
}

.tl-item {
  display: grid;
  grid-template-columns: 5.75rem 1.5rem 1fr;
  column-gap: 0.65rem;
  align-items: flex-start;
  padding: 0 0 1.2rem;
  margin: 0;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-date {
  text-align: right;
  padding-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
  line-height: 1.35;
  margin: 0;
  background: transparent;
}

.tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.1rem;
  margin: 0;
}

.tl-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--bg-elevated);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.tl-item.tl-current .tl-dot {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
}

.tl-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 0.2rem 0 0;
  min-height: 0.5rem;
}

.tl-item:last-child .tl-line {
  display: none;
}

.tl-content {
  padding-top: 0;
  min-width: 0;
  margin: 0;
}

.tl-role {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
  margin: 0 0 0.2rem;
  background: transparent;
}

.tl-org {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brand-text-on-bg);
  background: var(--brand-bg);
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.tl-item.tl-current .tl-org {
  background: var(--brand);
  color: #fff;
}

.tl-summary {
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.5;
  margin: 0;
  background: transparent;
}

@media screen and (max-width: 580px) {
  .career-timeline-section {
    padding: 1rem;
  }

  .tl-item {
    grid-template-columns: 1.25rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.6rem;
  }

  .tl-date {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding: 0 0 0.15rem;
  }

  .tl-spine {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .tl-content {
    grid-column: 2;
    grid-row: 2;
  }
}

/* News timeline */
.news-list {
  margin-top: 2rem;
}
.news-entry {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.news-entry:last-child {
  border-bottom: none;
}
.news-date {
  flex: 0 0 130px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.25rem;
}
.news-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.news-body p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.news-body .tags {
  margin-top: 0.5rem;
}
@media (max-width: 540px) {
  .news-entry {
    flex-direction: column;
    gap: 0.4rem;
  }
  .news-date {
    flex: none;
  }
}

/* Blog post pages */
.post {
  max-width: 680px;
  padding: 2.5rem 0 4rem;
}
.post-back {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-decoration: none;
}
.post-back:hover {
  color: var(--brand);
}
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.post-header h1 {
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 0.6rem 0 0.9rem;
}
.post-header time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.post-body {
  font-size: 1rem;
  line-height: 1.8;
}
.post-body p {
  margin: 0 0 1.35rem;
  color: var(--text);
}
.post-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
  color: var(--text);
}
.post-body a {
  color: var(--brand);
}
.post-body strong {
  color: var(--text);
}
.post-body ul,
.post-body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.5rem;
  color: var(--text);
}
.post-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.post-hero {
  margin: 0 0 2rem;
}
.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ============================================================
   BLOG POST FOOTER — AUTHOR CARD + CONTINUE READING
   ============================================================ */

.post-author {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin: 3rem 0 0;
  padding: 1.3rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 1px 3px var(--shadow-card);
}
.post-author-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #1e7268, #134a43);
  box-shadow: 0 2px 8px var(--shadow-card-strong);
}
.post-author-info {
  min-width: 0;
}
/* global `p { background: var(--bg) }` would paint bars inside the elevated card */
.post-author p,
.continue-reading .section-label {
  background: transparent;
}
.post-author-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.15rem;
}
.post-author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 0.3rem;
}
.post-author-bio {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 0.7rem;
}
.post-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.post-author-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.post-author-links a:hover {
  text-decoration: underline;
}

.continue-reading {
  margin: 2.5rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.continue-reading .section-label {
  margin-bottom: 0.4rem;
}
.continue-reading-list {
  margin-top: 1rem;
  counter-reset: upnext;
}
.cr-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0.25rem;
  text-decoration: none;
  border-top: 1px solid var(--border-card);
}
.cr-row:first-child {
  border-top: 0;
}
.cr-row::before {
  counter-increment: upnext;
  content: counter(upnext);
  flex: 0 0 auto;
  width: 1.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand);
}
.cr-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cr-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-strong);
}
.cr-row:hover .cr-title {
  color: var(--brand);
}
.cr-date {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.1rem;
}

@media (max-width: 560px) {
  .post-author {
    flex-direction: column;
    gap: 0.9rem;
  }
}

/* ============================================================
   FEATURED CARD / FEATURED PRODUCT
   ============================================================ */

.featured-card {
  border-top: 3px solid var(--brand);
}

.featured-card__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.featured-product {
  border-top: 3px solid var(--brand);
  margin-bottom: 3rem;
}

.featured-product h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.featured-product__url {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.featured-product .tags {
  margin: 0.75rem 0 1rem;
}

.featured-product__links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.featured-product__links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  margin: 0;
}

/* ============================================================
   POLISH — motion, micro-interactions, sticky nav
   Progressive enhancement: every effect below is additive and
   degrades gracefully. Animations are gated on a `motion-ok` root
   class (set by enhance.js only when the user hasn't asked for
   reduced motion), so content is fully visible without JS.
   ============================================================ */

/* Anchored headings clear the sticky nav when jumped to */
html {
  scroll-behavior: smooth;
}

:target,
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: 5rem;
}

/* Sticky, lightly-blurred navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

/* Slightly translucent so the blur reads, falling back to solid */
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .site-nav {
    background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  }
}

/* Soft shadow once the page has scrolled under the nav */
.site-nav.is-stuck {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .site-nav.is-stuck {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* Animated underline on nav links */
.site-nav .nav-links a:not(.lang-switch) {
  position: relative;
}

.site-nav .nav-links a:not(.lang-switch)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.site-nav .nav-links a:not(.lang-switch):hover::after,
.site-nav .nav-links a:not(.lang-switch):focus-visible::after {
  transform: scaleX(1);
}

/* Card hover lift (adds a subtle rise to the existing shadow) */
.card,
.project-card,
.td-callout {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}

.motion-ok .card:hover,
.motion-ok .project-card:hover,
.motion-ok .td-callout:hover {
  transform: translateY(-3px);
}

/* Button micro-interactions */
.btn-primary,
.featured-product__links .btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.motion-ok .btn-primary:hover,
.motion-ok .featured-product__links .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 45%, transparent);
}

.hero-links a:active,
.featured-product__links a:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0);
}

/* Avatar gets a subtle brand ring on hover */
.hero-avatar {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.motion-ok .hero-avatar:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--brand-bg);
}

/* Tag hover */
.tag {
  transition: transform 0.15s ease, background 0.15s ease;
}

.motion-ok .tag:hover {
  transform: translateY(-1px);
}

/* Sharper, consistent keyboard focus rings */
a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scroll-reveal — initial hidden state only applies when JS has
   opted in via `motion-ok`; everything is visible otherwise. */
.motion-ok .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.motion-ok .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Cross-document (multi-page) View Transitions in supporting browsers */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Respect reduced-motion: strip transitions/animations and the
   page fade-in, and never offset revealed content. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   MOBILE NAV — hamburger drawer (collapses the nav at/below 940px)
   Fixes horizontal overflow: the page links + language switcher
   no longer overrun the viewport. Desktop nav is unchanged. The
   breakpoint sits above the widest locale's full nav (CJK labels)
   so the desktop bar never overflows just above the cutoff. */
@media (max-width: 940px) {
  .nav-toggle {
    display: inline-grid;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 0 0.7rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    /* Never exceed the viewport below the sticky bar; scroll if it would
       (e.g. landscape / short screens), so the language + theme controls stay reachable. */
    max-height: calc(100vh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  [data-theme="dark"] .site-nav .nav-links {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  }
  .site-nav.nav-open .nav-links {
    display: flex;
  }

  .site-nav .nav-links a:not(.lang-switch) {
    display: block;
    padding: 0.7rem 1.25rem;
    font-size: 0.98rem;
  }
  /* No sliding underline on the stacked mobile links */
  .site-nav .nav-links a:not(.lang-switch)::after {
    display: none;
  }

  /* Keep the always-visible actions tight so name + globe + theme + hamburger
     fit on a phone. The language globe stays in the bar (not the drawer); on
     phones it collapses to an icon-only button — the dropdown still lists the
     full language names. */
  .nav-right { gap: 0.5rem; }
  .lang-current-label,
  .lang-caret { display: none; }
  .lang-current {
    width: 38px;
    height: 34px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }
  .lang-globe { width: 19px; height: 19px; }
}

/* ============================================================
   Consulting page — booking & payment (Cal.com inline embed)
   ============================================================ */
.consult-tiers {
  grid-template-columns: repeat(3, 1fr);
}

.consult-tier {
  display: flex;
  flex-direction: column;
}

.consult-tier-price {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.4rem;
  background: transparent;
}

.cal-embed {
  width: 100%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-elevated);
  margin: 0 0 1rem;
}

.consult-privacy {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

@media screen and (max-width: 767px) {
  .consult-tiers {
    grid-template-columns: 1fr;
  }
}

.consult-languages {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 3px solid var(--brand);
  padding: 0.15rem 0 0.15rem 0.85rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

/* ============================================================
   FIELD SYSTEM — 2026 redesign
   Evidence-led visual language for product, research, and writing.
   ============================================================ */

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

* {
  margin: 0;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  color: var(--text);
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 560px), color-mix(in srgb, var(--border) 34%, transparent) calc(50% - 560px), color-mix(in srgb, var(--border) 34%, transparent) calc(50% - 559px), transparent calc(50% - 559px)),
    var(--bg);
  animation: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  text-wrap: balance;
}

h1 {
  margin: 2.75rem 0 1.25rem;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  font-weight: 720;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 680;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h3 {
  line-height: 1.18;
  letter-spacing: -0.025em;
}

p {
  margin: 0 0 1.15rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.68;
  color: var(--text);
  background: transparent;
}

ul,
ol {
  margin: 0 0 1.35rem;
}

a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

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

.container {
  width: min(100% - 2.5rem, 1120px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}

/* Registry navigation */
.site-nav {
  min-height: 68px;
  padding: 0.8rem max(1.25rem, calc((100vw - 1180px) / 2));
  border-top: 3px solid var(--signal);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .site-nav {
    background: color-mix(in srgb, var(--bg) 90%, transparent);
  }
}

.site-nav.is-stuck,
[data-theme="dark"] .site-nav.is-stuck {
  box-shadow: 0 1px 0 var(--border), 0 10px 30px color-mix(in srgb, var(--text-strong) 7%, transparent);
}

.site-nav .nav-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 730;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}

.site-nav .nav-name::after {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.42rem;
  border-radius: 50%;
  background: var(--signal);
  vertical-align: 0.06em;
}

.site-nav .nav-links {
  gap: 1.2rem;
}

.site-nav .nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  color: var(--text-muted);
}

.site-nav .nav-links a:not(.lang-switch)::after {
  bottom: -0.45rem;
  height: 1px;
  border-radius: 0;
  background: var(--signal);
}

.lang-current,
.theme-toggle,
.nav-toggle,
.cmdk-trigger {
  border-radius: 2px;
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 68%, transparent);
}

.lang-menu,
.cmdk-container {
  border-radius: 3px;
  border-color: var(--border);
  box-shadow: 0 22px 60px var(--shadow-card-strong);
}

/* Homepage thesis and proof index */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.72fr);
  min-height: min(720px, calc(100vh - 68px));
  margin: 0 0 4.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hero {
  display: block;
  align-self: stretch;
  padding: clamp(3.5rem, 8vw, 7rem) clamp(2rem, 6vw, 5.75rem) 3.5rem;
  border-right: 1px solid var(--border);
}

.hero-content {
  max-width: 720px;
}

.hero-content h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(4rem, 9vw, 7.5rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero-title::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--signal);
}

.hero-tagline {
  max-width: 680px;
  margin: 0 0 1.3rem;
  font-size: clamp(1.13rem, 2vw, 1.42rem);
  line-height: 1.48;
  letter-spacing: -0.024em;
  color: var(--text-narrative);
}

.hero-narrative {
  max-width: 650px;
  margin: 0 0 2.1rem;
  padding-left: 1.15rem;
  border-left: 2px solid var(--brand-light);
  font-size: 0.94rem;
  font-style: normal;
  line-height: 1.65;
  color: var(--text-subtle);
}

.hero-links,
.featured-product__links,
.featured-card__links {
  gap: 0.65rem;
}

.hero-links a,
.featured-product__links a,
.btn-primary,
.btn-secondary {
  min-height: 42px;
  padding: 0.68rem 1rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.btn-primary {
  border: 1px solid var(--brand);
  background: var(--brand);
  box-shadow: none;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-soft);
}

.metrics-strip {
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 0;
  margin: 0;
  padding: clamp(2rem, 4vw, 3.25rem);
  border-radius: 0;
  background: var(--metrics-bg);
}

.metric {
  position: relative;
  padding: 1.2rem 0 1.15rem;
  border-top: 1px solid color-mix(in srgb, var(--metrics-fg) 20%, transparent);
  text-align: left;
}

.metric:first-child::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 20%, transparent);
}

.metric-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 720;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.metric-label {
  max-width: 25ch;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* Evidence labels and content surfaces */
.section-label,
.project-section-label,
.post-author-eyebrow,
.filter-label,
.consult-tier-price {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--brand);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.75rem;
}

.section-label::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--signal);
}

.section-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
}

.card-grid {
  gap: 1px;
  margin: 0 0 3.5rem;
  padding: 1px;
  background: var(--border-card);
}

.card-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.project-card,
.td-callout {
  border: 0;
  border-radius: 0;
  background: var(--bg-elevated);
  box-shadow: none;
}

.card {
  min-height: 100%;
  padding: clamp(1.35rem, 3vw, 2.1rem);
}

.card:hover,
.project-card:hover {
  border-color: transparent;
  box-shadow: inset 3px 0 0 var(--signal);
}

.motion-ok .card:hover,
.motion-ok .project-card:hover,
.motion-ok .td-callout:hover {
  transform: none;
}

.card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.card p {
  font-size: 0.91rem;
  line-height: 1.62;
}

.tag,
.project-company {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
}

.featured-product,
.featured-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  border-top: 0;
  color: var(--metrics-fg);
  background: var(--metrics-bg);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.featured-product {
  padding: clamp(1.75rem, 4vw, 3.25rem);
}

.featured-product h2,
.featured-product p,
.featured-product a,
.featured-card h3,
.featured-card p {
  color: var(--metrics-fg);
}

.featured-product .tag,
.featured-card .tag {
  border-color: color-mix(in srgb, var(--metrics-fg) 24%, transparent);
  color: var(--metrics-fg);
}

.featured-product .btn-secondary,
.featured-card .btn-secondary {
  border-color: color-mix(in srgb, var(--metrics-fg) 34%, transparent);
  color: var(--metrics-fg) !important;
}

.project-card {
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--border-card);
}

.impact-box {
  border-left: 3px solid var(--signal);
  border-radius: 0;
}

.skills-grid {
  gap: 1px;
  padding: 1px;
  background: var(--border-card);
}

.skill-category {
  min-height: 100%;
  padding: 1.4rem;
  background: var(--bg-elevated);
}

.skill-category h3 {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--signal);
}

.section-divider {
  margin: 4.5rem 0;
  border-color: var(--border);
}

/* Page-type theses */
.evidence-hero {
  position: relative;
  min-height: 330px;
  margin: 0 0 3.5rem;
  padding: clamp(2rem, 6vw, 5rem);
  overflow: hidden;
  border-radius: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  color: var(--metrics-fg);
  background:
    linear-gradient(115deg, var(--metrics-bg) 0 68%, color-mix(in srgb, var(--brand) 34%, var(--metrics-bg)) 68% 100%);
}

.evidence-hero::after {
  content: "";
  position: absolute;
  right: clamp(1.5rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 5vw, 4rem);
  width: clamp(64px, 10vw, 112px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--metrics-fg) 38%, transparent);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 12px color-mix(in srgb, var(--metrics-fg) 5%, transparent),
    0 0 0 1px color-mix(in srgb, var(--signal) 38%, transparent);
}

.evidence-hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.evidence-hero h1 {
  margin: 0 0 0.8rem;
  color: var(--metrics-fg);
}

.evidence-hero p,
.evidence-hero p:not(.section-label),
.evidence-hero .section-label {
  color: var(--metrics-fg-soft);
  background: transparent;
}

.news-list {
  border-top-color: var(--border);
}

.news-entry {
  border-bottom-color: var(--border);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.news-body h3 {
  margin: -0.15rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.news-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.news-body h3 a:hover,
.news-body h3 a:focus-visible {
  color: var(--brand);
}

.news-body p {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
}

.post {
  max-width: 780px;
  margin: 0 auto;
  padding-top: 3.5rem;
}

.post-header h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.78;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.78;
}

.post-body h2 {
  margin-top: 3.75rem;
}

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

.post-author,
.continue-reading,
.newsletter-signup {
  border-radius: 0;
  border-color: var(--border);
}

.post-author-avatar {
  border-radius: 2px;
  background: var(--metrics-bg);
  color: var(--metrics-fg);
  font-family: var(--font-mono);
}

.work-filters {
  border-radius: 0;
  border-color: var(--border);
  background: var(--bg-elevated);
}

.filter-btn {
  border-radius: 2px;
  border-color: var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-btn.active {
  border-color: var(--brand);
  background: var(--brand);
}

.newsletter-signup {
  width: min(100% - 2.5rem, 1120px);
  max-width: 1120px;
  border-top: 3px solid var(--signal);
  background: var(--bg-elevated);
}

footer {
  width: min(100% - 2.5rem, 1120px);
  margin: 4rem auto 0;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.035em;
  text-align: left;
}

@media (max-width: 940px) {
  .site-nav .nav-links {
    padding: 0.6rem max(1.25rem, calc((100vw - 1120px) / 2)) 0.9rem;
    background: var(--bg-elevated);
  }

  .site-nav .nav-links a:not(.lang-switch) {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: -0.015em;
  }

  .home-intro {
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  }

  .hero {
    padding-inline: clamp(1.5rem, 5vw, 3.2rem);
  }

  .hero-content h1 {
    font-size: clamp(3.8rem, 10vw, 6rem);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 1rem;
    background: var(--bg);
  }

  .container,
  .newsletter-signup,
  footer {
    width: min(100% - 1.5rem, 1120px);
  }

  .home-intro {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 3.5rem;
  }

  .hero {
    padding: 3.5rem 1.35rem 2.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-content h1 {
    font-size: clamp(3.65rem, 18vw, 6rem);
  }

  .hero-tagline {
    font-size: 1.08rem;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.1rem 1.25rem;
  }

  .metric {
    min-width: 0;
    padding: 1.15rem 0.5rem;
  }

  .metric:nth-child(odd) {
    padding-left: 0;
    padding-right: 1rem;
  }

  .metric:nth-child(even) {
    padding-left: 1rem;
    padding-right: 0;
    border-left: 1px solid color-mix(in srgb, var(--metrics-fg) 20%, transparent);
  }

  .metric-number {
    font-size: 2rem;
  }

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

  .evidence-hero {
    min-height: 290px;
    padding: 3rem 1.4rem;
    background: var(--metrics-bg);
  }

  .evidence-hero::after {
    right: 1.3rem;
    bottom: 1.3rem;
    opacity: 0.55;
  }

  .post {
    padding-top: 2.5rem;
  }

  .post-body,
  .post-body p {
    font-size: 1rem;
  }

  .newsletter-signup {
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  .site-nav {
    padding-inline: 0.8rem;
  }

  .site-nav .nav-name {
    font-size: 0.96rem;
  }

  .hero-links a {
    flex: 1 1 calc(50% - 0.4rem);
    text-align: center;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .metric:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

/* ============================================================
   HOMEPAGE THESIS — outcome-led composition
   ============================================================ */
.home-intro--thesis {
  display: block;
  min-height: 0;
  margin-bottom: 5rem;
  border: 1px solid var(--border);
  background: var(--brand);
}

.hero--thesis {
  min-height: 560px;
  padding: clamp(3.5rem, 8vw, 7rem) clamp(2rem, 7vw, 6rem) clamp(3.5rem, 7vw, 5.5rem);
  border: 0;
  background: var(--brand);
}

.hero--thesis .hero-content {
  max-width: 980px;
}

.hero--thesis .hero-title {
  margin: 0 0 1.6rem;
  color: #dce4ff;
}

.hero--thesis .hero-title::before {
  background: var(--signal);
}

.hero--thesis .hero-content h1 {
  max-width: 980px;
  margin: 0;
  color: #f9fbff;
  font-size: clamp(4rem, 8.2vw, 7.35rem);
  line-height: 0.9;
  letter-spacing: -0.072em;
}

.hero--thesis .hero-tagline {
  max-width: 830px;
  margin: 2.4rem 0 0;
  color: #e9edfb;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.55;
}

.hero--thesis .hero-links {
  margin-top: 2.25rem;
}

.hero--thesis .btn-primary {
  border-color: #f9fbff;
  background: #f9fbff;
  color: var(--brand) !important;
}

.hero--thesis .btn-primary::after {
  border-top-color: var(--brand);
}

.hero--thesis .btn-secondary {
  border-color: color-mix(in srgb, #f9fbff 58%, transparent);
  color: #f9fbff !important;
}

.hero--thesis .btn-secondary:hover,
.hero--thesis .btn-secondary:focus-visible {
  border-color: #f9fbff;
  background: color-mix(in srgb, #f9fbff 10%, transparent);
}

.proof-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--metrics-bg);
  color: var(--metrics-fg);
}

.proof-entry {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 245px;
  padding: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--metrics-fg) 24%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--metrics-fg) 18%, transparent);
}

.proof-entry:last-child {
  border-right: 0;
}

.proof-index,
.proof-system {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.proof-index {
  margin-bottom: 2.6rem;
  color: #ff9b73;
}

.proof-system {
  color: var(--metrics-fg-soft);
}

.proof-entry strong {
  display: block;
  margin: 0.45rem 0 0.8rem;
  color: var(--metrics-fg);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.proof-detail {
  max-width: 30ch;
  color: var(--metrics-fg-soft);
  font-size: 0.85rem;
  line-height: 1.55;
}

.project-index {
  display: block;
  padding: 0;
  background: transparent;
}

.project-index .card {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  column-gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
  min-height: 0;
  padding: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-card);
  background: transparent;
}

.project-index .card:last-child {
  border-bottom: 1px solid var(--border-card);
}

.project-index .card:hover {
  background: color-mix(in srgb, var(--brand) 4%, transparent);
  box-shadow: inset 4px 0 0 var(--signal);
}

.project-index .card h3 {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.project-index .card p,
.project-index .card .tags,
.project-index .card .card-link {
  grid-column: 2;
}

.project-index .card p {
  margin-top: 0;
}

@media (max-width: 760px) {
  .home-intro--thesis {
    margin-bottom: 3.5rem;
  }

  .hero--thesis {
    min-height: 0;
    padding: 3.5rem 1.4rem 3rem;
    border-bottom: 0;
  }

  .hero--thesis .hero-content h1 {
    font-size: clamp(3.35rem, 14vw, 5.25rem);
    line-height: 0.91;
  }

  .hero--thesis .hero-tagline {
    margin-top: 1.8rem;
    font-size: 1rem;
  }

  .proof-ledger {
    grid-template-columns: 1fr;
  }

  .proof-entry {
    min-height: 0;
    padding: 1.5rem 1.4rem 1.75rem;
    border-right: 0;
  }

  .proof-index {
    margin-bottom: 1.4rem;
  }

  .proof-entry strong {
    font-size: 2.2rem;
  }

  .project-index .card {
    display: block;
    padding: 2rem 0;
  }

  .project-index .card h3 {
    margin-bottom: 1rem;
  }
}
