/* ==========================================================================
   Pawan Thiruverkadu — personal site
   Soft, matte green. Flat fills, no gloss, no shadows.
   ========================================================================== */

:root {
  --bg: #e8efe5;           /* soft sage page */
  --surface: #dbe6d6;      /* matte panel */
  --panel: #c5d8bf;        /* deeper matte green block */
  --line: #bccbb6;         /* hairlines */
  --accent: #3d6849;       /* soft green accent */
  --ink: #213629;          /* deep green text */
  --ink-soft: #405848;     /* secondary text */
  --hover: #d2dfcc;        /* hovered surface */
  --line-strong: #a9bfa2;  /* hairlines on the deeper panel */
  --mark: #7fa58a;         /* decorative rules and bullets (never interactive) */
  --on-accent: #ffffff;    /* text on accent buttons */
  --paper-hover: #f1f5ef;
  --header-bg: rgb(232 239 229 / 0.78);
  --logo-plate: transparent;

  --page: 1120px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 1.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light dark;
}

/* Dark appearance follows the system setting; same greens, lights lowered. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141c17;
    --surface: #1b261f;
    --panel: #243328;
    --line: #2e3d33;
    --accent: #8cc29c;
    --ink: #e4ede1;
    --ink-soft: #a8bcab;
    --hover: #212e25;
    --line-strong: #3a4d40;
    --mark: #5f8a6c;
    --on-accent: #10180f;
    --paper-hover: #202c24;
    --header-bg: rgb(20 28 23 / 0.78);
    --logo-plate: #eef3ec;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--panel) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.5rem;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.625rem max(var(--gutter), calc((100% - var(--page)) / 2));
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9375rem;
}

.nav__link {
  min-height: 2.75rem;
  padding: 0 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.nav__link:hover { background: var(--surface); color: var(--ink); }
.nav__link[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.soon {
  padding: 0.125rem 0.5rem;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.hero__name {
  font-size: clamp(3rem, 8vw, 5.75rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__role {
  margin-top: 1.25rem;
  color: var(--ink);
  font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__org {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.8em;
  font-weight: 600;
}

.hero__lead {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  max-width: 34ch;
  font-size: clamp(1.25rem, 2.1vw, 1.5rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.hero__body {
  margin-top: 1.25rem;
  max-width: 60ch;
  color: var(--ink-soft);
}

.facts {
  margin-top: 2.25rem;
  max-width: 60ch;
  border-top: 1px solid var(--line);
}
.facts__row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}
.facts dd {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Photo sits on a matte green block, offset so the block shows */
.hero__photo {
  position: relative;
  margin: 0;
  padding: 0 0 clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 2.5vw, 1.75rem);
}
.hero__photo::before {
  content: "";
  position: absolute;
  inset: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 2.5vw, 1.75rem) 0 0;
  background: var(--panel);
  border-radius: var(--radius);
}
.hero__photo img,
.hero__initials {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.hero__photo img[hidden] { display: none; }
.hero__initials {
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
}
.hero__initials[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Background path
   -------------------------------------------------------------------------- */

.path {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: clamp(4.5rem, 10vw, 7.5rem) auto 0;
  padding: 0 var(--gutter);
}

.path__title {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.path__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.path__item {
  padding: 1.75rem 1.25rem 2rem;
  transition: background-color 250ms var(--ease-out);
}
.path__item + .path__item { border-left: 1px solid var(--line); }
.path__item:hover { background: var(--hover); }

/* A short accent rule marks each step; today's runs full width */
.path__item::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 3px;
  margin-bottom: 1.25rem;
  background: var(--mark);
  border-radius: 2px;
}
.path__item--now::before { background: var(--accent); }
.path__item--now,
.path__item--now:hover { background: var(--panel); }
.path__item--now::before { width: 100%; transform-origin: left center; }

.path__when {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.path__what {
  margin-top: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.path__detail {
  margin-top: 0.375rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Inner pages
   -------------------------------------------------------------------------- */

.page-head {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 0;
}
.page-head__title {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.page-head__lead {
  margin-top: 1.25rem;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.5;
}

/* Three strengths under the page intro */
.strengths {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 1100px) {
  .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.strength {
  position: relative;
  padding-top: calc(1.125rem + 3px);
}
.strength::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--mark);
  border-radius: 2px;
  transform-origin: left center;
}
.strength__title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.strength p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.96875rem;
  line-height: 1.6;
}
.page-head__note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
}
.page-head__note + .jump { margin-top: 0.875rem; }

/* Jump list: one pill per role */
.jump { margin-top: 2rem; }
.jump__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.jump__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms var(--ease-out);
}
.jump__list a span {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.8125rem;
}
.jump__list a:hover { background: var(--panel); }

html { scroll-behavior: smooth; }
.role { scroll-margin-top: 5.5rem; }
.role:target { box-shadow: inset 0 0 0 2px var(--accent); }

/* Roles: dates on the left, the work on the right */
.roles {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: clamp(3rem, 7vw, 4.5rem) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  gap: 1rem;
}

.role {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--surface);
  border-radius: var(--radius);
}
.role--current { background: var(--panel); }

.role__dates {
  font-weight: 700;
  font-size: 1rem;
}
.role__tag {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}

.role__title {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.role__org {
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
}
.role__formerly {
  display: block;
  margin-top: 0.125rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}
.role__about {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--ink-soft);
}
.role__pending {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.role__logo {
  display: block;
  width: auto;
  height: 1.5rem;
  margin-bottom: 1.25rem;
  box-sizing: content-box;
  background: var(--logo-plate);
  border-radius: 0.5rem;
}
@media (prefers-color-scheme: dark) {
  .role__logo { padding: 0.5rem 0.75rem; }
}
.role__logo--wordmark { height: 1rem; margin-top: 0.25rem; }
.role__logo--orion { height: 1.75rem; }
.role__logo--uh { height: 2.25rem; }
.role__logo--mc { height: 2.5rem; }
.role__logo--rice { height: 2.5rem; }
.role__logo--tamu { height: 2.25rem; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms var(--ease-out);
}
.button:hover { background: var(--ink); color: var(--bg); }
.button--quiet { background: var(--surface); color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button-row .button { margin-top: 0; }
.role__project .button--quiet { background: var(--bg); }
.button--quiet:hover { background: var(--panel); color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.hero__actions .button { min-height: 2.75rem; padding: 0 1.25rem; }

.inline-link {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1.5px;
}
.inline-link:hover { color: var(--ink); }

/* Tools and skills used in a role */
.role__stack {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.role__stack li {
  padding: 0.3rem 0.75rem;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 999px;
}

/* A linked publication */
.paper {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  border-radius: 1rem;
  transition: background-color 200ms var(--ease-out);
}
.paper:hover { background: var(--paper-hover); }
.paper__meta {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}
.paper__title {
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.paper__authors { color: var(--ink-soft); font-size: 0.9375rem; }
.paper__cta {
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9375rem;
}
.paper:hover .paper__cta { text-decoration: underline; text-underline-offset: 0.3em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Longer roles break into titled blocks */
.role__blocks {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
}
.role__block { border-top: 1px solid var(--line); padding-top: 1rem; }
.role--current .role__block { border-top-color: var(--line-strong); }
/* An odd last block spans the full width instead of leaving a hole */
.role__block:last-child:nth-child(odd) { grid-column: 1 / -1; }
.role__block--wide { grid-column: 1 / -1; }
/* With a wide lead block, the rest pair up evenly again */
.role__block--wide ~ .role__block:last-child:nth-child(odd) { grid-column: auto; }
.role__block--wide p { max-width: 72ch; }
/* A standout project inside a role */
.role__project {
  margin-top: 2rem;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--panel);
  border-radius: 1rem;
}
.role__project-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.role__project-about {
  margin-top: 0.5rem;
  max-width: 62ch;
  color: var(--ink-soft);
}
.role__project .role__points { margin-top: 1rem; }
.role__project + .role__project { margin-top: 1rem; }
.role__project .button { margin-top: 1.25rem; }
.role__stack + .role__project { margin-top: 1.75rem; }
.role__points strong { font-weight: 700; }
.role__points--compact {
  margin-top: 0.5rem;
  gap: 0.375rem;
  color: var(--ink-soft);
  font-size: 0.96875rem;
  line-height: 1.55;
}
.role__points--compact strong { color: var(--ink); }

.role__block .role__subhead { margin-top: 0; }
.role__block p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.96875rem;
  line-height: 1.6;
}

.role__subhead {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.005em;
}
.role__points {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.625rem;
  max-width: 62ch;
}
.role__points li {
  position: relative;
  padding-left: 1.5rem;
}
.role__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.75rem;
  height: 3px;
  background: var(--mark);
  border-radius: 2px;
}

/* A titled section below the main list */
.section {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: clamp(3.5rem, 8vw, 5.5rem) auto 0;
  padding: 0 var(--gutter);
}
.section__title {
  margin-bottom: 1.5rem;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.research-list { display: grid; gap: 1rem; }
.section .role, .section { scroll-margin-top: 5.5rem; }
.section:target .role { box-shadow: inset 0 0 0 2px var(--accent); }

/* --------------------------------------------------------------------------
   Writing
   -------------------------------------------------------------------------- */

.section--first { margin-top: clamp(2.5rem, 6vw, 3.5rem); }

.posts { display: grid; gap: 1rem; }
.post-card {
  display: grid;
  gap: 0.375rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 200ms var(--ease-out);
}
.post-card:hover { background: var(--hover); }
.post-card__date { color: var(--ink-soft); font-size: 0.875rem; font-weight: 700; }
.post-card__title {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 34ch;
}
.post-card__summary { max-width: 64ch; color: var(--ink-soft); }
.post-card__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.post-card__tags li {
  padding: 0.25rem 0.75rem;
  background: var(--bg);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 999px;
}
.post-card__cta { margin-top: 0.5rem; color: var(--accent); font-weight: 700; }
.post-card:hover .post-card__cta { text-decoration: underline; text-underline-offset: 0.3em; }

.posts-empty {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.posts-empty__title { color: var(--ink); font-size: 1.25rem; font-weight: 800; margin-bottom: 0.375rem; }

/* A single post: one readable column */
.post {
  max-width: calc(46rem + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) 0;
}
.post__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.post__back:hover { color: var(--ink); }
.post__meta { margin-top: 1rem; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 600; }
.post__title {
  margin-top: 0.5rem;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.post__dek {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: clamp(1.1875rem, 2vw, 1.375rem);
  line-height: 1.5;
}
.post__more { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* Long-form reading type */
.prose {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2.25rem);
  border-top: 1px solid var(--line);
  font-size: 1.125rem;
  line-height: 1.75;
}
.prose > * + * { margin-top: 1.25rem; }
.prose h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.prose h3 { margin-top: 2.25rem; font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: 0.75rem; }
.prose a { color: var(--accent); font-weight: 600; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.375rem; }
.prose li::marker { color: var(--ink-soft); }
.prose blockquote {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: 1rem;
  font-size: 1.1875rem;
  font-weight: 500;
}
.prose blockquote > * + * { margin-top: 0.75rem; }
.prose code {
  padding: 0.125rem 0.375rem;
  background: var(--surface);
  border-radius: 0.375rem;
  font-size: 0.9em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.prose pre {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: 0.75rem;
  overflow-x: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.prose pre code { padding: 0; background: none; }
.prose img { width: 100%; height: auto; border-radius: 0.75rem; background: #fff; }
/* An italic line right after an image becomes its caption */
.prose p:has(> img) { margin-top: 2rem; }
.prose p > img + em {
  display: block;
  margin-top: 0.625rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.5;
}
.prose p:has(> img) + * { margin-top: 2rem; }
.prose > p:first-child > em:only-child {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.6;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-weight: 800; border-bottom-color: var(--line-strong); }
.prose th[align="right"], .prose td[align="right"],
.prose th[style*="right"], .prose td[style*="right"] { text-align: right; }
.prose .math--display { display: block; overflow-x: auto; padding: 0.5rem 0; }
.prose .pdf-embed {
  display: block;
  width: 100%;
  height: min(85vh, 60rem);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}
.prose .pdf-embed p { padding: 1.25rem; }
.prose p > .button { margin-top: 0; }
.prose .button { color: var(--on-accent); text-decoration: none; }
.prose .button:hover { color: var(--bg); }
.prose .footnotes { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-soft); }
.prose .footnotes h2 { font-size: 1rem; margin-top: 0; }
.prose sup a { text-decoration: none; font-weight: 700; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: clamp(4rem, 9vw, 6rem) auto 0;
  padding: 0 var(--gutter) 2.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-inline: -0.75rem; }
.footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}
.footer__nav a:hover { background: var(--surface); color: var(--ink); }
.footer__email {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.footer__email:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .path__list { grid-template-columns: minmax(0, 1fr); }
  .path__item + .path__item { border-left: 0; border-top: 1px solid var(--line); }
  .path__item { padding: 1.5rem 1.5rem 1.625rem; }
  .path__item--now::before { width: 1.5rem; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__photo { grid-row: 1; max-width: 15rem; }
  .facts__row { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .role__blocks { grid-template-columns: minmax(0, 1fr); }
  .strengths { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .prose .math--display .katex { font-size: 0.82em; }
  .wordmark__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav__link { padding: 0 0.625rem; font-size: 0.875rem; }
  .nav { gap: 0; }
}

/* --------------------------------------------------------------------------
   Motion
   Everything is visible by default. Hidden starting states apply only when
   the inline script has added .js, so a failed script never hides content.
   -------------------------------------------------------------------------- */

/* 1. First impression: the hero and page titles rise into place on load */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes line-up {
  from { transform: translateY(105%); }
  to   { transform: none; }
}
@keyframes photo-in {
  from { clip-path: inset(100% 0 0 0 round var(--radius)); transform: scale(1.06); }
  to   { clip-path: inset(0 0 0 0 round var(--radius)); transform: none; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translate(-12px, 12px); }
  to   { opacity: 1; transform: none; }
}

.line { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; animation: line-up 900ms var(--ease-out) both; }
.line + .line > span { animation-delay: 80ms; }

.hero__role    { animation: rise 700ms var(--ease-out) 240ms both; }
.hero__lead    { animation: rise 700ms var(--ease-out) 320ms both; }
.hero__body    { animation: rise 700ms var(--ease-out) 400ms both; }
.hero .facts   { animation: rise 700ms var(--ease-out) 480ms both; }
.hero__actions { animation: rise 700ms var(--ease-out) 560ms both; }
.hero__photo::before { animation: panel-in 900ms var(--ease-out) 200ms both; }
.hero__photo img     { animation: photo-in 1100ms var(--ease-in-out) 120ms both; }

.page-head__lead { animation: rise 700ms var(--ease-out) 200ms both; }

/* 2. Scroll reveals, fired once as each block arrives */
.js [data-reveal],
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out),
    background-color 250ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-visible,
.js [data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}
/* Once revealed, hover responds immediately */
.js [data-stagger].is-done > * { transition-delay: 0ms; }

/* Accent rules draw themselves in after their block lands */
.js .strengths:not(.is-visible) .strength::before,
.js .path__list:not(.is-visible) .path__item--now::before { transform: scaleX(0); }
.strength::before,
.path__item--now::before {
  transition: transform 900ms var(--ease-in-out);
  transition-delay: calc(var(--i, 0) * 70ms + 250ms);
}

/* 3. Depth: scroll-linked drift on the portrait, and a reading-progress line */
@supports (animation-timeline: view()) {
  @keyframes drift-slow { from { translate: 0 -18px; } to { translate: 0 18px; } }
  @keyframes drift-fast { from { translate: 0 22px; } to { translate: 0 -22px; } }
  @keyframes progress   { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  .hero__photo img {
    animation: photo-in 1100ms var(--ease-in-out) 120ms both, drift-slow linear both;
    animation-timeline: auto, view();
    animation-range: normal, cover;
  }
  .hero__photo::before {
    animation: panel-in 900ms var(--ease-out) 200ms both, drift-fast linear both;
    animation-timeline: auto, view();
    animation-range: normal, cover;
  }

  .site-header::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 2px;
    background: var(--mark);
    transform-origin: left center;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}

/* 4. Press feedback on everything you can click */
.button, .jump__list a, .nav__link, .footer__nav a {
  transition-property: background-color, color, transform;
  transition-duration: 200ms, 200ms, 160ms;
  transition-timing-function: var(--ease-out);
}
.button:active, .jump__list a:active, .nav__link:active, .footer__nav a:active { transform: scale(0.97); }

/* Reduced motion: keep gentle fades, drop movement, parallax, and progress */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes rise     { from { opacity: 0; } to { opacity: 1; } }
  @keyframes line-up  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes photo-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }
  .hero__photo img, .hero__photo::before { animation-timeline: auto; }
  .hero__photo img { animation: photo-in 400ms ease both; }
  .hero__photo::before { animation: panel-in 400ms ease both; }
  .site-header::after { display: none; }
  .js [data-reveal], .js [data-stagger] > * {
    transform: none;
    transition: opacity 400ms ease, background-color 250ms ease;
    transition-delay: 0ms;
  }
  .strength::before, .path__item--now::before { transition: none; }
  .js .strengths:not(.is-visible) .strength::before,
  .js .path__list:not(.is-visible) .path__item--now::before { transform: none; }
  .button:active, .jump__list a:active, .nav__link:active, .footer__nav a:active { transform: none; }
}
