:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #171716;
  --muted: #68645e;
  --soft: #f2f2ef;
  --line: rgba(23, 23, 22, 0.16);
  --deep: #333b31;
  --max: 1180px;
  --font-latin:
    Georgia,
    "Times New Roman",
    serif;
  --font-serif:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    "Source Han Serif SC",
    serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-serif);
}

body.admin-page {
  font-family: var(--font-serif);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  /* 20250526 first release: keep brand left, navigation aligned right. */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  align-items: start;
  padding: 30px 42px;
  color: #fff;
  transition:
    color 180ms ease,
    background 180ms ease,
    backdrop-filter 180ms ease,
    padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  padding-block: 20px;
  color: var(--ink);
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
}

.brand {
  display: grid;
  gap: 7px;
}

.brand-mark {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.brand-sub,
.eyebrow,
.site-nav,
.line-link,
.scroll-cue,
.work-meta,
.flow-list span,
.news-date,
.site-footer,
.menu-toggle {
  font-family: var(--font-latin);
}

.brand-sub,
.eyebrow,
.work-meta,
.flow-list span,
.news-date,
.scroll-cue {
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  font-size: 0.86rem;
  min-width: 0;
  justify-self: end;
  width: fit-content;
  margin-top: 6px;
}

.nav-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-left: clamp(14px, 1.5vw, 18px);
  border-left: 1px solid rgba(255, 255, 255, 0.56);
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-social-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    sans-serif;
  font-size: 5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.86;
}

.nav-social-text {
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: inherit;
}

.site-nav a,
.line-link,
.scroll-cue {
  position: relative;
}

.site-nav a::after,
.line-link::after,
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.line-link:hover::after,
.scroll-cue:hover::after,
.site-nav a:focus-visible::after,
.line-link:focus-visible::after,
.scroll-cue:focus-visible::after {
  transform: scaleX(1);
}

main > section {
  width: min(calc(100% - 52px), var(--max));
  margin-inline: auto;
}

main > section {
  margin-top: 126px;
  scroll-margin-top: 128px;
}

.hero {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin-top: 0;
  overflow: hidden;
  color: #fff;
  background: var(--deep);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 46%, rgba(0, 0, 0, 0.12));
}

.hero-image,
.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  display: grid;
  place-items: center;
  background: var(--deep);
}

.hero-image img {
  object-fit: cover;
  object-position: center center;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1200ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-progress {
  position: absolute;
  z-index: 2;
  left: clamp(26px, 7vw, 108px);
  bottom: clamp(30px, 5vh, 54px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-progress-bar {
  position: relative;
  display: block;
  width: clamp(22px, 2.8vw, 38px);
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: width 220ms ease;
}

.hero-progress-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.42);
  transform: translateY(-50%);
  transition: background-color 220ms ease;
}

.hero-progress-bar.is-active {
  width: clamp(48px, 5.4vw, 76px);
}

.hero-progress-bar.is-active::before {
  background: #fff;
}

.hero-inner {
  position: absolute;
  z-index: 1;
  left: clamp(26px, 7vw, 108px);
  right: clamp(26px, 7vw, 108px);
  bottom: clamp(92px, 13vh, 132px);
  max-width: none;
}

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

h1 {
  font-family: var(--font-serif);
  margin-top: 18px;
  font-size: clamp(3.2rem, 5.7vw, 7.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.7vw, 1.75rem);
  font-weight: 400;
  line-height: 1.28;
}

.hero-lead,
.intro-body p,
.section-note,
.plain-list p,
.work-card p,
.note-item p,
.contact-copy p,
.duration {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.9;
}

.hero-lead {
  max-width: 34rem;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.88);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  right: 42px;
  bottom: 38px;
  color: rgba(255, 255, 255, 0.86);
  writing-mode: vertical-rl;
}

.scroll-cue::before {
  content: "";
  display: block;
  width: 1px;
  height: 68px;
  margin: 0 auto 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent);
}

.intro,
.split-text,
.flow,
.journal,
.news {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(34px, 7vw, 104px);
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.intro-body {
  display: grid;
  gap: 28px;
}

.quiet-image img {
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  object-position: center 9%;
}

.section-title {
  display: grid;
  gap: 16px;
}

.eyebrow {
  color: var(--muted);
}

.works {
  display: grid;
  gap: 34px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  display: grid;
  gap: 14px;
}

.work-card img {
  aspect-ratio: 0.78 / 1;
  object-fit: cover;
  object-position: center 9%;
  background: var(--soft);
}

.work-card h3 {
  font-size: 1.18rem;
}

.work-card p {
  margin-top: -8px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.work-meta {
  color: var(--muted);
}

.plain-list {
  display: grid;
  gap: 0;
}

.plain-list p,
.note-item,
.news-item,
.flow-list li {
  border-bottom: 1px solid var(--line);
}

.plain-list p {
  padding: 18px 0;
}

.flow-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 19px 0;
}

.flow-list span {
  color: var(--muted);
}

.duration {
  grid-column: 2;
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding: 22px 0 0;
}

.duration div {
  display: grid;
  gap: 6px;
}

.note-list,
.news-list {
  display: grid;
}

.note-item,
.news-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.36fr) 1fr;
  gap: 24px;
  padding: 18px 0;
}

