:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --paper: #ffffff;
  --ink: #1f2629;
  --muted: #657278;
  --line: #d8e0dd;
  --accent: #0f6b61;
  --accent-strong: #063f3a;
  --accent-warm: #9a4f2f;
  --soft: #edf5f2;
  --soft-warm: #fbf2ec;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

a {
  color: var(--accent-strong);
  text-decoration-color: rgba(15, 107, 97, 0.36);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

.page {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 32px 0 52px;
}

.cv-shell {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(31, 38, 41, 0.08);
}

.cv-header {
  display: grid;
  gap: 22px;
  padding: 42px 48px 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(112deg, rgba(15, 107, 97, 0.1), rgba(154, 79, 47, 0.06) 44%, rgba(255, 255, 255, 0) 78%),
    var(--paper);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 318px);
  gap: 42px;
  align-items: center;
}

.intro-copy {
  min-width: 0;
}

.portrait {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 38, 41, 0.12);
  border-radius: 8px;
  background: #e9efed;
  box-shadow: 0 22px 54px rgba(31, 38, 41, 0.14);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.role-line {
  max-width: 720px;
  margin: 14px 0 0;
  color: #263236;
  font-size: 1rem;
  font-weight: 760;
}

.hero-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  list-style: none;
  text-transform: uppercase;
}

.hero-themes li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--accent-warm);
  font-weight: 760;
}

.headline {
  max-width: 620px;
  margin: 18px 0 0;
  color: #4d5a60;
  font-size: 1.24rem;
  line-height: 1.42;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.action-button {
  appearance: none;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.action-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.action-button:hover {
  border-color: var(--accent-strong);
}

.action-button:focus-visible {
  outline: 3px solid rgba(15, 107, 97, 0.2);
  outline-offset: 2px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 10px;
  max-width: 720px;
  margin-top: 20px;
}

.metric {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.metric-value,
.metric-label,
.metric-note {
  display: block;
}

.metric-value {
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.metric-label {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 780;
}

.metric-note {
  color: var(--muted);
  font-size: 0.74rem;
}

.contact-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 820px;
  padding: 15px 0 0;
  border-top: 1px solid rgba(31, 38, 41, 0.12);
  background: transparent;
}

.contact-list div {
  min-width: 0;
}

.contact-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #334044;
  font-size: 0.9rem;
}

.content {
  padding: 0 48px 44px;
}

.tabs {
  display: grid;
  gap: 30px;
}

.tab-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.tab-list {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 -48px;
  padding: 14px 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.tab-label {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #47545a;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 780;
  cursor: pointer;
  user-select: none;
}

.tab-label:hover {
  border-color: rgba(15, 107, 97, 0.45);
  color: var(--accent-strong);
}

.tab-panels {
  min-width: 0;
}

.tab-panel {
  display: none;
}

#tab-overview:checked ~ .tab-list label[for="tab-overview"],
#tab-positions:checked ~ .tab-list label[for="tab-positions"],
#tab-publications:checked ~ .tab-list label[for="tab-publications"],
#tab-profile-kit:checked ~ .tab-list label[for="tab-profile-kit"],
#tab-funding:checked ~ .tab-list label[for="tab-funding"],
#tab-service:checked ~ .tab-list label[for="tab-service"] {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-strong);
}

#tab-overview:checked ~ .tab-panels #panel-overview,
#tab-positions:checked ~ .tab-panels #panel-positions,
#tab-publications:checked ~ .tab-panels #panel-publications,
#tab-profile-kit:checked ~ .tab-panels #panel-profile-kit,
#tab-funding:checked ~ .tab-panels #panel-funding,
#tab-service:checked ~ .tab-panels #panel-service {
  display: block;
}

.section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding-top: 2px;
}

.section + .section {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 32px;
}

h2 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-body {
  min-width: 0;
}

.section-body > p:first-child {
  margin-top: 0;
}

.full-publication .publication-citation {
  margin: 6px 0 0;
  color: #4d5a60;
  font-size: 0.94rem;
  line-height: 1.55;
}

.section-body > p:last-child {
  margin-bottom: 0;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.entry-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}

.entry {
  min-width: 0;
}

.entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
}

.entry-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 780;
}

.entry-subtitle,
.entry-meta,
.pub-meta {
  color: var(--muted);
}

.entry-subtitle {
  margin-top: 2px;
}

.entry-meta {
  white-space: nowrap;
}

.entry-description {
  margin: 8px 0 0;
}

.highlights {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.highlights li + li {
  margin-top: 5px;
}

.publication-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 780;
}

.authors {
  margin: 3px 0 0;
}

.pub-meta {
  margin: 2px 0 0;
}

.doi-text {
  color: #59666b;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.entry-links a {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-strong);
  padding: 2px 9px;
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
}

.entry-links a:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.link-list {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 30px;
}

.link-list li {
  break-inside: avoid;
}

.link-list li + li {
  margin-top: 6px;
}

.bio-pack,
.copy-list,
.pathway-grid {
  display: grid;
  gap: 14px;
}

.bio-card,
.copy-card,
.pathway {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px 18px;
}

.bio-card h3,
.copy-card h3,
.pathway h3 {
  margin: 0 0 7px;
  color: var(--accent-strong);
  font-size: 0.98rem;
  line-height: 1.3;
}

.bio-card p,
.copy-card p,
.pathway p {
  margin: 0;
}

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

.pathway {
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

.pathway-audience {
  color: var(--accent-warm);
  font-size: 0.82rem;
  font-weight: 780;
}

.pathway .link-list {
  columns: 1;
  margin-top: 12px;
  padding-left: 1.05rem;
  font-size: 0.92rem;
}

.copy-card {
  background: var(--soft-warm);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.footer {
  padding: 20px 48px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 28px;
  }

  .contact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(108px, 1fr));
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 20px, var(--max-width));
    padding: 10px 0 26px;
  }

  .cv-header,
  .content,
  .footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  .cv-header {
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 16px;
    align-items: start;
  }

  .portrait {
    width: 108px;
    aspect-ratio: 1;
    margin-top: 3px;
    box-shadow: 0 14px 34px rgba(31, 38, 41, 0.12);
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .role-line {
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .hero-themes {
    margin-top: 13px;
    font-size: 0.7rem;
    line-height: 1.65;
  }

  .hero-themes li + li::before {
    margin: 0 6px;
  }

  .headline {
    margin-top: 13px;
    font-size: 1.06rem;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    margin-top: 15px;
  }

  .metric {
    padding-top: 8px;
  }

  .metric-value {
    font-size: 1.36rem;
  }

  .metric-note {
    display: none;
  }

  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
  }

  .contact-list div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .contact-list dt {
    font-size: 0.64rem;
  }

  .contact-list dd {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .tab-list {
    margin-left: -22px;
    margin-right: -22px;
    padding-left: 22px;
    padding-right: 22px;
  }

  .tab-label {
    flex: 1 1 calc(50% - 8px);
  }

  .section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .entry-head {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .entry-meta {
    white-space: normal;
  }

  .link-list {
    columns: 1;
  }

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

@media (max-width: 520px) {
  .tab-label {
    flex: 1 1 calc(50% - 8px);
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --paper: #ffffff;
  }

  body {
    font-size: 11pt;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .cv-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cv-header,
  .content,
  .footer {
    padding-left: 0;
    padding-right: 0;
  }

  .actions,
  .tab-input,
  .tab-list {
    display: none;
  }

  .tab-panel {
    display: block;
  }

  .section {
    page-break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
