:root {
  --bg: #f6f7f3;
  --paper: #ffffff;
  --paper-strong: #ffffff;
  --ink: #151515;
  --muted: #5f6661;
  --line: #d7ddd5;
  --soft: #e7eeec;
  --accent: #1e6c93;
  --accent-dark: #0d4356;
  --accent-2: #ad5a4b;
  --accent-3: #68755d;
  --shadow: 0 24px 60px rgba(15, 35, 43, 0.12);
  --radius: 8px;
  --grid-a: rgba(30, 108, 147, 0.08);
  --grid-b: rgba(30, 108, 147, 0.06);
}

body.theme-scholarly,
.theme-card.theme-scholarly {
  --bg: #f6f7f3;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #5f6661;
  --line: #d7ddd5;
  --soft: #e7eeec;
  --accent: #1e6c93;
  --accent-dark: #0d4356;
  --accent-2: #ad5a4b;
  --accent-3: #68755d;
}

body.theme-ledger,
.theme-card.theme-ledger {
  --bg: #f7f9f8;
  --paper: #ffffff;
  --ink: #101315;
  --muted: #596268;
  --line: #cfd8d5;
  --soft: #edf2f0;
  --accent: #0b566b;
  --accent-dark: #073845;
  --accent-2: #b36b3c;
  --accent-3: #2f705b;
  --radius: 2px;
  --grid-a: rgba(11, 86, 107, 0.12);
  --grid-b: rgba(179, 107, 60, 0.08);
}

body.theme-milan,
.theme-card.theme-milan {
  --bg: #f8f8f7;
  --paper: #ffffff;
  --ink: #101010;
  --muted: #666663;
  --line: #dfdfdc;
  --soft: #eeeeea;
  --accent: #111111;
  --accent-dark: #111111;
  --accent-2: #b7352d;
  --accent-3: #2b5c88;
  --radius: 0;
  --grid-a: rgba(17, 17, 17, 0.06);
  --grid-b: rgba(183, 53, 45, 0.05);
}

body.theme-warmth,
.theme-card.theme-warmth {
  --bg: #f1f4ef;
  --paper: #ffffff;
  --ink: #17201d;
  --muted: #647067;
  --line: #d2dbd2;
  --soft: #e4ece6;
  --accent: #176b6f;
  --accent-dark: #0e484b;
  --accent-2: #c95f58;
  --accent-3: #6f7e46;
  --grid-a: rgba(23, 107, 111, 0.08);
  --grid-b: rgba(201, 95, 88, 0.06);
}

body.theme-dark,
.theme-card.theme-dark {
  --bg: #151a1d;
  --paper: #20282b;
  --paper-strong: #263034;
  --ink: #f3f7f8;
  --muted: #b8c3c7;
  --line: #3a484d;
  --soft: #1b2326;
  --accent: #4bb7cf;
  --accent-dark: #80d9ed;
  --accent-2: #d7856c;
  --accent-3: #9cb56f;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  --grid-a: rgba(75, 183, 207, 0.08);
  --grid-b: rgba(215, 133, 108, 0.05);
}

body.theme-signal,
.theme-card.theme-signal {
  --bg: #f2f5f8;
  --paper: #ffffff;
  --ink: #0d1117;
  --muted: #5b6573;
  --line: #d7dfe8;
  --soft: #e8eef6;
  --accent: #2e55ff;
  --accent-dark: #1735b5;
  --accent-2: #c0345a;
  --accent-3: #6f802e;
  --radius: 6px;
  --grid-a: rgba(46, 85, 255, 0.08);
  --grid-b: rgba(192, 52, 90, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--grid-a) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-b) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.theme-ledger {
  background:
    repeating-linear-gradient(0deg, transparent 0 35px, var(--grid-a) 35px 36px),
    linear-gradient(90deg, var(--grid-b) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 96px 96px, auto;
}

body.theme-dark {
  color-scheme: dark;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-2);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 15%);
  background: color-mix(in srgb, var(--bg), transparent 12%);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.nav,
.theme-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 24px);
  font-size: 0.86rem;
}

