:root {
  --accent: #1769e0;
  --paper: #f7f7f5;
  --ink: #171717;
  --dark-paper: #101214;
  --dark-ink: #f1f2ee;
  --page-width: 1180px;
  --project-radius: 6px;
  --hero-scale: 0.92;
  --page-background: var(--paper);
  --text: var(--ink);
  --muted: #62625e;
  --quiet: #8d8d87;
  --line: rgba(23, 23, 23, 0.15);
  --line-strong: rgba(23, 23, 23, 0.28);
  --surface: #ffffff;
  --header-background: rgba(247, 247, 245, 0.98);
  --focus: #0e5fd1;
  --profile-accent: #c65312;
  --skill-available: #009b4d;
  color-scheme: light;
  font-family:
    Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="dark"] {
  --page-background: var(--dark-paper);
  --text: var(--dark-ink);
  --muted: #a9aaa6;
  --quiet: #777a7c;
  --line: rgba(241, 242, 238, 0.16);
  --line-strong: rgba(241, 242, 238, 0.3);
  --surface: #171a1d;
  --header-background: rgba(16, 18, 20, 0.98);
  --focus: #6aa5ff;
  --profile-accent: #ff914d;
  --skill-available: #02e16e;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--page-background);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body[data-display-font="serif"] h1,
body[data-display-font="serif"] h2,
body[data-display-font="serif"] h3 {
  font-family: "Iowan Old Style", "Songti SC", Georgia, serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1000;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--page-background);
  color: var(--text);
  transform: translateY(-180%);
}

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

