:root {
  --bg-primary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #000000;
  --text-secondary: #5f5f5f;
  --border-color: rgb(0 0 0 / 12%);
  --border-strong: rgb(0 0 0 / 84%);
  --grid-color: rgb(0 0 0 / 12%);
  --teal-blue: #176f66;
  --dark-teal: #000000;
  --cream-white: #ffffff;
  --site-font: Inter, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --root-font-size: 16px;
  --base-letter-spacing: 0;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 15%);
  --shadow-lg: 0 10px 25px rgb(0 0 0 / 18%);
  --shadow-xl: 0 20px 42px rgb(0 0 0 / 22%);
  --footer-height: 158px;
}

[data-theme="dark"] {
  --bg-primary: #080808;
  --bg-card: #111111;
  --text-primary: #ffffff;
  --text-secondary: #bebebe;
  --border-color: rgb(255 255 255 / 12%);
  --border-strong: rgb(255 255 255 / 86%);
  --grid-color: rgb(255 255 255 / 9%);
  --teal-blue: #8de0d4;
  --dark-teal: #ffffff;
  --cream-white: #111111;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--root-font-size);
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--site-font);
  font-size: 0.7rem;
  line-height: 1.8;
  letter-spacing: var(--base-letter-spacing);
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 100px 100px;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10000;
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.container.narrow,
.narrow {
  width: min(700px, calc(100% - 40px));
}

.page-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background: transparent;
}

.navbar {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  transition: box-shadow 0.3s ease;
}

.navbar-blur {
  position: absolute;
  inset: 0;
  height: calc(100% + 24px);
  pointer-events: none;
}

.navbar-blur > div {
  position: absolute;
  inset: 0;
}

.navbar-blur > div:nth-child(1) {
  border-bottom: 2px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask: linear-gradient(to bottom, black 55%, transparent 95%);
  -webkit-mask: linear-gradient(to bottom, black 55%, transparent 95%);
}

.navbar-blur > div:nth-child(2) {
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask: linear-gradient(to bottom, black 30%, transparent 70%);
  -webkit-mask: linear-gradient(to bottom, black 30%, transparent 70%);
}

.navbar-blur > div:nth-child(3) {
  background: color-mix(in srgb, var(--bg-primary) 97%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask: linear-gradient(to bottom, black 12%, transparent 40%);
  -webkit-mask: linear-gradient(to bottom, black 12%, transparent 40%);
}

.nav-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.nav-brand {
  color: var(--dark-teal);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-link {
  position: relative;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--text-primary);
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  opacity: 1;
  transform: scaleX(1);
}

.language-toggle,
.theme-toggle,
.hamburger {
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0;
  font-family: var(--site-font);
  font-size: 0.7rem;
  font-weight: 500;
}

.language-toggle [data-lang-option] {
  opacity: 0.42;
  transition: opacity 0.2s ease;
}

.language-toggle [data-lang-option].is-active {
  opacity: 1;
  font-weight: 700;
}

.language-toggle:hover,
.theme-toggle:hover {
  opacity: 0.62;
}

.theme-toggle {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  margin-left: 0.6rem;
  font-size: 0.88rem;
}

[data-theme="dark"] .icon-sun,
.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: inline;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  width: 25px;
  height: 3px;
  border-radius: 3px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.intro-section {
  padding: 5.5rem 0 0.75rem;
}

.intro-grid {
  display: flex;
  max-width: 700px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
}

.intro-text {
  flex: 1;
  min-width: 0;
  animation: fadeInUp 0.6s ease both;
}

.intro-text h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
}

.intro-role {
  color: var(--text-secondary);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.35;
}

.intro-contact {
  margin-top: 0.7rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.intro-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.1rem;
}

.intro-photo {
  position: relative;
  display: block;
  width: 190px;
  height: 190px;
  flex: 0 0 190px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f7f7f7;
  box-shadow: var(--shadow-md);
}

.intro-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.3rem;
  font-size: 0.62rem;
  font-weight: normal;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  border: 2px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  border: 2px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.about-section {
  padding: 4.2rem 0 2.75rem;
}

.about-section p {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.55;
}

.about-section blockquote {
  margin: 0.9rem 0;
  border-left: 3px solid var(--text-primary);
  padding-left: 1.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55;
}

.section-title {
  position: relative;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.55rem auto 0;
  border-radius: 99px;
  background: var(--text-primary);
}

