:root {
  --navy:        #16283C;
  --navy-2:      #1E3552;
  --ink:         #16283C;
  --muted:       #6B6A63;
  --bg:          #FFFFFF;
  --surface:     #F5F4F0;
  --surface-navy:#EDF0F4;
  --accent:      #E77728;
  --accent-text: #9C4A28;
  --rule:        #E7E5DF;
  --field-border:#908A80;
  --focus:       #C25E1E;
  --measure:     40rem;
  --wide:        72rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--navy); }

body {
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

.serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
a { color: inherit; }

.site-nav {
  background: var(--navy);
  padding: 1.1rem clamp(1.5rem, 5vw, 2.5rem);
}
.site-nav .inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.9rem;
}
.site-nav .wordmark { color: var(--bg); font-weight: 600; text-decoration: none; font-size: 1rem; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2rem); }
.site-nav a.nav-link { color: #C7D0DB; text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.site-nav a.nav-link:hover, .site-nav a.nav-link.active { color: var(--accent); }
.site-nav a.nav-link:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
/* --focus is tuned for light backgrounds; the navy bands need the lighter accent to clear 3:1 */
.site-nav a:focus-visible,
.breadcrumbs a:focus-visible,
.hero-section a:focus-visible,
.hero-section button:focus-visible,
.page-header a:focus-visible,
.edit-toolbar button:focus-visible,
footer.site-footer a:focus-visible { outline-color: var(--accent); }
.nav-social { display: flex; align-items: center; gap: 0.75rem; margin-left: clamp(1.25rem, 3vw, 2rem); }
.nav-social a, .footer-social a {
  color: var(--navy);
  background: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-social a:hover { color: var(--navy); background: var(--accent); }

.breadcrumbs { background: var(--navy-2); padding: 0.6rem clamp(1.5rem, 5vw, 2.5rem); }
.breadcrumbs .inner { max-width: var(--wide); margin: 0 auto; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li { font-size: 0.82rem; color: #C7D0DB; }
.breadcrumbs li.sep { color: #6C7D91; }
.breadcrumbs a { color: #C7D0DB; text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs li[aria-current="page"] { color: var(--accent); }

.hero-section { background: var(--navy); padding: clamp(3.5rem, 9vw, 6rem) clamp(1.5rem, 5vw, 2.5rem) clamp(3rem, 7vw, 4.5rem); text-align: center; }
.hero-section .inner { max-width: var(--wide); margin: 0 auto; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 0.9rem; }
.hero-title { max-width: 52rem; margin: 0 auto 1rem; color: var(--bg); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 500; line-height: 1.15; text-align: center; }
.focus-tagline { font-size: clamp(1.6rem, 3.5vw, 2rem); font-weight: 400; color: var(--bg); margin: 0 auto 1.75rem; text-align: center; }
.focus-tagline .accent { color: var(--accent); font-weight: 600; }
.hero-section p.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  font-weight: 600;
  color: #C7D0DB;
  margin: 0 auto;
  text-align: center;
}

.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: #D06A20; }
.btn-secondary { background: transparent; color: var(--bg); border: 1px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--bg); }
.btn-navy { background: var(--navy); color: var(--bg); }
.btn-navy:hover { background: var(--navy-2); }
.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--navy);
  color: var(--bg);
}

.card-section { padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 2.5rem) clamp(3rem, 7vw, 4.5rem); background: var(--surface); }
.card-section .inner { max-width: var(--wide); margin: 0 auto; }
.card-grid { display: flex; align-items: stretch; gap: 1.75rem; flex-wrap: wrap; }
.icon-card {
  position: relative;
  flex: 1 1 15rem;
  aspect-ratio: 3 / 2;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(22, 40, 60, 0.1);
  border-radius: 16px;
  padding: 1.5rem 2.75rem 1.5rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
}
.icon-card:hover, .icon-card:focus-visible { transform: translateY(-2px); background: var(--accent); }
.icon-card:hover .desc, .icon-card:focus-visible .desc,
.icon-card:active .desc,
.icon-card:hover .eyebrow-label, .icon-card:focus-visible .eyebrow-label,
.icon-card:active .eyebrow-label { color: var(--ink); }
.icon-card:active { background: #D06A20; }
.icon-card .icon-wrap {
  flex: 0 0 38%;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
}
.icon-card .icon-wrap .icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.icon-card .card-body { flex: 1 1 auto; min-width: 0; }
.icon-card .title {
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.icon-card .desc { font-size: 0.9rem; color: var(--muted); }
.icon-card .card-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1.1rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
@media (max-width: 48rem) {
  .icon-card .title { font-size: 2.1rem; }
  .icon-card .desc { font-size: 1rem; }
  .icon-card .card-arrow { font-size: 2rem; bottom: 1rem; right: 1.25rem; }
  .case-study-grid .icon-card .title { font-size: 1.4rem; }
}
@media (max-width: 30rem) {
  .card-grid { flex-direction: column; }
  .icon-card { aspect-ratio: 5 / 3; }
  .about-portrait { float: none; width: 12rem; max-width: 60%; margin: 0 auto 1.5rem; }
}

.content.case-study-section { background: var(--surface); }
.case-study-grid { flex-direction: column; max-width: 42rem; margin: 0 auto; }
.case-study-grid .icon-card { flex: none; width: 100%; aspect-ratio: auto; }
.icon-card .eyebrow-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.35rem;
}
.page-header { background: var(--navy); padding: clamp(3rem, 7vw, 4rem) clamp(1.5rem, 5vw, 2.5rem) clamp(1.5rem, 4vw, 2rem); }
.page-header .inner { max-width: var(--wide); margin: 0 auto; }
.page-header h1 { color: var(--bg); font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 500; line-height: 1.2; }
.page-header p { margin-top: 0.75rem; color: #C7D0DB; font-size: 1rem; max-width: 38rem; }
.page-header .accent { color: var(--accent); }

.content { padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.5rem, 5vw, 2.5rem) clamp(3rem, 7vw, 4rem); background: var(--bg); }
.content .inner { max-width: var(--wide); margin: 0 auto; }
.content.narrow .inner { max-width: var(--measure); }

article p { margin-bottom: 1.4rem; color: var(--ink); }
article p:last-child { margin-bottom: 0; }

.about-portrait {
  float: right;
  width: 16rem;
  max-width: 45%;
  aspect-ratio: 5 / 6;
  border-radius: 16px;
  overflow: hidden;
  background: var(--navy-2);
  margin: 0 0 1.5rem 2rem;
}
.about-portrait picture { display: block; width: 100%; height: 100%; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.pivot { background: var(--surface-navy); border-left: 3px solid var(--accent); border-radius: 0 16px 16px 0; padding: 1.5rem 1.75rem; margin: 2rem 0; }
.pivot p { font-weight: 500; margin-bottom: 0.6rem; }
.pivot p:last-child { margin-bottom: 0; }
.pivot .lede { color: var(--accent-text); font-weight: 600; }

.cta-row { margin-top: 2.5rem; }
.cta-row-center { text-align: center; clear: both; }

.case-meta { margin-bottom: 2.5rem; font-size: 0.95rem; }
.case-meta p { margin-bottom: 0.3rem; color: var(--ink); }
.case-meta p:last-child { margin-bottom: 0; }
.case-meta strong { font-weight: 600; }

.case-section { margin-bottom: 2.75rem; }
.case-section-heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.case-section-heading .bar { width: 0.35rem; height: 1.4rem; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.case-section-heading h2 { font-size: 1.3rem; font-weight: 600; color: var(--navy); }

.case-subsection { margin-bottom: 2rem; }
.case-subsection:last-child { margin-bottom: 0; }
.case-subsection h3 { font-weight: 600; font-size: 1.05rem; color: var(--ink); margin-bottom: 0.5rem; }
.case-subsection p { color: var(--ink); }

.case-figure { margin: 1.5rem 0 0; }
.case-figure picture { display: block; }
.case-figure img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 24px rgba(22, 40, 60, 0.15); }
.case-figure.narrow { max-width: 22rem; margin-left: auto; margin-right: auto; }

.case-impact p { margin-bottom: 1.1rem; }
.case-impact p:last-child { margin-bottom: 0; }
.case-impact strong { color: var(--navy); }

.case-cta { text-align: center; margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--rule); }
.case-cta h3 { font-weight: 600; font-size: 1.15rem; color: var(--navy); margin-bottom: 0.75rem; }
.case-cta p { max-width: 36rem; margin: 0 auto 1.25rem; color: var(--muted); }
.case-cta a.btn { display: inline-block; }

.btn-outline { background: transparent; color: var(--navy); border: 1px solid rgba(22, 40, 60, 0.55); }
.btn-outline:hover { background: var(--surface); border-color: var(--navy); }

.case-next { text-align: center; margin-top: 1.5rem; }
.case-next a.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  text-align: left;
}
.case-next .case-next-rel { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.case-next .case-next-title { font-weight: 600; }
.case-next .case-next-arrow { color: var(--accent-text); font-weight: 600; }

.skills-table { background: var(--surface); border-radius: 16px; overflow: hidden; }
.skills-table table { width: 100%; border-collapse: collapse; }
.skills-table thead { background: var(--navy); color: var(--bg); }
.skills-table th { text-align: left; font-weight: 500; padding: 1rem 1.5rem; font-size: 0.95rem; }
.skills-table td { padding: 1.4rem 1.5rem; vertical-align: top; border-top: 0.5px solid var(--rule); font-size: 0.9rem; }
.skills-table tr:first-child td { border-top: none; }
.skills-table .clinical { font-weight: 600; width: 22%; }
.skills-table .equivalent { width: 22%; }
.skills-table .logic strong { color: var(--accent-text); }
@media (max-width: 48rem) {
  .skills-table { background: transparent; border-radius: 0; overflow: visible; }
  .skills-table table, .skills-table thead, .skills-table tbody, .skills-table th, .skills-table td, .skills-table tr { display: block; }
  .skills-table thead { display: none; }
  .skills-table tr {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 1.25rem 1.4rem 1.4rem;
    margin-bottom: 1rem;
    border-top: 1px solid var(--rule);
  }
  .skills-table tr:last-child { margin-bottom: 0; }
  .skills-table td { padding: 0; border-top: none; width: auto; }
  .skills-table td::before {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
  }

  /* Clinical skill: bold navy label, plain-weight content */
  .skills-table .clinical {
    width: 100%;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 1.15rem;
  }
  .skills-table .clinical::before {
    content: attr(data-label);
    color: var(--navy);
  }

  /* UI/UX equivalent: bold navy label, plain-weight content */
  .skills-table .equivalent {
    width: 100%;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 1.15rem;
  }
  .skills-table .equivalent::before {
    content: attr(data-label);
    color: var(--navy);
  }

  /* Connective logic: bold orange label, supporting explanation below */
  .skills-table .logic {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
  }
  .skills-table .logic::before {
    content: attr(data-label);
    color: var(--accent-text);
  }
}

.placeholder-notice { background: var(--surface); border-radius: 16px; padding: 1.75rem; color: var(--muted); font-size: 0.9rem; max-width: var(--measure); }

.contact-form { max-width: 30rem; }
.contact-form .required-tag { font-weight: 400; color: var(--muted); }
.contact-form label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; margin-top: 1.1rem; }
.contact-form label:first-child { margin-top: 0; }
.contact-form input:not([type="checkbox"]), .contact-form textarea { width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--field-border); border-radius: 10px; font-family: inherit; font-size: 0.9rem; background: var(--surface); }
.contact-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
  cursor: pointer;
}
.contact-form input[type="checkbox"]:checked { background: var(--navy); border-color: var(--navy); }
.contact-form input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.18rem;
  width: 0.3rem;
  height: 0.6rem;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.contact-form input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form button { margin-top: 1.4rem; }

