/* felipecasadei.ai
   Editorial / institute-inspired layout.
   Type: Switzer (single family, weight-driven hierarchy).
   Default theme: dark. Light theme via [data-theme="light"]. */

:root {
  /* dark default */
  --ink: #f3f0e9;
  --ink-soft: #d3cfc4;
  --paper: #0a0a0a;
  --paper-tint: #141414;
  --accent: #8146e1;
  --accent-warm: #dc9600;
  --teal: #00a59a;
  --indigo: #6464ff;
  --crimson: #cd0f55;
  --rule: #262626;
  --rule-soft: #1a1a1a;
  --muted: #908b80;
  --nav-bg: rgba(10, 10, 10, 0.85);

  --serif: 'Switzer', 'Inter', system-ui, sans-serif;
  --sans:  'Switzer', 'Inter', system-ui, sans-serif;
  --measure: 60ch;
  --max-w: 1120px;
}

[data-theme="light"] {
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --paper: #f3ede0;             /* warm off-white (parchment) */
  --paper-tint: #ebe5d4;
  --accent: #6e2dd6;            /* slightly deeper purple for AA contrast on light */
  --accent-warm: #b87a00;       /* slightly deeper gold for AA contrast on light */
  --rule: #d6d1c5;
  --rule-soft: #e7e2d6;
  --muted: #5c5854;
  --nav-bg: rgba(243, 237, 224, 0.9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  text-transform: lowercase;
}
/* preserve case where it matters */
input, textarea, audio, .keep-case { text-transform: none; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; transition: color 120ms ease; }
a:hover { color: var(--accent-warm); }
a.link-clean { border-bottom: none; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

/* ============ NAV ============ */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
nav.top .inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
nav.top .brand {
  display: flex; align-items: center; gap: 16px;
  border: none;
  color: var(--ink);
}
nav.top .brand:hover { color: var(--accent); }
nav.top .name {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* ============ LOGO (fc circle with gradient, letters bleed past edge) ============ */
.logo-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9b5eee 0%, #8146e1 50%, #6a35c5 100%);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  transition: filter 200ms ease, transform 200ms ease;
  box-shadow: 0 0 0 1px rgba(129, 70, 225, 0.15);
}
.logo-text {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 50px;
  line-height: 1;
  color: var(--paper);
  letter-spacing: -0.08em;
  position: relative;
  margin-top: 6px;
  text-transform: lowercase;
  /* font is intentionally much larger than the 38px circle so glyphs bleed past the edge */
  white-space: nowrap;
  display: inline-block;
}
.logo-letter {
  display: inline-block;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .logo-circle {
  filter: brightness(1.1) saturate(1.1);
  transform: scale(1.04);
}
.brand:hover .logo-f { transform: translateY(-3px) rotate(-3deg); }
.brand:hover .logo-c { transform: translateY(-3px) rotate(2deg); transition-delay: 70ms; }
[data-theme="light"] .logo-text { color: #f3ede0; }
[data-theme="light"] .logo-circle {
  background: linear-gradient(135deg, #8b48e3 0%, #6e2dd6 50%, #5320a9 100%);
}

/* ============ MEGA-NAV DROPDOWNS ============ */
nav.top .nav-primary { position: relative; }
nav.top .has-dropdown { position: relative; }
nav.top .has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 6px;
  opacity: 0.6;
}
nav.top .dropdown {
  position: absolute;
  top: calc(100% + 8px); left: -16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 8px;
  min-width: 280px;
  display: grid;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
nav.top .has-dropdown:hover > .dropdown,
nav.top .has-dropdown:focus-within > .dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
nav.top .dropdown a {
  display: grid;
  grid-template-columns: 1fr;
  padding: 12px 14px;
  font-size: 0.875rem;
  border: none;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease;
}
nav.top .dropdown a:hover {
  background: var(--paper-tint);
  color: var(--accent);
}
nav.top .dropdown a strong {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
nav.top .dropdown a span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}
nav.top .dropdown a:hover span { color: var(--ink-soft); }

/* ============ AVATAR ============ */
.avatar {
  flex-shrink: 0;
  shape-rendering: crispEdges;
  animation: avatar-breathe 5.4s ease-in-out infinite;
}
.avatar .body { fill: var(--ink); }
.avatar .eye { fill: var(--paper); animation: avatar-blink 6.3s steps(1) infinite; }
.avatar .eye-r { animation-delay: 0.06s; }
.avatar .thought {
  fill: var(--accent);
  transform-origin: center;
  transform-box: fill-box;
  animation: avatar-pulse 2.8s ease-in-out infinite;
}
@keyframes avatar-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.6px); }
}
@keyframes avatar-blink {
  0%, 92%, 96%, 100% { fill: var(--paper); }
  93%, 95%           { fill: var(--ink); }
}
@keyframes avatar-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.55); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
.avatar--lg { width: 96px; height: 96px; }
.avatar--xl { width: 144px; height: 144px; }
nav.top ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 36px;
  font-size: 1.0625rem;
  font-weight: 500;
}
nav.top ul a {
  color: var(--ink-soft);
  border: none;
  transition: color 150ms ease;
}
nav.top ul a:hover { color: var(--accent); }
nav.top .has-dropdown > a::after { content: none; }
nav.top .dropdown { display: none !important; }
nav.top .nav-end {
  display: flex; align-items: center; gap: 28px;
}
.theme-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--muted);
}
.theme-pair .theme-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms ease;
}
.theme-pair .theme-btn:hover { color: var(--ink); }
/* active state = current mode highlighted */
.theme-pair .theme-btn-light { color: var(--muted); }
.theme-pair .theme-btn-dark { color: var(--accent-warm); }
[data-theme="light"] .theme-pair .theme-btn-light { color: var(--accent-warm); }
[data-theme="light"] .theme-pair .theme-btn-dark { color: var(--muted); }
.theme-pair .theme-sep {
  color: var(--rule);
  font-weight: 300;
  font-size: 1rem;
}