.nav a,
.theme-links a,
.gallery-link {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.nav a:hover,
.theme-links a:hover,
.gallery-link:hover,
.theme-links a[aria-current="page"] {
  color: var(--accent-dark);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.theme-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
}

.gallery-link {
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  min-height: calc(100vh - 112px);
  padding: clamp(44px, 7vw, 92px) 0 64px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.06;
}

h1 {
  max-width: 820px;
  font-size: clamp(3.1rem, 8.4vw, 7.4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
  font-size: 1.55rem;
}

h4 {
  font-size: 1.2rem;
}

.lead,
.theme-tagline {
  max-width: 670px;
  color: color-mix(in srgb, var(--ink), var(--muted) 45%);
}

.lead {
  margin: 26px 0 0;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
}

.theme-tagline {
  margin: 12px 0 0;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--accent-dark);
  color: var(--paper);
}

.theme-dark .button.primary {
  color: #11191b;
}

.button.secondary {
  background: transparent;
  color: var(--accent-dark);
}

.profile-card {
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(340px, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.portrait-wrap {
  position: relative;
  min-height: 340px;
  background:
    radial-gradient(circle at 16% 14%, color-mix(in srgb, var(--accent-2), transparent 60%), transparent 28%),
    linear-gradient(140deg, color-mix(in srgb, var(--accent-dark), #000 45%), var(--accent) 52%, var(--accent-3));
}

.portrait-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 340px;
  color: rgba(255, 255, 255, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 700;
}

.quick-facts {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 26px;
}

.quick-facts div {
  display: grid;
  gap: 3px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.quick-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
}

.section {
  scroll-margin-top: 96px;
  padding: clamp(58px, 8vw, 104px) 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 10%);
}

.split,
.contact {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
}

.contact {
  align-items: center;
}

#about {
  min-height: min(760px, calc(100vh - 96px));
  align-items: center;
}

#contact.section {
  display: block;
  padding: clamp(42px, 5vw, 62px) 0;
}

#contact h2 {
  margin-top: 8px;
  font-size: clamp(2.25rem, 3.4vw, 3.5rem);
}

.prose {
  max-width: 760px;
  color: color-mix(in srgb, var(--ink), var(--muted) 20%);
  font-size: 1.03rem;
}

.prose p:first-child {
  margin-top: 0;
}

.bio-groups {
  display: grid;
  gap: 22px;
}

.bio-group h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.2;
}

.bio-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.bio-group li::marker {
  color: var(--accent-2);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.subsection-heading {
  margin-top: clamp(44px, 7vw, 78px);
}

.section-heading p:not(.section-kicker) {
  margin: 14px 0 0;
  color: var(--muted);
}

.working-papers-section {
  scroll-margin-top: 88px;
  padding-top: clamp(32px, 4.2vw, 52px);
}

.working-papers-section .section-heading {
  margin-bottom: 22px;
}

.working-papers-section .section-heading h2 {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
}

.working-papers-section .section-heading p:not(.section-kicker) {
  max-width: 660px;
  margin-top: 10px;
}

.cv-frame {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line), transparent 5%);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--ink), #000 18%);
  box-shadow: var(--shadow);
}

.cv-frame object {
  display: block;
  width: 100%;
  min-height: 78vh;
}

.research {
  display: grid;
  gap: 32px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.research-group,
.theme-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper), transparent 9%);
}

.research-group.featured {
  border-color: color-mix(in srgb, var(--accent), transparent 72%);
  background: linear-gradient(135deg, var(--paper), var(--soft));
}

.theme-dark .research-group.featured {
  background: linear-gradient(135deg, var(--paper), #152226);
}

.research-group.wide {
  grid-column: 1 / -1;
}

.publication {
  margin-top: 18px;
}

.publication p,
.paper-list {
  color: color-mix(in srgb, var(--ink), var(--muted) 18%);
}

.publication .journal-metric {
  margin: 8px 0 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.publication .journal-metric strong {
  color: var(--ink);
}

.mentions {
  color: var(--muted);
}

.paper-list {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
  padding-left: 20px;
}

.paper-list li::marker {
  color: var(--accent-2);
}

.email-link {
  display: inline-block;
  max-width: 100%;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
  font-weight: 850;
  line-height: 1.35;
  text-decoration-thickness: 0.08em;
  overflow-wrap: anywhere;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 52px;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  color: var(--muted);
  font-size: 0.9rem;
}

.theme-ledger h1,
.theme-ledger h2,
.theme-ledger h3 {
  font-family: Georgia, "Times New Roman", serif;
}

.theme-ledger .research-group {
  border-left-width: 6px;
  border-left-color: var(--accent);
}

.theme-milan .hero {
  grid-template-columns: 1fr 0.78fr;
}

.theme-milan h1 {
  font-weight: 500;
}

.theme-milan .profile-card,
.theme-milan .research-group {
  box-shadow: none;
}

.theme-warmth .portrait-wrap {
  background:
    radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--accent-2), transparent 48%), transparent 28%),
    linear-gradient(145deg, #103e42, var(--accent), var(--accent-3));
}