.section-shell {
  width: min(calc(100% - 56px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--header-background);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  width: min(calc(100% - 56px), var(--page-width));
  min-height: 58px;
  margin-inline: auto;
}

.brand {
  width: fit-content;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.desktop-navigation {
  display: flex;
  align-items: center;
  gap: 26px;
}

.desktop-navigation a {
  position: relative;
  padding-block: 17px 16px;
  color: var(--muted);
  font-size: 12px;
  transition: color 160ms ease;
}

.desktop-navigation a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--text);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.desktop-navigation a:hover,
.desktop-navigation a.is-active {
  color: var(--text);
}

.desktop-navigation a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.text-control {
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.text-control:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.menu-control {
  display: none;
}

.mobile-navigation {
  width: min(calc(100% - 64px), var(--page-width));
  margin-inline: auto;
  padding: 10px 0 22px;
}

.mobile-navigation a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.mobile-navigation a:hover,
.mobile-navigation a:focus-visible {
  color: var(--text);
}

.hero {
  display: grid;
  align-items: center;
  min-height: auto;
  padding-top: clamp(52px, 6vw, 78px);
  padding-bottom: clamp(60px, 7vw, 90px);
}

.hero.section-shell {
  width: min(calc(100% - clamp(56px, 10vw, 132px)), 1080px);
}

.profile-card {
  width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: calc(clamp(3rem, 4.8vw, 4rem) * var(--hero-scale));
  font-weight: 570;
  letter-spacing: -0.07em;
  line-height: 1;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 34px);
}

  .profile-avatar {
  flex: 0 0 auto;
  width: clamp(108px, 12vw, 132px);
  height: clamp(108px, 12vw, 132px);
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.profile-heading {
  min-width: 0;
}

.profile-role {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-intro {
  max-width: 1010px;
  margin: clamp(28px, 3.5vw, 42px) 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
  letter-spacing: -0.018em;
  line-height: 1.72;
  text-wrap: pretty;
  white-space: pre-line;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(22px, 3vw, 34px);
  align-items: center;
  margin-top: 20px;
  color: var(--text);
  font-size: 13px;
}

.profile-links a,
.profile-links span {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.profile-links a {
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  border-color: var(--profile-accent);
  color: var(--profile-accent);
}

.profile-email {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.copy-icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.copy-icon-button svg {
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.copy-icon-button:hover {
  background: var(--line);
  color: var(--accent);
}

.copy-icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.content-section {
  padding-block: clamp(62px, 7vw, 96px);
}

.section-heading {
  margin-bottom: clamp(30px, 4vw, 46px);
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.1fr);
  gap: 64px;
  align-items: start;
}

.section-heading h2,
.about-section h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3.2vw, 3.05rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.section-heading-row > p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.project-list {
  border-top: 1px solid var(--line-strong);
}

.project-item {
  border-bottom: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 56px minmax(170px, 0.72fr) minmax(260px, 1.1fr) minmax(130px, 0.45fr);
  gap: 24px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

button.project-row {
  cursor: pointer;
}

.project-number,
.experience-number,
.technology-number {
  align-self: start;
  padding-top: 5px;
  color: var(--quiet);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.project-name {
  width: fit-content;
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.15;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

button.project-row:hover .project-name,
button.project-row:focus-visible .project-name {
  color: var(--accent);
  transform: translateX(4px);
}

.project-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.project-metadata {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.project-state {
  color: var(--muted);
}

.project-detail {
  padding: 0 0 26px 80px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 44px;
  padding-top: 4px;
}

.detail-label {
  margin-bottom: 7px;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.detail-copy {
  margin-bottom: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.project-detail-link {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.project-detail-link:hover,
.project-detail-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.project-preview {
  position: fixed;
  z-index: 90;
  width: min(300px, calc(100vw - 36px));
  aspect-ratio: 1.58;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--project-radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.985);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.project-preview.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-preview[data-placement="below"] {
  transform: translateY(-8px) scale(0.985);
}

.project-preview[data-placement="below"].is-visible {
  transform: translateY(0) scale(1);
}

.project-preview[data-project-id="tongchuang-market"] {
  width: min(96px, calc(100vw - 36px));
  aspect-ratio: 1260 / 2844;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-preview[data-project-id="tongchuang-market"] img {
  object-fit: contain;
}

.project-site-header .header-inner {
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-detail-view main {
  min-height: calc(100svh - 130px);
}

.case-study {
  padding-top: clamp(24px, 4vw, 44px);
  padding-bottom: clamp(68px, 8vw, 104px);
}

.case-study-hero {
  max-width: 980px;
}

.case-study-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: clamp(20px, 2.5vw, 30px);
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(23, 23, 23, 0.07);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.case-study-back:hover,
.case-study-back:focus-visible {
  border-color: var(--accent);
  background: var(--page-background);
  box-shadow: 0 8px 22px rgba(23, 23, 23, 0.11);
  color: var(--accent);
  transform: translateY(-1px);
}

.case-study-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.65rem, 5.8vw, 5.15rem);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.case-study-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
  margin-bottom: 18px;
}

.case-study-title-link {
  display: inline-block;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.case-study-title-link:hover,
.case-study-title-link:focus-visible {
  color: var(--accent);
  transform: translateX(4px);
}

.case-study-summary {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.58;
  text-wrap: pretty;
}

.case-study-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 44px;
  max-width: 820px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line-strong);
}

.case-study-meta-item {
  min-width: 0;
}

.case-study-meta-value {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.case-study-cover {
  margin: clamp(42px, 5vw, 64px) 0 0;
}

.case-study-cover img {
  width: 100%;
  max-height: 760px;
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: var(--surface);
  object-fit: cover;
}

.case-study-content {
  width: min(100%, 820px);
  margin: clamp(42px, 5vw, 64px) auto 0;
}

.case-study-intro {
  margin-bottom: clamp(34px, 4vw, 48px);
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.68;
  text-wrap: pretty;
  white-space: pre-line;
}

.case-study-heading {
  margin: clamp(38px, 5vw, 56px) 0 16px;
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

h3.case-study-heading {
  margin-top: 38px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

.case-study-paragraph {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
  text-wrap: pretty;
  white-space: pre-line;
}

.case-study-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.case-study-skill-block {
  margin-top: 20px;
}

.case-study-skill-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.case-study-skill-note::before {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--skill-available);
  content: "";
}

.case-study-skill-list {
  display: grid;
  gap: clamp(28px, 4vw, 38px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: case-study-skill;
}

.case-study-skill-list li {
  display: grid;
  grid-template-columns: 2.5ch minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  counter-increment: case-study-skill;
}

.case-study-skill-list li::before {
  grid-column: 1;
  grid-row: 1;
  color: var(--text);
  content: counter(case-study-skill, decimal-leading-zero);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(18px, 1.7vw, 20px);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.4;
}

.case-study-skill-name,
.case-study-skill-purpose {
  grid-column: 2;
  color: var(--text);
}

.case-study-skill-name {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(18px, 1.7vw, 20px);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.case-study-skill-purpose {
  font-size: clamp(17px, 1.5vw, 18px);
  font-weight: 580;
  line-height: 1.55;
}

.case-study-skill-list li.is-available::before,
.case-study-skill-list li.is-available .case-study-skill-name {
  color: var(--skill-available);
}

.case-study-skill-more {
  margin: 28px 0 0 calc(2.5ch + 14px);
  color: var(--quiet);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1;
}

.case-study-mapping {
  margin: clamp(30px, 4vw, 44px) 0;
  border-top: 1px solid var(--line-strong);
}

.case-study-mapping-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.62fr) minmax(0, 1fr) minmax(0, 1.35fr);
  border-bottom: 1px solid var(--line-strong);
}

.case-study-mapping-cell {
  min-width: 0;
  padding: 20px 22px 22px;
  border-left: 1px solid var(--line);
}

.case-study-mapping-cell:first-child {
  padding-left: 0;
  border-left: 0;
}

.case-study-mapping-cell:last-child {
  padding-right: 0;
}

.case-study-mapping-label {
  display: block;
  margin-bottom: 8px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.case-study-mapping-value {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 430;
  line-height: 1.62;
  text-wrap: pretty;
}

.case-study-mapping-cell.is-problem .case-study-mapping-value {
  color: var(--text);
  font-size: 18px;
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.case-study-matrix {
  margin: clamp(28px, 4vw, 42px) 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-matrix table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.case-study-matrix caption {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

.case-study-matrix th,
.case-study-matrix td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
}

.case-study-matrix th {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-study-matrix td {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.case-study-matrix th + th,
.case-study-matrix td + td {
  border-left: 1px solid var(--line);
}

.case-study-matrix tbody tr:first-child td {
  border-top: 1px solid var(--line-strong);
}

.case-study-matrix tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.case-study-matrix tbody td:first-child {
  color: var(--text);
  font-weight: 620;
}

.case-study-agent-flow {
  margin: clamp(30px, 4vw, 46px) 0;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid var(--line-strong);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-agent-main {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.08fr) minmax(0, 1.42fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.case-study-agent-node {
  min-width: 0;
}

.case-study-agent-stage {
  position: relative;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: var(--paper);
}

.case-study-agent-stage:not(:first-child)::before {
  position: absolute;
  top: 50%;
  left: -19px;
  color: var(--profile-accent);
  content: "→";
  font-size: 14px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.case-study-agent-assistant {
  border-color: var(--profile-accent);
}

.case-study-agent-label {
  margin: 0 0 7px;
  color: var(--profile-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.case-study-agent-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.case-study-agent-text {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.case-study-agent-context {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.case-study-agent-context .case-study-agent-title {
  font-size: 12px;
}

.case-study-agent-tools > .case-study-agent-label {
  margin-bottom: 10px;
}

.case-study-agent-tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.case-study-agent-tool {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-agent-tool .case-study-agent-title {
  font-size: 12px;
}

.case-study-agent-tool .case-study-agent-text {
  margin-top: 4px;
  font-size: 10px;
}

.case-study-agent-feedback {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.case-study-figure,
.case-study-video {
  margin: clamp(34px, 5vw, 52px) 0;
}

.case-study-figure img,
.case-study-gallery-item img,
.case-study-video video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-figure figcaption,
.case-study-gallery-item figcaption,
.case-study-video figcaption,
.case-study-cover figcaption {
  margin-top: 11px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.6;
}

.case-study-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(34px, 5vw, 52px) 0;
}

.case-study-gallery-item {
  min-width: 0;
  margin: 0;
}

.case-study-gallery-item img {
  height: auto;
  object-fit: contain;
}

.case-study-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.case-study-experience {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  margin: clamp(34px, 5vw, 52px) 0;
}

.case-study-experience-poster,
.case-study-experience-qr {
  margin: 0;
}

.case-study-experience-poster img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-experience-entry {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: var(--project-radius);
  background: var(--surface);
}

.case-study-experience-launch {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.case-study-experience-qr img {
  display: block;
  width: 160px;
  height: 160px;
  border: 0;
  background: #fff;
  image-rendering: pixelated;
}

.case-study-experience-actions {
  display: grid;
  align-content: center;
  gap: 12px;
}

.case-study-experience-scan-note {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.65;
}

.case-study-experience-alternative {
  margin: 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.5;
}

.case-study-experience-button {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  padding: 12px 18px;
  border: 1px solid var(--text);
  border-radius: var(--project-radius);
  background: var(--text);
  color: var(--paper);
  font-size: 14px;
  font-weight: 650;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.case-study-experience-button:hover,
.case-study-experience-button:focus-visible {
  background: transparent;
  color: var(--text);
  transform: translateY(-2px);
}

.case-study-experience-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.case-study-experience-fact-label {
  margin-bottom: 5px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-study-experience-fact-value {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.case-study-experience-notices {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.case-study-link {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--project-radius);
  background: var(--surface);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.case-study-link::after {
  margin-top: 7px;
  color: var(--quiet);
  content: "↗";
  font-size: 13px;
}

.case-study-link:hover,
.case-study-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.case-study-link-label {
  font-size: 15px;
  font-weight: 650;
}

.case-study-link-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.case-study-video iframe,
.case-study-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.case-study-video iframe {
  border: 1px solid var(--line);
  border-radius: var(--project-radius);
  background: #000000;
}

.case-study-pending {
  margin-top: clamp(64px, 8vw, 96px);
  padding: 28px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.case-study-pending h2 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.case-study-pending p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.case-study-not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100svh - 170px);
  padding-block: 90px;
}

.case-study-not-found .case-study-back {
  margin-bottom: 48px;
}

.case-study-not-found h1 {
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5.2rem);
}

.case-study-not-found p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.experience-item {
  min-width: 0;
  min-height: 150px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.experience-item h3 {
  margin: 9px 0 18px;
  font-size: clamp(1.18rem, 1.65vw, 1.5rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.experience-organization,
.experience-role,
.experience-period,
.experience-summary {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.experience-role {
  color: var(--text);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: clamp(44px, 7vw, 96px);
  padding-block: clamp(68px, 8vw, 104px);
  border-top: 1px solid var(--line-strong);
}

.about-copy h2 {
  max-width: 650px;
  margin-bottom: 28px;
}

.about-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 680px;
}

.about-text p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.contact-block {
  align-self: end;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.contact-block h2 {
  margin-bottom: 16px;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.contact-block > p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.contact-links {
  border-top: 1px solid var(--line);
}

.contact-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.contact-link-row .contact-link {
  border-bottom: 0;
}

.contact-link-row .copy-icon-button {
  margin-right: 2px;
}

.contact-link {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-label {
  color: var(--quiet);
  font-size: 11px;
}

.contact-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px 28px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.load-error {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 210;
  max-width: min(360px, calc(100vw - 48px));
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.js .motion-enabled .reveal.reveal-ready {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.js .motion-enabled .reveal.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .section-shell,
  .header-inner,
  .mobile-navigation {
    width: min(calc(100% - 40px), var(--page-width));
  }

  .project-row {
    grid-template-columns: 44px minmax(160px, 0.7fr) minmax(230px, 1fr) 116px;
    gap: 18px;
  }

  .project-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-section {
    gap: 64px;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 88px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 56px;
  }

  .desktop-navigation {
    display: none;
  }

  .menu-control {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
    padding-bottom: 68px;
  }

  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading-row > p {
    margin-top: 0;
  }

  .project-row {
    grid-template-columns: 40px minmax(180px, 0.7fr) minmax(240px, 1fr);
  }

  .project-metadata {
    grid-column: 3;
    align-items: flex-start;
    text-align: left;
  }

  .project-detail {
    padding-left: 58px;
  }

  .project-preview {
    display: none;
  }

  .case-study-title {
    max-width: 720px;
  }

  .case-study-content {
    width: min(100%, 720px);
  }

  .case-study-mapping-row {
    grid-template-columns: 1fr;
    padding: 22px 0 24px;
  }

  .case-study-mapping-cell,
  .case-study-mapping-cell:first-child,
  .case-study-mapping-cell:last-child {
    padding: 0;
    border-left: 0;
  }

  .case-study-mapping-cell + .case-study-mapping-cell {
    margin-top: 18px;
  }

  .case-study-mapping-label {
    margin-bottom: 5px;
  }

  .case-study-mapping-cell.is-problem .case-study-mapping-value {
    font-size: 20px;
  }

  .case-study-agent-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .case-study-agent-stage:not(:first-child)::before {
    top: -22px;
    left: 50%;
    content: "↓";
    transform: translate(-50%, -50%);
  }

  .experience-grid {
    gap: 24px;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .about-text {
    max-width: none;
  }

  .contact-block {
    width: min(100%, 520px);
  }
}

@media (max-width: 680px) {
  .section-shell,
  .header-inner,
  .mobile-navigation {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .header-controls {
    gap: 13px;
  }

  h1 {
    margin-bottom: 8px;
    font-size: calc(clamp(2.35rem, 10.5vw, 3rem) * var(--hero-scale));
    line-height: 1;
  }

  .profile-identity {
    gap: 20px;
  }

.profile-avatar {
    width: clamp(80px, 23vw, 96px);
    height: clamp(80px, 23vw, 96px);
  }

  .profile-role {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .case-study-matrix {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .case-study-matrix table,
  .case-study-matrix tbody {
    display: grid;
    gap: 14px;
  }

  .case-study-matrix caption {
    display: block;
    padding: 0 0 12px;
    border: 0;
  }

  .case-study-matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .case-study-matrix tr {
    display: grid;
    border: 1px solid var(--line-strong);
    border-radius: var(--project-radius);
    background: var(--surface);
  }

  .case-study-matrix th,
  .case-study-matrix td {
    display: grid;
    grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
  }

  .case-study-matrix td::before {
    color: var(--quiet);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 680;
    letter-spacing: 0.05em;
    line-height: 1.5;
    text-transform: uppercase;
  }

  .case-study-matrix th + th,
  .case-study-matrix td + td,
  .case-study-matrix tbody tr:first-child td,
  .case-study-matrix tbody tr + tr td {
    border-top: 0;
    border-left: 0;
  }

  .case-study-matrix td + td {
    border-top: 1px solid var(--line);
  }

  .case-study-agent-flow {
    padding: 16px;
  }

  .case-study-agent-tool-list {
    grid-template-columns: 1fr;
  }

  .hero-intro {
    margin-top: 28px;
    font-size: 0.875rem;
    line-height: 1.62;
  }

  .profile-links {
    gap: 12px 20px;
    margin-top: 18px;
    font-size: 12px;
  }

  .content-section {
    padding-block: 60px;
  }

  .project-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px 16px;
    min-height: 106px;
    padding: 20px 0;
  }

  .project-primary,
  .project-summary,
  .project-metadata {
    grid-column: 2;
  }

  .project-summary {
    margin-top: 2px;
  }

  .project-metadata {
    align-items: flex-start;
    margin-top: 3px;
    text-align: left;
  }

  .project-detail {
    padding: 0 0 22px 48px;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-link {
    margin-top: 22px;
  }

  .case-study {
    padding-top: 22px;
    padding-bottom: 72px;
  }

  .case-study-back {
    min-height: 46px;
    margin-bottom: 22px;
    padding-inline: 18px;
    font-size: 14px;
  }

  .case-study-title {
    font-size: clamp(2.3rem, 12.5vw, 3.35rem);
  }

  .case-study-title-row {
    gap: 10px 16px;
    margin-bottom: 16px;
  }

  .case-study-summary {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .case-study-meta,
  .case-study-gallery,
  .case-study-links {
    grid-template-columns: 1fr;
  }

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

  .case-study-experience-entry {
    order: -1;
  }

  .case-study-experience-poster {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .case-study-meta {
    gap: 18px;
    margin-top: 34px;
  }

  .case-study-cover,
  .case-study-content {
    margin-top: 40px;
  }

  .case-study-intro {
    margin-bottom: 38px;
    font-size: 1rem;
  }

  .case-study-heading {
    margin-top: 40px;
    font-size: 1.45rem;
  }

  .case-study-paragraph {
    font-size: 14px;
  }

  .case-study-gallery {
    gap: 30px;
  }

  .case-study-gallery-item img {
    height: auto;
  }

  .case-study-experience-launch {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
  }

  .case-study-experience-qr img {
    width: 132px;
    height: 132px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .experience-item {
    min-height: 124px;
    padding-block: 18px 24px;
  }

  .about-section {
    padding-block: 64px;
  }

  .about-text {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media (hover: none), (pointer: coarse) {
  .project-preview {
    display: none;
  }

  button.project-row:hover .project-name {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal,
  .project-preview {
    opacity: 1;
    transform: none;
  }
}
