:root {
  --ink: #0f1b2d;
  --navy: #0f1b2d;
  --muted: #475569;
  --blue: #315fdb;
  --blue-dark: #274fbd;
  --teal: #0e7490;
  --paper: #f4f7fb;
  --surface: #fff;
  --line: #d6dfeb;
  --hover: #e8eeff;
  --slate: #1e293b;
  --section: #eaf0f7;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(15, 27, 45, 0.06);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.75; }
a { color: var(--blue-dark); text-underline-offset: 5px; }
a:hover { color: #163ba3; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.04em; margin: 0 0 20px; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 4.6vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.85rem, 3vw, 2.65rem); font-weight: 700; }
h3 { font-size: 1.2rem; line-height: 1.4; letter-spacing: -.025em; }
p { margin: 0 0 22px; color: var(--muted); }
ul { padding-left: 21px; color: var(--muted); }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 20px; z-index: 100; background: #fff; padding: 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Compact branding, generous hit areas, and a quiet active-page treatment. */
.header { position: sticky; top: 0; z-index: 20; background: #fffffffa; border-bottom: 1px solid var(--line); box-shadow: 0 3px 16px #0f1b2d03; }
.header-row { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; background: var(--navy); border: 1px solid #29354a; border-radius: 9px; padding: 6px 9px; }
.brand img { display: block; width: 163px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-size: .9rem; font-weight: 550; text-decoration: none; color: var(--muted); padding: 9px 12px; border-radius: 7px; white-space: nowrap; transition: background .18s, color .18s; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current=page] { background: var(--hover); color: var(--blue-dark); }
.nav .nav-cta { margin-left: 14px; padding: 10px 18px; background: var(--blue); color: #fff; border: 1px solid #274fbd; box-shadow: 0 3px 7px #315fdb19, inset 0 1px #ffffff1a; }
.nav .nav-cta:hover { color: #fff; background: var(--blue-dark); box-shadow: 0 5px 13px #315fdb25; }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); padding: 9px 13px; min-height: 44px; border-radius: 8px; color: var(--ink); font-size: .88rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: .78rem; line-height: 1.6; font-weight: 700; color: var(--teal); margin-bottom: 20px; }
.lead { font-size: 1.1rem; line-height: 1.85; max-width: 68ch; }
.small { font-size: .875rem; }

/* The existing two-column hero, with a tighter typographic hierarchy. */
.hero { display: grid; grid-template-columns: 1.24fr 1fr; gap: 70px; align-items: center; padding-block: 94px 90px; }
.hero h1 { font-size: clamp(3rem, 4.3vw, 4rem); line-height: 1.09; letter-spacing: -.055em; margin-bottom: 28px; text-wrap: initial; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { max-width: 55ch; }
.hero .eyebrow { font-size: .75rem; letter-spacing: .14em; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 49px; padding: 12px 21px; border: 1px solid var(--blue-dark); background: var(--blue); color: #fff; border-radius: 9px; font-size: .92rem; font-weight: 650; line-height: 1.5; text-decoration: none; cursor: pointer; box-shadow: 0 4px 9px #315fdb1c, inset 0 1px #ffffff1a; transition: background .18s, box-shadow .18s, transform .18s; }
.button:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 7px 18px #315fdb26; transform: translateY(-1px); }
.button span { font-size: 1.08rem; line-height: 1; }
.button.secondary { background: #fff; border-color: #cbd5e1; color: var(--ink); box-shadow: 0 2px 4px #0f1b2d04; }
.button.secondary:hover { background: var(--hover); border-color: #a5bde9; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.hero-note { border-left: 2px solid #cbd5e1; padding-left: 13px; font-size: .85rem; margin: 27px 0 0; color: var(--muted); }
.architecture { background: var(--navy); color: #fff; border: 1px solid #2b3a50; border-radius: 22px; padding: 34px 36px; box-shadow: 0 5px 10px #0f1b2d08, 0 24px 44px -20px #0f1b2d55, inset 0 1px #ffffff08; }
.architecture .eyebrow { color: #a4d7d0; font-size: .75rem; margin-bottom: 14px; }
.architecture h2 { font-size: 1.5rem; margin-bottom: 12px; letter-spacing: -.03em; }
.architecture > p:not(.eyebrow) { color: #b9c6d7; font-size: .95rem; }
.architecture ol { padding: 25px 0 0; margin: 26px 0 0; list-style: none; border-top: 1px solid #ffffff14; }
.architecture li { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 16px; position: relative; padding-bottom: 25px; }
.architecture li:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; border-left: 1px solid #3b4c64; }
.architecture li:last-child { padding-bottom: 0; }
.step-number { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #465b76; background: #ffffff04; color: #c4dbef; border-radius: 10px; font: 12px/1 ui-monospace, monospace; }
.architecture li:last-child .step-number { border-color: #37776f; color: #b5e6db; background: #0e749020; }
.architecture strong { display: block; font-size: .925rem; line-height: 1.45; font-weight: 600; letter-spacing: -.01em; }
.architecture small { display: block; margin-top: 3px; color: #b0bdcf; font-size: .8rem; }
.scope-strip { border-block: 1px solid var(--line); background: var(--paper); }
.scope-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 24px; }
.scope-strip span { color: var(--muted); font-size: .875rem; font-weight: 600; }
.scope-strip .eyebrow { margin: 0; color: #64748b; font-size: .75rem; }

/* Repeated surfaces share border, radius, spacing, and elevation tokens. */
.section { padding-block: 92px; }
.section.tint { background: var(--section); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 38px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { max-width: 64ch; margin-bottom: 0; }
.section-head .text-link { flex-shrink: 0; padding-block: 6px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card-number { display: block; margin-bottom: 24px; color: #64748b; font: 500 .76rem/1.6 ui-monospace, monospace; letter-spacing: .025em; }
.project-card { display: flex; flex-direction: column; border-top: 2px solid #dce5f2; }
.project-card h3 { margin-bottom: 14px; font-size: 1.22rem; }
.project-card h3 a { color: var(--ink); text-decoration: none; }
.project-card p { font-size: 1rem; line-height: 1.8; margin-bottom: 18px; }
.project-card .text-link { margin-top: auto; padding-top: 20px; }
.project-card .tags { padding-bottom: 20px; border-bottom: 1px solid #edf1f6; margin-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 15px; }
.tag { color: #40536d; background: #f5f8fc; border: 1px solid #e5ebf3; border-radius: 6px; padding: 4px 9px; font-size: .77rem; line-height: 1.5; }
.lab-type { color: var(--teal)!important; font-size: .8rem!important; font-weight: 550; margin: 0 0 12px!important; }
.feature-card { display: flex; flex-direction: column; padding: 32px; }
.feature-card .text-link { margin-top: auto; padding-top: 12px; }
.feature-card .card-number { color: var(--teal); }
.service-card { display: flex; flex-direction: column; }
.service-card ul { font-size: 1rem; line-height: 1.85; padding-left: 19px; margin-bottom: 28px; }
.service-card li { padding-left: 3px; margin-bottom: 4px; }
.service-card li::marker { color: #94a3b8; }
.service-card .text-link { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
@media (hover: hover) {
  :is(.project-card, .feature-card, .service-card):hover { border-color: #b9cbed; box-shadow: 0 4px 10px #0f1b2d04, 0 18px 35px -14px #0f1b2d20; transform: translateY(-3px); }
}
.callout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; background: var(--navy); border: 1px solid #2b3a50; border-radius: 22px; padding: 48px 52px; color: #fff; box-shadow: 0 20px 35px -25px #0f1b2d70; }
.callout p { color: #c5cfdd; font-size: .98rem; }
.callout p:last-child { margin-bottom: 0; }
.callout h2 { font-size: 2rem; margin-bottom: 18px; }
.callout .actions { justify-content: flex-end; margin: 0; }
.callout .eyebrow { color: #a4d7d0; font-size: .75rem; }

/* Interior pages retain the same alignment and quieter editorial rhythm. */
.page-heading { padding-block: 76px 50px; }
.page-heading h1 { font-size: clamp(2.6rem, 4.6vw, 3.8rem); max-width: 24ch; margin-bottom: 22px; }
.page-heading .lead { margin: 0; }
.content-section { padding-block: 0 88px; }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 66px; align-items: start; }
.prose { max-width: 76ch; min-width: 0; }
.prose h2 { font-size: 1.75rem; margin-top: 40px; padding-top: 8px; }
.prose h3 { margin-top: 30px; }
.prose li { margin-block: 8px; }
.prose img { border-radius: 12px; border: 1px solid var(--line); }
.prose figure { margin: 32px 0; }
.prose figcaption { font-size: .875rem; color: var(--muted); margin-top: 12px; }
.prose pre { overflow: auto; background: var(--navy); color: #dbeafe; padding: 24px; border-radius: 12px; line-height: 1.65; }
.prose blockquote { margin: 28px 0; border-left: 3px solid var(--teal); padding: 18px 24px; background: var(--paper); }
.prose blockquote p:last-child { margin: 0; }
.breadcrumb { font-size: .875rem; margin-bottom: 28px; }
.case-study .prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 36px; box-shadow: var(--shadow); }
.case-study .prose h2 { border-top: 1px solid var(--line); padding-top: 30px; }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.side-card p:last-child { margin-bottom: 0; }
.side-card dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 650; margin-top: 22px; }
.side-card dd { margin: 8px 0 0; font-size: .95rem; }
.foundation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.foundation-card { padding: 32px; border-left: 3px solid #cbdaf5; }
.foundation-card p { margin-bottom: 0; }
.foundation-card .card-number { margin-bottom: 18px; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; align-items: start; }
.skills details { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #0f1b2d03; transition: border-color .18s, box-shadow .18s; }
.skills details:hover { border-color: #bbcae0; }
.skills details[open] { border-color: #b5c9ea; box-shadow: 0 6px 20px #0f1b2d06; }
.skills summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; cursor: pointer; font-weight: 600; line-height: 1.55; font-size: .98rem; list-style: none; }
.skills summary::-webkit-details-marker { display: none; }
.skills summary::after { content: '+'; color: var(--blue-dark); font-size: 1.35rem; font-weight: 400; flex-shrink: 0; }
.skills details[open] summary::after { content: '−'; }
.skills details[open] summary { color: #1e40af; }
.skills .tags { padding: 0 24px 24px; margin: 0; gap: 8px; }
.skills .tag { font-size: .82rem; padding: 5px 10px; }
.filter-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 32px; padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.filter-bar label { margin: 0; font-size: .88rem; font-weight: 600; }
.filter-bar select { width: auto; max-width: 100%; min-width: 205px; font-size: .9rem; }
.filter-bar p { margin: 0 0 0 auto; color: #64748b; }
.empty { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid #b5c9ea; border-radius: var(--radius); padding: 46px; max-width: 800px; box-shadow: var(--shadow); }
.empty h2 { font-size: 1.8rem; }
.empty p { max-width: 60ch; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 70px; }
.contact-layout > .card { padding: 34px; }
.contact-layout .side-card { margin-top: 30px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 8px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: inset 0 1px 2px #0f1b2d03; }
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
textarea { resize: vertical; min-height: 165px; }
.field { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .field { margin: 0 0 22px; }
.form-note { font-size: .875rem; background: var(--paper); border: 1px solid var(--line); padding: 15px 17px; border-radius: 8px; }
.status { margin-top: 16px; font-size: 1rem; }
.status:empty { margin: 0; }
.trap { display: none; }
#message-form { scroll-margin-top: 110px; }
.screenshot-note { border: 1px solid var(--line); border-left: 3px solid #bccde6; background: var(--paper); padding: 24px; border-radius: 10px; color: var(--muted); font-size: .9rem; margin-top: 28px; }
.heading-small { font-size: 1.45rem; }
.heading-card { font-size: 1.4rem; }
.heading-contact { font-size: 1.75rem; }

.footer { border-top: 1px solid #334155; padding: 56px 0 26px; background: var(--navy); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 64px; }
.footer .brand { margin-bottom: 22px; }
.footer p { font-size: .9rem; max-width: 36ch; line-height: 1.85; }
.footer h2 { font-size: .83rem; letter-spacing: .065em; text-transform: uppercase; margin-bottom: 22px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a:not(.brand) { font-size: .9rem; text-decoration: none; }
.footer p, .footer li a { color: #cbd5e1; }
.footer a:not(.brand) { color: #93c5fd; }
.footer li a:not(.brand) { color: #cbd5e1; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid #334155; margin-top: 44px; padding-top: 24px; font-size: .8rem; color: #cbd5e1; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: min(1100px, 94vw); max-height: 94vh; box-shadow: 0 30px 80px #0004; }
dialog::backdrop { background: #0f1b2de6; }
dialog img { display: block; max-height: 72vh; margin: auto; object-fit: contain; }
dialog button { display: block; margin-left: auto; margin-bottom: 15px; }
dialog p { margin: 12px 0 0; }
[hidden] { display: none!important; }

@media (min-width: 1001px) { .nav { display: flex!important; } }
@media (max-width: 1150px) {
  .wrap { width: calc(100% - 64px); }
  .nav a { padding-inline: 9px; font-size: .875rem; }
  .nav .nav-cta { margin-left: 7px; padding-inline: 14px; }
  .brand img { width: 150px; }
  .hero { gap: 42px; }
  .hero h1 { font-size: clamp(2.65rem, 4.3vw, 3.6rem); }
  .architecture { padding: 30px; }
}
@media (max-width: 1000px) {
  .header-row { min-height: 76px; flex-wrap: wrap; padding-block: 14px; gap: 12px; }
  .menu-toggle { display: block; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-block: 12px 4px; }
  .js .nav { display: none; }
  .js .nav.is-open { display: grid; }
  .nav a { text-align: center; font-size: .9rem; }
  .nav .nav-cta { margin: 0; }
  .hero { gap: 35px; padding-block: 64px; }
  .hero .eyebrow { font-size: .75rem; }
  .hero h1 { font-size: 2.75rem; }
  .architecture strong { font-size: .87rem; }
  .architecture { padding: 26px; }
  .architecture li { gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-block: 68px; }
  .scope-strip .wrap { flex-wrap: wrap; gap: 14px 24px; }
  .scope-strip .eyebrow { width: 100%; }
  .callout { grid-template-columns: 1fr; gap: 28px; padding: 38px; }
  .callout .actions { justify-content: flex-start; }
  .two-col, .contact-layout { gap: 32px; }
  .case-study .prose { padding: 26px; }
  .footer-grid { gap: 32px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .hero { grid-template-columns: 1fr; gap: 42px; padding-block: 48px 54px; }
  .hero h1 { font-size: clamp(2.4rem, 7.3vw, 3.75rem); }
  .hero .lead { max-width: 60ch; }
  .hero .eyebrow { font-size: .75rem; }
  .hero-note { font-size: .8rem; }
  .architecture { padding: 30px; }
  .architecture strong { font-size: .95rem; }
  .section { padding-block: 54px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
  .grid, .skills, .two-col, .contact-layout, .foundation-grid { grid-template-columns: 1fr; }
  .page-heading { padding-block: 48px 34px; }
  .page-heading h1 { font-size: clamp(2.3rem, 7vw, 3.2rem); }
  .content-section { padding-bottom: 54px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .card, .feature-card, .foundation-card { padding: 26px; }
  .skills summary { padding: 22px; }
  .skills .tags { padding-inline: 22px; }
  .contact-layout > .card { padding: 26px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .empty { padding: 30px; }
  .scope-strip span { font-size: .82rem; }
  .header { position: relative; }
}
@media (max-width: 430px) {
  .wrap { width: calc(100% - 36px); }
  .brand img { width: 150px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .actions { align-items: stretch; flex-direction: column; }
  .hero .button { justify-content: space-between; }
  .architecture { padding: 25px; }
  .architecture strong { font-size: .89rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 18px; gap: 12px; }
  .filter-bar select { min-width: 0; width: 100%; }
  .filter-bar p { margin-left: 0; }
  .callout { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; transition: none!important; }
}

/* Final experience and surface refinements. */
.nav a { color: var(--slate); }
.page-index main { background: linear-gradient(120deg, #f8fafc, #eef4ff) top / 100% 820px no-repeat; }
.page-index main > .section:not(.tint) { background: #f8fafc; }
.page-services main { background: var(--section); }
.professional-experience { background: var(--hover); border-left-color: var(--blue); }
.professional-experience .card-number { color: var(--blue-dark); }
.credential-note { margin: 30px 0 0; font-size: .9rem; }
.skills details[open] { background: #f7f9ff; border-color: #9bb2e7; }
.skills .tag { background: #eef4ff; color: #334155; border-color: #d7e1f2; }
.lab-type { display: inline-block; align-self: flex-start; background: #eaf4f7; border: 1px solid #cfdee7; border-radius: 6px; padding: 4px 9px; }
.callout p { color: #cbd5e1; }
.footer :is(a,button):focus-visible, .callout :is(a,button):focus-visible { outline-color: #93c5fd; }