.cad-gallery-section {
  padding: 2rem 0 5rem;
  background: var(--bg-primary);
}

.cad-gallery-title {
  margin-bottom: 0.75rem;
}

.cad-filter {
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
}

.cad-filter-link {
  border: none;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--text-primary);
  text-underline-offset: 2px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.cad-filter-link:hover,
.cad-filter-link:focus {
  opacity: 0.58;
}

.cad-filter-link.active {
  font-weight: 700;
}

.cad-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.cad-photo-wrap {
  position: relative;
  display: block;
  break-inside: avoid;
  overflow: hidden;
  margin-bottom: 0;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.28s ease;
}

.cad-photo-wrap:hover,
.cad-photo-wrap:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.cad-photo-wrap.cad-filtered-out {
  display: none;
}

.cad-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #f6f6f6;
}

.cad-photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1), filter 0.35s ease;
}

.cad-photo-wrap:hover img,
.cad-photo-wrap:focus-within img {
  transform: scale(1.07);
  filter: brightness(0.68);
}

.cad-photo-cap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 0 0 8px 8px;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(0deg, rgb(0 0 0 / 88%) 0%, transparent 100%);
  color: rgb(255 255 255 / 92%);
  font-size: 0.55rem;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cad-photo-wrap:hover .cad-photo-cap,
.cad-photo-wrap:focus-within .cad-photo-cap {
  opacity: 1;
  transform: translateY(0);
}

.modal-copy {
  display: none;
}

.live-loop-preview {
  position: relative;
  min-height: 268px;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--handle-x, 54%) var(--handle-y, 44%), rgb(31 128 117 / 28%), transparent 112px),
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px),
    #ffffff;
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.live-loop-preview::before {
  content: "";
  position: absolute;
  inset: 42px 34px;
  border: 1px solid rgb(0 0 0 / 16%);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.live-loop-preview::after {
  content: "";
  position: absolute;
  left: calc(var(--handle-x, 54%) - 1px);
  top: 42px;
  bottom: calc(100% - var(--handle-y, 44%));
  width: 2px;
  background: linear-gradient(#cf4d3b, transparent);
  opacity: 0.72;
}

.loop-node {
  position: absolute;
  z-index: 2;
  border: 1px solid #000000;
  border-radius: 999px;
  padding: 4px 8px;
  background: #ffffff;
  color: #000000;
  font-size: 0.6rem;
  font-weight: 700;
}

.node-lead {
  left: 12%;
  top: 18%;
}

.node-quote {
  left: 56%;
  top: 14%;
}

.node-channel {
  right: 10%;
  top: 46%;
}

.node-deliver {
  left: 48%;
  bottom: 14%;
}

.node-feedback {
  left: 12%;
  bottom: 25%;
}

.loop-handle {
  position: absolute;
  left: var(--handle-x, 54%);
  top: var(--handle-y, 44%);
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  padding: 0;
  background: #1f8075;
  box-shadow:
    0 0 0 1px #000000,
    0 0 28px rgb(31 128 117 / 64%);
  cursor: grab;
  transform: translate(-50%, -50%);
}

.loop-handle:active {
  cursor: grabbing;
}

#scroll-sidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.4s ease;
}

#scroll-sidebar.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgb(0 0 0 / 18%);
  transform: translateX(-1px);
}

[data-theme="dark"] .sidebar-track {
  background: rgb(255 255 255 / 22%);
}

#sidebar-fill {
  width: 2px;
  height: 0;
  background: var(--text-primary);
}

.sdot {
  position: relative;
  display: flex;
  align-items: center;
  border: 0;
  padding: 11px 0;
  background: transparent;
  cursor: pointer;
}

.sdot-ring {
  position: relative;
  z-index: 1;
  display: block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border: 2px solid rgb(0 0 0 / 40%);
  border-radius: 50%;
  background: var(--cream-white);
  transition: all 0.3s ease;
}

[data-theme="dark"] .sdot-ring {
  border-color: rgb(255 255 255 / 45%);
}

.sdot.active .sdot-ring {
  border-color: var(--text-primary);
  background: var(--text-primary);
  box-shadow: 0 0 14px rgb(0 0 0 / 60%);
  transform: scale(1.5);
}

