/* Mobile first. Content remains visible and navigable without JavaScript. */
:root {
  color-scheme: light;
  --paper: #f7f9fc;
  --surface: #fff;
  --ink: #152b46;
  --navy-mid: #294e71;
  --navy-light: #446b8b;
  --muted: #536578;
  --accent: #086b68;
  --line: #d8e1ea;
  --soft: #eaf0f6;
  --max: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --header-height: 5.25rem;
  --radius: 1rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 1.25rem); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.65; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-touch-callout: default; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { text-wrap: balance; overflow-wrap: anywhere; }
p, li, a { overflow-wrap: anywhere; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 700; }
h3, h4 { line-height: 1.2; letter-spacing: -.035em; }
p { margin-bottom: 1.25rem; }
strong { font-weight: 650; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
main:focus { outline: none; }
::selection { background: #c1e4e0; color: var(--ink); }
.container { width: min(100%, calc(var(--max) + var(--gutter) * 2)); margin-inline: auto; padding-inline: var(--gutter); padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.skip-link { position: fixed; top: .75rem; left: 1rem; transform: translateY(-180%); z-index: 100; padding: .85rem 1.25rem; border-radius: .5rem; background: var(--ink); color: white; }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 5.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-height: 3rem; font-size: .875rem; line-height: 1.25; letter-spacing: -.02em; }
.brand strong { font-weight: 700; }
.brand-logo { width: 2.75rem; height: 2.75rem; object-fit: contain; border-radius: .45rem; background: white; border: 1px solid var(--line); }
.header-controls { display: flex; align-items: center; gap: .5rem; }
.theme-toggle { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.875rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 2.875rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 650; }
.menu-icon { width: 1rem; height: .75rem; position: relative; border-block: 1.5px solid currentColor; }
.menu-icon::after { content: ""; position: absolute; inset: calc(50% - .75px) 0 auto; border-top: 1.5px solid currentColor; }
.menu-toggle[aria-expanded="true"] .menu-icon { border-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before, .menu-toggle[aria-expanded="true"] .menu-icon::after { content: ""; position: absolute; top: 50%; left: 0; width: 100%; border-top: 1.5px solid currentColor; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: rotate(-45deg); }
.site-nav { flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; padding-block: .5rem; }
.site-nav a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3rem; padding: .65rem .85rem; border-radius: .5rem; font-size: .9375rem; font-weight: 550; }
.site-nav a[aria-current="location"] { background: var(--soft); color: var(--accent); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.site-nav .nav-contact { background: var(--ink); color: white; }
.site-nav .nav-contact[aria-current="location"] { background: var(--navy-mid); color: white; }
/* Only collapse navigation after its controls have been successfully wired. */
.nav-ready .site-nav:not(.is-open) { display: none; }
.eyebrow { margin-bottom: 1rem; color: var(--accent); font-size: .875rem; font-weight: 650; line-height: 1.55; letter-spacing: .065em; }
.hero { padding-block: clamp(2.5rem, 6vw, 5.75rem) clamp(2rem, 5vw, 3.75rem); }
.hero-intro { display: flex; flex-wrap: wrap; gap: .2rem .65rem; max-width: 42rem; color: var(--muted); letter-spacing: .01em; }
.hero-intro span { color: #7b8d9d; }
.hero-layout { display: grid; gap: 1.75rem; }
.hero-copy { display: flex; flex-direction: column; min-width: 0; }
.hero-image { order: -1; margin: 0 0 1.5rem; }
.hero-image img { width: 100%; aspect-ratio: 1045 / 691; object-fit: cover; border-radius: .9rem; }
.hero-role { max-width: 38rem; margin-bottom: .75rem; color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.55; }
h1 { margin-bottom: 0; font-size: clamp(3.25rem, 10.9vw, 6.25rem); font-weight: 750; line-height: 1.035; letter-spacing: -.065em; }
h1 span { display: block; padding-bottom: .07em; }
h1 span:nth-child(2) { color: var(--navy-mid); }
h1 span:nth-child(3) { color: var(--navy-light); }
.lede { max-width: 38rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 3.25rem; padding: .85rem 1.1rem; border: 1px solid transparent; border-radius: .6rem; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { border-color: #aab9c8; background: transparent; }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.work-section { background: var(--surface); border-block: 1px solid var(--line); }
.section-heading { display: grid; gap: 1rem; margin-bottom: 2rem; }
.section-heading > p { max-width: 36rem; margin: 0; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.work-carousel { min-width: 0; }
.carousel-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.carousel-progress { flex: 1; min-width: 2rem; height: 2px; background: var(--line); overflow: hidden; }
.carousel-progress::after { content: ''; display: block; height: 100%; background: var(--navy-mid); transform: scaleX(var(--project-progress, .1)); transform-origin: left; transition: transform .75s cubic-bezier(.22, 1, .36, 1); }
.carousel-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 100%; }
.carousel-count { margin-right: .35rem; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.carousel-total { color: var(--muted); }
.carousel-arrow { display: inline-flex; align-items: center; justify-content: center; width: 3rem; min-height: 3rem; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.5rem; line-height: 1; transition: background .2s ease; }
.carousel-arrow:hover { background: var(--soft); }
.work-track { position: relative; display: flex; gap: clamp(1.5rem, 4vw, 3rem); overflow-x: auto; overflow-anchor: none; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.work-track.is-animating { scroll-snap-type: none; }
.carousel-ready .work-track { scrollbar-width: none; }
.carousel-ready .work-track::-webkit-scrollbar { display: none; }
.work-track:focus-visible { outline-offset: 4px; }
.project { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always; background: transparent; }
.project-media { display: grid; place-items: center; position: relative; flex-shrink: 0; aspect-ratio: 4 / 3; border-radius: 1.1rem; background: var(--soft); overflow: hidden; }
.project-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sct-media { background: #e6eee9; }
/* Match the source project's maroon and teal; anchor text within the sky. */
.new-life-media { container-type: inline-size; }
.journey-preview-title { position: absolute; top: 17%; left: 6%; max-width: 58%; color: #7a1f3d; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1rem, 5cqw, 2.25rem); font-weight: 600; line-height: 1.08; letter-spacing: -.025em; text-align: left; text-shadow: 0 1px 6px rgba(250,247,245,.7); }
.journey-preview-title > span { color: #135e59; }
.spoodle-media { background: #eaf0f7; }
.beaver-media { background: #fbfaf5; }
.white-whale-media { background: #e8e6dc; }
.allyindex-media { background: #c4f1fa; }
.allyindex-media img { object-fit: contain; }
.beetlejuice-media { background: #20172d; }
.media-link { position: absolute; right: 1rem; bottom: 1rem; padding: .45rem .7rem; border: 1px solid #d2dde6; border-radius: .45rem; background: #fff; color: #152b46; font-size: .875rem; font-weight: 600; line-height: 1.35; }
.project-content { display: flex; flex: 1; flex-direction: column; padding: 1.5rem .15rem .25rem; }
.project-category { margin-bottom: .65rem; color: var(--accent); font-size: .8125rem; font-weight: 600; line-height: 1.45; letter-spacing: .035em; }
.project h3 { margin-bottom: .65rem; font-size: clamp(1.65rem, 2.8vw, 2.4rem); overflow-wrap: anywhere; }
.project h3 a { display: inline-block; min-height: 2.75rem; padding-block: .15rem; }
.project-subtitle { margin-bottom: 1rem; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.project-content > p:not(.project-category, .project-subtitle) { max-width: 38rem; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 0 1rem; }
.project-tags li { color: var(--muted); font-size: .8125rem; }
.project-tags li + li::before { content: '·'; margin-right: .5rem; }
.project-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin-top: auto; padding-top: .65rem; }
.text-link, .source-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding-block: .6rem; font-size: .9375rem; font-weight: 600; line-height: 1.5; text-decoration: underline; text-underline-offset: .3em; text-decoration-color: #92a4b5; }
.text-link { color: var(--ink); }
.source-link { color: var(--muted); font-weight: 500; }
.work-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin-top: 1rem; }
.work-footer p { margin: 0; color: var(--muted); font-size: .8125rem; }
.work-footer .text-link { font-size: .8125rem; }
.about-layout { display: grid; gap: 2.5rem; }
.about-copy > p { color: var(--muted); }
.about-copy > .lead-paragraph { color: var(--ink); font-size: 1.25rem; line-height: 1.65; }
.approach { display: grid; gap: 0; margin-top: 2rem; max-width: 31rem; }
.approach > a { display: flex; flex-direction: column; justify-content: center; min-height: 8.25rem; padding: 1.5rem clamp(1rem, 3vw, 2rem); border-radius: 5rem; text-align: center; border: 3px solid var(--paper); position: relative; }
.approach > a + a { margin-top: -.65rem; }
.approach strong { display: block; margin-bottom: .15rem; font-size: 1.6rem; line-height: 1.3; letter-spacing: -.02em; }
.approach span { display: block; max-width: 15rem; margin-inline: auto; font-size: 1rem; line-height: 1.5; }
.approach-people { background: #152b46; color: white; margin-right: 1.5rem; }
.approach-play { background: #294e71; color: white; margin-left: 1.5rem; }
.approach-simplify { background: #d9e7f0; color: var(--ink); margin-right: 1.5rem; }
.credentials { display: grid; gap: 1.25rem; margin-block: 2rem; padding-block: 1.5rem; border-block: 1px solid var(--line); }
.credentials p { margin: 0; }
.credentials strong, .credentials span { display: block; }
.credentials span { color: var(--muted); font-size: .9375rem; }
.skills { display: flex; flex-wrap: wrap; gap: .5rem; }
.skills li { padding: .45rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; font-size: .875rem; }
.research-section { background: var(--surface); border-top: 1px solid var(--line); }
.publication-list { border-top: 1px solid #aebfce; }
.publication { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: .65rem 1rem; align-items: center; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.publication-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .875rem; color: var(--muted); }
.publication-meta span { color: var(--accent); }
.publication-copy { min-width: 0; }
.publication-copy strong { display: block; font-size: 1.125rem; line-height: 1.45; font-weight: 600; }
.publication-copy > span { display: block; margin-top: .45rem; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.publication-arrow { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 50%; font-size: 1.25rem; }
.contact-section { padding-block: clamp(3.5rem, 7vw, 5.5rem); background: #152b46; color: white; }
.contact-layout { display: grid; gap: 2rem; }
.contact-section .eyebrow { color: #a7d9d4; }
.contact-section h2 { font-size: clamp(2.15rem, 4.6vw, 3.65rem); }
.contact-copy > p { max-width: 31rem; color: #d0deea; font-size: 1.0625rem; }
.contact-button { background: #e6f5f2; color: #152b46; }
.email-link { display: block; width: fit-content; max-width: 100%; min-height: 2.75rem; padding-block: .7rem; margin-top: .45rem; color: #d0deea; font-size: .9375rem; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: .3em; }
.social { display: flex; gap: 1.5rem; margin-top: 1rem; }
.social a { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .75rem; font-size: 1rem; }
.contact-section :focus-visible, .site-footer :focus-visible { outline-color: #a7d9d4; }
.site-footer { background: #152b46; color: #d0deea; border-top: 1px solid #38506c; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.footer-inner p { margin: 0; font-size: .875rem; }
.footer-brand { display: block; color: #a7bdcf; }
.back-to-top { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; font-size: .875rem; }
@media (min-width: 40rem) {
  .hero-layout { gap: 2.25rem; }
  .hero-intro { margin-bottom: 1.5rem; }
  .publication { grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1.5rem; }
  .publication-meta { grid-column: auto; flex-direction: column; gap: .2rem; }
}
@media (min-width: 48rem) {
  .header-inner { flex-wrap: wrap; }
  .hero-layout { grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); }
  h1 { font-size: clamp(3.6rem, 7.3vw, 6.25rem); }
  .hero-copy { padding-top: 0; }
  .project { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); }
  .project-media { align-self: start; }
  .project-content { padding: .5rem .15rem; }
  .about-layout { grid-template-columns: 1fr 1.05fr; align-items: start; gap: 4rem; }
  .contact-layout { grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center; }
}
@media (min-width: 64rem) {
  .menu-toggle { display: none; }
  .header-controls { order: 2; }
  .site-nav, .nav-ready .site-nav:not(.is-open) { order: 1; display: flex; flex-basis: auto; gap: .2rem; padding: 0; }
  .site-nav a { min-height: 2.875rem; padding-inline: .8rem; }
  .section-heading { grid-template-columns: 1.3fr 1fr; gap: 3.5rem; align-items: end; margin-bottom: 2.5rem; }
  .section-heading > p { max-width: 28rem; justify-self: end; }
  .about-layout { gap: 6rem; }
  .approach { margin-top: 2.5rem; }
  .approach > a { min-height: 9rem; }
  .footer-brand { display: inline; margin-left: 1rem; }
}
@media (max-width: 24rem) {
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .hero-intro span { display: none; }
  .hero-intro { display: block; max-width: 18rem; }
}
@media (hover: hover) and (pointer: fine) {
  a, button, .publication-arrow { transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
  .site-nav a:hover { background: var(--soft); color: var(--accent); }
  .site-nav .nav-contact:hover, .button.primary:hover { background: var(--navy-mid); color: white; }
  .button.secondary:hover { background: var(--soft); border-color: var(--navy-mid); }
  .text-link:hover, .source-link:hover, .project h3 a:hover { color: var(--accent); text-decoration-color: currentColor; }
  .project-media:hover .media-link { background: var(--ink); color: white; }
  .publication:hover .publication-copy strong { text-decoration: underline; text-underline-offset: .2em; }
  .publication:hover .publication-arrow { background: var(--ink); color: white; border-color: var(--ink); }
  .contact-button:hover { background: white; }
  .social a:hover, .email-link:hover, .back-to-top:hover { color: #a7d9d4; text-decoration: underline; text-underline-offset: .3em; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .button, .brand-logo, .approach > a, .media-link { border: 1px solid ButtonText; }
}

/* Publications and focus labels are real HTML, including with scripts disabled. */
.publication-cover { width: 100%; height: 5rem; object-fit: contain; background: white; border: 1px solid var(--line); border-radius: .3rem; }
.publication-copy .publication-meta { margin-top: 0; margin-bottom: .5rem; color: var(--accent); font-size: .875rem; }
.publication-year { color: var(--muted); font-size: .875rem; }
.approach > a:focus-visible { z-index: 2; }
.approach > a:hover strong { text-decoration: underline; text-underline-offset: .15em; }
.principles { display: grid; gap: .75rem; margin-top: 2rem; }
.principles p { margin: 0; color: var(--muted); font-size: .9375rem; }
.principles strong { display: block; color: var(--ink); }
.experience-section { background: var(--soft); border-bottom: 1px solid var(--line); }
.experience-list { display: grid; gap: 1.75rem; }
.experience-list article { padding-top: 1.25rem; border-top: 1px solid #aab9c8; }
.experience-list h3 { font-size: 1.375rem; }
.experience-list article > p:not(.project-category) { color: var(--muted); }
.allyindex-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-block: 0 1rem; }
.allyindex-gallery a { min-width: 0; min-height: 2.75rem; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: .4rem; }
.allyindex-gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (min-width: 40rem) {
  .publication-cover { height: 6.5rem; }
}
@media (min-width: 48rem) {
  .experience-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
@media (max-width: 24rem) {
  .publication { grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: .75rem; }
  .publication-arrow { width: 1.75rem; height: 1.75rem; }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111e2d;
  --surface: #172638;
  --ink: #edf4ff;
  --navy-mid: #b7d5ed;
  --navy-light: #92b8d6;
  --muted: #b2c3d5;
  --accent: #8bdbd0;
  --line: #3c5066;
  --soft: #21364a;
}
[data-theme="dark"] .button.primary, [data-theme="dark"] .site-nav .nav-contact { background: #b7d5ed; color: #152b46; }
[data-theme="dark"] .button.primary:hover, [data-theme="dark"] .site-nav .nav-contact:hover { background: #d8eaf6; color: #152b46; }
[data-theme="dark"] .approach-simplify { color: #152b46; }
[data-theme="dark"] .publication:hover .publication-arrow, [data-theme="dark"] .project-media:hover .media-link { background: #d8eaf6; color: #152b46; }
[data-theme="dark"] .skip-link { background: #b7d5ed; color: #152b46; }

@media print {
  :root { --gutter: 0; }
  .site-header { position: static; }
  .menu-toggle, .site-nav, .skip-link, .actions, .media-link, .back-to-top { display: none !important; }
  .section, .hero, .contact-section { padding-block: 1.5rem; }
  .contact-section, .site-footer { background: white; color: black; }
  .contact-copy > p, .contact-section .eyebrow, .email-link, .footer-brand { color: black; }
  .project, .publication { break-inside: avoid; }
}
