:root {
  --canvas: #f0f0ee;
  --paper: #fbfbfa;
  --card: #ffffff;
  --ink: #0b0b0b;
  --muted: #5f5f5c;
  --faint: #8b8b87;
  --line: #e3e3df;
  --soft: #f5f5f2;
  --dot: #0a0a0a;
  --paper-shadow: 0 30px 75px rgba(20, 20, 18, 0.14), 0 3px 14px rgba(20, 20, 18, 0.06);
  --card-shadow: 0 18px 48px rgba(20, 20, 18, 0.11), 0 2px 8px rgba(20, 20, 18, 0.04);
  --radius-paper: 32px;
  --radius-card: 25px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --canvas: #11110f;
  --paper: #191917;
  --card: #222220;
  --ink: #f6f6f2;
  --muted: #b4b4ae;
  --faint: #83837e;
  --line: #373733;
  --soft: #2a2a27;
  --dot: #f5f5f0;
  --paper-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 3px 14px rgba(0, 0, 0, 0.25);
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  padding: 18px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.95), transparent 48%),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.portfolio-paper {
  display: grid;
  grid-template-rows: 96px minmax(0, 1fr) 56px;
  width: min(1680px, 100%);
  height: clamp(780px, calc(100svh - 36px), 1020px);
  min-height: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius-paper);
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  isolation: isolate;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
}

.wordmark {
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.055em;
}

.header-actions,
.site-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 34px;
}

.site-nav {
  gap: 38px;
}

.site-nav a {
  position: relative;
  padding: 9px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active::after {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot);
  content: "";
  transform: translateX(-50%);
}

.theme-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--ink);
  transform: rotate(10deg);
}

.theme-toggle-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: -4px 0 0 0 var(--paper);
  transform: translateX(2px);
}

.project-number {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.projects-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 24px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 24px clamp(56px, 5vw, 92px) 16px;
}

.section-heading--counter-only {
  justify-content: flex-end;
}

.project-counter {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.project-counter span {
  color: var(--ink);
  font-weight: 700;
}

.carousel-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.project-track {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  gap: 24px;
  padding: 0 clamp(56px, 5vw, 92px) 9px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: clamp(56px, 5vw, 92px);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.project-track::-webkit-scrollbar {
  display: none;
}

.project-track:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -5px;
}

.project-card {
  display: grid;
  grid-template-rows: auto auto minmax(170px, 1fr) auto auto;
  flex: 0 0 clamp(680px, 65vw, 880px);
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 28px 38px 22px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 220ms var(--ease), border-color 180ms ease, box-shadow 220ms var(--ease);
}

.project-card--no-metrics {
  grid-template-rows: auto auto minmax(170px, 1fr) auto;
}

.project-card:focus-visible {
  border-color: color-mix(in srgb, var(--ink) 45%, var(--line));
  outline: 3px solid color-mix(in srgb, var(--ink) 22%, transparent);
  outline-offset: 4px;
  transform: translateY(-3px);
}

@media (hover: hover) {
  .project-card:hover {
    border-color: color-mix(in srgb, var(--ink) 24%, var(--line));
    box-shadow: 0 23px 58px rgba(20, 20, 18, 0.15), 0 3px 10px rgba(20, 20, 18, 0.06);
    transform: translateY(-3px);
  }
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
}

.project-intro {
  padding: 15px 0 16px;
}

.project-intro h3 {
  margin: 0 0 7px;
  font-size: clamp(27px, 2.3vw, 36px);
  font-weight: 730;
  letter-spacing: -0.048em;
  line-height: 1.05;
}

.project-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.project-preview {
  position: relative;
  min-height: 155px;
  overflow: hidden;
  border-radius: 13px;
  background: #0d0e0f;
  color: #f8f8f6;
}

.project-preview--agent {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  padding: 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.09), transparent 34%),
    linear-gradient(145deg, #101112, #090a0b);
}

.preview-statement {
  align-self: center;
}

.preview-title {
  margin: 0 0 8px;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 680;
  letter-spacing: -0.042em;
  line-height: 1.05;
}

