:root {
  --ink: #171a1b;
  --ink-soft: #272b2c;
  --paper: #f1eee8;
  --paper-deep: #e5dfd4;
  --copper: #a45f42;
  --copper-light: #cb8d6d;
  --line: rgba(23, 26, 27, .16);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: inherit; }
.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -5rem;
  padding: .7rem 1rem;
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 4rem) 1.1rem;
  color: #f7f3ed;
  transition: background .25s ease, padding .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  padding-block: .75rem;
  background: rgba(23, 26, 27, .94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.1);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.brand-mark { display: block; width: 1.25rem; height: 1.25rem; object-fit: contain; transform: translateY(-2px); }
nav { display: flex; align-items: center; gap: 1.7rem; }
nav a { font-size: .92rem; text-decoration: none; }
.nav-cta { padding: .55rem .9rem; border: 1px solid rgba(255,255,255,.5); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid rgba(255,255,255,.45); background: rgba(23,26,27,.35); color: white; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 2px; margin: 4px 0; background: currentColor; transition: transform .2s ease, opacity .2s ease; }

.hero {
  position: relative;
  min-height: 780px;
  height: min(94vh, 980px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #f8f3eb;
  background: var(--ink);
}
.hero-image, .hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-image { top: -.5rem; height: calc(100% + .5rem); object-fit: cover; object-position: center top; }
.hero-shade {
  background:
    linear-gradient(90deg, rgba(15,17,18,.88) 0%, rgba(15,17,18,.67) 43%, rgba(15,17,18,.06) 75%),
    linear-gradient(0deg, rgba(15,17,18,.55) 0%, transparent 35%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 2.5rem));
  margin-left: max(1.25rem, calc((100vw - var(--max)) / 2));
  padding-top: 4rem;
}
.eyebrow, .section-kicker {
  margin: 0 0 1.1rem;
  color: var(--copper-light);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1, h2, h3 {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}
h1 { max-width: 980px; font-size: clamp(3.5rem, 5.8vw, 6.2rem); }
.hero-line { display: block; white-space: nowrap; }
h2 { font-size: clamp(2.3rem, 4.1vw, 4.5rem); }
h3 { font-size: clamp(1.45rem, 2.1vw, 2rem); }
.hero-lede { max-width: 640px; margin: 1.6rem 0 .9rem; font-size: 1.18rem; color: rgba(255,255,255,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .72rem 1.1rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--copper); color: white; }
.button-primary:hover { background: #b86e4d; }
.button-secondary { border-color: rgba(255,255,255,.48); color: white; }
.button-secondary:hover { background: rgba(255,255,255,.1); }
.section-pad { padding: clamp(5rem, 9vw, 9rem) max(1.25rem, calc((100vw - var(--max)) / 2)); }
.intro {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(3rem, 8vw, 8rem);
}
.intro h2 { max-width: 650px; }
.intro-copy { max-width: 610px; padding-top: 1.8rem; font-size: 1.1rem; }
.intro-copy p:first-child { margin-top: 0; }

.services { background: var(--ink); color: var(--paper); }
.section-heading { max-width: 770px; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.section-thesis { max-width: 680px; margin: 1.6rem 0 0; color: rgba(255,255,255,.7); font-size: 1.08rem; }
.service-list { border-top: 1px solid rgba(255,255,255,.16); }
.service-list article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.service-list article > span { color: var(--copper-light); font-family: "Manrope", sans-serif; font-size: .8rem; }
.service-list article div { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(300px, 1.2fr); gap: 3rem; }
.service-list p { max-width: 610px; margin: 0; color: rgba(255,255,255,.67); }

.experience {
  background: var(--paper-deep);
}
.experience-lead { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); align-items: end; margin-bottom: 3.2rem; }
.experience-lead .section-kicker { grid-column: 1 / -1; margin-bottom: -1.4rem; }
.experience-lead p:last-child { max-width: 560px; margin: 0; }
.experience-matrices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.matrix-block { border-top: 4px solid var(--copper); background: #f6f3ee; }
.matrix-block h3 { padding: 1rem 1.15rem .9rem; border-bottom: 1px solid var(--line); font-size: 1.18rem; letter-spacing: -.02em; }
.matrix { display: grid; }
.product-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.disease-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.matrix button { min-height: 58px; padding: .75rem .85rem; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 .9rem/1.25 "Manrope", sans-serif; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease, opacity .18s ease, box-shadow .18s ease; }
.matrix button:hover { background: #ece5dc; }
.matrix button:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--copper); outline-offset: -3px; }
.matrix button.is-active { background: var(--copper); color: white; box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.matrix button.is-related { background: var(--ink); color: white; }
.matrix button.is-muted { opacity: .28; }
.portfolio-note { grid-column: 1 / -1; margin: 0; padding: 1.15rem 1.4rem; border-left: 5px solid var(--copper); background: var(--ink); color: rgba(255,255,255,.82); font-size: .96rem; line-height: 1.5; }
.portfolio-note strong { color: white; }
.matrix-status { grid-column: 1 / -1; margin: -.5rem 0 0; color: #62625f; font-size: .82rem; }

.about {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(3rem, 8vw, 8rem);
}
.about-copy { max-width: 630px; font-size: 1.08rem; }
.about-copy p:first-child { margin-top: .2rem; }
.operating-record { border-top: 1px solid var(--line); }
.operating-record .record-context { margin: 0; padding: 1.15rem 0; border-bottom: 1px solid var(--line); color: #62625f; font-size: .92rem; }
.operating-record article { display: grid; grid-template-columns: minmax(140px, .42fr) 1fr; gap: 1.3rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.operating-record h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -.015em; }
.continuity-ref { margin-left: .18rem; font-size: .72em; line-height: 0; }
.continuity-ref a { color: var(--copper); text-decoration: none; }
.continuity-ref a:hover, .continuity-ref a:focus-visible { text-decoration: underline; text-underline-offset: .16em; }
.stage-label { display: block; width: max-content; max-width: 100%; margin-top: .45rem; color: var(--copper); font-family: "DM Sans", Arial, sans-serif; font-size: .66rem; font-weight: 600; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase; }
.operating-record p { margin: 0; color: #505351; font-size: .96rem; line-height: 1.55; }
.operating-record .continuity-note { margin-top: 1.25rem; padding: 1rem 0; border-top: 1px solid var(--line); color: #62625f; font-size: .82rem; scroll-margin-top: 6rem; }
.continuity-note sup { margin-right: .2rem; color: var(--copper); font-weight: 700; }
.confidential-note { padding-top: 1.2rem; border-top: 1px solid var(--line); color: #62625f; font-size: .92rem; }
.operating-record .confidential-note { margin-top: 1.25rem; }

.contact {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: clamp(3rem, 8vw, 8rem);
  background: #c9b39e;
}
.contact h2 { max-width: 810px; }
.contact-action { align-self: end; }
.contact-action p { margin-top: 0; }
.contact-action .button { margin-bottom: .9rem; }
.linkedin-link { display: block; width: max-content; font-size: .9rem; text-underline-offset: .2em; }

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: var(--ink);
  color: rgba(255,255,255,.62);
  font-size: .78rem;
}
.footer-brand { color: white; }
.footer-quote { grid-column: 1 / -1; margin: .5rem 0 0; color: rgba(255,255,255,.76); font-size: .82rem; }
.footer-quote span { color: rgba(255,255,255,.5); }
.footer-quote sup { margin-left: .18rem; }
.footer-source { grid-column: 1 / -1; max-width: 780px; margin: -.9rem 0 0; color: rgba(255,255,255,.42); font-size: .68rem; line-height: 1.5; }
.footer-source sup { margin-right: .2rem; }

@media (max-width: 850px) {
  .menu-toggle { display: block; position: relative; z-index: 2; }
  .site-header nav { position: absolute; top: calc(100% + .5rem); left: 1rem; right: 1rem; display: grid; gap: 0; padding: .5rem; background: rgba(23,26,27,.98); box-shadow: 0 18px 40px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
  .site-header nav a { display: block; padding: .8rem .9rem; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-header nav .nav-cta { margin-top: .45rem; border: 1px solid rgba(255,255,255,.5); text-align: center; }
  .site-header.menu-open nav { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-header.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero { min-height: 100svh; height: auto; padding: 7.5rem 0 3.5rem; }
  .hero-image { object-position: 50% top; }
  .hero-shade { background: linear-gradient(90deg, rgba(15,17,18,.94), rgba(15,17,18,.62)); }
  .hero-copy { width: min(640px, calc(100% - 2.5rem)); }
  h1 { font-size: clamp(2.6rem, 8vw, 4.8rem); }
  .intro, .about, .contact { grid-template-columns: 1fr; }
  .experience-lead, .experience-matrices { grid-template-columns: 1fr; }
  .experience-lead .section-kicker { margin-bottom: -1rem; }
  .service-list article div { grid-template-columns: 1fr; gap: .7rem; }
  footer { grid-template-columns: 1fr; gap: .5rem; }
  .footer-quote { margin-top: 1rem; }
  .footer-source { margin: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { padding-inline: 1rem; }
  .hero { min-height: 100svh; padding-top: 7rem; }
  .hero-copy { width: calc(100% - 2rem); margin-left: 1rem; padding-top: 0; }
  .hero-image { object-position: 50% top; }
  .hero-shade { background: rgba(15,17,18,.76); }
  h1 { font-size: clamp(2.25rem, 11.5vw, 4.2rem); }
  .hero-lede { font-size: 1.05rem; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .email-link { width: 100%; overflow-wrap: anywhere; }
  .service-list article { grid-template-columns: 42px 1fr; gap: .8rem; }
  .operating-record article { grid-template-columns: 1fr; gap: .35rem; }
  .product-matrix, .disease-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix button { min-height: 54px; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Engagement and work examples follow the established Nettuno palette. */
section[id] { scroll-margin-top: 5rem; }
.hero-principal { margin: 0 0 1.6rem; color: rgba(255,255,255,.7); font-size: .92rem; }
.service-list .systems-note { margin-top: 1rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.selected-work { background: var(--paper); }
.selected-work .section-heading, .engagements .section-heading { margin-bottom: 2.8rem; }
.case-grid, .engagement-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; }
.case-grid article, .engagement-grid article { padding-top: 1.4rem; border-top: 3px solid var(--copper); }
.case-grid h3, .engagement-grid h3 { font-size: 1.45rem; line-height: 1.2; }
.case-label { margin: 0 0 1rem; font-size: .76rem; font-weight: 600; color: #825038; }
.case-grid article > p:not(.case-label), .engagement-grid p { font-size: .96rem; }
.case-takeaway { padding-top: 1rem; border-top: 1px solid var(--line); color: #505351; }
.engagements { background: var(--paper-deep); }
.step-number { display: block; margin-bottom: 1rem; color: #825038; font-size: .8rem; }
.engagement-start { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.engagement-start h3 { font-size: 1.5rem; line-height: 1.25; }
.engagement-start p { margin: 0; }
@media (max-width: 850px) { .case-grid, .engagement-grid, .engagement-start { grid-template-columns: 1fr; gap: 1.5rem; } }
.service-list .systems-note { grid-column: 1 / -1; margin-top: 0; }

.outcome-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2.5rem; }
.outcome-grid .outcome-number { font-size: clamp(2rem,3.7vw,3.5rem); color: #825038; }
.capacity-note { margin: 2.5rem 0 0; padding: 1.4rem; border-left: 4px solid var(--copper); background: rgba(255,255,255,.35); }
.signature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.signature-grid article { padding: 1.5rem; background: #f6f3ee; border-top: 3px solid var(--copper); }
.signature-grid h3 { font-size: 1.6rem; }
.signature-grid p:last-child { margin-bottom: 0; }
.portfolio-details summary { padding: 1rem 0; cursor: pointer; font-weight: 600; }
.portfolio-details[open] summary { margin-bottom: 1rem; }
.experience-context { grid-column: 1 / -1; padding: 1.1rem 1.4rem; border-left: 4px solid var(--copper); background: #f6f3ee; }
.experience-context p { margin: 0; }
.principles { background: var(--ink); color: var(--paper); }
.principles-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; }
.principles-grid h3 { font-size: 1.4rem; }
.principles-grid p { color: rgba(255,255,255,.75); }
.contact-email { font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 850px) { .principles-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .outcome-grid, .signature-grid { grid-template-columns: 1fr; } .hero-line { white-space: normal; } }