/* ============ HERO ============ */
.hero {
  padding: 96px 0 96px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
  filter: saturate(1.1) contrast(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 70% 30%, rgba(10,10,10,0.05), rgba(10,10,10,0.55) 80%),
    linear-gradient(to bottom, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.4) 60%, rgba(10,10,10,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 2; }
[data-theme="light"] .hero-video { opacity: 0.85; }
[data-theme="light"] .hero-overlay {
  background:
    radial-gradient(120% 80% at 70% 30%, rgba(243,237,224,0.05), rgba(243,237,224,0.55) 80%),
    linear-gradient(to bottom, rgba(243,237,224,0.25) 0%, rgba(243,237,224,0.4) 60%, rgba(243,237,224,0.7) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero .eyebrow { margin: 0 0 36px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: end;
}
.hero-main h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.25rem, 4.4vw + 0.5rem, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.024em;
  margin: 0;
  max-width: 22ch;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--accent); font-weight: inherit; }

/* Stacked typographic block — lead + four areas, all one line each */
.hero-lead,
.hero-areas {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw + 0.5rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.026em;
}
.hero-lead {
  color: var(--ink);
  margin: 0 0 8px;
  white-space: nowrap;
}
.hero-areas {
  list-style: none;
  margin: 0;
  /* extra padding-bottom keeps the gradient covering descenders (e.g. "g" in intelligence) */
  padding: 0 0 0.22em;
  /* purple shading matching the logo gradient */
  background: linear-gradient(135deg, #b07dff 0%, #8146e1 50%, #6a35c5 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-areas li {
  padding: 4px 0;
  display: block;
  white-space: nowrap;
}
.hero-areas li:first-child { padding-top: 0; }
.hero-areas li:last-child { padding-bottom: 0; }
.hero-areas .amp,
.hero-areas .period {
  color: var(--accent-warm);
  -webkit-text-fill-color: var(--accent-warm);
  font-weight: 700;
  font-style: normal;
}
.hero-areas .amp { margin-left: 4px; }
.hero-areas .period { margin-left: 2px; }

/* ============ HERO META (typographic, no box, pushed to right edge) ============ */
.hero-meta {
  background: transparent;
  border: none;
  /* padding-bottom mirrors the descender-compensation on .hero-areas so that
     "amazon bio discovery" visually bottom-aligns with the g descender of
     "intelligence" (both grid items align to grid row bottom). */
  padding: 0 0 0.6rem;
  font-size: 1rem;
  line-height: 1.4;
  justify-self: end;
  max-width: 320px;
  text-align: left;
}
.hero-meta .meta-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 24px;
}
.hero-meta .meta-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.4vw + 0.75rem, 2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 4px;
  color: var(--ink);
}
.hero-meta .meta-org {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1vw + 0.75rem, 1.625rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.hero-meta .meta-org .at {
  color: var(--accent-warm);
  font-weight: 600;
  letter-spacing: 0;
}
.hero-meta .meta-detail {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.hero-meta .meta-detail a {
  color: var(--ink-soft);
  transition: color 150ms ease;
}
.hero-meta .meta-detail a:hover { color: var(--accent); }
/* legacy hero-card styles preserved for fallback compatibility */
.hero-card { padding: 0; background: transparent; border: none; }
.hero-card::before { display: none; }
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 3px;
  background: var(--accent-warm);
}
.hero-card .card-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.hero-card .card-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 4px;
}
.hero-card .card-org {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0;
}
.hero-card .card-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 22px 0;
}
.hero-card .card-meta {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
  line-height: 1.55;
}
.hero-card .card-affil {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.hero-card .card-affil li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.hero-card .card-affil .lbl {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-top: 2px;
}

/* ============ SECTIONS ============ */
section {
  padding: 96px 0;
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 56px;
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
}
.section-head::before {
  content: '';
  position: absolute;
  top: -10px; left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
}
/* color variance per section */
#about     .section-head::before { background: var(--accent); }
#research  .section-head::before { background: var(--teal); }
#writing   .section-head::before { background: var(--indigo); }
#listening .section-head::before { background: var(--accent-warm); }
#portfolio .section-head::before { background: var(--crimson); }
.section-head .num { display: none; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 2vw + 0.5rem, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
  text-transform: none;
}

/* About variant — section head with inline cycling word ticker (reads as "about insights") */
.section-head-with-ticker {
  flex-direction: row;
  align-items: baseline;
  gap: 0.4em;
  flex-wrap: wrap;
}
.head-ticker {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.625rem, 2vw + 0.5rem, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  display: inline-grid;
  grid-template-areas: "stack";
  vertical-align: baseline;
}
.head-ticker .word {
  grid-area: stack;
  white-space: nowrap;
  opacity: 0;
  animation: ticker-cycle 48s infinite;
}
.head-ticker .word-1 { animation-delay: 0s;  color: var(--accent); }
.head-ticker .word-2 { animation-delay: 6s;  color: var(--accent-warm); }
.head-ticker .word-3 { animation-delay: 12s; color: var(--teal); }
.head-ticker .word-4 { animation-delay: 18s; color: var(--indigo); }
.head-ticker .word-5 { animation-delay: 24s; color: var(--crimson); }
.head-ticker .word-6 { animation-delay: 30s; color: var(--accent); }
.head-ticker .word-7 { animation-delay: 36s; color: var(--accent-warm); }
.head-ticker .word-8 { animation-delay: 42s; color: var(--teal); }

h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin: 0 0 12px;
  color: var(--ink);
}