.sdot-label {
  position: absolute;
  left: 18px;
  border-radius: 4px;
  padding: 2px 7px;
  background: var(--cream-white);
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  color: var(--dark-teal);
  font-size: 0.48rem;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.sdot:hover .sdot-label,
.sdot.active .sdot-label {
  opacity: 1;
  transform: translateX(0);
}

.experience-section {
  padding: 4rem 0 4.5rem;
}

.experience-timeline {
  border-top: 1px solid var(--border-color);
}

.experience-item {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

.experience-date {
  color: var(--text-secondary);
  font-size: 0.62rem;
  line-height: 1.45;
  white-space: nowrap;
}

.experience-body {
  min-width: 0;
}

.experience-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: baseline;
  margin-bottom: 0.46rem;
  color: var(--text-secondary);
  font-size: 0.6rem;
  line-height: 1.35;
}

.experience-kicker span:first-child {
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  padding: 0.14rem 0.54rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.18;
}

.experience-item:not(.experience-featured) .experience-kicker span:first-child {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
}

.experience-body h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.experience-featured .experience-body h3 {
  font-size: 1.04rem;
}

.experience-body p {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.65;
}

.experience-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.7rem;
  padding: 0;
  list-style: none;
}

.experience-scope li {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.16rem 0.42rem;
  color: var(--text-secondary);
  font-size: 0.54rem;
  line-height: 1.2;
}

.experience-scope .experience-link-item {
  border: 0;
  padding: 0;
  background: transparent;
}

