/* Shared visual system for the portfolio, CV, and diagram gallery. */
:root {
  --paper: #f6f5f0;
  --surface: #fffefa;
  --ink: #222923;
  --muted: #575f53;
  --line: #d8dbd1;
  --control-border: #7d8873;
  --accent: #b84320;
  --focus-color: var(--accent);
  --green: #526448;
  --font: "Manrope", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.7; -webkit-font-smoothing: antialiased; }
::selection { background: #ead0b8; color: var(--ink); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; -webkit-tap-highlight-color: rgb(184 67 32 / 15%); }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }
p { text-wrap: pretty; }
:where(.home-hero, .section-heading, .expertise-row, .work-grid, .career-grid, .contact-top) > * { min-width: 0; }
[hidden] { display: none !important; }
.container { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 100; padding: 12px 18px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--paper); }
.nav-inner { min-height: 88px; display: flex; align-items: center; gap: 40px; }
.wordmark { font-size: 2.125rem; font-weight: 800; letter-spacing: -3px; line-height: 1; text-decoration: none; }
.wordmark span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; position: relative; text-decoration: none; font-size: .875rem; font-weight: 600; }
.nav-links a[aria-current="page"], .nav-links a.is-active { color: var(--accent); }
.nav-links a[aria-current="page"]::after, .nav-links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor; }
.nav-contact { min-height: 44px; white-space: nowrap; display: inline-flex; align-items: center; gap: 20px; border: 1px solid var(--ink); padding: 10px 17px; font-size: .875rem; font-weight: 700; text-decoration: none; }
.nav-contact:hover { background: var(--ink); color: var(--paper); }
.menu-toggle { display: none; }
.eyebrow, .section-number, .micro-label { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: .11em; text-transform: uppercase; }
.micro-label { overflow-wrap: anywhere; }
.eyebrow { color: var(--accent); }
.section-number { color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--green); }
.home-hero { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; align-items: center; padding-block: 84px 76px; }
.home-hero .eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 27px; }
.eyebrow-line { display: inline-block; width: 27px; height: 1px; background: currentColor; }
.home-hero h1 { font-size: clamp(3.25rem, 5.7vw, 4.875rem); font-weight: 600; letter-spacing: -.065em; line-height: 1.05; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.hero-intro { max-width: 465px; margin-top: 27px; font-size: 1.0625rem; color: var(--muted); }
.hero-intro strong { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 32px; }
.button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: 30px; padding: 11px 22px; background: var(--ink); color: var(--surface); border: 1px solid var(--ink); font-size: .875rem; font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.button:hover { background: var(--accent); border-color: var(--accent); color: white; }
.button-outline { background: transparent; color: var(--ink); }
.text-link { min-height: 44px; display: inline-flex; gap: 17px; align-items: center; font-size: .875rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.portrait-frame { position: relative; margin: 12px 0 0 12px; }
.portrait-frame picture { position: relative; display: block; background: #080b08; }
.portrait-frame picture::before { content: ""; position: absolute; inset: -12px 12px 12px -12px; border: 1px solid #b6bcae; z-index: -1; }
.portrait-frame img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; object-position: top; }
.portrait-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 0 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: .035em; text-transform: uppercase; }
.portrait-caption span:last-child { color: var(--muted); }
.current-role { border-block: 1px solid var(--line); padding-block: 22px; display: grid; grid-template-columns: 1fr 1.3fr 1fr auto; gap: 30px; align-items: center; }
.current-role .micro-label { color: var(--muted); }
.current-role strong { font-size: 0.875rem; font-weight: 600; }
.current-role .role-company { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; font-weight: 700; }
.company-monogram { display: inline-grid; width: 35px; height: 35px; place-items: center; color: var(--accent); border: 1px solid var(--line); font-size: 1rem; }
.current-role .period { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.section { padding-block: 88px; }
.section-heading { display: grid; grid-template-columns: 1fr 2.3fr; gap: 60px; margin-bottom: 45px; }
.section-heading .section-number { padding-top: 8px; }
.section-heading h2 { max-width: 700px; font-size: clamp(2rem, 3.2vw, 2.8125rem); font-weight: 500; letter-spacing: -.05em; }
.section-heading p { margin-top: 17px; max-width: 550px; color: var(--muted); font-size: 1rem; }
.expertise-list { border-top: 1px solid var(--line); }
.expertise-row { display: grid; grid-template-columns: 45px 1fr 1.1fr; gap: 30px; padding-block: 32px; border-bottom: 1px solid var(--line); align-items: start; }
.expertise-index { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); padding-top: 5px; }
.expertise-row h3 { font-size: 1.375rem; font-weight: 500; letter-spacing: -.035em; }
.expertise-row p { color: var(--muted); font-size: 1rem; }
.tool-line { display: block; margin-top: 13px; color: var(--green); font-family: var(--mono); font-size: 0.75rem; line-height: 1.8; }
.work-section { background: #eaece3; border-block: 1px solid var(--line); }
.work-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.work-feature { --focus-color: #f4c5a4; background: var(--ink); color: var(--paper); padding: 35px; display: flex; flex-direction: column; min-height: 400px; }
.work-feature .micro-label { color: #bcc4b4; }
.work-feature h3 { font-size: 1.875rem; font-weight: 500; letter-spacing: -.04em; max-width: 330px; margin-top: auto; padding-top: 30px; }
.work-feature p { color: #c1c6bb; font-size: 1rem; max-width: 360px; margin-block: 18px 24px; }
.work-feature .text-link { color: #f4c5a4; }
.delivery-diagram { display: grid; grid-template-columns: 1fr 23px 1fr 23px 1fr; align-items: center; gap: 5px; margin-top: 25px; padding-block: 15px 30px; }
.delivery-diagram span { padding: 12px 3px; border: 1px solid #687360; text-align: center; font-family: var(--mono); font-size: 0.75rem; color: #dde3d6; }
.delivery-diagram i { font-style: normal; color: #d49873; text-align: center; }
.work-notes { display: grid; }
.work-note { padding: 29px 0 29px 28px; border-bottom: 1px solid #cbd0c1; }
.work-note:first-child { padding-top: 0; }
.work-note h3 { font-size: 1.3125rem; font-weight: 500; letter-spacing: -.035em; }
.work-note p { color: var(--muted); font-size: 1rem; margin-block: 12px; }
.work-note .micro-label { color: var(--green); font-size: 0.75rem; }
.career-grid { display: grid; grid-template-columns: 1fr 2.3fr; gap: 60px; }
.career-aside h2 { font-size: 2.375rem; font-weight: 500; letter-spacing: -.05em; margin-top: 24px; }
.career-aside p { color: var(--muted); font-size: 1rem; margin-block: 20px 25px; max-width: 260px; }
.career-row { display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: 25px; align-items: start; padding-block: 25px; border-top: 1px solid var(--line); }
.career-row:last-child { border-bottom: 1px solid var(--line); }
.career-date { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 5px; }
.career-row h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.025em; }
.career-row p { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.career-row .current-label { font-family: var(--mono); font-size: 0.75rem; color: var(--green); background: #e6eadf; padding: 4px 9px; }
.credential-strip { flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 26px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.credential-strip .micro-label { color: var(--muted); }
.credentials { display: flex; flex: 1; justify-content: center; flex-wrap: wrap; gap: 20px 30px; }
.credentials span { font-size: .875rem; font-weight: 600; }
.credentials small { display: block; color: var(--muted); font-family: var(--mono); font-size: 0.75rem; margin-top: 2px; font-weight: 400; }
.contact-section { --focus-color: #f4c5a4; background: var(--ink); color: var(--paper); padding-block: 75px 30px; }
.contact-top { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; padding-bottom: 60px; }
.contact-top .eyebrow { color: #dba27c; }
.contact-top h2 { font-size: clamp(2.1875rem, 3.3vw, 3rem); font-weight: 500; letter-spacing: -.05em; max-width: 550px; margin-top: 20px; }
.contact-details { display: flex; flex-direction: column; align-items: start; gap: 18px; }
.contact-email { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.0625rem, 2vw, 1.5625rem); text-decoration: none; border-bottom: 1px solid #6f7668; padding-bottom: 8px; }
.contact-details a:hover { color: #e8ba99; }
.contact-social { display: flex; flex-wrap: wrap; gap: 25px; font-size: .875rem; }
.contact-social a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-bottom { padding-top: 23px; border-top: 1px solid #495142; display: flex; justify-content: space-between; gap: 20px; color: #b7bfb0; font-family: var(--mono); font-size: 0.75rem; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-bottom a:hover { color: #f4c5a4; }
.simple-footer { border-top: 1px solid var(--line); padding-block: 27px; color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.simple-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.simple-footer .container { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 20px; }

@media (min-width: 1500px) {
  .home-hero { padding-block: 110px 100px; }
}
@media (max-width: 1000px) {
  .container { width: calc(100% - 48px); }
  .home-hero { gap: 40px; }
  .home-hero h1 { font-size: clamp(3rem, 6.5vw, 4.25rem); }
  .section-heading, .career-grid { grid-template-columns: 1fr 2fr; gap: 35px; }
  .current-role { grid-template-columns: 1fr 1fr; gap: 12px 30px; }
  .career-row { grid-template-columns: 140px minmax(0, 1fr); gap: 18px; }
  .career-row .current-label { grid-column: 2; justify-self: start; }
  .credential-strip { align-items: start; }
}
@media (max-width: 960px) {
  .nav-inner { min-height: 76px; gap: 20px; flex-wrap: wrap; }
  .nav-contact { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 60px; min-height: 44px; background: none; border: 1px solid var(--control-border); padding: 8px; font-family: var(--mono); font-size: .75rem; }
  .nav-links { order: 3; width: 100%; margin: -8px 0 14px; gap: 10px 24px; }
  .js .nav-links { display: none; }
  .js .nav-links.is-open { display: flex; }
  .credential-strip { align-items: start; gap: 20px; }
  .credentials { justify-content: start; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 85px; }
  .container { width: calc(100% - 40px); }
  .nav-inner { min-height: 72px; gap: 12px; flex-wrap: wrap; }
  .wordmark { font-size: 1.9375rem; }
  .nav-contact { margin-left: auto; padding: 7px 12px; gap: 15px; }
  .menu-toggle { min-width: 60px; }
  .nav-links { order: 3; width: 100%; margin: -8px 0 14px; display: flex; flex-wrap: wrap; gap: 10px 24px; }
  .js .nav-links { display: none; }
  .js .nav-links.is-open { display: flex; }
  .nav-links a { padding-block: 9px; }
  .nav-links a[aria-current="page"]::after, .nav-links a.is-active::after { bottom: 4px; }
  .home-hero { grid-template-columns: 1fr; gap: 42px; padding-block: 50px 40px; }
  .home-hero h1 { font-size: clamp(2.5rem, 10vw, 4.25rem); }
  .home-hero .eyebrow { font-size: 0.75rem; margin-bottom: 24px; }
  .hero-intro { font-size: 1rem; }
  .hero-actions { gap: 22px; }
  .portrait-frame { width: calc(100% - 12px); max-width: 440px; justify-self: center; }
  .portrait-frame img { aspect-ratio: 1 / 1; }
  .current-role { grid-template-columns: 1fr; padding-block: 24px; gap: 10px; }
  .current-role .micro-label { font-size: 0.75rem; }
  .current-role strong { font-size: .875rem; }
  .current-role .role-company { font-size: 1rem; }
  .current-role .period { font-size: 0.75rem; }
  .section { padding-block: 55px; }
  .section-heading, .career-grid { grid-template-columns: 1fr; gap: 22px; }
  .section-heading { margin-bottom: 30px; }
  .expertise-row { grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; padding-block: 25px; }
  .expertise-row h3 { font-size: 1.3125rem; }
  .expertise-row > div:last-child { grid-column: 2; }
  .work-grid { grid-template-columns: 1fr; gap: 30px; }
  .work-feature { padding: 27px; min-height: 360px; }
  .work-feature h3 { font-size: 1.6875rem; }
  .work-note { padding: 25px 0; }
  .career-aside h2 { font-size: 2.125rem; margin-top: 15px; }
  .career-aside p { max-width: none; }
  .career-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .career-date { grid-column: 1 / -1; }
  .career-row .current-label { grid-column: 2; grid-row: 2; }
  .career-row h3 { font-size: 1.0625rem; }
  .credential-strip { flex-direction: column; padding-block: 24px; }
  .credentials { gap: 18px 25px; }
  .contact-top { grid-template-columns: 1fr; gap: 35px; padding-bottom: 40px; }
  .contact-section { padding-block: 50px 25px; }
  .footer-bottom { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 400px) {
  .delivery-diagram { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 0; }
  .delivery-diagram i { transform: rotate(90deg); justify-self: center; }
}