/* ============ RESEARCH ============ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.research-card {
  display: flex; flex-direction: column;
  border-top: none;
  padding-top: 0;
  transition: padding-left 200ms ease;
}
.research-card .tag { color: var(--accent-warm); }
.research-card:nth-child(1) .tag { color: var(--teal); }
.research-card:nth-child(2) .tag { color: var(--indigo); }
.research-card:nth-child(3) .tag { color: var(--crimson); }
.research-card:nth-child(1) h3 { color: var(--ink); }
.research-card:nth-child(2) h3 { color: var(--ink); }
.research-card:nth-child(3) h3 { color: var(--ink); }
.research-card .tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}
.research-card h3 { margin-bottom: 16px; }
.research-card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
  flex: 1;
}
.research-card .status {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

/* ============ WRITING ============ */
.writing-list { list-style: none; padding: 0; margin: 0; }
.writing-list li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
  transition: padding-left 200ms ease;
}
.writing-list li:hover { padding-left: 8px; }
.writing-list li:last-child { border-bottom: 1px solid var(--rule); }
.writing-list .date {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.writing-list .title {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
}
.writing-list .venue {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 80px;
  align-items: start;
}
.bio p:first-child {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 28px;
}
.bio p {
  max-width: var(--measure);
  font-size: 1rem;
  color: var(--ink-soft);
}
.education {
  list-style: none; padding: 0;
  margin: 40px 0 0;
  border-top: 1px solid var(--ink);
}
.education li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  font-size: 0.9375rem;
  align-items: baseline;
}
.education .yr {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.875rem;
}
.education .deg strong {
  font-weight: 500;
  color: var(--ink);
}
.education .deg span {
  color: var(--muted);
  font-size: 0.875rem;
  display: block;
  margin-top: 2px;
}

