:root {
  --paper: #f4f7fb;
  --paper-deep: #e2e8f0;
  --ink: #111827;
  --muted: #526071;
  --navy: #102a43;
  --blue-soft: #d7e5ff;
  --blue-focus: #78a9ff;
  --line: #c7d0dc;
  --white: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 10px 14px; background: var(--white); color: var(--navy); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.system-card :focus-visible, .contact-section :focus-visible, footer :focus-visible { outline-color: var(--blue-focus); }

.site-header { width: var(--page); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; text-decoration: none; letter-spacing: -.04em; }
.wordmark span { color: #0f62fe; }
nav { display: flex; gap: clamp(20px, 4vw, 54px); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
nav a { text-decoration: none; }
nav a:hover { color: #0043ce; }

.hero { width: var(--page); min-height: 700px; margin: 0 auto; padding: clamp(76px, 10vw, 138px) 0 100px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: clamp(48px, 9vw, 120px); align-items: center; }
.eyebrow, .section-index { margin: 0 0 24px; color: var(--muted); font: .72rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.status-dot, .live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: #0f62fe; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; line-height: .96; }
h1 { max-width: 850px; margin: 0; font-size: clamp(3.7rem, 7.5vw, 7.3rem); }
.hero-role { margin: 30px 0 8px; color: var(--navy); font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 700; }
.hero-lede { max-width: 670px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; min-height: 48px; padding: 12px 18px; align-items: center; justify-content: center; border: 1px solid var(--navy); font: 700 .78rem/1 var(--mono); letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.button-primary { background: var(--navy); color: var(--white); }
.button-secondary { color: var(--navy); }
.button:hover { transform: translateY(-2px); }

.system-card { align-self: center; background: var(--navy); color: var(--white); box-shadow: 18px 18px 0 var(--paper-deep); transform: rotate(1.2deg); }
.system-card-head { padding: 14px 18px; display: flex; justify-content: space-between; border-bottom: 1px solid #486581; color: var(--blue-soft); font: .68rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.system-card dl { margin: 0; padding: 12px 22px 22px; }
.system-card dl div { padding: 15px 0; border-bottom: 1px solid #334e68; }
.system-card dl div:last-child { border-bottom: 0; }
.system-card dt { margin-bottom: 5px; color: #a8bed3; font: .65rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.system-card dd { margin: 0; font-family: var(--mono); font-size: .82rem; }
.live-dot { width: 7px; height: 7px; background: var(--blue-focus); }

.proof { background: var(--navy); color: var(--white); display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 max(24px, calc((100vw - 1180px) / 2)); }
.proof div { min-height: 170px; padding: 35px clamp(18px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #486581; }
.proof div:first-child { border-left: 1px solid #486581; }
.proof strong { font: 500 clamp(2.5rem, 5vw, 4rem)/1 var(--serif); }
.proof span { margin-top: 8px; color: #c4d3e3; font: .68rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }

.section { width: var(--page); margin: 0 auto; padding: clamp(90px, 12vw, 160px) 0; }
.section-heading { max-width: 820px; margin-bottom: 70px; }
.section-heading h2, .about-section h2 { margin: 0; font-size: clamp(3rem, 6vw, 5.6rem); }
.section-heading > p:last-child { max-width: 610px; margin: 28px 0 0; color: var(--muted); font-size: 1.08rem; }
.section-heading-row { max-width: none; display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: end; }
.section-heading-row > p:last-child { margin-bottom: 8px; }

.expertise-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.expertise-grid article { min-height: 300px; padding: 35px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.article-number { color: #526071; font: .7rem var(--mono); }
.expertise-grid h3 { margin: 48px 0 14px; font: 600 1.5rem var(--serif); }
.expertise-grid p { max-width: 500px; color: var(--muted); }
.expertise-grid .tech-line { margin-top: 28px; color: var(--navy); font: .67rem var(--mono); letter-spacing: .04em; text-transform: uppercase; }

.work-section { width: 100%; padding-left: max(24px, calc((100vw - 1180px) / 2)); padding-right: max(24px, calc((100vw - 1180px) / 2)); background: var(--white); }
.project-list { border-top: 1px solid var(--line); }
.project { padding: 34px 0 42px; border-bottom: 1px solid var(--line); }
.project-meta { display: flex; justify-content: space-between; margin-bottom: 34px; color: var(--muted); font: .68rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.project-body { display: grid; grid-template-columns: 70px 1fr; gap: 20px; }
.project-number { margin: 8px 0 0; color: #526071; font: .75rem var(--mono); }
.project h3 { margin: 0; font: 500 clamp(2rem, 4vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.035em; }
.project-role { margin: 8px 0 18px; color: #0050d8; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.project-body div > p:not(.project-role) { max-width: 750px; color: var(--muted); }
.project-body div > p a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; list-style: none; }
.tag-list li { padding: 5px 9px; border: 1px solid var(--line); font: .65rem var(--mono); text-transform: uppercase; }
.architecture { margin: 38px 0 0 90px; padding: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background-image: linear-gradient(#e3e8ef 1px, transparent 1px), linear-gradient(90deg, #e3e8ef 1px, transparent 1px); background-size: 20px 20px; }
.architecture span { padding: 8px 10px; border: 1px solid #829ab1; background: var(--white); color: var(--navy); font: .62rem var(--mono); text-transform: uppercase; }
.architecture i { width: clamp(18px, 5vw, 80px); height: 1px; background: #829ab1; }

.experience-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 10vw, 140px); }
.timeline { border-top: 1px solid var(--line); }
.timeline article { padding: 30px 0 42px; display: grid; grid-template-columns: 120px 1fr; gap: 25px; border-bottom: 1px solid var(--line); }
.timeline-period { margin: 4px 0 0; color: var(--muted); font: .68rem var(--mono); }
.timeline h3 { margin: 0; font: 600 1.5rem var(--serif); }
.company { margin: 3px 0 18px; color: #0050d8; font-size: .76rem; font-weight: 700; text-transform: uppercase; }
.timeline article div > p:last-child { color: var(--muted); }

.about-section { padding-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 10vw, 140px); }
.about-copy { padding-top: 42px; color: var(--muted); font-size: 1.08rem; }
.contact-section { padding: clamp(90px, 12vw, 150px) max(24px, calc((100vw - 1180px) / 2)); background: var(--navy); color: var(--white); }
.contact-section .section-index { color: #a8bed3; }
.contact-section h2 { max-width: 900px; margin: 0; font-size: clamp(3.3rem, 7vw, 6.8rem); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(45px, 9vw, 120px); align-items: start; margin-top: 42px; }
.contact-grid > div > p { max-width: 650px; margin: 0; color: #d0dce8; font-size: 1.08rem; }
.button-light { border-color: var(--white); background: var(--white); color: var(--navy); }
.button-outline-light { border-color: #829ab1; color: var(--white); }
.contact-form fieldset { margin: 0; padding: 0; border: 0; }
.contact-form legend { margin-bottom: 18px; color: #a8bed3; font: .67rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.contact-form label { display: block; margin: 13px 0 5px; color: #d0dce8; font: .67rem var(--mono); text-transform: uppercase; }
.contact-form input, .contact-form textarea { width: 100%; padding: 11px; border: 1px solid #627d98; border-radius: 0; background: #243b53; color: var(--white); font: inherit; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue-focus); outline: 0; box-shadow: 0 0 0 2px var(--blue-focus); }
.contact-form button { margin-top: 16px; padding: 13px 18px; border: 1px solid var(--blue-focus); background: var(--blue-focus); color: var(--navy); cursor: pointer; font: 700 .72rem var(--mono); text-transform: uppercase; }
.contact-form :disabled { cursor: not-allowed; opacity: .78; }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#contact-turnstile { min-height: 65px; margin-top: 18px; }
.contact-status { min-height: 1.6em; margin: 12px 0 0; color: #d0dce8; font: .72rem var(--mono); }
.contact-status[data-state="success"] { color: var(--blue-focus); }
.contact-status[data-state="error"] { color: #ffd1c7; }
.contact-note { margin-top: 20px; color: #a8bed3; font: .67rem var(--mono); text-transform: uppercase; }

footer { min-height: 130px; padding: 30px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 32px; border-top: 1px solid #334e68; background: var(--navy); color: #b8c8d8; font-size: .74rem; }
.wordmark-footer { color: var(--white); }
footer p:nth-of-type(2) { margin-left: auto; }
footer a { text-underline-offset: 3px; }

/* Printable CV */
.cv-page { background: #e7e7e7; color: #171717; font-family: var(--sans); font-size: 15px; line-height: 1.55; }
.cv-toolbar { max-width: 900px; margin: 24px auto 0; display: flex; justify-content: space-between; align-items: center; }
.cv-toolbar a { font-weight: 700; }
.cv-toolbar button { padding: 10px 14px; border: 0; background: var(--navy); color: white; cursor: pointer; font-weight: 700; }
.cv-document { width: min(900px, calc(100% - 32px)); margin: 16px auto 40px; padding: 56px 62px; background: white; box-shadow: 0 8px 30px #0002; }
.cv-header { padding-bottom: 20px; border-bottom: 3px solid var(--navy); }
.cv-header h1 { font: 700 2.2rem/1 var(--serif); letter-spacing: -.04em; }
.cv-header p { margin: 7px 0 0; }
.cv-document section { margin-top: 24px; }
.cv-document h2 { margin: 0 0 10px; padding-bottom: 4px; border-bottom: 1px solid #aaa; font: 700 .95rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.cv-document h3 { margin: 0; font-size: 1rem; }
.cv-document h4 { margin: 13px 0 4px; font-size: .9rem; }
.cv-document h4 span { font-weight: 400; }
.cv-document p { margin: 4px 0; }
.cv-document ul { margin: 5px 0; padding-left: 19px; }
.cv-document li { margin: 3px 0; }
.cv-skills { display: block; }
.cv-skills strong { display: inline-block; min-width: 78px; }
.cv-role { margin-top: 16px; }
.cv-role > header { display: block; }
.cv-role > header > p { font-weight: 700; white-space: nowrap; }
.cv-project { margin-left: 15px; padding-left: 15px; border-left: 2px solid #ccc; }
.cv-project h4 { break-after: avoid; }

@media (max-width: 760px) {
  :root { --page: min(100% - 32px, 620px); }
  .site-header { min-height: 72px; }
  nav { gap: 17px; font-size: .65rem; }
  .hero { min-height: auto; padding: 72px 0 85px; grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.4rem, 17vw, 5.5rem); }
  .system-card { max-width: 430px; transform: none; }
  .proof { grid-template-columns: 1fr 1fr; padding: 0 16px; }
  .proof div { min-height: 130px; border-bottom: 1px solid #486581; }
  .proof div:nth-child(odd) { border-left: 1px solid #486581; }
  .section-heading-row, .experience-section, .about-section, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .section-heading-row > p:last-child { margin-top: 0; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-grid article { min-height: 260px; padding: 27px; }
  .project-body { grid-template-columns: 36px 1fr; gap: 10px; }
  .architecture { margin-left: 46px; padding: 15px 8px; overflow: hidden; }
  .architecture span { padding: 6px 4px; font-size: .52rem; }
  .timeline article { grid-template-columns: 1fr; gap: 8px; }
  .about-copy { padding-top: 0; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  footer p { margin: 0; }
  footer p:nth-of-type(2) { margin-left: 0; }
  .cv-toolbar { width: calc(100% - 32px); }
  .cv-document { padding: 34px 24px; }
}

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

@page { size: A4; margin: 10mm; }
@media print {
  .cv-page { background: white; font-size: 10.25pt; line-height: 1.4; }
  .cv-toolbar, .skip-link { display: none; }
  .cv-document { width: 100%; margin: 0; padding: 0; box-shadow: none; }
  .cv-document section { margin-top: 9px; }
  .cv-header { padding-bottom: 8px; }
  .cv-document h2 { margin-bottom: 7px; }
  .cv-document ul { margin: 3px 0; }
  .cv-document li { margin: 1px 0; }
  .cv-role { margin-top: 6px; }
  .cv-project h4 { margin-top: 4px; }
  a { color: inherit; text-decoration: none; }
}
