/* Shared open-document design. Font files and licenses are served locally. */
@font-face { font-family: Manrope; src: url('/assets/fonts/manrope-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 500; font-display: optional; }
@font-face { font-family: 'Azeret Mono'; src: url('/assets/fonts/azeret-mono-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 500; font-display: optional; }
:root { color-scheme: dark; --bg: #090909; --text: #f3f3f3; --muted: #a3a3a3; --accent: #53c3cb; --line: #2b2b2b; --surface: #161616; --mono: 'Azeret Mono', monospace; --gutter: 5.5%; --content-width: 72rem; --reading-width: 46rem; }
* { box-sizing: border-box; }
/* Keep the shell aligned when navigation adds or removes a vertical scrollbar. */
html { background: var(--bg); scroll-padding-block: 1.5rem; scrollbar-gutter: stable; }
body { margin: 0; color: var(--text); font-family: Manrope, Arial, sans-serif; font-size: 1.0625rem; font-weight: 400; line-height: 1.7; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, [tabindex] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
#page-content:focus, #page-title:focus { outline: none; }
#page-content:focus-visible h1, #page-title:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; }
::selection { color: var(--bg); background: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; top: .75rem; left: var(--gutter); padding: .5rem 1rem; background: var(--text); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-shell { width: 100%; max-width: 1800px; min-height: 100svh; margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 2rem; }
.site-brand { position: relative; display: flex; align-items: center; min-height: 44px; text-decoration: none; flex: 0 0 auto; max-width: 100%; }
.brand-mark { display: block; width: 44px; height: 39px; flex: 0 0 44px; color: var(--text); transition: color 180ms ease; }
.site-brand:hover .brand-mark, .site-brand:focus-visible .brand-mark,
.site-brand:hover .brand-wordmark, .site-brand:focus-visible .brand-wordmark { color: var(--accent); }
/* Tuck the text into the diagonal's empty space so the mark reads as /evans.digital. */
.brand-wordmark { margin-left: -3px; display: grid; min-width: 0; padding-right: .2em; font-size: 1.6rem; line-height: 1.4; font-weight: 500; letter-spacing: -.065em; color: var(--text); transform: translateY(.075em); transition: color 180ms ease; }
.brand-wordmark { overflow-wrap: anywhere; }
.brand-ghost, .brand-live { grid-area: 1 / 1; }
.brand-ghost { visibility: hidden; }
/* The typing caret never changes the wordmark's reserved width or line height. */
.brand-caret { display: inline-block; position: relative; width: 0; height: 0; visibility: hidden; }
.brand-caret::after { content: ''; position: absolute; left: .1em; bottom: -.04em; width: .1em; height: .9em; background: var(--accent); }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.8rem; font-size: .9375rem; }
.site-nav a { display: inline-flex; align-items: center; gap: .6em; min-height: 44px; text-decoration: none; position: relative; padding-block: .4rem; }
.site-nav a:not(.nav-contact)::after { content: ''; position: absolute; height: 1px; bottom: .25rem; left: 0; right: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
.site-nav .nav-contact { background: var(--text); color: var(--bg); border-radius: 2rem; padding-inline: 1.2em; }
.nav-contact svg { flex: 0 0 auto; }
.site-nav .nav-contact:hover { background: var(--accent); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: auto; padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .75rem; }
#page-content { min-width: 0; width: 100%; padding-block: 4rem 7rem; }
/* A short entrance softens document changes without moving content or delaying links. */
@media screen and (prefers-reduced-motion: no-preference) {
  :root:not(.reduce-motion) body:not(.is-home) #page-content { animation: page-arrive 500ms ease-in-out; }
}
@keyframes page-arrive { from { opacity: 0; } to { opacity: 1; } }
.content { width: 100%; max-width: var(--content-width); margin-inline: auto; overflow-wrap: anywhere; }
h1, h2, h3 { font-weight: 500; line-height: 1.3; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 4.5rem); letter-spacing: -.05em; margin-bottom: 2.5rem; }
h2 { font-size: 1.7rem; letter-spacing: -.025em; margin-block: 3.5rem 1.2rem; }
h3 { font-size: 1.2rem; margin-block: 2rem .8rem; }
p { margin-block: 0 1.4rem; }
ul, ol { padding-left: 1.5em; margin-block: 1rem 2rem; }
li { margin-block: .6rem; padding-left: .2em; }
strong, b { font-weight: 500; color: var(--text); }
.content__body { max-width: var(--reading-width); min-width: 0; color: #d2d2d2; }
.content__header { max-width: 52rem; }
.about { max-width: var(--reading-width); }
.content__body h2, .content__body h3 { color: var(--text); }
.content__header { margin-bottom: 3rem; }
.content__header h1 { margin-bottom: 1.2rem; }
.content__subtitle { font-size: 1.2rem; color: var(--muted); line-height: 1.6; }
.content__meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.content__table-wrap { width: 100%; max-width: 100%; overflow-x: auto; margin-block: 2rem; }
.content__table { width: 100%; min-width: 38rem; border-collapse: collapse; text-align: left; font-size: .9375rem; }
.content__table th, .content__table td { padding: 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.content__table th { font-weight: 500; color: var(--text); }
code { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 3rem; }
img { max-width: 100%; height: auto; }
/* Both strings share the same complete, invisible sizing text. No wiping or cropping. */
.is-home #page-content { display: flex; align-items: center; flex: 1; padding-block: 5rem 7rem; }
.home-hero { max-width: none; }
.home-hero h1 { font-size: clamp(1.5rem, 8vw, 5.25rem); font-weight: 500; letter-spacing: -.065em; line-height: 1.4; margin: 0; }
.hero-slot { display: grid; padding-bottom: .2em; }
.hero-ghost, .hero-live { grid-area: 1 / 1; }
.hero-ghost { visibility: hidden; }
.hero-caret { display: inline-block; width: .1em; height: .94em; margin-left: .075em; vertical-align: -.025em; background: var(--accent); }
.hero-live .hero-caret { animation: caret-blink 1.2s step-end infinite; }
.is-home .brand-live { visibility: hidden; }
[data-phase="header"] .brand-caret, [data-phase="deleting-header"] .brand-caret { visibility: visible; }
.is-home[data-phase="typing"] .hero-caret, .is-home[data-phase="deleting"] .hero-caret { animation: none; }
.is-home[data-phase="handoff"] .hero-caret, .is-home[data-phase="header"] .hero-caret, .is-home[data-phase="departed"] .hero-caret { visibility: hidden; }
.home-starting .hero-live { visibility: hidden; }
.header-starting .brand-live { visibility: hidden; }
@keyframes caret-blink { 50% { opacity: 0; } }
.bird-flight { position: fixed; inset: 0; overflow: hidden; contain: layout paint; pointer-events: none; z-index: 20; }
.pointer-bird { position: absolute; top: 0; left: 0; width: 47.5px; height: 42.5px; color: var(--accent); opacity: 0; pointer-events: none; transition: opacity 320ms ease; }
.pointer-bird.is-visible { opacity: .85; }
.pointer-bird svg { display: block; width: 100%; height: 100%; overflow: visible; animation: bird-hover 3.2s ease-in-out infinite; animation-play-state: paused; }
.pointer-bird.is-flying svg { animation-play-state: running; }
/* The same small drift continues through travel and arrival, without a reset. */
@keyframes bird-hover {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(2px, -3px) rotate(-2deg); }
  50% { transform: translate(-1px, -5px) rotate(1deg); }
  75% { transform: translate(-3px, -1px) rotate(2deg); }
}
.pointer-bird__wing { transform-origin: 21px 18px; transform: rotate(12deg) scaleY(.3); }
.pointer-bird__wing--far { opacity: .6; }
.pointer-bird.is-flying .pointer-bird__wing { animation: bird-wingbeat 280ms ease-in-out infinite; }
.pointer-bird.is-flying .pointer-bird__wing--far { animation-delay: -70ms; }
@keyframes bird-wingbeat {
  0%, 100% { transform: rotate(12deg) scaleY(.3); }
  50% { transform: rotate(-12deg) scaleY(1); }
}
.document-hidden .hero-caret { animation-play-state: paused; }
/* Lists are open layouts with a single divider rather than stacked terminal panels. */
.project-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: 4rem; text-decoration: none; border-top: 1px solid var(--line); padding-block: 3rem; }
.project-card__visual { min-width: 0; display: grid; place-items: center; padding: 2rem; background: var(--surface); border-radius: .8rem; }
.project-card__visual img { width: 200px; display: block; }
.project-card__header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1rem; }
.project-card__title { font-size: 2rem; margin: 0; }
.project-card__arrow { width: .65em; height: .65em; margin-inline-start: .2em; color: var(--accent); }
.project-card__status { font-family: var(--mono); font-size: .8125rem; color: var(--accent); max-width: 100%; }
.project-card__description { color: var(--muted); margin-block: 1.5rem; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: .75rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.project-card:hover .project-card__title, .article-preview:hover .article-preview__title { color: var(--accent); }
.article-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem; border-block: 1px solid var(--line); padding-block: 2.5rem; text-decoration: none; }
.article-preview__title { margin: 0 0 1rem; max-width: 38rem; }
.article-preview__subtitle { grid-column: 1; margin: 0; color: var(--muted); }
.article-preview__year { grid-column: 2; grid-row: 1; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.about__certs { margin-top: 3rem; }
.about__terminal-title { color: var(--accent); font-family: var(--mono); font-size: .85rem; }
.about__terminal-list { padding: 0; list-style: none; }
.about__terminal-list li { padding: .7rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.about__terminal-prompt { color: var(--muted); margin-right: .7rem; font-family: var(--mono); }
.article__figure { margin: 3rem 0; }
.article__image { display: block; width: 100%; }
.article__image[role="button"], .screenshot-gallery__image[role="button"] { cursor: zoom-in; }
.article__callout { border-left: 2px solid var(--accent); background: rgb(83 195 203 / 5%); padding: 1.5rem; margin-block: 2.5rem; scroll-margin-block: 2rem; }
.content__body .article__callout h3 { margin-top: 0; color: var(--accent); }
.article__callout p:last-child { margin-bottom: 0; }
.article__references { font-size: .9rem; }
.not-found__image { display: block; width: min(100%, 28rem); margin-block: 2rem; }
/* Forms follow document flow; neither the field group nor outcomes has a fixed height. */
.contact { max-width: 38rem; }
.contact__form { display: grid; gap: 1.7rem; }
.form-field { display: grid; gap: .5rem; min-width: 0; }
.form-field__label { font-size: .875rem; color: var(--muted); }
.form-field__input, .form-field__textarea { width: 100%; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid #494949; border-radius: .4rem; padding: .8rem 1rem; scroll-margin-block: 3rem; }
.form-field__textarea { resize: vertical; }
.contact__submit, .keyboard-help button { justify-self: start; min-height: 44px; padding: .75rem 1.5rem; border: 0; border-radius: 2rem; background: var(--text); color: var(--bg); }
.contact__submit:hover, .keyboard-help button:hover { background: var(--accent); }
.contact__success, .contact__error { padding: 1.5rem; border: 1px solid var(--accent); border-radius: .4rem; margin: 0; scroll-margin-block: 2rem; }
.contact__success p { margin: 0; }
.contact__error { border-color: #e6ab9c; }
/* Modal overlays keep their own scrolling, without constraining the reading page. */
/* A contained viewport pans the original image without moving the close control. */
.lightbox { display: none; position: fixed; z-index: 50; inset: 0; background: rgb(9 9 9 / 96%); padding: 1rem; }
.lightbox--open { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1rem; }
.lightbox__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; }
.lightbox__toolbar button, .lightbox__original { min-height: 44px; border: 1px solid #555; border-radius: 2rem; padding: .4rem 1rem; background: var(--surface); color: var(--text); font-size: .9375rem; }
.lightbox__original { display: inline-flex; align-items: center; text-decoration: none; }
.lightbox__toolbar .lightbox__close { font-size: 1.5rem; line-height: 1; min-width: 44px; }
.lightbox__viewport { min-width: 0; min-height: 0; overflow: auto; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.lightbox__image { display: block; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox--zoomed .lightbox__viewport { display: block; }
.lightbox--zoomed .lightbox__image { width: var(--image-width); max-width: none; max-height: none; }
.keyboard-help { width: min(40rem, calc(100% - 3rem)); max-height: calc(100svh - 3rem); border: 1px solid var(--line); padding: 2rem; background: var(--surface); color: var(--text); overflow-wrap: anywhere; }
.keyboard-help::backdrop { background: rgb(0 0 0 / 75%); }
.keyboard-help h2 { margin-top: 0; }
.keyboard-help dt { margin-top: 1rem; color: var(--accent); }
.keyboard-help dd { margin-left: 0; color: var(--muted); }
/* Shared reading alignment; only long prose and form fields use a narrower measure. */
.reading-layout { display: grid; grid-template-columns: minmax(0, var(--reading-width)) minmax(12rem, 1fr); align-items: start; gap: 4rem; }
.reading-layout > .content__body { grid-column: 1; grid-row: 1; width: 100%; }
.page-contents { grid-column: 2; grid-row: 1; min-width: 0; border-top: 1px solid var(--accent); padding-top: 1rem; font-size: .875rem; line-height: 1.5; }
.contents-disclosure summary { cursor: pointer; min-height: 44px; }
.page-contents__label { color: var(--accent); font-family: var(--mono); font-size: .8rem; margin: 0 0 1rem; }
.page-contents ol { list-style: none; padding: 0; margin: 0; }
.page-contents li { padding: 0; margin: 0 0 .8rem; }
.page-contents a { text-decoration: none; color: var(--muted); }
.page-contents a:hover, .page-contents a:focus-visible, .page-contents a[aria-current] { color: var(--accent); }
.content__body h2:not(.metricpull-glance__title)::before { content: ''; display: block; width: 2rem; border-top: 2px solid var(--accent); margin-bottom: 1rem; }
.content__body > h2:first-child { margin-top: 0; }
.content--article h1 { font-size: clamp(2.3rem, 4.2vw, 3.5rem); line-height: 1.18; }
.content--article .content__body { font-size: 1.125rem; line-height: 1.8; }
.content--article .content__body h2 { font-size: 1.65rem; line-height: 1.35; }
.article__section-question { display: block; margin-top: .4rem; font-size: .9em; font-weight: 400; color: #d2d2d2; }
.summary-panel { border-left: 2px solid var(--accent); background: rgb(83 195 203 / 5%); padding: 1.5rem; margin-bottom: 3rem; }
.summary-panel h2 { margin-top: 0; }
.content__body .summary-panel h2::before { display: none; }
.summary-panel p:last-child { margin-bottom: 0; }
.disclosure { border-block-end: 1px solid var(--line); margin-block: 0; min-width: 0; }
.disclosure summary { display: flex; align-items: baseline; gap: 1rem; list-style: none; cursor: pointer; padding-block: 1.25rem; color: var(--text); }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: '+'; margin-left: auto; color: var(--accent); font-family: var(--mono); flex: 0 0 auto; }
.disclosure[open] > summary::after { content: '−'; }
.disclosure summary h2, .disclosure summary h3 { font-size: 1.125rem; line-height: 1.5; margin: 0; min-width: 0; }
.content__body .disclosure summary h2::before { display: none; }
.disclosure summary:hover { color: var(--accent); }
.disclosure__body { padding-bottom: 1rem; }
.disclosure__count { font-size: .8125rem; color: var(--muted); margin-left: .75rem; }
.detail-controls { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-block: 1rem; }
.detail-controls button { text-align: left; min-height: 44px; padding: .35rem 0; border: 0; background: transparent; color: var(--accent); font-size: .8125rem; text-decoration: underline; text-underline-offset: .25em; }
.product-back { font-size: .9375rem; }
h2[id], details[id] { scroll-margin-block: 2rem; }
@media (max-width: 1050px) {
  .reading-layout { display: flex; flex-direction: column; gap: 2.5rem; }
  .page-contents { width: 100%; max-width: var(--reading-width); }
  .page-contents ol { columns: 2; column-gap: 2rem; }
  .page-contents li { break-inside: avoid; }
}
@media (max-width: 600px) { .page-contents ol { columns: 1; } }
@media print {
  .site-header, .site-footer, .page-contents, .detail-controls, .pointer-bird, .lightbox { display: none !important; }
  .reading-layout { display: block; }
  .content__body { max-width: none; }
  .disclosure summary::after { content: none; }
}
@media (max-width: 700px) {
  :root { --gutter: 6%; }
  .site-header { align-items: flex-start; padding-block: 1.5rem; gap: 1.5rem; }
  .site-nav { width: 100%; gap: .3rem 1.4rem; }
  #page-content { padding-block: 1.75rem 4.5rem; }
  .project-card { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .project-card__visual { order: 1; padding: 1.5rem; }
  .project-card__visual img { width: 150px; }
  .article-preview { grid-template-columns: minmax(0, 1fr); }
  .article-preview__year { grid-column: 1; grid-row: auto; margin-top: 1.2rem; }
  .site-footer { padding-block: 1.5rem; }
  .brand-wordmark { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .pointer-bird { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.reduce-motion .hero-caret { animation: none; }
.reduce-motion .pointer-bird { display: none; }

/* The footer supplies the closing rule; final disclosures do not need another. */
.about__certs > .disclosure, .content--article #references { border-block-end: 0; }
.about__certs .disclosure__body, #references .disclosure__body { padding-bottom: 0; }
.about__terminal-list, .article__references { margin-bottom: 0; }
.about__terminal-list li:last-child { border-bottom: 0; }
.page-about #page-content, .page-articles-ai-business-management-practices #page-content { padding-bottom: 3rem; }
