:root {
  --paper: #f4f0e7;
  --paper-2: #ede6d8;
  --paper-3: #e4dccb;
  --card: #fffdf8;
  --ink: #171614;
  --ink-2: #403b33;
  --muted: #756f63;
  --line: rgba(23, 22, 20, 0.15);
  --line-soft: rgba(23, 22, 20, 0.09);
  --accent: #171614;
  --accent-soft: rgba(23, 22, 20, 0.08);
  --cream: #f4f0e7;
  --dark: #141311;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --latin: "Helvetica Neue", "Arial", sans-serif;
  --max: 1240px;
  --pad: 40px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 28px 80px rgba(23, 22, 20, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

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

button {
  font: inherit;
  color: inherit;
}

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

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

h1, h2, h3, h4, p, blockquote, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- loading / noscript ---------- */
.site-loading {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.site-loading p {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.loading-line {
  width: 120px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.loading-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: loading 1.2s var(--ease) infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.noscript {
  padding: 18vh 8vw;
}

.noscript h1 {
  font-family: var(--serif);
  font-size: 64px;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 78px;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(244, 240, 231, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand-text em {
  font-family: var(--latin);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  transition: color 0.2s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.header-resume {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.header-resume:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.header-resume span {
  font-size: 13px;
  color: var(--accent);
}

.header-resume:hover span {
  color: var(--cream);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 22px; }

.menu-toggle[aria-expanded="true"] span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  padding: 120px var(--pad) 40px;
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-inner {
  max-width: 560px;
  margin: 0 auto;
}

.mobile-menu-eyebrow {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 26px;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
}

.mobile-menu nav a span {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.mobile-menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  font-size: 12px;
  color: var(--muted);
}

.mobile-menu-foot a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 116px 0 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 54vw;
  height: 54vw;
  max-width: 760px;
  max-height: 760px;
  right: -12vw;
  top: -18vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 22, 20, 0.045), rgba(23, 22, 20, 0) 66%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.hero-copy {
  min-width: 0;
  align-self: center;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--latin);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-avail::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c8a5a;
  box-shadow: 0 0 0 4px rgba(76, 138, 90, 0.12);
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 60px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero-name-en {
  font-family: var(--latin);
  font-size: clamp(9px, 0.85vw, 11px);
  letter-spacing: 0.58em;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero-role {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 30px;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(16px, 1.7vw, 23px);
  line-height: 1.6;
  letter-spacing: 0.01em;
  white-space: pre-line;
  margin-bottom: 20px;
}

.hero-summary {
  max-width: 520px;
  font-size: 13px;
  line-height: 2;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--solid {
  background: var(--ink);
  color: var(--cream);
}

.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--light {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
}

.btn--outline-light {
  background: transparent;
  border-color: rgba(244, 240, 231, 0.32);
  color: var(--cream);
}

.btn--outline-light:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 440px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.stat-value {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.hero-portrait {
  position: relative;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portrait-frame {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow);
  flex: 1;
  min-height: 480px;
}

.portrait-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  height: 100%;
}

.portrait-grid .tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
}

.portrait-grid .tile:first-child {
  grid-row: 1 / -1;
}

.portrait-grid .tile:last-child:nth-child(4) {
  grid-row: auto;
}

.portrait-grid .tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.tile-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(244, 240, 231, 0.94);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.scroll-cue {
  position: absolute;
  left: var(--pad);
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--latin);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.scroll-cue::after {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--line);
  position: relative;
}

/* ---------- section common ---------- */
.section {
  position: relative;
  padding: clamp(80px, 9.5vw, 132px) 0;
}

#works.section {
  padding-top: clamp(36px, 4.5vw, 60px);
}

.section--tint {
  background: var(--paper-2);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 28px 50px;
  align-items: end;
  padding-bottom: 26px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-top: 14px;
}

.section-sub {
  max-width: 440px;
  justify-self: end;
  text-align: right;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.section-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- works ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}

.filter:hover {
  border-color: var(--ink);
}

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.filter-count {
  font-family: var(--latin);
  font-size: 9px;
  opacity: 0.5;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.work-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(23, 22, 20, 0.11);
  border-color: var(--line);
}

.work-card.is-hidden {
  display: none;
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--paper-2);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.card-media.is-contain img {
  object-fit: contain;
  padding: 24px;
  background: linear-gradient(140deg, #f2ecdf, #e6decd);
}

.work-card:hover .card-media img {
  transform: scale(1.035);
}

.work-card:hover .card-media.is-contain img {
  transform: scale(1.015);
}

.card-cat,
.card-year {
  position: absolute;
  top: 14px;
  z-index: 3;
  padding: 5px 9px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--ink);
  background: rgba(244, 240, 231, 0.94);
  border: 1px solid rgba(23, 22, 20, 0.08);
  border-radius: 2px;
}

.card-cat { left: 14px; }
.card-year { right: 14px; font-family: var(--latin); color: var(--ink-2); }

.card-body {
  padding: 24px 26px 22px;
}

.card-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0.005em;
  margin-bottom: 11px;
}

.card-summary {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.7em;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  transition: color 0.2s;
}

.card-cta span {
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.work-card:hover .card-cta {
  color: var(--accent);
}

.work-card:hover .card-cta span {
  transform: translate(3px, -3px);
}

.card-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.card-open:focus-visible {
  outline-offset: -4px;
}

.works-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.about-left {
  position: sticky;
  top: 110px;
}

.about-left h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  margin-top: 14px;
}

.about-quote {
  position: relative;
  margin: 34px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.7;
  color: var(--ink);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.fact-value {
  font-size: 12.5px;
  line-height: 1.65;
  margin-top: 6px;
  color: var(--ink-2);
}

.about-right {
  padding-top: 6px;
}

.about-lead {
  font-family: var(--serif);
  font-size: clamp(21px, 2.35vw, 31px);
  line-height: 1.75;
  letter-spacing: 0.005em;
  margin-bottom: 26px;
}

.about-right p {
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.about-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.about-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  padding-top: 5px;
  font-family: var(--latin);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-org {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 600;
  line-height: 1.4;
}

.timeline-role {
  display: inline-flex;
  padding: 3px 9px;
  border: 1px solid rgba(23, 22, 20, 0.3);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
}

.timeline-dept {
  margin-top: 7px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.timeline-points {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.timeline-points li {
  position: relative;
  padding-left: 15px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.timeline-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.92em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.other-exp {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  margin-top: 50px;
}

.other-exp h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  padding-top: 4px;
}

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

.other-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.other-item .other-org {
  color: var(--ink-2);
}

.other-item .other-role {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.other-item .other-period {
  font-family: var(--latin);
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- awards ---------- */
.awards-list {
  border-top: 1px solid var(--line);
}

.award-row {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding: 25px 0 26px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}

.award-row:hover {
  background: rgba(255, 253, 248, 0.44);
}

.award-year {
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 3px;
  white-space: nowrap;
}

.award-title {
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 600;
  line-height: 1.5;
}

.award-note {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.award-work {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.skill-card {
  position: relative;
  padding: 28px 26px 26px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.skill-en {
  font-family: var(--latin);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.skill-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-2);
  background: rgba(244, 240, 231, 0.5);
}

.process {
  margin-top: 30px;
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.44);
}

.process-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.process-head h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.process-head span {
  font-family: var(--latin);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.process-track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.process-step {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11.5px;
  color: var(--ink-2);
}

.process-step em {
  font-family: var(--latin);
  font-style: normal;
  font-size: 8px;
  color: var(--accent);
}

.process-arrow {
  color: var(--muted);
  font-size: 11px;
}

/* ---------- contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 7vw, 90px);
  background: var(--dark);
  color: var(--cream);
}

.contact .eyebrow {
  color: rgba(244, 240, 231, 0.5);
}

.contact h2 {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 20px 0 22px;
}

.contact-sub {
  position: relative;
  z-index: 1;
  max-width: 540px;
  font-size: 14.5px;
  line-height: 1.95;
  color: rgba(244, 240, 231, 0.66);
}

.contact-email {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  margin: 42px 0 48px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 240, 231, 0.28);
  font-family: var(--serif);
  font-size: clamp(24px, 4.2vw, 54px);
  line-height: 1.2;
  color: var(--cream);
  transition: color 0.25s, border-color 0.25s;
  word-break: break-all;
}

.contact-email span {
  font-family: var(--latin);
  font-size: 0.45em;
  color: rgba(244, 240, 231, 0.55);
  transition: transform 0.3s var(--ease);
}

.contact-email:hover {
  color: var(--cream);
  border-color: var(--cream);
}

.contact-email:hover span {
  transform: translate(4px, -4px);
}

.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(244, 240, 231, 0.16);
}

.contact-label {
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(244, 240, 231, 0.4);
  text-transform: uppercase;
}

.contact-value {
  margin-top: 9px;
  font-size: 14px;
  color: rgba(244, 240, 231, 0.88);
}

.contact-value a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-value a:hover {
  border-bottom-color: var(--cream);
}

.contact-note {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(244, 240, 231, 0.42);
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad);
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.site-footer[hidden] {
  display: none;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.admin-link {
  border: 0;
  padding: 4px 0;
  background: transparent;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.admin-link:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

/* ---------- work modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(14, 13, 11, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.25s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
}

.work-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  width: min(1120px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.32);
  animation: modalIn 0.45s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
}

.work-modal-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 34px;
  background: linear-gradient(140deg, #efe8da, #e4dbc8);
  border-right: 1px solid var(--line-soft);
}

.work-modal-media img {
  max-width: 100%;
  max-height: 66vh;
  width: auto;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(23, 22, 20, 0.16);
  cursor: zoom-in;
}

.work-modal-body {
  padding: 46px 40px 34px;
}

.modal-close,
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(244, 240, 231, 0.92);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover,
.lightbox-close:hover {
  background: var(--ink);
  color: var(--cream);
}

.modal-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.modal-kicker .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.work-modal h2 {
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}

.work-modal .modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

.modal-summary {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-2);
}

.work-details {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.work-details p {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.work-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 26px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-fact-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.work-fact-value {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 4px;
  color: var(--ink-2);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.award-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 20px;
  padding: 11px 13px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.award-line::before {
  content: "奖";
  flex: none;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.work-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.work-pager button {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.work-pager button:hover {
  color: var(--accent);
}

.work-pager span {
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(10, 9, 8, 0.95);
  animation: fadeIn 0.2s;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  background: rgba(244, 240, 231, 0.14);
  border-color: rgba(244, 240, 231, 0.24);
  color: var(--cream);
}

/* ---------- login ---------- */
.login-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 38px 36px 32px;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow);
  animation: modalIn 0.4s var(--ease);
}

.login-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: var(--accent);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 25px;
  border-radius: 2px;
}

.login-modal h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}

.login-form .field {
  margin-bottom: 14px;
}

.login-error {
  min-height: 20px;
  margin: 6px 0 10px;
  font-size: 11.5px;
  color: var(--accent);
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}

.login-hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- toast ---------- */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 800;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  background: rgba(20, 19, 17, 0.95);
  color: var(--cream);
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: 0.03em;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  animation: toastIn 0.3s var(--ease);
  max-width: min(90vw, 480px);
  text-align: center;
}

.toast.is-error {
  background: #7e2318;
  border-color: rgba(255, 255, 255, 0.16);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
}

/* ---------- admin bar ---------- */
.admin-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 7px;
  background: rgba(20, 19, 17, 0.96);
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  animation: adminIn 0.4s var(--ease);
}

.admin-bar[hidden] {
  display: none;
}

@keyframes adminIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
}

.admin-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(244, 240, 231, 0.56);
  white-space: nowrap;
}

.admin-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ac488;
  box-shadow: 0 0 0 3px rgba(106, 196, 136, 0.14);
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 240, 231, 0.82);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.admin-btn:hover {
  background: rgba(244, 240, 231, 0.1);
  color: var(--cream);
}

.admin-btn.is-on {
  background: var(--accent);
  color: #fff;
}

.admin-btn.is-primary {
  background: var(--cream);
  color: var(--ink);
}

.admin-btn.is-primary:hover {
  background: #fff;
}

.admin-btn.has-dirty::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 1px;
}

.admin-btn.is-on.has-dirty::after {
  background: #fff;
}

.admin-sep {
  width: 1px;
  height: 18px;
  background: rgba(244, 240, 231, 0.14);
  margin: 0 3px;
}

/* ---------- drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(14, 13, 11, 0.46);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 460;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.18);
  animation: drawerIn 0.38s var(--ease);
}

@keyframes drawerIn {
  from { transform: translateX(100%); }
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
}

.drawer-sub {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.drawer-close {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

.drawer-close:hover {
  background: var(--ink);
  color: var(--cream);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 30px;
}

.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.drawer-foot .admin-note {
  margin-right: auto;
  font-size: 10px;
  color: var(--muted);
}

.btn--small {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 3px;
  font-size: 11.5px;
}

.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.btn--dark:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--plain {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn--plain:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- forms ---------- */
.field {
  margin-bottom: 16px;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field .hint {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.list-editor {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-row input {
  flex: 1;
  min-width: 0;
}

.icon-btn {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.add-row-btn {
  align-self: flex-start;
  margin-top: 2px;
  padding: 5px 9px;
  border: 1px dashed var(--line);
  border-radius: 3px;
  background: transparent;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
}

.add-row-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.image-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--card);
}

.image-field img {
  width: 86px;
  height: 64px;
  flex: none;
  object-fit: cover;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}

.image-field .image-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.image-field .image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.image-field input[type="url"],
.image-field input[type="text"] {
  width: 100%;
  padding: 5px 7px;
  font-size: 10.5px;
}

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

.gallery-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb .icon-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(244, 240, 231, 0.92);
  font-size: 12px;
}

.gallery-add {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.gallery-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.settings-block {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.settings-block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.settings-block h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 14px;
}

.settings-note {
  padding: 12px 14px;
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid var(--line-soft);
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--muted);
}

.settings-note code {
  font-family: var(--latin);
  font-size: 10px;
  color: var(--ink-2);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.swatch {
  width: 30px;
  height: 30px;
  border: 2px solid var(--card);
  outline: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.swatch.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.section-manager {
  display: flex;
  flex-direction: column;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-row .section-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-row .section-type {
  flex: none;
  font-family: var(--latin);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.section-row.is-hidden-section .section-name {
  color: var(--muted);
  text-decoration: line-through;
}

.toggle {
  position: relative;
  width: 34px;
  height: 18px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-3);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s var(--ease);
}

.toggle.is-on {
  background: var(--ink);
}

.toggle.is-on::after {
  transform: translateX(16px);
}

/* ---------- edit mode ---------- */
.is-editing [data-edit] {
  outline: 1px dashed rgba(23, 22, 20, 0.35);
  outline-offset: 3px;
  border-radius: 2px;
  cursor: text;
  transition: background 0.18s, outline-color 0.18s;
  min-width: 1ch;
}

.is-editing [data-edit]:hover {
  background: rgba(23, 22, 20, 0.05);
  outline-color: rgba(23, 22, 20, 0.65);
}

.is-editing [data-edit]:focus {
  outline: 2px solid var(--accent);
  background: #fffdf8;
}

.is-editing [data-edit]:empty::before {
  content: attr(data-placeholder);
  color: rgba(117, 111, 99, 0.6);
}

.is-editing .card-open {
  display: none;
}

.is-editing .work-card:hover {
  transform: none;
  box-shadow: none;
}

.edit-only {
  display: none !important;
}

.is-editing .edit-only {
  display: inline-flex !important;
}

.item-tools,
.section-tools {
  display: none;
  align-items: center;
  gap: 4px;
  z-index: 60;
}

.item-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px;
  background: rgba(20, 19, 17, 0.92);
  border-radius: 4px;
}

.is-editing .item-tools {
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease);
}

.is-editing .work-card:hover .item-tools,
.is-editing .stat:hover .item-tools,
.is-editing .timeline-item:hover .item-tools,
.is-editing .other-item:hover .item-tools,
.is-editing .award-row:hover .item-tools,
.is-editing .skill-card:hover .item-tools,
.is-editing .item-tools:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.hero-stats .stat .item-tools {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
}

.section-tools {
  position: absolute;
  top: 22px;
  right: var(--pad);
  padding: 4px;
  background: rgba(20, 19, 17, 0.92);
  border-radius: 4px;
}

.is-editing .section-tools {
  display: flex;
}

.hero .section-tools {
  top: 92px;
}

.item-tools button,
.section-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: rgba(244, 240, 231, 0.78);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.item-tools button:hover,
.section-tools button:hover {
  background: rgba(244, 240, 231, 0.14);
  color: #fff;
}

.item-tools button.is-danger:hover,
.section-tools button.is-danger:hover {
  background: var(--accent);
}

.item-tools .tool-label {
  font-size: 10px;
  padding: 0 4px;
}

.image-edit-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  display: none;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(244, 240, 231, 0.28);
  border-radius: 999px;
  background: rgba(20, 19, 17, 0.78);
  color: var(--cream);
  font-size: 10px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.is-editing .image-edit-btn {
  display: inline-flex;
}

.portrait-frame .image-edit-btn {
  bottom: 12px;
}

.image-edit-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.add-item-btn {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}

.is-editing .add-item-btn {
  display: inline-flex;
}

.add-item-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- small editor utilities ---------- */
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.file-badge {
  flex: none;
  width: 44px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.inline-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inline-row > [data-edit] {
  flex: 1;
  min-width: 0;
}

.inline-remove {
  display: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.is-editing .inline-remove {
  display: inline-grid;
  place-items: center;
}

.inline-remove:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.custom-body {
  max-width: 760px;
}

.custom-paragraph {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 2;
  color: var(--ink-2);
}

.custom-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.custom-image {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}

.custom-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-image .inline-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  background: rgba(244, 240, 231, 0.92);
  z-index: 6;
}

.footer-note {
  letter-spacing: 0.04em;
}

.section-title {
  font-family: var(--serif);
}

.is-editing .hero-name,
.is-editing .hero-tagline,
.is-editing .hero-name-en {
  outline-offset: 6px;
}

.is-editing .works-grid .card-open {
  display: none;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  :root { --pad: 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
  .hero-portrait { width: 100%; }
  .about-grid { gap: 54px; }
  .skills-grid { gap: 14px; }
  .skill-card { padding: 24px 20px; }
}

@media (max-width: 960px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .header-resume { display: none; }
  .hero { padding-top: 108px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-portrait { justify-self: start; width: min(72%, 320px); margin-top: 6px; height: auto; }
  .portrait-frame { flex: none; min-height: 0; }
  .portrait-grid { grid-template-rows: none; height: auto; }
  .portrait-frame img, .portrait-grid .tile img { position: static; height: auto; aspect-ratio: 4 / 5; width: 100%; }
  .hero-name { font-size: clamp(38px, 8vw, 56px); }
  .scroll-cue { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 14px; }
  .section-sub { justify-self: start; text-align: left; }
  .about-grid { grid-template-columns: 1fr; }
  .about-left { position: static; }
  .timeline-item { grid-template-columns: 150px minmax(0, 1fr); gap: 26px; }
  .other-exp { grid-template-columns: 1fr; gap: 16px; }
  .other-list { gap: 0 32px; }
  .award-row { grid-template-columns: 105px minmax(0, 1fr); gap: 20px; }
  .award-note { grid-column: 2; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card:last-child { grid-column: span 2; }
  .work-modal { grid-template-columns: 1fr; max-height: 92vh; }
  .work-modal-media { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 24px; }
  .work-modal-media img { max-height: 38vh; }
  .work-modal-body { padding: 30px 28px 26px; }
}

@media (max-width: 720px) {
  :root { --pad: 22px; }
  .header-inner { height: 68px; }
  .site-header { height: 68px; }
  .hero { padding-top: 94px; padding-bottom: 40px; }
  .eyebrow-row { gap: 10px 16px; margin-bottom: 16px; }
  .hero-name { font-size: clamp(34px, 10.5vw, 48px); }
  .hero-name-en { letter-spacing: 0.4em; margin-bottom: 12px; }
  .hero-tagline { font-size: clamp(17px, 4.8vw, 21px); }
  .hero-summary { font-size: 12.5px; }
  .hero-actions { margin: 16px 0 22px; }
  .btn { min-height: 38px; padding: 0 15px; font-size: 11px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; max-width: none; }
  .hero-portrait { width: min(100%, 300px); }
  .hero .section-tools { top: 80px; right: 12px; }
  .section { padding: 70px 0; }
  .section-head { margin-bottom: 30px; padding-bottom: 20px; }
  .section-head h2 { font-size: clamp(34px, 10vw, 46px); }
  .section-sub { font-size: 12.5px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .works-grid { grid-template-columns: 1fr; gap: 22px; }
  .card-body { padding: 20px 20px 18px; }
  .card-title { font-size: 22px; }
  .card-summary { -webkit-line-clamp: 3; }
  .section-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .about-quote { font-size: 21px; margin: 28px 0; }
  .about-facts { gap: 16px; }
  .about-lead { font-size: 22px; }
  .about-right p { font-size: 13.5px; line-height: 2; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; padding: 26px 0 28px; }
  .timeline-period { padding-top: 0; }
  .timeline-org { font-size: 22px; }
  .timeline-points li { font-size: 12.5px; }
  .other-list { grid-template-columns: 1fr; }
  .award-row { grid-template-columns: 1fr; gap: 7px; padding: 21px 0; }
  .award-note { grid-column: auto; }
  .award-title { font-size: 19px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card:last-child { grid-column: auto; }
  .process { padding: 20px; }
  .process-head { flex-direction: column; gap: 4px; }
  .contact h2 { font-size: clamp(42px, 14vw, 68px); }
  .contact-email { margin: 32px 0 38px; font-size: 26px; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .contact { padding-bottom: 54px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 20px; padding-bottom: 22px; }
  .footer-right { width: 100%; justify-content: space-between; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .work-modal { max-height: 94vh; border-radius: 10px 10px 0 0; }
  .work-modal-body { padding: 26px 22px 24px; }
  .work-modal-media { padding: 18px; min-height: 210px; }
  .work-facts { grid-template-columns: 1fr; gap: 12px; }
  .lightbox { padding: 14px; }
  .login-modal { padding: 30px 24px 26px; border-radius: 10px 10px 0 0; }
  .admin-bar { left: 0; right: 0; bottom: 0; transform: none; border-radius: 0; justify-content: space-between; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; }
  @keyframes adminIn { from { opacity: 0; transform: translateY(14px); } }
  .admin-status { display: none; }
  .admin-btn { padding: 0 9px; font-size: 10px; }
  .admin-sep { display: none; }
  .toast-root { bottom: 72px; }
  .drawer { width: 100%; }
  .drawer-head { padding: 20px 20px 16px; }
  .drawer-body { padding: 18px 20px 26px; }
  .drawer-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .gallery-editor { grid-template-columns: repeat(3, 1fr); }
  .section-tools { top: 12px; right: 12px; }
  .hero .section-tools { top: 76px; }
}

@media (max-width: 420px) {
  .hero-name { font-size: 36px; }
  .hero-name-en { font-size: 8px; letter-spacing: 0.32em; }
  .hero-portrait { width: 58%; }
  .mobile-menu nav a { font-size: 29px; }
  .contact-email { font-size: 23px; }
  .admin-btn { padding: 0 7px; }
}

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

@media print {
  .site-header, .admin-bar, .site-footer, .filters, .hero-actions, .section-tools, .item-tools, .image-edit-btn, .add-item-btn { display: none !important; }
  .hero { min-height: auto; padding-top: 40px; }
  .work-card, .skill-card { break-inside: avoid; }
  body { background: #fff; }
}