.preview-copy {
  max-width: 270px;
  margin: 0;
  color: #aaa;
  font-size: 10.5px;
  line-height: 1.45;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.preview-tags span {
  padding: 4px 7px;
  border: 1px solid #2d2e30;
  border-radius: 999px;
  color: #aaa;
  font-size: 7px;
}

.chat-window {
  align-self: stretch;
  padding: 13px;
  border: 1px solid #2c2d2f;
  border-radius: 10px;
  background: rgba(24, 25, 27, 0.84);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.chat-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 8px;
  font-weight: 650;
}

.chat-heading small {
  display: block;
  margin-top: 1px;
  color: #777;
  font-size: 6px;
  font-weight: 450;
}

.chat-avatar {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: #d8d8d3;
  color: #171719;
  font-size: 8px;
}

.chat-bubble {
  width: fit-content;
  max-width: 82%;
  margin: 5px 0;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 7px;
  line-height: 1.35;
}

.chat-bubble--agent {
  color: #bbb;
  background: #232426;
}

.chat-bubble--user {
  margin-left: auto;
  background: #303134;
}

.chat-input {
  position: absolute;
  right: 32px;
  bottom: 27px;
  left: calc(45% + 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border: 1px solid #303134;
  border-radius: 7px;
  color: #696a6d;
  background: #191a1c;
  font-size: 7px;
}

.chat-input span {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 4px;
  color: #d5d5d0;
  background: #343538;
}

.project-preview--chat-opa {
  min-height: 155px;
  background: #ff6b00;
}

.project-preview--chat-opa > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  transition: transform 500ms var(--ease), filter 220ms ease;
}

.project-card:hover .project-preview--chat-opa > img,
.project-card:focus-visible .project-preview--chat-opa > img {
  filter: saturate(1.05);
  transform: scale(1.015);
}

.project-live-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  color: #111;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 680;
}

.project-live-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00a98f;
}

.project-preview--chess {
  min-height: 155px;
  background: #efefed;
}

.project-preview--chess > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  transition: filter 220ms ease, transform 500ms var(--ease);
}

.project-preview--chess::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.2));
  content: "";
  pointer-events: none;
}

.project-card:hover .project-preview--chess > img,
.project-card:focus-visible .project-preview--chess > img {
  filter: contrast(1.02);
  transform: scale(1.015);
}

.project-evidence-badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 680;
}

.project-evidence-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
}

.project-preview--book-recommender {
  min-height: 155px;
  background: #f2f2f0;
}

.project-preview--book-recommender > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  transition: filter 220ms ease, transform 500ms var(--ease);
}

.project-card:hover .project-preview--book-recommender > img,
.project-card:focus-visible .project-preview--book-recommender > img {
  filter: contrast(1.02);
  transform: scale(1.015);
}

.project-preview--soothemate {
  background: #e7f4f8;
}

.project-preview--soothemate > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-preview--segments {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 20px;
  padding: 21px 24px;
  background:
    radial-gradient(circle at 18% 30%, rgba(59, 134, 115, 0.2), transparent 32%),
    #0c0e0e;
}

.segment-summary {
  align-self: center;
}

.segment-summary small {
  color: #6f7d78;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.segment-summary strong {
  display: block;
  margin: 5px 0 7px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.segment-summary p {
  max-width: 180px;
  margin: 0;
  color: #7e8581;
  font-size: 8px;
  line-height: 1.45;
}

.segment-chart {
  align-self: center;
}

.segment-chart > div {
  display: grid;
  grid-template-columns: 70px 1fr 26px;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 7px;
}

.segment-chart span {
  color: #a5aaa7;
}

.segment-chart i {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #242a28;
}

.segment-chart i::after {
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d8f78, #76bba8);
  content: "";
}

.segment-chart small {
  color: #6f7673;
  font-size: 7px;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 13px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.project-metrics > div {
  display: flex;
  min-width: 0;
  padding: 0 18px 11px;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.project-metrics > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.project-metrics dd {
  order: -1;
  margin: 0 0 2px;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1;
}

.project-metrics dt {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-metrics small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--faint);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-study-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
  transition: border-color 160ms ease;
}

.case-study-link span {
  display: inline-block;
  margin-left: 8px;
  transition: transform 220ms var(--ease);
}

.project-card:hover .case-study-link,
.project-card:focus-visible .case-study-link {
  border-bottom-color: var(--ink);
}

.project-card:hover .case-study-link span,
.project-card:focus-visible .case-study-link span {
  transform: translateX(5px);
}

.carousel-button {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 60px;
  height: 60px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--line));
  border-radius: 50%;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 14px 38px rgba(15, 15, 13, 0.2), 0 0 0 5px color-mix(in srgb, var(--paper) 74%, transparent);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 200ms var(--ease), opacity 180ms ease, background 180ms ease;
}