.note-item p {
  margin-top: 5px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.news-date {
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--deep);
  color: #fff;
}

.contact-image img {
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center 9%;
}

.contact-copy {
  align-self: center;
  display: grid;
  gap: 22px;
  padding: clamp(34px, 6vw, 78px);
}

.contact-copy .eyebrow,
.contact-copy p {
  color: rgba(255, 255, 255, 0.74);
}

.contact-copy .line-link {
  width: fit-content;
  font-family: var(--font-serif);
}

.site-footer {
  width: 100%;
  margin-top: 72px;
  padding: 86px 0;
  color: var(--ink);
  background-color: #fff;
  background-image:
    linear-gradient(rgba(23, 23, 22, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 22, 0.045) 1px, transparent 1px);
  background-position: center top;
  background-size: 28px 28px;
}

.footer-inner {
  width: min(calc(100% - 52px), var(--max));
  margin-inline: auto;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.footer-brand {
  color: var(--ink);
}

.footer-brand .brand-mark {
  color: var(--ink);
}

.footer-brand .brand-sub {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1em;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
}

.site-footer nav a {
  transition: color 160ms ease;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  text-decoration: underline;
}

.footer-address {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-line;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

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

.floating-logo {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  width: clamp(29px, 3.5vw, 43px);
  transform: translateX(-50%);
}

.floating-logo img {
  width: 100%;
  height: auto;
  transition:
    opacity 180ms ease,
    filter 180ms ease;
}

.floating-logo-black {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.floating-logo-white {
  opacity: 1;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.22));
}

.floating-logo.is-dark .floating-logo-white {
  opacity: 0;
}

.floating-logo.is-dark .floating-logo-black {
  opacity: 0.92;
}

.admin-shell {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  padding: 34px 0 80px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-top h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.admin-button.secondary {
  background: transparent;
  color: var(--ink);
}

.admin-help {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.editor-grid {
  display: grid;
  gap: 22px;
  margin-top: 32px;
}

.editor-section {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
}

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

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

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 0.82rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

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

.list-editor {
  display: grid;
  gap: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: start;
}

.list-row textarea,
.list-row input {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
}

.delete-row {
  min-height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.status-line {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
}

.visual-admin {
  height: 100vh;
  overflow: hidden;
  background: #f4f4f1;
}

.visual-admin-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.visual-admin-bar h1 {
  margin-top: 4px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.visual-admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
  height: 100vh;
  padding-top: 76px;
}

.site-preview {
  width: 100%;
  height: calc(100vh - 76px);
  border: 0;
  background: #fff;
}

.edit-panel {
  height: calc(100vh - 76px);
  overflow: auto;
  padding: 24px;
  background: #fff;
  border-left: 1px solid var(--line);
}

.edit-panel-empty,
.edit-panel-head {
  display: grid;
  gap: 12px;
}

.edit-panel-empty h2,
.edit-panel-head h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  word-break: break-word;
}

.edit-panel-empty p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.visual-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.visual-field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.visual-field input,
.visual-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

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

.edit-preview-image {
  width: 100%;
  max-height: 220px;
  margin-top: 18px;
  object-fit: contain;
  background: #f7f7f4;
  border: 1px solid var(--line);
}

.visual-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.edit-panel-actions {
  margin-top: 18px;
}

.visual-status {
  position: fixed;
  left: 22px;
  bottom: 14px;
  z-index: 60;
  margin: 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 22px 24px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
    margin-top: 0;
  }

  .nav-social {
    margin-left: auto;
    padding-left: 10px;
    border-left: 1px solid currentColor;
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .intro,
  .split-text,
  .flow,
  .journal,
  .news,
  .contact {
    grid-template-columns: 1fr;
  }

  .duration {
    grid-column: auto;
  }

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

  .field-grid,
  .list-row {
    grid-template-columns: 1fr;
  }

  .visual-admin {
    overflow: auto;
  }

  .visual-admin-bar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .visual-admin-workspace {
    grid-template-columns: 1fr;
    height: auto;
    padding-top: 0;
  }

  .site-preview {
    height: 70vh;
  }

  .edit-panel {
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

}

@media (max-width: 640px) {
  main > section {
    width: min(calc(100% - 28px), var(--max));
  }

  .footer-inner {
    width: min(calc(100% - 28px), var(--max));
  }

  main > section {
    margin-top: 84px;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-inner {
    right: 24px;
    bottom: 86px;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.6rem);
  }

  .scroll-cue {
    right: 22px;
    bottom: 24px;
  }

  .hero-progress {
    left: 26px;
    right: 72px;
    bottom: 28px;
    gap: 6px;
  }

  .hero-progress-bar {
    flex: 1;
    width: auto;
  }

  .hero-progress-bar.is-active {
    flex: 2.4;
    width: auto;
  }

  .quiet-image img {
    aspect-ratio: 1 / 1.05;
  }

  .work-grid,
  .flow-list li,
  .note-item,
  .news-item {
    grid-template-columns: 1fr;
  }

  .flow-list li {
    gap: 8px;
  }

  .contact-image img {
    min-height: 360px;
  }

  .admin-top {
    display: grid;
  }

  .admin-actions {
    justify-content: flex-start;
  }
}
