:root {
  color-scheme: light;
  --ink: #243230;
  --muted: #64716d;
  --paper: #fbfffd;
  --surface: #f3faf7;
  --panel: #ffffff;
  --green: #78c991;
  --blue: #2f79a8;
  --red: #c9535a;
  --amber: #f3b18d;
  --frame: rgba(47, 121, 168, 0.2);
  --frame-strong: rgba(36, 50, 48, 0.32);
  --line: rgba(36, 50, 48, 0.12);
  --line-strong: rgba(36, 50, 48, 0.22);
  --header-height: 74px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(47, 121, 168, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 201, 145, 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 34px 34px;
}

body[data-theme="rose-blue"] {
  --surface: #f7fbff;
  --paper: #fdffff;
  --green: #8ccf9d;
  --blue: #4f8fbd;
  --red: #c9535a;
  --amber: #efc5c0;
  --frame: rgba(79, 143, 189, 0.22);
}

body[data-theme="grass"] {
  --surface: #f2fbf4;
  --paper: #fdfffc;
  --green: #5bb584;
  --blue: #5f9ac1;
  --red: #bf646a;
  --amber: #badf8d;
  --frame: rgba(91, 181, 132, 0.22);
}

body[data-theme="peach"] {
  --surface: #fff5ef;
  --paper: #fffaf6;
  --green: #8ccf9d;
  --blue: #4f8fbd;
  --red: #c85f65;
  --amber: #f3b18d;
  --frame: rgba(243, 177, 141, 0.32);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
dd,
li,
a,
strong,
span,
em {
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: stretch;
  gap: 18px;
  padding: 0 clamp(18px, 5vw, 64px);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--frame);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(36, 50, 48, 0.22);
  border-radius: 10px;
  color: #ffffff;
  background: var(--red);
  font-weight: 900;
}

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

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.brand small {
  display: none;
}

.nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  min-width: 64px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(36, 50, 48, 0.78);
  font-size: 14px;
  font-weight: 760;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #ffffff;
  background: var(--blue);
}

.language-toggle,
.button,
.theme-toggle,
.theme-panel button {
  border-radius: 4px;
  cursor: pointer;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-dev {
  position: relative;
}

.theme-toggle,
.language-toggle {
  align-self: center;
  min-width: 54px;
  min-height: 42px;
  border: 1px solid rgba(36, 50, 48, 0.28);
  color: var(--ink);
  background: var(--paper);
  font-weight: 860;
}

.theme-toggle {
  padding: 0 14px;
  color: var(--blue);
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible {
  color: #ffffff;
  background: var(--blue);
}

.theme-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: 220px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--frame);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 96%, white 4%);
  box-shadow: 0 18px 42px rgba(36, 50, 48, 0.14);
}

.theme-dev.is-open .theme-panel {
  display: grid;
}

.theme-panel button {
  min-height: 58px;
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 820;
}

.theme-panel button:hover,
.theme-panel button:focus-visible,
.theme-panel button[aria-pressed="true"] {
  border-color: var(--blue);
  background: rgba(47, 121, 168, 0.08);
}

.swatch-pair {
  display: flex;
  gap: 4px;
}

.swatch-pair i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--swatch);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  padding: clamp(32px, 5vw, 58px) clamp(18px, 6vw, 86px);
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--frame);
}

.hero::before {
  display: none;
}