.theme-dark .site-header,
.theme-dark .profile-card,
.theme-dark .research-group,
.theme-dark .theme-card {
  background: color-mix(in srgb, var(--paper), #000 4%);
}

.theme-signal h1 {
  font-family: Georgia, "Times New Roman", serif;
}

.theme-signal .profile-card {
  border-top: 8px solid var(--accent);
}

.gallery-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.gallery-hero {
  padding: clamp(58px, 9vw, 112px) 0 36px;
}

.gallery-hero h1 {
  max-width: 920px;
}

.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 80px;
}

.theme-card {
  min-height: 310px;
  display: grid;
  align-content: start;
  gap: 16px;
  color: var(--ink);
}

.theme-card .button {
  justify-self: start;
  margin-top: 14px;
}

.theme-number {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

@media (max-width: 940px) {
  .theme-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .site-header,
  .theme-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero,
  .theme-milan .hero,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .profile-card {
    max-width: 520px;
  }

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

@media (max-width: 560px) {
  main,
  .site-footer,
  .gallery-main {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    padding: 16px 14px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .profile-card {
    grid-template-rows: 280px auto;
  }

  .portrait-wrap,
  .portrait-fallback {
    min-height: 280px;
  }

  .cv-frame object {
    min-height: 560px;
  }
}

/* Current homepage */
.hero {
  grid-template-columns: minmax(280px, 0.66fr) minmax(0, 0.94fr);
  gap: clamp(24px, 4.6vw, 62px);
  min-height: min(660px, calc(100vh - 116px));
  padding: clamp(24px, 3.4vw, 42px) 0 clamp(38px, 4.8vw, 56px);
}

.hero-copy {
  order: 2;
  padding-left: clamp(68px, 5.3vw, 112px);
}

.hero h1 {
  max-width: 600px;
  font-size: clamp(2.35rem, 5.05vw, 4.55rem);
  line-height: 1.04;
}

.hero .lead {
  max-width: 560px;
  margin-top: 18px;
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
}

.hero-detail {
  max-width: 560px;
  margin: 14px 0 0;
  color: color-mix(in srgb, var(--ink), var(--muted) 28%);
  font-size: 0.9rem;
}

.hero .hero-actions {
  margin-top: 28px;
}

.hero .button {
  min-height: 42px;
  padding: 0 17px;
  font-size: 0.84rem;
}

.profile-card {
  order: 1;
  align-self: center;
  grid-template-rows: clamp(400px, 48vh, 540px) auto;
}

.portrait-wrap {
  height: clamp(400px, 48vh, 540px);
  min-height: 0;
  overflow: hidden;
}

.portrait-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset 0 -80px 90px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 56% 13%;
  transform: translateX(-4%) scale(1.1);
  transform-origin: 60% 13%;
}

.button.compact {
  min-height: 40px;
  padding: 0 15px;
  white-space: nowrap;
}

.paper-stack {
  display: grid;
  gap: 26px;
}

.working-papers-section .paper-stack {
  gap: 14px;
}

.paper-card {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid color-mix(in srgb, var(--line), transparent 8%);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper), transparent 6%);
  box-shadow: var(--shadow);
}

details.paper-card {
  padding: 0;
  overflow: hidden;
}

.paper-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(20px, 2.8vw, 30px) clamp(22px, 3vw, 36px);
  list-style: none;
  cursor: pointer;
}

.working-papers-section .paper-card-summary {
  padding-block: clamp(16px, 2.1vw, 22px);
}

.paper-card-summary::-webkit-details-marker {
  display: none;
}

.paper-card-summary h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.65vw, 1.42rem);
  line-height: 1.25;
}

.paper-card-summary-text {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.collapsed-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.paper-card-summary .paper-label {
  margin: 0;
}

.paper-card-summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 35%);
  outline-offset: -6px;
}

.expand-control {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent-dark), transparent 28%);
  border-radius: var(--radius);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.expand-control::before {
  content: "Expand";
}

.expand-control::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
}