.cv-card {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 36px;
}
.cv-card h3 { margin: 0 0 12px; }
.cv-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: background 150ms ease, color 150ms ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { font-size: 1em; transition: transform 150ms ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-lg {
  padding: 18px 32px;
  font-size: 1rem;
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* ============ PORTFOLIO ============ */
.portfolio-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: end;
  padding: 16px 0 8px;
}
.portfolio-block .lead {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 36ch;
}
.portfolio-block .descr {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 28px;
}
.portfolio-block .tag-row {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}
.portfolio-block .tag-row span { white-space: nowrap; }
.portfolio-block .tag-row span + span::before { content: '·'; margin-right: 14px; color: var(--rule); }
.portfolio-block .lock-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 14px;
}
.portfolio-block .lock-meta::before {
  content: '⌬';
  margin-right: 8px;
  font-style: normal;
  color: var(--accent);
}

/* ============ BIO ============ */

@keyframes ticker-cycle {
  0%   { opacity: 0; transform: translateY(8px); }
  3%   { opacity: 1; transform: translateY(0); }
  10%  { opacity: 1; transform: translateY(0); }
  13%  { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* Bio prose stands alone (no grid, no animated mark) */
.bio-prose {
  margin-bottom: 64px;
}
.bio-prose .bio-lead {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.5vw + 0.5rem, 1.75rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
  max-width: 36ch;
  margin: 0 0 24px;
  letter-spacing: -0.012em;
}
.bio-prose .bio-body {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.65;
  margin: 0;
  font-weight: 400;
}

/* Education + Past Industry as sub-sections within About */
.bio-subs {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 96px;
  align-items: stretch;
}
@media (min-width: 1081px) {
  .bio-sub {
    display: flex;
    flex-direction: column;
  }
  .bio-sub .edu-list,
  .bio-sub .past-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
  }
}
.bio-subs .sub-head {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.25vw + 0.5rem, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--accent);
  margin: 0 0 28px;
}
.bio-subs .bio-sub:nth-child(2) .sub-head { color: var(--teal); }

/* Education list — typographic, no logos, no separators */
.edu-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 32px;
}
.edu-list li {
  display: grid;
  gap: 4px;
}
.edu-list h4 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.25vw + 0.5rem, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.edu-list p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Past industry — company default, role appears on hover. One per line. */
/* Spacing + size matched to .edu-list so the two columns visually align. */
.past-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 32px;
}
.past-list li {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.25vw + 0.5rem, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  cursor: default;
  white-space: nowrap;
  transition: color 150ms ease;
}
.past-list li::after {
  content: attr(data-role);
  color: var(--accent-warm);
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  margin-left: 0.5em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.past-list li:hover { color: var(--accent); }
.past-list li:hover::after { opacity: 1; transform: translateX(0); }
@media (hover: none) {
  .past-list li::after { opacity: 1; transform: translateX(0); }
}
@media (max-width: 640px) {
  .past-list li { white-space: normal; }
}
.bio-prose .bio-lead {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
  max-width: 32ch;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}
.bio-prose p {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 64ch;
  line-height: 1.7;
  margin: 0 0 18px;
}
.bio-side .side-head {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}
/* Education monograms grid */
.bio-side .edu-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 4px;
}
.bio-side .edu-grid li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.bio-side .edu-grid li:last-child { border-bottom: none; }
.bio-side .edu-grid .mono {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  font-feature-settings: 'kern' 1;
}
.mono-uw  { background: var(--accent); }
.mono-c   { background: var(--indigo); }
.mono-h   { background: var(--crimson); }
.mono-usp { background: var(--accent-warm); color: #1a0f00; }
.bio-side .edu-grid li > div { display: flex; flex-direction: column; gap: 3px; }
.bio-side .edu-grid strong { font-size: 0.9375rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.bio-side .edu-grid span { font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }

/* Past industry — labeled list */
.bio-side .affiliation-list {
  list-style: none; padding: 0; margin: 0;
}
.bio-side .affiliation-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.875rem;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: baseline;
}
.bio-side .affiliation-list li:last-child { border-bottom: none; }
.bio-side .affiliation-list li strong {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.875rem;
}
.bio-side .affiliation-list li span {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* ============ PUBLICATIONS ============ */
.publications-list {
  list-style: none; padding: 0; margin: 0;
}
.publications-list > li {
  display: grid;
  grid-template-columns: 80px 1fr 90px;
  gap: 32px;
  padding: 28px 0;
  align-items: baseline;
  transition: padding-left 200ms ease;
}
.publications-list > li:first-child { padding-top: 0; }
.publications-list > li:hover { padding-left: 8px; }
.publications-list > li + li { margin-top: 0; }
.pub-year {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-warm);
  font-weight: 700;
  padding-top: 8px;
}
.pub-body { min-width: 0; }
.pub-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 8px;
}
.pub-title a { color: inherit; border: none; }
.pub-title a:hover { color: var(--accent); }
.pub-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.pub-abs {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 64ch;
  line-height: 1.55;
}
.pub-status {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  text-align: right;
  padding-top: 8px;
  white-space: nowrap;
}
.pub-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--accent);
  border: none;
  white-space: nowrap;
  padding-top: 8px;
  text-align: right;
  font-weight: 500;
}
.pub-link:hover { color: var(--accent-warm); }
.pub-foot {
  margin-top: 32px;
  font-size: 0.9375rem;
}
.pub-foot a {
  color: var(--accent);
  border: none;
  font-weight: 500;
}
.pub-foot a:hover { color: var(--accent-warm); }