.hero-color-rail {
  position: absolute;
  top: clamp(34px, 6vw, 64px);
  bottom: clamp(34px, 6vw, 64px);
  left: clamp(24px, 6vw, 72px);
  width: 5px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.hero-color-rail i {
  display: block;
  min-height: 48px;
  border-radius: 999px;
}

.hero-color-rail i:nth-child(1) {
  flex: 0.92;
  background: var(--red);
}

.hero-color-rail i:nth-child(2) {
  flex: 1.05;
  background: var(--blue);
}

.hero-color-rail i:nth-child(3) {
  flex: 0.76;
  background: var(--green);
}

.hero-copy,
.hero-profile,
.section {
  position: relative;
}

.hero-copy {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  align-content: center;
  max-width: 880px;
  padding: 22px 0 22px;
}

.hero-profile {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  gap: 14px;
  padding-left: 30px;
}

h1 {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 82px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.role-line {
  max-width: 780px;
  margin-bottom: 24px;
  color: var(--green);
  font-size: 21px;
  font-weight: 820;
  line-height: 1.52;
}

.hero-summary,
.lead {
  max-width: 760px;
  color: rgba(21, 23, 19, 0.72);
  font-size: 18px;
  line-height: 1.78;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--frame-strong);
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

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

.button.secondary {
  color: var(--ink);
  background: var(--paper);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  color: #ffffff;
  background: var(--blue);
}

.button.secondary.dark {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
  background: transparent;
}

.portrait-slot {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #dfe8e4;
  border: 1px solid var(--frame-strong);
  border-radius: 14px;
}

.portrait-slot img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center top;
}

.profile-stats {
  margin: 0;
  display: grid;
  background: var(--panel);
  border: 1px solid var(--frame);
  border-radius: 14px;
}

.profile-stats div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.profile-stats div:first-child {
  border-top: 0;
}

.profile-stats dt,
.fact-matrix span,
.line-list > article > span,
.output-table span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 0;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.48;
}

.section {
  padding: clamp(68px, 9vw, 124px) clamp(18px, 6vw, 86px);
  border-bottom: 1px solid var(--frame);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 38px;
}

.section-heading.compact {
  max-width: 760px;
}

.identity-section,
.bio-section,
.service-section {
  background: rgba(245, 241, 232, 0.88);
}

.clinical-section,
.doctors-section,
.achievements-section {
  background: var(--paper);
}

.fact-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.fact-matrix div {
  min-height: 176px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.fact-matrix div:last-child {
  border-right: 0;
}

.fact-matrix strong {
  font-size: 18px;
  line-height: 1.48;
}

.doctor-browser {
  display: grid;
  gap: 0;
}

.doctor-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--frame);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: var(--panel);
}

.doctor-tab {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.doctor-tab:last-child {
  border-right: 0;
}

.doctor-tab:hover,
.doctor-tab:focus-visible {
  background: rgba(44, 95, 133, 0.12);
}

.doctor-tab.is-active {
  color: #ffffff;
  background: var(--blue);
}

.doctor-tab img {
  width: 54px;
  height: 64px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid currentColor;
  border-radius: 4px;
}

.doctor-tab strong,
.doctor-tab small {
  display: block;
}

.doctor-tab strong {
  font-size: 16px;
  line-height: 1.25;
}

.doctor-tab small {
  margin-top: 5px;
  color: currentColor;
  opacity: 0.72;
  font-size: 13px;
  line-height: 1.35;
}

.doctor-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--frame);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  background: var(--panel);
}

.doctor-detail-image {
  min-height: 420px;
  overflow: hidden;
  border-right: 1px solid var(--frame);
  background: #dfe8e4;
}

.doctor-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.doctor-detail-copy {
  padding: 34px clamp(24px, 4vw, 48px);
}

.doctor-detail-copy h3 {
  margin-bottom: 16px;
  font-size: 40px;
}

.doctor-detail-copy > p {
  max-width: 780px;
  color: rgba(21, 23, 19, 0.72);
  font-size: 18px;
  line-height: 1.72;
}

.doctor-detail-copy dl {
  margin: 32px 0 0;
  border: 1px solid var(--frame);
  border-radius: 12px;
  overflow: hidden;
}

.doctor-detail-copy dl div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.doctor-detail-copy dl div:last-child {
  border-bottom: 0;
}

.doctor-detail-copy dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.doctor-detail-copy dd {
  margin: 0;
  font-weight: 780;
  line-height: 1.55;
}

.line-list {
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.line-list article {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 24px;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.line-list article:last-child {
  border-bottom: 0;
}

.line-list > article > span {
  color: var(--red);
}

.line-list p,
.research-grid p,
.service-columns p,
.contact-copy p,
.timeline p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(21, 23, 19, 0.68);
  font-size: 17px;
  line-height: 1.78;
}

.profile-bullets {
  display: grid;
  gap: 10px;
  max-width: 780px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-bullets li {
  position: relative;
  padding-left: 22px;
  color: rgba(21, 23, 19, 0.68);
  font-size: 17px;
  line-height: 1.72;
}

.profile-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--green);
  border-radius: 50%;
}