.carousel-button span {
  font-size: 24px;
  line-height: 1;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--soft);
  transform: translateY(-50%) scale(1.06);
}

.carousel-button:disabled {
  pointer-events: none;
  opacity: 0;
}

.carousel-button--previous {
  left: 22px;
}

.carousel-button--next {
  right: 22px;
  left: auto;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.carousel-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: width 220ms var(--ease), background 180ms ease;
}

.carousel-dots button.active {
  width: 22px;
  background: var(--ink);
}

.portfolio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 48px;
  color: var(--faint);
  font-size: 10px;
}

.portfolio-footer p {
  margin: 0;
}

.portfolio-footer div {
  display: flex;
  gap: 22px;
}

.portfolio-footer a:hover,
.portfolio-footer a:focus-visible {
  color: var(--ink);
}

.case-dialog {
  width: min(980px, calc(100vw - 36px));
  max-height: min(820px, calc(100svh - 28px));
  padding: clamp(42px, 4vw, 58px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
}

.case-dialog::backdrop {
  background: rgba(12, 12, 11, 0.55);
  backdrop-filter: blur(8px);
}

.case-dialog[open] {
  animation: dialog-in 280ms var(--ease) both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.case-dialog form {
  position: sticky;
  z-index: 2;
  top: -30px;
  height: 0;
  margin: 0;
  text-align: right;
}

.dialog-close {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.dialog-overline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-right: 55px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-dialog h2 {
  max-width: 700px;
  margin: 34px 0 14px;
  font-size: clamp(38px, 6vw, 65px);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.dialog-lead {
  max-width: 710px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

#agentic-dialog,
#chat-opa-dialog,
#agentic-chess-dialog,
#book-recommender-dialog,
#soothemate-dialog {
  width: min(1320px, calc(100vw - 36px));
  max-height: calc(100svh - 28px);
}

#agentic-dialog .dialog-lead,
#chat-opa-dialog .dialog-lead,
#agentic-chess-dialog .dialog-lead,
#book-recommender-dialog .dialog-lead,
#soothemate-dialog .dialog-lead {
  max-width: 1040px;
}

.case-media {
  margin-top: 38px;
}

.case-media-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 14px;
}

.case-media-heading p,
.case-section-heading p {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-media-heading > p {
  max-width: 310px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: right;
  text-transform: none;
}

.case-media-heading h3,
.case-section-heading h3 {
  margin: 4px 0 0;
  font-size: clamp(21px, 2.4vw, 29px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.case-media-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: 18px;
  background: #0b0b0b;
}

.case-media-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0b0b;
}

.case-image-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: 18px;
  color: #fff;
  background: #0b0b0b;
}

.case-image-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-image-stage--contain {
  background: #f3f3f1;
}

.case-image-stage--contain > img {
  object-fit: contain;
  object-position: center top;
}

.case-image-stage figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 64px 25px 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.case-image-stage figcaption small,
.case-image-stage figcaption strong,
.case-image-stage figcaption span {
  display: block;
}

.case-image-stage figcaption small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.case-image-stage figcaption strong {
  margin-top: 5px;
  font-size: clamp(21px, 3vw, 32px);
  letter-spacing: -0.045em;
}

.case-image-stage figcaption span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.case-image-stage--showcase {
  aspect-ratio: auto;
  color: var(--ink);
  background: var(--card);
}

.case-image-stage--showcase > img {
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.case-image-stage--showcase figcaption {
  position: static;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: none;
}

.case-image-stage--showcase figcaption small,
.case-image-stage--showcase figcaption span {
  color: var(--muted);
}

#soothemate-dialog .case-media-option img {
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.case-objectives {
  margin-top: 38px;
}

.case-objectives ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 20px 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.case-objectives strong {
  font-size: 16px;
}

.case-objectives p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.case-video-launch {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: #0b0b0b;
  cursor: pointer;
}

.case-video-launch[hidden] {
  display: none;
}

.case-video-launch > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 240ms ease, transform 500ms var(--ease);
}

.case-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 25px;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76));
  text-align: left;
}