/* ============ PORTFOLIO MINIMAL ============ */
.portfolio-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.portfolio-minimal .lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  max-width: 36ch;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ============ CONNECT (in-footer social row) ============ */
.connect-social {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.connect-social a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: var(--ink-soft);
  border: none;
  background: transparent;
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}
.connect-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.connect-social svg { width: 24px; height: 24px; }

/* ============ COLOPHON FOOTER (connect + bottom strip) ============ */
footer.colophon-only {
  padding: 80px 0 48px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.footer-connect {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
  margin: 0 0 56px;
}
.footer-connect .connect-lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
  max-width: 28ch;
}
.footer-connect-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* legacy footer styles preserved as no-ops to avoid breakage */
footer { padding: 0; background: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.footer-lead .footer-eyebrow {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  color: var(--accent-warm);
  margin: 0 0 20px;
  font-weight: 700;
}
.footer-lead .footer-headline {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0;
  max-width: 26ch;
  color: var(--ink);
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 20px;
  font-weight: 700;
  padding-bottom: 0;
  border-bottom: none;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li {
  font-size: 1.0625rem;
  padding: 6px 0;
  font-weight: 500;
}
.footer-col a {
  color: var(--ink);
  border: none;
  transition: color 120ms ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-social {
  margin-top: 72px;
  padding-top: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-social a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--ink-soft);
  border: none;
  background: transparent;
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}
.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-social svg { width: 22px; height: 22px; }

.colophon {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.colophon .domain { font-weight: 600; color: var(--ink-soft); }

/* ============ PORTFOLIO PAGE (case studies) ============ */
body.portfolio { background: var(--paper); }
.case-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.case-hero .back {
  font-size: 0.875rem;
  color: var(--muted);
  border: none;
}
.case-hero .back:hover { color: var(--accent); }
.case-hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 32px 0 16px;
  max-width: 22ch;
}
.case-hero p {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.cases { padding: 80px 0; }
.case {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
.case:last-child { border-bottom: 1px solid var(--rule); }
.case .meta-col {
  font-size: 0.875rem;
}
.case .meta-col .org {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.case .meta-col .role { color: var(--muted); margin: 0 0 12px; }
.case .meta-col .period {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.case .body-col h3 {
  font-size: 1.625rem;
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.case .body-col p {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 64ch;
}
.case .body-col ul {
  margin: 16px 0 0;
  padding-left: 0;
  list-style: none;
}
.case .body-col li {
  padding: 8px 0 8px 20px;
  position: relative;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 64ch;
}
.case .body-col li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.case .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 28px 0 0;
  padding: 24px;
  background: var(--paper-tint);
  border-left: 3px solid var(--accent);
}
.case .metrics .metric .num {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--ink);
  display: block;
  line-height: 1;
}
.case .metrics .metric .lbl {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}

/* ============ MEDIUM FEED + PODCAST ============ */
.feed-list { list-style: none; padding: 0; margin: 0; }
.feed-list li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
  transition: padding-left 200ms ease;
}
.feed-list li:hover { padding-left: 8px; }
.feed-list li:last-child { border-bottom: 1px solid var(--rule); }
.feed-list .date {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.feed-list .title-link {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
  border: none;
}
.feed-list .title-link:hover { color: var(--accent); }
.feed-list .venue {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
}
.feed-loading {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  padding: 24px 0;
}
.feed-fallback {
  margin-top: 16px;
  font-size: 0.875rem;
}

.podcast-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.podcast-card .lead {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0 0 24px;
  max-width: 30ch;
}
.podcast-card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 56ch;
}
.podcast-card .player {
  background: var(--paper-tint);
  border-left: 3px solid var(--accent);
  padding: 28px;
  font-size: 0.9375rem;
}
.podcast-card .player .ep {
  font-family: var(--serif);
  font-size: 1.125rem;
  margin: 0 0 8px;
}
.podcast-card .player .ep-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.podcast-card audio {
  width: 100%;
  margin-top: 8px;
}
.podcast-card .platforms {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 0.8125rem;
}
.podcast-card .platforms a { font-size: 0.8125rem; }
.podcast-card .ep .title-link {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--ink);
  border: none;
  line-height: 1.4;
}
.podcast-card .ep .title-link:hover { color: var(--accent); }
.podcast-card .ep-list {
  list-style: none; padding: 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.podcast-card .ep-list li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.podcast-card .ep-list li:last-child { border-bottom: none; }
.podcast-card .ep-list .title-link {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  border: none;
  line-height: 1.35;
}
.podcast-card .ep-list .title-link:hover { color: var(--accent); }
.podcast-card .ep-list .ep-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* ============ MOBILE ============ */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .bio-subs { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 880px) {
  .wrap { padding: 0 24px; }
  nav.top .inner { padding: 14px 24px; }
  nav.top .nav-primary { gap: 18px; font-size: 0.9375rem; }
  nav.top .name { display: none; }
  .logo-circle { width: 34px; height: 34px; }
  .logo-text { font-size: 44px; margin-top: 5px; }
  .hero { padding: 56px 0 72px; }
  .hero-lead, .hero-areas { font-size: clamp(1.5rem, 7vw + 0.25rem, 2.5rem); }
  .hero-meta { justify-self: start; max-width: 100%; }
  section { padding: 72px 0; }
  .section-head { gap: 10px; margin-bottom: 40px; }
  .section-head h2 { font-size: clamp(1.5rem, 6vw + 0.5rem, 2.25rem); }
  .section-head-with-ticker { flex-direction: column; align-items: flex-start; gap: 6px; }
  .head-ticker { font-size: clamp(1.5rem, 6vw + 0.5rem, 2.25rem); }
  .hero-meta .meta-title { font-size: 1.5rem; }
  .hero-meta .meta-org { font-size: 1.125rem; }
  .research-grid { grid-template-columns: 1fr; gap: 32px; }
  .bio-prose { margin-bottom: 56px; }
  .bio-subs { grid-template-columns: 1fr; gap: 48px; }
  .past-list li { font-size: clamp(1.125rem, 5vw, 1.5rem); }
  .publications-list > li { grid-template-columns: 60px 1fr; gap: 12px 16px; }
  .pub-status, .pub-link { grid-column: 2; text-align: left; padding-top: 4px; }
  .portfolio-minimal { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-connect { gap: 20px; margin-bottom: 40px; }
  .footer-connect-actions { gap: 24px; }
  .connect-social { gap: 20px; }
  .connect-social a { width: 28px; height: 28px; }
  .connect-social svg { width: 22px; height: 22px; }
  .writing-list li { grid-template-columns: 70px 1fr; gap: 16px; }
  .writing-list .venue { grid-column: 2; font-size: 0.8125rem; padding-top: 4px; }
  .colophon { flex-direction: column; gap: 8px; align-items: flex-start; }
  .feed-list li { grid-template-columns: 70px 1fr; gap: 16px; }
  .feed-list .venue { grid-column: 2; padding-top: 4px; }
  .podcast-card { grid-template-columns: 1fr; gap: 32px; }
  .theme-pair .theme-sep { font-size: 0.875rem; }
}

@media (max-width: 640px) {
  nav.top .nav-primary { display: none; }
  nav.top .nav-end { gap: 12px; }
  nav.top .name { display: none; }
}

/* ============ PRINT ============ */
@media print {
  nav.top, footer .colophon { display: none; }
  body { background: white; color: black; }
}