.bio-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.78fr);
  gap: clamp(34px, 7vw, 100px);
}

.bio-copy {
  max-width: 740px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.timeline li {
  padding: 22px 24px 26px;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline time {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-weight: 900;
}

.research-section {
  background: #edf3ee;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.research-grid article {
  min-height: 270px;
  display: grid;
  align-content: start;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.research-grid article:last-child {
  border-right: 0;
}

.research-grid article > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 48px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 50%;
  font-weight: 900;
}

.research-grid article:nth-child(2) > span {
  background: var(--red);
}

.research-grid article:nth-child(3) > span {
  background: var(--green);
}

.output-table {
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.output-table a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(240px, 0.58fr);
  gap: 22px;
  align-items: start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  transition: color 160ms ease, background 160ms ease;
}

.output-table a:last-child {
  border-bottom: 0;
}

.output-table a:hover,
.output-table a:focus-visible {
  color: var(--ink);
  background: rgba(200, 139, 47, 0.16);
}

.output-table span {
  color: var(--red);
}

.output-table strong {
  font-size: 18px;
  line-height: 1.45;
}

.output-table em {
  color: rgba(21, 23, 19, 0.62);
  font-size: 15px;
  font-style: normal;
  line-height: 1.55;
}

.service-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.service-columns div {
  min-height: 246px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.service-columns div:last-child {
  border-right: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(320px, 0.86fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: start;
  color: #ffffff;
  background: var(--ink);
}

.contact-section .eyebrow {
  color: #f1b44c;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.contact-section .button.primary {
  color: var(--ink);
  background: #ffffff;
}

.contact-section .button.primary:hover,
.contact-section .button.primary:focus-visible {
  color: #ffffff;
  background: var(--red);
}

.site-footer {
  padding: 26px clamp(18px, 6vw, 86px);
  color: rgba(255, 255, 255, 0.68);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .button,
  .output-table a,
  .doctor-tab {
    transition: none;
  }
}

@media (max-width: 1120px) {
  h1 {
    font-size: 68px;
  }

  h2 {
    font-size: 42px;
  }

  .hero {
    grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  }

  .fact-matrix,
  .doctor-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-matrix div:nth-child(2n),
  .doctor-tab:nth-child(2n) {
    border-right: 0;
  }

  .fact-matrix div:nth-child(-n + 2),
  .doctor-tab:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .bio-section,
  .contact-section,
  .doctor-detail {
    grid-template-columns: 1fr;
  }

  .doctor-detail-image {
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--frame);
  }

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

  .research-grid article,
  .service-columns div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-grid article:last-child,
  .service-columns div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-color-rail {
    left: 18px;
    width: 4px;
  }

  .hero-copy,
  .hero-profile {
    grid-column: auto;
    grid-row: auto;
  }

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

  .hero-profile {
    order: 2;
    padding-left: 28px;
  }

  .output-table a {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .output-table em {
    grid-column: 2;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 66px;
  }

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

  .brand {
    gap: 10px;
    padding-right: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 15px;
  }

  .language-toggle {
    min-width: 48px;
    margin-left: 10px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 34px;
  }

  h3 {
    font-size: 20px;
  }

  .role-line {
    font-size: 18px;
  }

  .hero-summary,
  .lead {
    font-size: 16px;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .fact-matrix,
  .doctor-rail {
    grid-template-columns: 1fr;
  }

  .fact-matrix div,
  .doctor-tab {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact-matrix div:last-child,
  .doctor-tab:last-child {
    border-bottom: 0;
  }

  .line-list article,
  .profile-stats div,
  .output-table a,
  .doctor-detail-copy dl div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero {
    padding: 30px 16px 44px;
  }

  .section {
    padding: 62px 16px;
  }

  .hero-summary {
    display: none;
  }

  .portrait-slot,
  .portrait-slot img {
    min-height: 220px;
  }

  .profile-stats {
    display: none;
  }

  .doctor-detail-image {
    min-height: 280px;
  }

  .doctor-detail-copy {
    padding: 28px 18px;
  }

  .doctor-detail-copy h3 {
    font-size: 32px;
  }

  .output-table em {
    grid-column: auto;
  }
}