.case-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 70px;
  height: 70px;
  padding-left: 4px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #111;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  font-size: 20px;
  transform: translate(-50%, -50%);
  transition: transform 220ms var(--ease), background 180ms ease;
}

.case-video-copy,
.case-video-copy strong,
.case-video-copy span {
  display: block;
}

.case-video-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.case-video-copy strong {
  margin-top: 5px;
  font-size: clamp(21px, 3vw, 32px);
  letter-spacing: -0.045em;
}

.case-video-copy span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.case-video-launch:hover > img,
.case-video-launch:focus-visible > img {
  opacity: 1;
  transform: scale(1.015);
}

.case-video-launch:hover .case-video-play,
.case-video-launch:focus-visible .case-video-play {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.case-media-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.case-media-options--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-media-options--three .case-media-option {
  grid-template-columns: 106px minmax(0, 1fr);
}

.case-media-options--three .case-media-option img {
  width: 106px;
}

.case-media-options--single {
  grid-template-columns: minmax(0, 520px);
}

.case-media-option {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 200ms var(--ease);
}

.case-media-option img {
  width: 126px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(0.22);
}

.case-media-option span,
.case-media-option strong,
.case-media-option small {
  display: block;
  min-width: 0;
}

.case-media-option strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-media-option small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-media-option:hover,
.case-media-option:focus-visible,
.case-media-option.active {
  border-color: color-mix(in srgb, var(--ink) 38%, var(--line));
  background: var(--soft);
}

.case-media-option:hover,
.case-media-option:focus-visible {
  transform: translateY(-2px);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-metrics > div {
  display: flex;
  min-width: 0;
  padding: 22px 24px;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.case-metrics > div:first-child {
  border-left: 0;
}

.case-metrics dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.case-metrics dd {
  order: -1;
  margin: 0 0 7px;
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.case-metrics small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
}

.case-flow {
  margin-top: 38px;
}

.case-flow ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.case-flow li {
  min-width: 0;
  padding: 19px 16px;
  border-left: 1px solid var(--line);
}

.case-flow li:first-child {
  border-left: 0;
}

.case-flow li > span,
.case-flow li > strong,
.case-flow li > small {
  display: block;
}

.case-flow li > span {
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.case-flow li > strong {
  margin-top: 17px;
  font-size: 13px;
}

.case-flow li > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.case-flow--seven ol {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case-flow--seven li:nth-child(-n + 4) {
  border-bottom: 1px solid var(--line);
}

.case-flow--seven li:nth-child(5) {
  border-left: 0;
}

#agentic-dialog .dialog-grid,
#chat-opa-dialog .dialog-grid,
#agentic-chess-dialog .dialog-grid,
#book-recommender-dialog .dialog-grid {
  margin-top: 38px;
}

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.dialog-grid section {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-grid h3 {
  margin: 0 0 9px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.dialog-tags span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 25px;
}

.dialog-actions a {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.dialog-actions a span {
  transition: transform 200ms var(--ease);
}

.dialog-actions a:hover span,
.dialog-actions a:focus-visible span {
  transform: translateX(4px);
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .portfolio-paper {
    grid-template-rows: 82px minmax(0, 1fr) 48px;
  }

  .site-header,
  .portfolio-footer {
    padding-inline: 34px;
  }

  .header-actions {
    gap: 23px;
  }

  .site-nav {
    gap: 25px;
  }

  .section-heading,
  .project-track {
    padding-inline: 44px;
    scroll-padding-inline: 44px;
  }

  .project-card {
    flex-basis: min(740px, calc(100vw - 140px));
  }

  .carousel-button--previous {
    left: 10px;
  }

  .carousel-button--next {
    right: 10px;
    left: auto;
  }

  .case-flow ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 0;
  }

  .case-flow li {
    border-bottom: 1px solid var(--line);
  }

  .case-flow li:nth-child(4) {
    border-left: 0;
  }

  .case-flow--seven ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-flow--seven li:nth-child(5) {
    border-left: 1px solid var(--line);
  }

  .case-flow--seven li:nth-child(7) {
    border-left: 0;
  }
}

@media (max-width: 700px) {
  body {
    padding: 0;
    background: var(--paper);
  }

  .portfolio-paper {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    padding: 0 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(16px);
  }

  .wordmark {
    font-size: 22px;
  }

  .header-actions {
    gap: 16px;
  }

  .site-nav {
    gap: 17px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .theme-toggle {
    width: 31px;
    height: 31px;
  }

  .projects-section {
    display: grid;
    grid-template-rows: auto auto 26px;
    padding: 0 0 58px;
  }

  .section-heading {
    padding: 42px 24px 16px;
  }

  .project-track {
    height: auto;
    gap: 14px;
    padding: 0 24px 20px;
    scroll-padding-inline: 24px;
  }

  .project-card {
    grid-template-rows: auto auto auto auto auto;
    flex-basis: calc(100vw - 48px);
    height: auto;
    min-height: 660px;
    padding: 23px;
    border-radius: 22px;
  }

  .project-card--no-metrics {
    grid-template-rows: auto auto auto auto;
  }

  .status-pill {
    padding: 6px 8px;
    font-size: 9px;
  }

  .project-intro {
    padding: 18px 0;
  }

  .project-intro h3 {
    font-size: 30px;
  }

  .project-preview {
    min-height: 280px;
  }

  .project-preview--agent,
  .project-preview--segments {
    grid-template-columns: 1fr;
  }

  .preview-statement {
    align-self: end;
  }

  .chat-window {
    min-height: 128px;
  }

  .chat-input {
    right: 35px;
    bottom: 31px;
    left: 35px;
  }

  .segment-summary {
    text-align: center;
  }

  .segment-summary p {
    margin-inline: auto;
  }

  .project-metrics > div {
    padding-inline: 10px;
  }

  .carousel-button {
    top: 48%;
    width: 50px;
    height: 50px;
  }

  .carousel-button--previous {
    left: 3px;
  }

  .carousel-button--next {
    left: auto;
    right: 3px;
  }

  .portfolio-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px 34px;
    border-top: 1px solid var(--line);
  }

  .case-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    padding: 34px 24px;
    border-radius: 20px;
  }

  .dialog-overline {
    flex-direction: column;
    gap: 5px;
  }

  .case-dialog h2 {
    margin-top: 30px;
  }

  .dialog-lead {
    font-size: 16px;
  }

  #agentic-dialog,
  #chat-opa-dialog,
  #agentic-chess-dialog,
  #book-recommender-dialog,
  #soothemate-dialog {
    width: calc(100vw - 20px);
  }

  .case-media-heading {
    display: block;
  }

  .case-media-heading > p {
    max-width: none;
    margin-top: 7px;
    text-align: left;
  }

  .case-media-stage,
  .case-image-stage {
    border-radius: 13px;
  }

  .case-video-overlay {
    padding: 17px;
  }

  .case-video-play {
    width: 56px;
    height: 56px;
    font-size: 16px;
  }

  .case-media-options {
    grid-template-columns: 1fr;
  }

  .case-objectives ul {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-metrics {
    grid-template-columns: 1fr;
  }

  .case-metrics > div {
    padding-inline: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .case-metrics > div:first-child {
    border-top: 0;
  }

  .case-flow ol {
    grid-template-columns: 1fr;
  }

  .case-flow li,
  .case-flow li:nth-child(4) {
    display: grid;
    grid-template-columns: 34px 110px 1fr;
    align-items: center;
    gap: 10px;
    padding-inline: 0;
    border-left: 0;
  }

  .case-flow--seven li:nth-child(5),
  .case-flow--seven li:nth-child(7) {
    border-left: 0;
  }

  .case-flow li > strong,
  .case-flow li > small {
    margin-top: 0;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .site-nav a:nth-child(2) {
    display: none;
  }

  .project-card {
    min-height: 640px;
  }

  .case-video-copy > span {
    display: none;
  }

  .case-media-option {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .case-media-option img {
    width: 96px;
  }

  .project-metrics {
    grid-template-columns: 1fr 1fr;
    row-gap: 11px;
  }

  .project-metrics > div:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