.experience-link {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.16rem 0.42rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.experience-link::after {
  content: "↗";
  margin-left: 0.32rem;
}

.experience-link:hover,
.experience-link:focus-visible {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.muted-row {
  opacity: 0.78;
}

.publications-section {
  padding: 2rem 0 5rem;
}

.skills-section {
  padding: 0.2rem 0 3.2rem;
}

.skill-groups {
  display: grid;
  gap: 1rem;
}

.skill-group h3 {
  display: block;
  margin: 0 0 0.42rem;
  color: var(--text-secondary);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.35;
}

.skill-group h3::after {
  display: none;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.skill-tags span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.16rem 0.46rem;
  background: color-mix(in srgb, var(--bg-card) 94%, var(--text-primary) 6%);
  color: var(--text-primary);
  font-size: 0.57rem;
  font-weight: 700;
  line-height: 1.25;
}

.tools-section {
  padding: 0.55rem 0 4rem;
}

.tools-title {
  margin: 0 0 0.95rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.tool-groups {
  display: grid;
  gap: 0.95rem;
}

.tool-group {
  display: block;
}

.tool-group h3 {
  display: block;
  margin: 0 0 0.38rem;
  color: var(--text-secondary);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.35;
}

.tool-group h3::after {
  display: none;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tool-link {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.18rem 0.48rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.tool-link::after {
  content: "↗";
  margin-left: 0.32rem;
}

.tool-link:hover,
.tool-link:focus-visible {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.content-cover {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem;
  background: #f7f7f5;
}

.content-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
}

.sop-preview {
  position: relative;
  z-index: 1;
}

.cover-sop {
  aspect-ratio: 16 / 9;
  min-height: 0;
  place-items: center;
  padding: 0;
  background: #fbfbfb;
}

.sop-preview {
  width: 100%;
  height: 100%;
}

.sop-preview img {
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  object-fit: contain;
  object-position: center;
}

.cover-image {
  aspect-ratio: 16 / 9;
  min-height: 0;
  padding: 0;
  background: var(--bg-card);
}

.cover-image::before {
  display: none;
}

.cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cover-contain {
  padding: 0.7rem;
  background: #f5f5f5;
}

.cover-contain img {
  object-fit: contain;
}

.cover-video-still {
  background: #101114;
}

.cover-video-still img {
  object-fit: contain;
}

[data-theme="dark"] .content-cover {
  background: #151515;
}

[data-theme="dark"] .cover-sop {
  background: #101010;
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 1.35rem 1.45rem 1.45rem;
}

.project-content .content-platform {
  margin: 0 0 0.58rem;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
}

.project-content h3 {
  min-height: 3.45rem;
  margin: 0 0 0.72rem;
  font-size: 1.36rem;
  font-weight: 700;
  line-height: 1.28;
}

.project-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.75;
}

.content-link {
  display: inline-flex;
  margin-top: auto;
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1.3rem;
}

.content-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.18rem 0.48rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.content-tag::after {
  content: "↗";
  margin-left: 0.32rem;
}

.content-tag:hover,
.content-tag:focus-visible {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.article-list,
.article-meta-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.05rem;
}

.article-meta-list {
  gap: 0;
  margin-top: auto;
  padding-top: 0.72rem;
}

.article-link {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 0.64rem 0.7rem;
  background: color-mix(in srgb, var(--bg-card) 90%, var(--text-primary) 10%);
  text-decoration: none;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.article-link:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 18px rgb(0 0 0 / 11%);
  transform: translateY(-2px);
}

.article-link span {
  display: block;
  color: var(--text-primary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-link small {
  display: block;
  margin-top: 0.22rem;
  color: var(--text-secondary);
  font-size: 0.56rem;
  line-height: 1.45;
}

.article-meta-link {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding: 0.62rem 0;
  color: inherit;
  text-decoration: none;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.article-meta-link:last-child {
  border-bottom: 1px solid var(--border-color);
}

.article-meta-link:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.article-meta-link span {
  color: var(--text-secondary);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}

.article-meta-link strong {
  color: var(--text-primary);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.55;
}

.contact-section {
  padding: 2rem 0 5rem;
  text-align: center;
}

.contact-section p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.contact-direct {
  margin: 0.9rem 0 0;
  color: color-mix(in srgb, var(--text-secondary) 76%, transparent);
  font-size: 0.62rem;
}

.contact-direct a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer-spacer {
  display: none;
}

.footer {
  position: relative;
  z-index: 1;
  background: #000000;
  color: #ffffff;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--footer-height);
  padding: 1.5rem 0;
}

.footer p {
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.64rem;
}

.footer div p:first-child {
  color: #ffffff;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: rgb(255 255 255 / 78%);
  font-size: 0.62rem;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: #ffffff;
}

#photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#photo-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.pm-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 88%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pm-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 55% 45%;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 28px 80px rgb(0 0 0 / 42%);
  transform: scale(0.97) translateY(18px);
  transition: transform 0.3s ease;
}

#photo-modal.open .pm-card {
  transform: scale(1) translateY(0);
}

.pm-img-wrap {
  position: relative;
  min-height: 380px;
  max-height: 88vh;
  overflow: hidden;
  background: #f4f7f5;
}

.pm-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#photo-modal.media-wide .pm-img-wrap img {
  object-fit: cover;
  object-position: center;
}

@media (min-width: 769px) {
  #photo-modal.media-wide .pm-card {
    grid-template-columns: minmax(0, 62%) minmax(0, 38%);
    max-width: 1100px;
  }
}

.pm-info {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: 2.4rem 2rem;
  background: var(--bg-card);
}

.pm-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 45%);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s ease;
}

.pm-close:hover {
  background: rgb(0 0 0 / 72%);
}

#pm-title {
  margin: 0;
  color: var(--dark-teal);
  font-family: var(--site-font);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

#pm-desc {
  color: var(--text-secondary);
  font-size: 0.67rem;
  line-height: 1.85;
}

