@font-face { font-family: Inter; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f7f6f2;
  --text: #171714;
  --muted: #6d6b63;
  --line: #d9d7cf;
  --card: #efeee8;
  --accent: #dce7dc;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.wordmark { font-weight: 650; letter-spacing: -0.02em; }
nav { display: flex; gap: 26px; font-size: 14px; }
nav a, .social { color: var(--muted); }
nav a:hover, nav a.active, .social:hover { color: var(--text); }
.social { justify-self: end; font-size: 14px; }

.section { max-width: var(--max); margin: 0 auto; padding: 100px 34px; }
.section-border { border-top: 1px solid var(--line); }

.hero {
  min-height: 670px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 64px;
}
.eyebrow, .section-kicker, .project-meta {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(3.3rem, 7vw, 6.8rem);
  line-height: .94;
  letter-spacing: -.065em;
  max-width: 900px;
  margin: 0;
}
.hero h1 { max-width: 850px; }
.lede {
  max-width: 680px;
  margin: 32px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: #4f4d47;
}
.lede.narrow { max-width: 640px; }
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  isolation: isolate;
}
.hero-art::before {
  position: absolute;
  z-index: -1;
  width: min(390px, 84vw);
  aspect-ratio: 1;
  border: 1px dashed rgba(42, 94, 96, .42);
  border-radius: 50%;
  content: "";
  background: conic-gradient(from 210deg, rgba(92, 164, 159, .18), rgba(97, 117, 182, .05), rgba(92, 164, 159, .18));
}
.hero-art img {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}
.hero-actions, .contact-links { display: flex; align-items: center; gap: 24px; margin-top: 36px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--text);
}
.button-dark { background: var(--text); color: var(--bg); }
.text-link { font-size: 14px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* Home: an editorial introduction with the portfolio's existing content. */
.home-page { background: #f7f7f5; }
.site-header { max-width: none; padding-right: 4vw; padding-left: 4vw; grid-template-columns: 1fr auto; }
.wordmark {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1;
}
.site-header nav { justify-self: end; }
.site-header nav a {
  position: relative;
  color: #4f4e49;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
}
/* Current page and hover: a short underline instead of parentheses */
.site-header nav a::after {
  position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease; content: "";
}
.site-header nav a:hover::after, .site-header nav a.active::after { transform: scaleX(1); }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); }
.home-page .hero {
  position: relative;
  display: block;
  max-width: none;
  min-height: calc(100svh - 80px);
  padding: 0;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .26fr);
  gap: clamp(26px, 4vw, 76px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 40% 32% at 54% 94%, rgba(255, 97, 48, .7), transparent 72%),
    radial-gradient(ellipse 28% 30% at 33% 87%, rgba(253, 213, 225, .9), transparent 74%),
    #f7f7f5;
}
.home-page .hero::after {
  position: absolute;
  right: 4vw;
  bottom: 0;
  left: 4vw;
  height: 1px;
  background: rgba(23, 23, 20, .15);
  content: "";
}
.home-page .hero-copy {
  position: absolute;
  top: 42%;
  left: 47%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(54vw, 1120px);
  min-height: 0;
  text-align: left;
  transform: translate(-50%, -50%);
}
.home-page .hero h1 {
  width: 100%;
  max-width: none;
  font-family: Iowan Old Style, Baskerville, Georgia, serif;
  font-size: clamp(4.2rem, 10.5vw, 12rem);
  font-weight: 500;
  letter-spacing: -.09em;
  line-height: .78;
}
.home-page .hero h1 span { display: block; }
.home-page .hero h1 .hero-greeting { padding-left: .01em; font-size: .64em; letter-spacing: -.07em; }
.home-page .hero h1 .hero-comma { margin-left: .07em; font-weight: inherit; }
.home-page .hero h1 .hero-title { margin-top: .16em; padding-left: .01em; font-size: 1.05em; font-style: italic; white-space: nowrap; }
.home-page .hero-art {
  position: absolute;
  z-index: 3;
  top: auto;
  right: 8vw;
  bottom: 1px;
  left: auto;
  display: block;
  width: clamp(380px, 26.4vw, 520px);
  min-width: 0;
  aspect-ratio: 1;
  overflow: visible;
  transform: none;
}
.home-page .hero-art::before { display: none; }
.home-page .hero-art img { width: 100%; height: 100%; aspect-ratio: 1; border-radius: 0; object-fit: contain; filter: grayscale(1) contrast(1.08); transition: filter .6s ease; }
.home-page .hero-art:hover img { filter: grayscale(0) saturate(.88) contrast(1.04); }
@media (prefers-reduced-motion: reduce) { .home-page .hero-art img { transition: none; } }
.hero-starfield { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.hero-star { position: absolute; color: var(--text); font-family: Georgia, serif; font-size: clamp(20px, 2vw, 33px); line-height: 1; }
.hero-star-one { top: 16%; left: 17%; }
.hero-star-two { top: 16%; right: 16%; }
.hero-star-three { bottom: 25%; left: 17%; }
.hero-star-four { right: 16%; bottom: 25%; }
.has-motion .hero-star-one { animation: star-spin 9s linear infinite; }
.has-motion .hero-star-two { animation: star-spin 12s linear -3s infinite; }
.has-motion .hero-star-three { animation: star-spin 10s linear -6s infinite; }
.has-motion .hero-star-four { animation: star-spin 14s linear -9s infinite; }
@keyframes star-spin { to { transform: rotate(360deg); } }
.intro-copy { display: grid; gap: 26px; }
.intro-copy p { margin: 0; }
.intro-copy p:first-child { color: var(--text) !important; font-size: 22px !important; line-height: 1.45; }
.hero-scroll {
  position: absolute;
  z-index: 1;
  bottom: 31px;
  left: 50%;
  color: #3f3e39;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: translateX(-50%);
}
.hero-scroll span { display: inline-block; margin-left: 6px; font-size: 16px; vertical-align: -1px; }

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 70px;
}
.intro h2, .section-heading h2, .cta h2 {
  font-size: clamp(2.3rem, 4.5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  margin: 0;
}
.intro p:not(.section-kicker) { max-width: 540px; font-size: 18px; color: #55534d; }

.ai-practice { display: grid; grid-template-columns: minmax(0, .92fr) minmax(380px, 1.08fr); gap: clamp(42px, 7vw, 110px); align-items: center; }
.ai-practice-copy h2 { max-width: 650px; margin: 0; font-size: clamp(2.3rem, 4.5vw, 4.8rem); letter-spacing: -.055em; line-height: 1.02; }
.ai-practice-copy > p:not(.section-kicker) { max-width: 610px; margin: 28px 0 0; color: #4f4d47; font-size: 18px; line-height: 1.6; }
.ai-workflow { position: relative; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ai-workflow::before { position: absolute; top: 28px; bottom: 28px; left: 14px; width: 1px; background: linear-gradient(#5d938f, #7f8dbc); content: ""; }
.ai-workflow li { position: relative; display: grid; grid-template-columns: 42px 1fr; column-gap: 18px; padding: 22px 24px; border: 1px solid rgba(23, 23, 20, .1); background: rgba(237, 244, 237, .68); }
.ai-workflow span { z-index: 1; display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #5d938f; border-radius: 50%; background: var(--bg); color: #3f716d; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.ai-workflow strong { align-self: end; font-size: 17px; line-height: 1.2; }
.ai-workflow p { grid-column: 2; margin: 8px 0 0; color: #4f4d47; font-size: 15px; line-height: 1.5; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 45px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.projects .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform .25s ease, background .25s ease;
}
.project-card:hover { transform: translateY(-5px); background: #e9e8e0; }
.project-card:nth-child(2n) { background: var(--accent); }
.project-card h3 { font-size: clamp(1.5rem, 2.6vw, 2.6rem); letter-spacing: -.05em; line-height: .98; max-width: 510px; margin: 58px 0 18px; }
.project-card p { color: #55534d; max-width: 520px; margin: 0; font-size: 16px; }
.project-outcome { display: block; margin-top: 16px; color: #3f716d; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.card-preview { display: block; height: 116px; margin-top: auto; overflow: hidden; border: 1px solid rgba(23, 23, 20, .1); background: rgba(255, 255, 255, .32); }
.card-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card-preview-cisco img { transform: scale(1.3); transform-origin: top center; }
.project-card:hover .card-preview img { transform: scale(1.04); }
.project-card:hover .card-preview-cisco img { transform: scale(1.38); }
.card-arrow { position: absolute; top: 28px; right: 28px; font-size: 18px; line-height: 1; }
.project-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 0; }
.project-card .project-meta { padding-right: 46px; }
.cta { padding-bottom: 130px; }
.cta .button { margin-top: 34px; }

.page-hero { padding-top: 105px; padding-bottom: 105px; }
.page-hero h1 { max-width: 1000px; }
.work-list { padding-top: 0; }
.work-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(260px, .72fr);
  grid-template-areas: "number copy visual";
  align-items: center;
  gap: 34px;
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}
.work-number { grid-area: number; align-self: start; color: var(--muted); font-size: 13px; }
.work-copy { max-width: 860px; }
.work-copy { grid-area: copy; }
.work-preview {
  grid-area: visual;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  overflow: hidden;
}
.work-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  transition: transform .3s ease;
  cursor: zoom-in;
}
.work-preview:hover img { transform: scale(1.025); }
.work-preview-cisco img { transform: scale(1.65); transform-origin: top center; }
.work-preview-cisco:hover img { transform: scale(1.7); }
.work-copy h2 { margin: 14px 0 16px; font-size: clamp(2.4rem, 4.5vw, 5rem); line-height: 1; letter-spacing: -.055em; }
.work-copy p { color: #4f4d47; font-size: 18px; max-width: 760px; }
.work-impact { margin-top: 18px; padding-left: 14px; border-left: 2px solid #5d938f; color: #3f716d !important; font-size: 15px !important; line-height: 1.5; }
.work-note { font-size: 14px !important; color: var(--muted) !important; margin-top: 28px; }
.case-study-link { display: inline-flex; gap: 10px; margin-top: 18px; font-size: 14px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.case-study-link span { transition: transform .2s ease; }
.case-study-link:hover span { transform: translateX(4px); }

.case-hero { padding-top: 85px; padding-bottom: 72px; }
.case-hero h1 { max-width: 1080px; }
.case-summary { max-width: 760px; margin: 30px 0 0; font-size: 21px; line-height: 1.5; color: #4f4d47; }
.case-at-a-glance { padding-top: 42px; padding-bottom: 56px; }
.case-at-a-glance .section-kicker { margin-bottom: 22px; }
.case-at-a-glance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; margin: 0; }
.case-at-a-glance-grid div { min-width: 0; }
.case-at-a-glance-grid dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.case-at-a-glance-grid dd { margin: 0; color: #4f4d47; font-size: 15px; line-height: 1.45; }
.case-study {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 34px;
  display: grid;
  grid-template-columns: minmax(170px, .28fr) minmax(0, 860px);
  column-gap: clamp(36px, 6vw, 92px);
}
.case-study > .section { width: 100%; max-width: none; margin: 0; padding-left: 0; padding-right: 0; }
.case-study > .case-hero, .case-study > .case-at-a-glance { grid-column: 1 / -1; }
.case-study > :not(.case-hero):not(.case-at-a-glance):not(.case-toc) { grid-column: 2; min-width: 0; }
.case-toc {
  grid-column: 1;
  grid-row: 3 / span 99;
  align-self: start;
  position: sticky;
  top: 28px;
  padding: 78px 0 24px;
}
.case-toc ol { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.case-toc a { display: block; padding: 5px 0; color: var(--muted); font-size: 13px; line-height: 1.35; transition: color .18s ease; }
.case-toc a:hover, .case-toc a:focus-visible, .case-toc a.is-current { color: var(--text); }
.case-toc a.is-current { font-weight: 650; }
.case-visuals {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 34px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.case-visuals[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-visuals[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-visuals figure { margin: 0; min-width: 0; background: transparent; }
.case-visuals img { width: 100%; max-width: 100%; height: auto; max-height: none; object-fit: initial; background: transparent; cursor: zoom-in; }
.case-visuals + .case-content { padding-top: 22px; }
.case-visuals:not(.is-carousel) figure { display: flex; justify-content: center; }
.case-visuals.is-carousel { display: block; }
.case-carousel-viewport { overflow: hidden; outline: none; }
.case-carousel-track { display: flex; transition: transform .28s ease; }
.case-carousel-slide { flex: 0 0 100%; display: block; padding: 0; }
.case-carousel-slide img { width: 100%; max-width: 100%; height: auto; max-height: none; }
.case-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px; }
.case-carousel-status { min-width: 42px; text-align: center; color: var(--muted); font-size: 13px; }
.image-lightbox {
  display: none;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 48px 28px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex-direction: column;
}
.image-lightbox[open] { display: flex; }
.image-lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.image-lightbox-stage { position: relative; display: block; width: 100%; height: calc(100vh - 110px); max-height: 890px; min-height: 280px; flex: 0 0 auto; }
.image-lightbox-stage img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 1px; max-width: none; max-height: none; object-fit: contain; }
.image-lightbox-previous, .image-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.image-lightbox-previous { left: 0; }
.image-lightbox-next { right: 0; }
.image-lightbox-previous:disabled, .image-lightbox-next:disabled { opacity: .3; cursor: default; }
.image-lightbox-status { display: block; margin-top: 12px; text-align: center; color: rgba(255,255,255,.82); font-size: 13px; }
.image-lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.role-highlights {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 34px 62px;
}
.role-highlights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.role-highlights-list li {
  display: grid;
  grid-template-columns: minmax(190px, .35fr) 1fr;
  gap: 26px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(239, 238, 232, .62);
}
.role-highlights-list strong {
  font-size: 15px;
  letter-spacing: -.01em;
}
.role-highlights-list span {
  color: #4f4d47;
  font-size: 16px;
  line-height: 1.55;
}
.approach-principles {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 34px 62px;
}
.approach-principles-grid {
  list-style: none;
  counter-reset: approach;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
}
.approach-principles-grid li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 8px;
  align-content: start;
  min-height: 160px;
  padding: 22px;
  border-top: 3px solid #5d8062;
  background: #edf4ed;
}
.approach-number {
  grid-row: span 2;
  color: #4d7053;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}
.approach-principles-grid strong {
  font-size: 17px;
  line-height: 1.2;
}
.approach-principles-grid li > span:last-child {
  grid-column: 2;
  color: #4f4d47;
  font-size: 16px;
  line-height: 1.5;
}
.case-content { max-width: 860px; padding-top: 78px; }
.case-content h2 { font-size: clamp(2rem, 3.5vw, 3.4rem); letter-spacing: -.045em; line-height: 1.05; margin: 70px 0 18px; }
.case-content h2 { scroll-margin-top: 28px; }
.case-content h2:first-child { margin-top: 0; }
.case-content h3 { font-size: 20px; margin: 36px 0 10px; }
.case-content p, .case-content li { font-size: 18px; color: #4f4d47; }
.case-content ul { margin: 12px 0 0; padding-left: 22px; }
.case-content li + li { margin-top: 8px; }
.case-quote { border-left: 2px solid var(--text); padding-left: 22px; font-size: 22px !important; line-height: 1.4; color: var(--text) !important; margin: 32px 0; }
.case-footer-link { display: inline-flex; margin-top: 70px; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.related-work { margin-top: 72px; padding-top: 30px; border-top: 1px solid var(--line); }
.related-work > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 30px; }
.related-work a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.related-work a span { color: var(--muted); font-size: 13px; }
.contact-form { width: min(100%, 620px); display: grid; gap: 22px; margin-top: 54px; }
.form-field { display: grid; gap: 9px; }
.form-field label { font-size: 14px; }
.form-field input, .form-field textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--text); outline-offset: 2px; }

.about-grid { display: grid; grid-template-columns: .55fr 1fr; gap: 100px; align-items: start; }
.about-photo { width: 100%; max-width: 300px; border-radius: 50%; cursor: default; }
.about-copy p { max-width: 650px; font-size: 20px; color: #4f4d47; margin: 0 0 28px; }
.about-copy .button { margin-top: 10px; }
.experience-heading { max-width: 720px; margin-bottom: 54px; }
.experience-heading h2 { margin: 0; font-size: clamp(2.3rem, 4.5vw, 4.8rem); letter-spacing: -.055em; line-height: 1.02; }
.experience-timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.experience-timeline li { display: grid; grid-template-columns: minmax(190px, .32fr) 1fr; gap: 42px; padding: 32px 0 38px; border-bottom: 1px solid var(--line); }
.experience-meta { display: grid; align-content: start; gap: 5px; color: var(--muted); font-size: 13px; }
.experience-timeline h3, .specialty-grid h3, .credentials-grid h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.025em; }
.experience-timeline h3 span { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.experience-timeline p, .specialty-grid p, .credentials-grid p { margin: 0; color: #4f4d47; font-size: 17px; line-height: 1.55; }
.specialty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.specialty-grid article { min-height: 180px; padding: 26px; background: var(--card); border-top: 3px solid #5d8062; }
.tools-block { margin-top: 54px; padding-top: 30px; border-top: 1px solid var(--line); }
.tool-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.tool-list li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.credentials-grid { display: grid; grid-template-columns: 1.2fr repeat(2, 1fr); gap: 34px; }
.contact-hero { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 34px 42px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.back-to-top-button {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 10;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(23, 23, 20, .16);
  border-radius: 999px;
  background: rgba(239, 238, 232, .82);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(23, 23, 20, .08);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.back-to-top-button.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top-button:hover {
  background: rgba(239, 238, 232, .9);
  border-color: rgba(23, 23, 20, .36);
  box-shadow: 0 12px 28px rgba(23, 23, 20, .14);
  transform: translateY(-3px);
}
.back-to-top-button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.back-to-top-button[hidden] { display: none; }

.has-motion .hero-art::before { animation: slow-orbit 18s linear infinite; }
.has-motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease var(--reveal-delay, 0ms), transform .65s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms); }
.has-motion .reveal.is-revealed { opacity: 1; transform: translateY(0); }
.has-motion .project-card.reveal.is-revealed:hover { transform: translateY(-5px); }
@keyframes slow-orbit { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header { gap: 16px; }
  .site-header nav { justify-self: end; gap: 18px; }
  .site-header nav a { font-size: 14px; }
  .social { display: none; }
  .section { padding: 72px 22px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 48px; padding-top: 70px; }
  .hero-art { justify-content: flex-start; }
  .hero-art img { width: min(300px, 75vw); }
  .home-page .site-header { padding-right: 22px; padding-left: 22px; }
  .home-page .hero {
    min-height: calc(100svh - 96px);
    padding: 0;
  }
  .home-page .hero-copy { top: 43%; left: 22px; width: calc(100% - 44px); min-height: 0; align-items: flex-start; text-align: left; transform: translateY(-50%); }
  .home-page .hero h1 { font-size: clamp(4.15rem, 17vw, 5.9rem); line-height: .79; }
  .home-page .hero h1 span:first-child { font-size: .82em; }
  .home-page .hero h1 .hero-title { margin-top: .18em; padding-left: 0; font-size: 1em; }
  .home-page .hero h1 span:last-child { white-space: nowrap; }
  .home-page .hero-art { top: auto; right: 22px; bottom: 1px; left: auto; width: 224px; min-width: 0; transform: none; }
  .home-page .hero::after { right: 22px; left: 22px; }
  .hero-star { font-size: 22px; }
  .hero-star-one { top: 15%; left: 10%; }
  .hero-star-two { top: 15%; right: 13%; }
  .hero-star-three { bottom: 23%; left: 10%; }
  .hero-star-four { right: 13%; bottom: 23%; }
  .intro-grid, .about-grid, .ai-practice { grid-template-columns: 1fr; gap: 35px; }
  .experience-timeline li { grid-template-columns: 1fr; gap: 12px; }
  .specialty-grid, .credentials-grid { grid-template-columns: 1fr; }
  .project-grid, .projects .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 330px; }
  .card-preview { height: 150px; }
  .section-heading { align-items: start; flex-direction: column; }
  .work-item, .work-item:nth-child(even) { grid-template-columns: 1fr; grid-template-areas: "number" "copy" "visual"; gap: 18px; padding: 52px 0; }
  .work-preview { min-height: 180px; margin-top: 8px; }
  .case-visuals img, .case-carousel-slide img { height: auto; }
  .case-at-a-glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .case-study { display: block; padding: 0; }
  .case-study > .section { padding-left: 22px; padding-right: 22px; }
  .case-toc { position: static; max-width: var(--max); margin: 0 auto; padding: 0 22px 36px; }
  .case-toc ol { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .case-toc a { padding: 2px 0; font-size: 13px; }
  .related-work > div { grid-template-columns: 1fr; }
  .case-visuals, .case-visuals[data-columns="2"], .case-visuals[data-columns="3"] { grid-template-columns: 1fr; padding: 12px 22px 24px; }
  .case-visuals + .case-content { padding-top: 18px; }
  .role-highlights { padding: 12px 22px 48px; }
  .role-highlights-list li { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .approach-principles { padding: 12px 22px 48px; }
  .approach-principles-grid { grid-template-columns: 1fr; }
  .case-hero { padding-top: 70px; }
  .site-footer { padding: 25px 22px 35px; }
  .back-to-top-button { right: 18px; bottom: 18px; width: 42px; height: 42px; }
  .image-lightbox { width: 100vw; height: 100vh; padding: 44px 12px 20px; }
  .image-lightbox-stage { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 8px; height: calc(100vh - 100px); min-height: 220px; }
}

/* ---------- Page transitions (View Transitions API) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-fade-out .22s ease both; }
  ::view-transition-new(root) { animation: vt-fade-in .32s ease .06s both; }
  ::view-transition-group(project-title) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
  ::view-transition-old(project-title),
  ::view-transition-new(project-title) { height: 100%; object-fit: none; object-position: left top; }
}
.site-header { view-transition-name: site-header; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Hero headline entrance (plays once) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .home-page .hero h1 .hero-greeting { animation: hero-fade-in .7s ease .1s both; }
  .home-page .hero h1 .hero-title { animation: hero-slide-in .9s cubic-bezier(.2,.7,.2,1) .45s both; }
  .home-page .hero-art img { animation: hero-fade-in 1s ease .2s both; }
}
@keyframes hero-fade-in { from { opacity: 0; } }
@keyframes hero-slide-in { from { opacity: 0; transform: translateX(-28px); } }

/* ---------- Reading progress line ---------- */
.reading-progress {
  position: fixed; z-index: 60; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, #5d938f, #7f8dbc);
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
  view-transition-name: reading-progress;
}

/* ---------- Looping prototype clips ---------- */
.case-clip { position: relative; margin: 0; }
.case-clip video { display: block; width: 100%; height: auto; border: 1px solid rgba(23, 23, 20, .1); background: var(--card); }
.case-clip figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.case-clip-toggle {
  position: absolute; top: 12px; right: 12px; padding: 6px 12px; border: 1px solid rgba(23, 23, 20, .2);
  border-radius: 999px; background: rgba(247, 246, 242, .9); color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
}
.case-clip-toggle:hover { background: var(--bg); }
.case-clip-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- Footer contact links ---------- */
.site-footer { align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.footer-links { display: flex; gap: 20px; }
.site-footer a { color: inherit; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--text); }

/* ---------- Work page: company in meta line ---------- */
.work-copy h2 { margin: 12px 0 18px; font-size: clamp(2rem, 3.4vw, 3.5rem); line-height: 1.05; letter-spacing: -.045em; }
.project-meta .work-company { color: var(--text); font-weight: 600; }

/* ---------- Work page: whole row opens the case study ---------- */
.work-item { position: relative; isolation: isolate; cursor: pointer; }
/* Card surface that appears behind the whole row on hover/focus */
.work-item::before {
  position: absolute; z-index: -1; inset: 12px -24px; border-radius: 18px;
  background: var(--card); opacity: 0; transform: scale(.985);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.7,.2,1); content: "";
}
.work-item:hover::before, .work-item:has(.case-study-link:focus-visible)::before { opacity: 1; transform: scale(1); }
/* One link covers the row */
.work-item .case-study-link::after { position: absolute; z-index: 1; inset: 0; content: ""; }
/* The row's action, styled as a button that responds to the whole row */
.work-item .case-study-link {
  align-items: center; margin-top: 22px; padding: 10px 18px; border: 1px solid var(--text); border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: background .2s ease, color .2s ease;
}
.work-item:hover .case-study-link, .work-item .case-study-link:focus-visible { background: var(--text); color: var(--bg); }
.work-item:hover .case-study-link span { transform: translateX(4px); }
.work-item:hover .work-preview img { transform: scale(1.025); }
.work-item:hover .work-preview-cisco img { transform: scale(1.7); }
.work-item .case-study-link:focus-visible { outline: none; }
.work-item:has(.case-study-link:focus-visible)::before { outline: 2px solid var(--text); outline-offset: 0; }
@media (max-width: 760px) { .work-item::before { inset: 8px -12px; } }
@media (hover: none) { .work-item::before { display: none; } }

/* Hide the dividers touching the hovered card so the card replaces them */
.work-item, .work-list { transition: border-color .25s ease; }
.work-item::before { inset: 0 -24px; }
.work-item:hover,
.work-item:has(+ .work-item:hover),
.work-item:has(.case-study-link:focus-visible),
.work-item:has(+ .work-item .case-study-link:focus-visible) { border-bottom-color: transparent; }
.work-list:has(> .work-item:first-of-type:hover),
.work-list:has(> .work-item:first-of-type .case-study-link:focus-visible) { border-top-color: transparent; }
@media (max-width: 760px) { .work-item::before { inset: 0 -12px; } }
@media (hover: none) {
  .work-item:hover, .work-item:has(+ .work-item:hover) { border-bottom-color: var(--line); }
  .work-list:has(> .work-item:first-of-type:hover) { border-top-color: var(--line); }
}

/* ---------- Work page: 4:3 project covers (same as the live site) ---------- */
.work-preview { min-height: 0; border: 1px solid rgba(23, 23, 20, .08); border-radius: 12px; background: var(--card); }
.work-preview img { aspect-ratio: 4 / 3; max-height: none; object-fit: cover; object-position: center; cursor: pointer; }

/* ---------- Homepage cards: 4:3 project covers ---------- */
.project-card h3 { margin-top: 36px; }
.project-card .project-outcome { margin-bottom: 26px; }
.card-preview { height: auto; aspect-ratio: 4 / 3; border-radius: 10px; background: #fff; }
.card-preview img { object-position: center; }
.project-card p { margin-bottom: 26px; }
.project-meta span:last-child { white-space: nowrap; }

/* ---------- Case study diagrams: journey map ---------- */
.journey-map { max-width: 860px; margin: 0 auto; padding: 18px 34px 62px; }
.journey-map ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.journey-map li {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px 18px; border: 1px solid var(--line); border-radius: 4px; background: rgba(239, 238, 232, .62);
}
.journey-map li:not(:last-child)::after {
  position: absolute; top: 50%; right: -13px; z-index: 1; transform: translateY(-50%);
  color: #5d8062; font-size: 16px; content: "→";
}
.journey-step { color: #4d7053; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.journey-map strong { font-size: 16px; line-height: 1.2; }
.journey-map li > span:not(.journey-step) { color: #4f4d47; font-size: 14px; line-height: 1.45; }
.journey-map em {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  color: #3f716d; font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: .02em;
}

/* ---------- Case study diagrams: before / after ---------- */
.before-after {
  max-width: 860px; margin: 0 auto; padding: 18px 34px 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.before-after-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 4px; background: rgba(239, 238, 232, .62); }
.before-after-card.is-after { border-top: 3px solid #5d8062; background: #edf4ed; }
.before-after-card .section-kicker { margin: 0 0 8px; }
.before-after-card strong { display: block; margin-bottom: 10px; font-size: 17px; line-height: 1.25; }
.before-after-card ul { margin: 0; padding-left: 18px; color: #4f4d47; font-size: 15px; line-height: 1.55; }

@media (max-width: 760px) {
  .journey-map, .before-after { padding-right: 22px; padding-left: 22px; }
  .journey-map ol { grid-template-columns: 1fr 1fr; }
  .journey-map li:not(:last-child)::after { display: none; }
  .before-after { grid-template-columns: 1fr; }
}

/* ---------- Case study: next case study card ---------- */
.next-case {
  display: grid; grid-template-columns: 1fr minmax(180px, 240px); align-items: center; gap: 28px;
  margin: 56px 0 36px; padding: 26px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--text); text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.next-case:hover { background: #e9e8e0; transform: translateY(-3px); }
.next-case:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.next-case-copy { display: flex; flex-direction: column; gap: 6px; }
.next-case-copy .section-kicker { margin: 0 0 6px; }
.next-case strong { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.05; letter-spacing: -.04em; }
.next-case-company { color: var(--muted); font-size: 15px; }
.next-case-cta {
  align-self: flex-start; margin-top: 14px; padding: 9px 16px; border: 1px solid var(--text); border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: background .2s ease, color .2s ease;
}
.next-case:hover .next-case-cta { background: var(--text); color: var(--bg); }
.next-case-image { display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; background: #fff; }
.next-case-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .next-case { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .next-case, .next-case:hover { transform: none; } }

/* ---------- Journey map: five stages ---------- */
.journey-map-5 { max-width: 980px; }
.journey-map-5 ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.journey-map-5 li { padding: 18px 14px; }
.journey-map-5 li:not(:last-child)::after { right: -11px; }

/* ---------- Topology diagram ---------- */
.topology-diagram { max-width: 860px; margin: 0 auto; padding: 18px 34px 48px; }
.topology-diagram > .section-kicker { margin: 0 0 14px; }
.topology {
  display: grid; grid-template-columns: 1fr minmax(150px, .7fr) 1fr; align-items: center; gap: 14px;
  padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: rgba(239, 238, 232, .62);
}
.topology-site { display: grid; gap: 10px; padding: 16px; border: 1.5px dashed #b9b7ad; border-radius: 10px; background: var(--bg); }
.topology-site.is-preferred { border-color: #5d8062; }
.topology-site-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; }
.topology-site-label em { color: #3f716d; font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: .02em; }
.topology-fd { display: grid; gap: 8px; padding: 10px 12px; border-radius: 6px; background: #edf4ed; }
.topology-fd strong { font-size: 13px; }
.topology-nodes { display: flex; gap: 6px; }
.topology-nodes i { width: 22px; height: 14px; border: 1px solid #5d8062; border-radius: 3px; background: #fff; }
.topology-witness { display: grid; justify-items: center; gap: 6px; text-align: center; }
.topology-witness strong { padding: 8px 12px; border: 1px solid var(--text); border-radius: 999px; background: var(--bg); font-size: 13px; }
.topology-witness > span:not(.topology-link) { color: #4f4d47; font-size: 12px; line-height: 1.4; }
.topology-link { width: 1px; height: 22px; background: #8b897f; }
.topology-caption { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
@media (max-width: 900px) { .journey-map-5 ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } .journey-map-5 li::after { display: none; } }
@media (max-width: 760px) {
  .topology-diagram { padding-right: 22px; padding-left: 22px; }
  .topology { grid-template-columns: 1fr; }
  .journey-map-5 ol { grid-template-columns: 1fr 1fr; }
}
/* Witness connects sideways to both sites */
.topology-link { display: none; }
.topology-witness { position: relative; }
.topology-witness strong { position: relative; }
.topology-witness strong::before, .topology-witness strong::after {
  position: absolute; top: 50%; width: 30px; height: 0; border-top: 1.5px dashed #8b897f; content: "";
}
.topology-witness strong::before { right: 100%; }
.topology-witness strong::after { left: 100%; }
@media (max-width: 760px) { .topology-witness strong::before, .topology-witness strong::after { display: none; } }

/* ---------- Journey map: three stages ---------- */
.journey-map-3 ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Decision options (trade-off cards) ---------- */
.decision-options .before-after-card ul { list-style: none; padding-left: 0; }
.decision-options li { position: relative; padding-left: 22px; }
.decision-options li + li { margin-top: 4px; }
.decision-options li::before { position: absolute; left: 0; font-weight: 700; }
.decision-options li.is-pro::before { color: #3f716d; content: "+"; }
.decision-options li.is-con::before { color: #9a5b3c; content: "–"; }

/* ---------- Learning pathways diagram ---------- */
.pathway-diagram {
  max-width: 860px; margin: 0 auto; padding: 18px 34px 48px;
  display: grid; grid-template-columns: minmax(180px, .8fr) auto 2fr; align-items: center; gap: 16px;
}
.pathway-start { display: grid; gap: 6px; padding: 20px; border: 1px solid var(--text); border-radius: 10px; background: var(--bg); }
.pathway-start .section-kicker, .pathway-list .section-kicker { margin: 0; font-size: 10px; }
.pathway-start strong { font-size: 17px; }
.pathway-arrow { color: #5d8062; font-size: 22px; }
.pathway-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pathway-list li { display: grid; gap: 4px; padding: 16px 18px; border-top: 3px solid #5d8062; background: #edf4ed; }
.pathway-list strong { font-size: 17px; }
@media (max-width: 760px) {
  .pathway-diagram { grid-template-columns: 1fr; padding-right: 22px; padding-left: 22px; }
  .pathway-arrow { transform: rotate(90deg); justify-self: center; }
  .journey-map-3 ol { grid-template-columns: 1fr; }
}

/* ---------- Homepage hero photo: crop just above the skirt, sit lower ---------- */
.home-page .hero-art { aspect-ratio: 1254 / 1050; }
.home-page .hero-art img { aspect-ratio: auto; object-fit: cover; object-position: center top; }

/* Phones: keep "Scroll down" clear of the photo */
@media (max-width: 760px) {
  .home-page .hero-scroll { right: auto; left: 22px; max-width: 110px; transform: none; text-align: left; line-height: 1.5; }
}

/* Hero stars: slightly larger */
.hero-star { font-size: clamp(25px, 2.5vw, 41px); }
@media (max-width: 760px) { .hero-star { font-size: 27px; } }

/* Desktop: top-right star sits in line with the end of the headline */
@media (min-width: 761px) { .hero-star-two { right: 25%; } }
/* Desktop: top stars sit the same distance above the headline as the bottom star sits below it */
@media (min-width: 761px) { .hero-star-one, .hero-star-two { top: 10.4%; } }

/* Side nav: sub-sections under a parent section */
.case-toc li.is-sub a { padding-left: 14px; font-size: 12.5px; }
@media (max-width: 820px) { .case-toc li.is-sub { display: none; } }
.case-content h3 { scroll-margin-top: 28px; }
/* Side nav: highlight without changing text width, so labels never re-wrap on click */
.case-toc a.is-current { font-weight: inherit; text-shadow: 0 0 .6px currentColor; }
.case-study { grid-template-columns: minmax(200px, .28fr) minmax(0, 860px); }
@media (max-width: 820px) { .case-study { grid-template-columns: none; } }

/* Tall page screenshots: show a fixed-height preview instead of a very long image */
.case-visuals figure.is-tall { position: relative; max-height: 540px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; display: block; }
.case-visuals figure.is-tall img { width: 100%; display: block; }
.case-visuals figure.is-tall::after {
  content: "Click to view the full page"; position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 0 16px; text-align: center;
  font-size: 12.5px; letter-spacing: .02em; color: var(--text); pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg, #f7f5f0) 78%);
}
.image-lightbox-stage:has(img.is-tall) { overflow-y: auto; }
.image-lightbox-stage img.is-tall { height: auto; width: min(100%, 960px); margin: 0 auto; object-fit: initial; }

/* Carousel: dots instead of arrow buttons */
.case-carousel-controls { gap: 8px; }
.case-carousel-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .18s ease, transform .18s ease; }
.case-carousel-dot:hover { background: var(--muted); }
.case-carousel-dot.is-current { background: var(--text); transform: scale(1.25); }
.case-carousel-status { margin-left: 8px; min-width: 0; }

/* Carousel: arrows on the left and right edges of the image */
.case-carousel-frame { position: relative; }
.case-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; padding: 0 0 3px; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,.94); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); transition: transform .18s ease, background .18s ease;
}
.case-carousel-arrow[hidden] { display: none; }
.case-carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.case-carousel-arrow-previous { left: 12px; }
.case-carousel-arrow-next { right: 12px; }

/* Enlarged tall page: arrows stay put while scrolling, and a hint says the page scrolls */
.image-lightbox-stage:has(img.is-tall) .image-lightbox-previous, .image-lightbox-stage:has(img.is-tall) .image-lightbox-next { position: fixed; top: 50%; }
.image-lightbox-stage:has(img.is-tall) { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent; }
.image-lightbox-hint {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 3; padding: 9px 16px; border-radius: 999px;
  background: rgba(255,255,255,.96); color: #111; font-size: 13px; box-shadow: 0 4px 18px rgba(0,0,0,.35);
  pointer-events: none; transition: opacity .25s ease;
}
.image-lightbox-hint[hidden] { display: none; }
.image-lightbox-hint.is-away { opacity: 0; }
.image-lightbox-hint b { display: inline-block; margin-left: 4px; animation: lightbox-hint-bounce 1.2s ease-in-out infinite; }
@keyframes lightbox-hint-bounce { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .image-lightbox-hint b { animation: none; } }
.image-lightbox-stage:has(img.is-tall) .image-lightbox-previous { left: 24px; }
.image-lightbox-stage:has(img.is-tall) .image-lightbox-next { right: 24px; }

/* Animated walkthrough */
.case-gif figure { flex-direction: column; align-items: center; gap: 12px; }
.case-gif img { max-width: 520px; border: 1px solid var(--line); border-radius: 12px; }
.case-gif figcaption { color: var(--muted); font-size: 13px; text-align: center; }
/* Keep the animation close to the overview text */
.case-content:has(+ .case-gif) { padding-bottom: 8px; }
.case-gif { padding-top: 0; padding-bottom: 8px; }
.case-gif + .case-content { padding-top: 56px; }
/* Tighten the gap between text and the images that follow it, on every case study */
.case-content:has(+ .case-visuals) { padding-bottom: 8px; }
.case-visuals { padding-top: 10px; }
.case-visuals + .case-content { padding-top: 44px; }
@media (max-width: 820px) { .case-content:has(+ .case-visuals) { padding-bottom: 4px; } .case-visuals + .case-content { padding-top: 32px; } }
/* Inline cards and diagrams: less space above and below */
.case-content:has(+ :is(.before-after, .journey-map, .pathway-diagram, .topology-diagram)) { padding-bottom: 8px; }
.before-after, .journey-map, .pathway-diagram, .topology-diagram { padding-top: 6px; padding-bottom: 14px; }
:is(.before-after, .journey-map, .pathway-diagram, .topology-diagram) + .case-content { padding-top: 40px; }
:is(.before-after, .journey-map, .pathway-diagram, .topology-diagram) + :is(.before-after, .pathway-diagram) { padding-top: 0; }
/* Tighter vertical rhythm on case studies */
.case-content:has(+ :is(.role-highlights, .approach-principles)) { padding-bottom: 8px; }
.role-highlights, .approach-principles { padding-top: 6px; padding-bottom: 14px; }
:is(.role-highlights, .approach-principles) + .case-content { padding-top: 40px; }
.case-content h2 { margin-top: 54px; }
.case-content h2:first-child { margin-top: 0; }
.case-content h3 { margin-top: 30px; }
.case-content h3:first-child { margin-top: 0; }
.case-at-a-glance { padding-bottom: 36px; }
.case-toc + .case-content { padding-top: 52px; }
.next-case { margin-top: 40px; margin-bottom: 24px; }
.related-work { margin-top: 48px; }
/* No double padding when the next-case card sits in its own block after the last section */
.case-content:has(+ .case-content > .next-case:first-child) { padding-bottom: 0; }
.case-content:has(> .next-case:first-child) { padding-top: 0; }

/* Carousel height follows the current image */
.case-carousel-track { align-items: flex-start; }
.case-carousel-viewport { transition: height .28s ease; }

/* Dots: larger tap area */
.case-carousel-dot { position: relative; }
.case-carousel-dot::after { content: ""; position: absolute; inset: -9px -3px; }

/* Phones: carousel arrows move below the image so they never cover it */
@media (max-width: 820px) {
  .case-carousel-controls { min-height: 48px; margin-top: 6px; gap: 6px; }
  .case-carousel-arrow { top: calc(100% + 12px); transform: none; width: 36px; height: 36px; font-size: 22px; box-shadow: none; background: transparent; }
  .case-carousel-arrow:hover { transform: none; background: var(--card); }
  .case-carousel-arrow-previous { left: 0; }
  .case-carousel-arrow-next { right: 0; }
  .back-to-top-button { width: 38px; height: 38px; right: 14px; bottom: 14px; opacity: .9; }
}

/* ---- Datera case study: real screenshots, annotations, hierarchy ---- */
.case-note { margin: 0 0 8px; padding: 16px 20px; border-left: 3px solid #8a8678; background: rgba(239, 238, 232, .62); color: #4f4d47; font-size: 15px; line-height: 1.55; }
.case-note + h2 { margin-top: 44px; }
.case-shots, .case-annotated { max-width: 860px; margin: 0 auto; padding: 10px 34px 8px; display: grid; gap: 20px; }
.case-shots-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-shot, .annotated-shot { position: relative; margin: 0; min-width: 0; }
.case-shot img, .annotated-frame img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: zoom-in; box-shadow: 0 10px 30px rgba(23, 23, 20, .06); }
.case-shot figcaption, .annotated-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.case-shot-tag { display: inline-block; margin-bottom: 10px; padding: 4px 9px; border-radius: 999px; background: #ebe3dc; color: #7a4a2c; font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.case-shot-tag.is-after { background: #e3eee3; color: #3f6645; }
.annotated-frame { position: relative; }
.annotated-frame .pin { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #171714; color: #fff; font-size: 13px; font-weight: 650; line-height: 26px; text-align: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 4px 10px rgba(0, 0, 0, .18); pointer-events: none; }
.annotation-list { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: pin; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.annotation-list li { position: relative; padding-left: 38px; color: #4f4d47; font-size: 15px; line-height: 1.5; counter-increment: pin; }
.annotation-list li::before { content: counter(pin); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #171714; color: #fff; font-size: 13px; font-weight: 650; line-height: 26px; text-align: center; }
.annotation-list strong { color: var(--text); }
.hierarchy-diagram { max-width: 860px; margin: 0 auto; padding: 14px 34px 8px; display: grid; justify-items: center; gap: 18px; }
.hierarchy-node { padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; font-weight: 600; }
.hierarchy-node.is-root { background: #171714; border-color: #171714; color: #fff; }
.hierarchy-children { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; padding-top: 18px; border-top: 1px solid var(--line); }
.hierarchy-branch { display: grid; justify-items: center; gap: 10px; }
.hierarchy-branch.is-more .hierarchy-node { border-style: dashed; color: var(--muted); font-weight: 500; }
.hierarchy-leaves { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hierarchy-leaves span { padding: 6px 10px; border-radius: 6px; background: var(--accent); font-size: 13px; }
.case-content:has(+ .case-shots), .case-content:has(+ .case-annotated), .case-content:has(+ .hierarchy-diagram) { padding-bottom: 8px; }
.case-shots + .case-content, .case-annotated + .case-content { padding-top: 44px; }
.hierarchy-diagram + .case-visuals { padding-top: 18px; }
@media (max-width: 820px) {
  .case-shots, .case-annotated, .hierarchy-diagram { padding-right: 22px; padding-left: 22px; }
  .case-shots-2, .annotation-list { grid-template-columns: 1fr; }
  .annotated-frame .pin { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: 11px; line-height: 20px; }
  .hierarchy-children { grid-template-columns: 1fr; }
  .case-shots + .case-content, .case-annotated + .case-content { padding-top: 32px; }
}

/* Datera template hierarchy diagram */
.template-diagram { max-width: 860px; margin: 0 auto; padding: 14px 34px 8px; }
.template-diagram-frame { padding: 26px 22px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; }
.template-diagram svg { display: block; width: 100%; min-width: 620px; height: auto; }
.template-diagram .td-t { font-family: inherit; font-size: 14px; font-weight: 600; fill: #171714; }
.template-diagram .td-root { fill: #fff; }
.template-diagram .td-muted { fill: #6d6b63; font-weight: 500; }
.template-diagram .td-small { font-size: 12.5px; font-weight: 500; fill: #3f5a3d; }
.template-diagram .td-note { font-family: inherit; font-size: 12.5px; fill: #6d6b63; }
.case-content:has(+ .template-diagram) { padding-bottom: 8px; }
.template-diagram + .case-visuals { padding-top: 18px; }
@media (max-width: 820px) { .template-diagram { padding-right: 22px; padding-left: 22px; } }

@media (max-width: 360px) {
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: 13px; }
  .wordmark { font-size: 1.05rem; }
}
