@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --ink: #1b1b1d;
  --muted: #6c6c70;
  --line: #dcdcd9;
  --soft: #eeefec;
  --nav: rgba(247, 247, 245, .88);
  --radius: 6px;
  --radius-control: 4px;
  --radius-icon: 3px;
  --container: 1240px;
}

:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #141416;
  --ink: #f0f0ee;
  --muted: #a4a4aa;
  --line: #353538;
  --soft: #202023;
  --nav: rgba(20, 20, 22, .88);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { border: 0; border-radius: var(--radius-control); background: none; color: inherit; font: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button, input, a { -webkit-tap-highlight-color: transparent; outline-offset: 6px; }
:is(button, a, input):focus-visible { outline: 2px solid var(--ink); }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3, ol { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--bg); }

.container, .nav-shell { width: min(var(--container), calc(100% - 112px)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 15px;
  padding: 10px 20px;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--bg);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 80px;
}
.wordmark {
  justify-self: start;
  font-size: 30px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -1.8px;
  transition: opacity .18s;
}
.wordmark span { color: var(--muted); }
.wordmark:hover { opacity: .7; }
.desktop-nav { display: flex; align-items: center; gap: 35px; font-size: 13px; }
.desktop-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  transition: color .2s;
}
.desktop-nav a > span { display: inline-flex; align-items: center; font-size: 12px; }
.desktop-nav a:hover, .desktop-nav a[aria-current] { border-color: var(--ink); color: var(--ink); }
.desktop-nav a:hover .ui-icon { transform: translate(2px, -2px); }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: 24px; }
.icon-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.icon-button:hover { background: var(--soft); }
svg { stroke-linecap: round; stroke-linejoin: round; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.theme-toggle .sun, [data-theme=dark] .theme-toggle .moon { display: none; }
[data-theme=dark] .theme-toggle .sun { display: block; }
.menu-toggle, .mobile-nav { display: none; }
.ui-icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -.12em;
  fill: none;
  stroke: currentColor;
  transition: transform .18s;
}

.motion-enabled .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .65, .2, 1);
}
.motion-enabled .reveal.is-visible { opacity: 1; transform: none; }

.image-button {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  text-align: inherit;
}
.image-button img, .detail-gallery figure, .drawing-gallery figure { border-radius: var(--radius); }

.project-main { padding-block: 42px clamp(52px, 7vw, 100px); }
.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 57px;
  color: var(--muted);
  font-size: 11px;
}
.project-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: color .18s, border-color .18s;
}
.project-breadcrumb a:hover { border-color: var(--ink); color: var(--ink); }
.project-breadcrumb a:hover .ui-icon { transform: translateX(-2px); }
.project-intro { max-width: 950px; }
.project-main:is([data-group=personal], [data-group=commercial]) .project-intro {
  margin: 0 auto clamp(36px, 4vw, 58px);
  text-align: center;
}
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .15em; }
.project-intro h1 {
  margin: 17px 0 13px;
  font-size: clamp(37px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -1.8px;
  overflow-wrap: anywhere;
}
.project-chapter + .project-chapter { margin-top: 27px; }
.detail-gallery, .drawing-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 27px; }
.detail-gallery figure { overflow: hidden; }
.detail-gallery .image-button { aspect-ratio: 1; }
.detail-gallery .image-button:focus-visible { outline-offset: -3px; }
.detail-gallery img { width: 100%; height: 100%; object-fit: contain; background: #e7e7e5; }
.drawing-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.drawing-gallery figure { padding: 25px; background: #fff; }
.drawing-gallery img { width: 100%; height: 260px; object-fit: contain; }
.detail-gallery [data-detail-fit] .image-button { background: #e7e7e5; }
:is(.detail-gallery, .project-viewer) [data-detail-fit] img {
  object-fit: contain;
  background: transparent;
  transform: translate(var(--detail-x, 0), var(--detail-y, 0)) scale(var(--detail-scale, 1));
}
:is(.detail-gallery, .project-viewer) [data-detail-crop] img {
  object-fit: cover;
  object-position: var(--detail-focus);
  transform: scale(calc(var(--detail-scale) * var(--detail-direction, 1)), var(--detail-scale));
  transform-origin: var(--detail-focus);
}
.project-description { max-width: 65ch; margin: 32px auto 0; color: var(--muted); font-size: 13px; line-height: 1.95; text-align: center; }

@media (max-width: 1100px) {
  .container, .nav-shell { width: calc(100% - 72px); }
  .desktop-nav { gap: 25px; }
  .nav-actions { gap: 16px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 85px; }
  .container, .nav-shell { width: calc(100% - 36px); }
  .nav-shell { grid-template-columns: 1fr auto; gap: 15px; height: 65px; }
  .wordmark { font-size: 28px; }
  .desktop-nav { display: none; }
  .nav-actions { gap: 6px; }
  .icon-button { width: 44px; height: 44px; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; }
  .menu-toggle span { width: 17px; height: 1px; border-radius: 2px; background: currentColor; transition: transform .2s; }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .mobile-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 18px 16px;
    border-block: 1px solid var(--line);
    background: var(--bg);
  }
  .mobile-nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-control); background: var(--soft); font-size: 13px; }
  .project-main { padding-block: 26px 46px; }
  .project-breadcrumb { margin-bottom: 28px; gap: 10px; }
  .project-intro h1 { margin-top: 12px; font-size: clamp(28px, 6vw, 36px); letter-spacing: -1px; }
  .detail-gallery, .drawing-gallery { gap: 14px; }
  .drawing-gallery figure { padding: 14px; }
  .drawing-gallery img { height: clamp(130px, 37vw, 210px); }
}
@media (max-width: 520px) {
  .detail-gallery { grid-template-columns: minmax(0, 1fr); }
  .drawing-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (pointer: coarse) {
  .desktop-nav a, .icon-button { min-height: 44px; }
  .icon-button { min-width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-enabled .reveal { opacity: 1; transform: none; }
  a .ui-icon { transform: none !important; }
}
@media print {
  .site-header { display: none !important; }
  body { background: #fff; color: #000; }
  .container { width: 100%; }
  .motion-enabled .reveal { opacity: 1; transform: none; }
}