.pm-link {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.18rem 0.48rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.pm-link::after {
  content: "↗";
  margin-left: 0.32rem;
}

.pm-link:hover,
.pm-link:focus-visible {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.pm-tools {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.pm-tools-label {
  margin-bottom: 0.55rem;
  color: var(--teal-blue);
  font-family: var(--site-font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#pm-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pm-tool-tag {
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  background: var(--text-primary);
  color: var(--bg-card);
  font-family: var(--site-font);
  font-size: 0.56rem;
  white-space: nowrap;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition:
    width 0.18s ease,
    height 0.18s ease,
    border-width 0.18s ease,
    opacity 0.2s ease;
}

.has-custom-cursor,
.has-custom-cursor * {
  cursor: none !important;
}

.has-pointer .cursor-dot,
.has-pointer .cursor-ring {
  opacity: 1;
}

.cursor-hover .cursor-ring {
  width: 46px;
  height: 46px;
  border-width: 2px;
}

.js-enabled .sr {
  opacity: 0;
  transform: translateY(45px);
}

.js-enabled .sr.sr-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-enabled .experience-item.sr,
.js-enabled .project-card.sr {
  opacity: 1;
  transform: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Case study pages */
.site-header {
  position: relative;
  z-index: 2;
}

.brand,
.main-nav,
.header-tools {
  display: flex;
  align-items: center;
}

.brand {
  color: var(--dark-teal);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav {
  gap: 2rem;
  list-style: none;
}

.header-tools {
  gap: 0.6rem;
}

.case-main {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: 78px;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  min-height: 72vh;
  padding: clamp(42px, 7vw, 86px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-style: italic;
}

.case-hero h1,
.case-section h2 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}

.case-hero h1 {
  font-size: clamp(1.86rem, 3.5vw, 3.05rem);
}

.case-hero-refined {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
}

.case-hero-refined h1 {
  max-width: 720px;
  font-size: clamp(1.86rem, 2.9vw, 2.65rem);
  line-height: 1.12;
}

.ai-robot-case .case-hero-refined {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.62fr);
  gap: clamp(28px, 5vw, 56px);
}

.ai-robot-case .case-hero-refined h1 {
  max-width: 650px;
  font-size: clamp(1.72rem, 2.7vw, 2.42rem);
  line-height: 1.14;
}

.ai-robot-case .case-cover {
  max-width: 410px;
  justify-self: end;
}

.case-hero-refined > div > p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.85;
}

.case-hero p,
.case-section > p {
  color: var(--text-secondary);
}

.case-cover {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.case-meta {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
}

.case-meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.case-hero-refined .case-meta {
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 820px;
  margin-top: 1.45rem;
}

.case-hero-refined .case-meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border: 0;
  border-top: 1px solid var(--border-color);
  border-radius: 0;
  padding: 12px 0 0;
  background: transparent;
  box-shadow: none;
}

.case-meta dt {
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.case-meta dd {
  margin: 0;
}

.case-hero-refined .case-meta dd {
  margin-top: 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.case-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.5rem 0.86rem;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.case-actions .button:hover {
  transform: translateY(-2px);
}

.case-actions .button.primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.case-actions .button.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
}

.case-section {
  padding: clamp(42px, 7vw, 86px) 0;
  border-top: 1px solid var(--border-color);
}

.case-section h2 {
  max-width: 720px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.case-section > p {
  max-width: 820px;
}

.case-metrics,
.case-columns,
.gallery-grid {
  display: grid;
  gap: 16px;
}

.case-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.case-metric,
.case-note,
.case-column {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  background: var(--bg-card);
}

.case-metric strong {
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
}

.case-metric span {
  display: block;
  margin-top: 9px;
  color: var(--text-secondary);
}

.case-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  margin-bottom: 18px;
}

.case-columns.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.case-column h3,
.case-note h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.case-column ul,
.case-note ul {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

.case-column li,
.case-note li {
  margin: 6px 0;
}

.evidence-ladder {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.evidence-ladder div {
  min-width: 0;
  border-top: 3px solid var(--teal-blue);
  padding: 16px 14px 14px;
  background: var(--bg-card);
}

.evidence-ladder strong,
.evidence-ladder span,
.evidence-ladder small {
  display: block;
}

.evidence-ladder strong {
  font-size: 1.35rem;
  line-height: 1;
}

.evidence-ladder span {
  margin-top: 10px;
  font-weight: 700;
}

.evidence-ladder small {
  margin-top: 6px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.case-report {
  width: min(980px, calc(100% - 40px));
}

.report-hero {
  padding: clamp(86px, 12vw, 150px) 0 clamp(54px, 8vw, 90px);
  border-bottom: 1px solid var(--border-strong);
}

.report-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  font-weight: 750;
  line-height: 1.02;
}

.report-lede {
  max-width: 780px;
  margin-top: 1.35rem;
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 1.5vw, 1.08rem);
  line-height: 1.85;
}

.report-meta {
  display: grid;
  grid-template-columns: 0.65fr 1.25fr 1fr;
  gap: 24px;
  margin-top: clamp(34px, 5vw, 58px);
}

.report-meta div {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.report-meta dt {
  color: var(--text-secondary);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.report-meta dd {
  margin: 8px 0 0;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.65;
}

.report-body {
  width: min(820px, 100%);
  margin: 0 auto;
}

.report-section {
  position: relative;
  padding: clamp(64px, 10vw, 116px) 0;
}

.section-index {
  display: block;
  margin-bottom: 12px;
  color: var(--teal-blue);
  font-size: 0.65rem;
  font-weight: 800;
}

.report-section > h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  line-height: 1.25;
}

.star-section {
  margin-top: clamp(52px, 8vw, 84px);
  border-left: 3px solid var(--border-strong);
  padding-left: clamp(20px, 4vw, 38px);
}

.star-section > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  line-height: 1.35;
}

.star-section > h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border: 1px solid var(--border-strong);
  padding: 0 9px;
  font-size: 0.62rem;
  line-height: 1;
}

.star-section h4 {
  margin: 38px 0 10px;
  color: var(--teal-blue);
  font-size: 0.76rem;
  font-weight: 800;
}

.star-section p,
.star-section li,
.sample-map p,
.sample-map li {
  font-size: 0.78rem;
  line-height: 1.9;
}

.star-section p {
  margin: 14px 0 0;
}

.star-section .case-columns + p,
.star-section .report-stats + p {
  margin-top: 22px;
}

.star-section ul,
.star-section ol {
  margin: 14px 0 0;
  padding-left: 1.3rem;
  color: var(--text-secondary);
}

.star-section li {
  margin: 6px 0;
}

.star-section strong {
  color: var(--text-primary);
}

.commitment-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 18px 0;
}

.commitment-flow span {
  font-weight: 700;
}

.commitment-flow b {
  color: var(--teal-blue);
  font-size: 0.95rem;
}

.key-sentence {
  margin-top: 24px !important;
  font-size: 0.84rem !important;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 30px;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.report-stats div {
  min-width: 0;
  padding: 18px 16px 18px 0;
}

.report-stats div + div {
  border-left: 1px solid var(--border-color);
  padding-left: 16px;
}

.report-stats strong,
.report-stats span {
  display: block;
}

.report-stats strong {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.05;
}

.report-stats span {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.55;
}

.report-note {
  border-left: 3px solid var(--teal-blue);
  padding-left: 14px;
  color: var(--text-secondary);
  font-size: 0.7rem !important;
}

.report-visual,
.report-visual-grid {
  margin-top: 28px;
}

.report-visual + p,
.report-visual-grid + p {
  margin-top: 24px;
}

.report-landing-grid .story-figure img {
  height: 100%;
  aspect-ratio: auto;
  object-position: top center;
}

.report-landing-grid .story-figure button {
  height: clamp(240px, 32vw, 320px);
}

.report-evidence-figure button {
  height: clamp(320px, 42vw, 440px);
}

.story-figure.contain-figure.report-evidence-figure img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
}

.report-funnel-grid .story-figure button {
  background: #f8f8f6;
}

.report-funnel-grid .story-figure button {
  height: clamp(200px, 24vw, 248px);
}

.report-funnel-grid .story-figure.contain-figure img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
}

.star-section blockquote {
  margin: 16px 0 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 22px 0;
  font-size: clamp(0.88rem, 1.7vw, 1.04rem);
  font-weight: 650;
  line-height: 1.85;
}

.final-conclusion {
  margin-top: 34px;
  padding: 24px 26px;
  background: var(--text-primary);
  color: var(--bg-primary);
}

.final-conclusion span,
.final-conclusion strong {
  display: block;
}

.final-conclusion span {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.final-conclusion strong {
  margin-top: 10px;
  color: inherit;
  font-size: clamp(0.9rem, 2vw, 1.12rem);
  line-height: 1.75;
}

.sample-map {
  margin-top: 42px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 30px 0;
}

.sample-map h3 {
  margin: 0;
  font-size: 1.05rem;
}

.sample-map p {
  margin-top: 12px;
  color: var(--text-secondary);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.sample-grid div {
  min-width: 0;
  padding: 0 20px;
}

.sample-grid div:first-child {
  padding-left: 0;
}

.sample-grid div + div {
  border-left: 1px solid var(--border-color);
}

.sample-grid strong,
.sample-grid span,
.sample-grid small {
  display: block;
}

.sample-grid strong {
  color: var(--teal-blue);
  font-size: 0.62rem;
}

.sample-grid span {
  margin-top: 9px;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.6;
}

.sample-grid small {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border-color);
  padding: 28px 0 80px;
}

.report-actions .back-link {
  margin-top: 0;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.gallery-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.gallery-item button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0;
  background: var(--bg-card);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  background: var(--bg-card);
}

.gallery-item figcaption,
.gallery-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.story-section h2 {
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.case-story {
  display: grid;
  gap: 1.15rem;
  max-width: 820px;
  margin-inline: auto;
}

.case-story p {
  max-width: 100%;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.9;
}

.story-media-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin: 0.5rem 0 0.85rem;
}

.story-media-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.story-media-grid.service-media-row {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: stretch;
  max-width: 820px;
}

.story-media-grid.service-proof-row {
  grid-template-columns: minmax(260px, 317px) minmax(0, 1fr);
}

.story-figure {
  display: grid;
  gap: 0.48rem;
  min-width: 0;
  margin: 0;
}

.story-figure.wide {
  max-width: 820px;
  margin: 0.55rem 0 0.85rem;
}

.story-figure button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.story-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.story-figure button:hover img {
  transform: scale(1.025);
}

.story-figure.wide img {
  aspect-ratio: 16 / 7.4;
}

.story-figure.contain-figure button {
  background: var(--bg-card);
}

.story-figure.contain-figure img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.flowchart-figure {
  max-width: 760px;
}

.email-proof-grid {
  align-items: start;
}

.email-figure button {
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  background: var(--bg-card);
}

.email-figure img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.case-inline-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.case-inline-link:hover {
  color: var(--teal-blue);
}

.story-figure figcaption {
  color: var(--text-secondary);
  font-size: 0.62rem;
}

.story-video {
  display: grid;
  gap: 0.48rem;
  width: min(100%, 360px);
  margin: 0.55rem 0 0.85rem;
}

.service-media-row .story-video {
  width: 100%;
  margin: 0;
}

.service-media-row .story-figure {
  height: 100%;
  margin: 0;
}

.service-media-row .story-figure button {
  height: 100%;
}

.service-media-row .story-figure img {
  display: block;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.service-photo-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.service-photo-stack .story-figure,
.service-photo-stack .story-figure button {
  height: auto;
}

.service-photo-stack .story-figure button {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  background: #f8f8f6;
}

.service-photo-stack .story-figure img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.story-video video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #000000;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.story-video figcaption {
  color: var(--text-secondary);
  font-size: 0.62rem;
}

.story-summary {
  border-left: 4px solid var(--text-primary);
  padding: 0.75rem 0 0.75rem 1rem;
  color: var(--text-primary) !important;
  font-weight: 700;
}

.back-link,
.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 68px 20px 24px;
  background: rgb(0 0 0 / 78%);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: calc(100vh - 120px);
  border-radius: 14px;
  background: white;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 8px;
  padding: 9px 13px;
  background: rgb(18 18 18 / 70%);
  color: white;
  cursor: pointer;
}

@media (max-width: 900px) {
  #scroll-sidebar {
    display: none;
  }

  .cad-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .publication-grid,
  .case-metrics,
  .case-columns,
  .gallery-grid,
  .story-media-grid.two-up,
  .story-media-grid.three-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-columns.three,
  .evidence-ladder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ai-robot-case .case-hero-refined {
    grid-template-columns: 1fr;
  }

  .ai-robot-case .case-cover {
    max-width: none;
    justify-self: stretch;
  }

  .report-meta {
    grid-template-columns: 1fr;
  }

  .sample-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sample-grid div,
  .sample-grid div:first-child {
    padding: 0;
  }

  .sample-grid div + div {
    border-top: 1px solid var(--border-color);
    border-left: 0;
    padding-top: 18px;
  }

}

@media (max-width: 768px) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .has-custom-cursor,
  .has-custom-cursor * {
    cursor: auto !important;
  }

  .nav-container {
    height: 70px;
    padding: 0 14px;
  }

  .container,
  .container.narrow,
  .narrow,
  .case-main {
    width: min(100% - 28px, 1200px);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    width: 100%;
    padding: 2rem 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .intro-section {
    padding-top: 5.2rem;
  }

  .intro-grid {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
  }

  .intro-photo {
    width: 140px;
    height: 140px;
    flex-basis: 140px;
    margin: 0 auto;
  }

  .intro-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
  }

  .about-section {
    padding-top: 2.2rem;
  }

  .cad-gallery-section {
    padding: 1.25rem 0 3rem;
  }

  .section-title {
    font-size: 1rem;
  }

  .cad-filter {
    margin-bottom: 1.5rem;
  }

  .cad-photo-cap {
    padding: 0.65rem 0.6rem 0.5rem;
    font-size: 0.52rem;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }

  .experience-date {
    font-size: 0.6rem;
  }

  .experience-body h3,
  .experience-featured .experience-body h3 {
    font-size: 0.96rem;
  }

  .experience-kicker span:first-child {
    font-size: 0.74rem;
  }

  .experience-scope {
    gap: 0.34rem;
  }

  .skills-section {
    padding: 0.2rem 0 2.8rem;
  }

  .skill-groups {
    gap: 0.9rem;
  }

  .skill-tags span {
    min-height: 24px;
    font-size: 0.56rem;
  }

  .tools-section {
    padding: 0.5rem 0 3.5rem;
  }

  .tool-groups {
    gap: 0.9rem;
  }

  .tool-link,
  .content-tag,
  .experience-link,
  .pm-link {
    white-space: normal;
  }

  .publication-grid,
  .case-metrics,
  .case-columns,
  .gallery-grid,
  .case-hero-refined .case-meta,
  .story-media-grid.service-media-row,
  .story-media-grid.two-up,
  .story-media-grid.three-up {
    grid-template-columns: 1fr;
  }

  .case-columns.three,
  .evidence-ladder {
    grid-template-columns: 1fr;
  }

  .service-media-row .story-video {
    width: min(100%, 330px);
  }

  .service-media-row .story-figure,
  .service-media-row .story-figure button,
  .service-media-row .story-figure img {
    height: auto;
  }

  .service-media-row .story-figure img {
    aspect-ratio: 16 / 9;
  }

  .case-hero-refined h1 {
    font-size: clamp(1.55rem, 8vw, 2.2rem);
  }

  .case-hero-refined > div > p:not(.eyebrow) {
    font-size: 0.7rem;
    line-height: 1.72;
  }

  .case-report {
    width: min(100% - 28px, 820px);
  }

  .report-hero {
    padding-top: 78px;
  }

  .report-hero h1 {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .report-lede {
    font-size: 0.76rem;
    line-height: 1.8;
  }

  .report-meta dd {
    font-size: 0.66rem;
  }

  .report-section {
    padding: 56px 0;
  }

  .report-section > h2 {
    font-size: 1.5rem;
  }

  .star-section {
    margin-top: 48px;
    padding-left: 18px;
  }

  .star-section p,
  .star-section li,
  .sample-map p,
  .sample-map li {
    font-size: 0.72rem;
    line-height: 1.82;
  }

  .compact-list,
  .report-stats {
    grid-template-columns: 1fr;
  }

  .report-stats div,
  .report-stats div + div {
    padding: 18px 0;
  }

  .report-stats div + div {
    border-top: 1px solid var(--border-color);
    border-left: 0;
  }

  .commitment-flow {
    gap: 7px;
    font-size: 0.68rem;
  }

  .commitment-flow b {
    font-size: 0.76rem;
  }

  .report-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-story p {
    font-size: 0.72rem;
    line-height: 1.82;
  }

  .story-figure.wide img {
    aspect-ratio: 16 / 10;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pm-card {
    grid-template-columns: 1fr;
    grid-template-rows: 42vw auto;
    max-height: 92vh;
  }

  .pm-img-wrap {
    min-height: unset;
  }

  .pm-info {
    padding: 1.4rem 1.2rem;
  }

  #pm-title {
    font-size: 0.85rem;
  }

  #pm-desc {
    font-size: 0.63rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: calc(var(--root-font-size) * 0.74);
  }

  body::before {
    background-size: 100px 100px;
  }

  .nav-brand {
    font-size: 0.72rem;
  }

  .language-toggle {
    font-size: 0.65rem;
  }

  .cad-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .cad-photo-wrap {
    border-radius: 11px;
    padding: 5px;
  }

  .live-loop-preview {
    min-height: 170px;
  }

  .loop-node {
    font-size: 0.48rem;
    padding: 3px 6px;
  }

  .loop-handle {
    width: 24px;
    height: 24px;
  }

  .content-cover {
    min-height: 160px;
  }

  .project-content {
    min-height: 0;
  }

  .project-content h3 {
    min-height: 0;
  }

  .content-link,
  .article-meta-list {
    margin-top: 1.15rem;
  }

  .article-meta-list {
    padding-top: 0;
  }
}

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

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .js-enabled .sr {
    opacity: 1;
    transform: none;
  }
}