footer.site-footer {
  background: var(--navy);
  padding: 1.5rem clamp(1.5rem, 5vw, 2.5rem);
  display: flex; justify-content: center; align-items: center;
  font-size: 0.85rem; color: #C7D0DB;
  margin-top: auto;
}
footer.site-footer .copy { text-align: center; }
.footer-social { display: none; }

@media (max-width: 40rem) {
  .site-nav { text-align: center; padding: 1.25rem 1.5rem; }
  .site-nav .inner { justify-content: center; }
  .site-nav .wordmark { font-size: 1.3rem; flex: 1 1 100%; text-align: center; }
  .site-nav ul { flex: 1 1 100%; justify-content: center; gap: 0.9rem 1.1rem; flex-wrap: wrap; }
  .nav-social { display: none; }
  footer.site-footer { flex-direction: column; text-align: center; }
  .footer-social { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.9rem; }
}

.editable[contenteditable="true"] {
  display: inline-block;
  min-width: 2rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(231, 119, 40, 0.6);
  border-radius: 6px;
  padding: 0.15em 0.4em;
  margin: 0.1em 0;
  cursor: text;
}
.editable[contenteditable="true"]:hover { border-style: solid; border-color: var(--accent); }
.editable[contenteditable="true"]:focus {
  border-style: solid;
  border-color: var(--accent);
  background: #fff;
  outline: 2px solid rgba(231, 119, 40, 0.35);
  outline-offset: 1px;
}
.edit-status { font-size: 0.75rem; margin-left: 0.5rem; color: var(--muted); vertical-align: middle; }
.edit-status.saving { color: var(--muted); }
.edit-status.saved { color: #2E7D32; }
.edit-status.error { color: #C0392B; }

.editing-banner {
  background: var(--accent);
  color: var(--navy);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.editing-banner a { text-decoration: underline; }

.edit-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
  background: var(--navy);
  padding: 0.6rem clamp(1.5rem, 5vw, 2.5rem);
  border-bottom: 2px solid var(--accent);
}
.edit-toolbar button {
  background: var(--navy-2);
  color: var(--bg);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.edit-toolbar button:hover { background: var(--accent); color: var(--navy); border-color: var(--accent); }
.edit-toolbar button[data-cmd="removeFormat"] { width: auto; padding: 0 0.75rem; font-size: 0.8rem; }

a.btn:link, a.btn:visited { color: inherit; }
a.btn.btn-primary:link, a.btn.btn-primary:visited { color: var(--navy); }
a.btn.btn-navy:link, a.btn.btn-navy:visited { color: var(--bg); }
a.btn.btn-secondary:link, a.btn.btn-secondary:visited { color: var(--bg); }