.paper-card[open] .paper-card-summary {
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 8%);
}

.paper-card[open] .expand-control::before {
  content: "Collapse";
}

.paper-card[open] .expand-control::after {
  content: "-";
}

.paper-expanded {
  padding: clamp(20px, 2.8vw, 30px) clamp(22px, 3vw, 36px) clamp(22px, 3vw, 36px);
}

.paper-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.paper-label {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.paper-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.paper-card-header .paper-meta:first-child {
  margin-top: 0;
}

.paper-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(340px, 0.86fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
}

.paper-summary {
  color: color-mix(in srgb, var(--ink), var(--muted) 18%);
  font-size: 1rem;
}

.paper-summary p:first-child {
  margin-top: 0;
}

.paper-summary p:last-child {
  margin-bottom: 0;
}

.paper-visual {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 4%);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--soft), transparent 18%), var(--paper));
}

.paper-visual svg,
.paper-plot {
  display: block;
  width: 100%;
  height: auto;
}

.paper-plot {
  aspect-ratio: 1.72;
  object-fit: contain;
}

.paper-visual figcaption {
  margin: 0;
  color: color-mix(in srgb, var(--muted), var(--ink) 12%);
  font-size: 0.88rem;
  line-height: 1.45;
}

.visual-panel {
  fill: color-mix(in srgb, var(--paper), var(--soft) 45%);
  stroke: color-mix(in srgb, var(--accent-dark), transparent 72%);
  stroke-width: 1.4;
}

.visual-panel.strong,
.visual-node {
  fill: color-mix(in srgb, var(--accent), transparent 82%);
  stroke: color-mix(in srgb, var(--accent-dark), transparent 45%);
  stroke-width: 1.5;
}

.visual-node.muted,
.visual-bar.muted {
  fill: color-mix(in srgb, var(--accent-3), transparent 72%);
  stroke: color-mix(in srgb, var(--accent-3), transparent 42%);
}

.visual-node.mini {
  stroke-width: 1.2;
}

.visual-label,
.visual-small,
.visual-tiny,
.visual-number {
  fill: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.visual-label {
  font-size: 15px;
  font-weight: 850;
}

.visual-small {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.visual-tiny {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.visual-number {
  fill: var(--accent-2);
  font-size: 28px;
  font-weight: 850;
}

.visual-number.small {
  font-size: 18px;
}

.visual-connector,
.visual-axis,
.visual-down,
.visual-trend {
  fill: none;
  stroke: color-mix(in srgb, var(--accent-dark), transparent 22%);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.visual-connector.thin {
  stroke-width: 1.8;
}

.visual-axis {
  stroke: color-mix(in srgb, var(--line), var(--ink) 16%);
  stroke-width: 1.5;
}

.visual-down {
  stroke: var(--accent-2);
  stroke-width: 4;
}

.visual-trend {
  stroke: var(--accent-2);
  stroke-width: 4;
}

.visual-arrow-fill,
.visual-bar {
  fill: var(--accent-dark);
}

.visual-bar.one {
  fill: var(--accent);
}

.visual-bar.two {
  fill: var(--accent-2);
}

.visual-bar.three {
  fill: var(--accent-3);
}

.visual-bar.four {
  fill: color-mix(in srgb, var(--accent-dark), var(--accent-2) 24%);
}

.cv-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.cv-highlights div {
  padding: 16px;
  border-top: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--paper), transparent 8%);
  color: color-mix(in srgb, var(--ink), var(--muted) 16%);
}

.cv-highlights strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

@media (max-width: 880px) {
  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-copy {
    order: 2;
  }

  .profile-card {
    order: 1;
    grid-template-rows: 340px auto;
  }

  .profile-photo {
    min-height: 340px;
  }

  .portrait-wrap {
    height: 340px;
    min-height: 340px;
  }

  .paper-layout,
  .cv-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
    padding-left: 0;
  }

  .profile-card {
    order: 2;
  }
}

@media (max-width: 560px) {
  .profile-card {
    grid-template-rows: 280px auto;
  }

  .section {
    scroll-margin-top: 132px;
  }

  .portrait-wrap {
    height: 280px;
    min-height: 280px;
  }

  .profile-photo {
    min-height: 280px;
  }

  .paper-card-header {
    display: grid;
  }

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

  .expand-control {
    width: fit-content;
  }

  .paper-visual {
    padding: 12px;
  }
}
