:root {
  color-scheme: light;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #252620;
  background: #f3f2ed;
  --edge: clamp(16px, 4vw, 64px);
  --line: #d0d0c6;
}

* { box-sizing: border-box; }
body { min-height: 100svh; margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #48573a; outline-offset: 4px; }
h1, h2, p, ul { margin: 0; }
.site-header { padding-inline: var(--edge); }
.site-header nav {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 71px;
  border-bottom: 1px solid var(--line);
}
.site-header a {
  justify-self: start;
  padding-block: 10px;
  font-size: .9375rem;
  white-space: nowrap;
}
.site-header .name { font-weight: 700; }
.language-switch {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 3px;
  white-space: nowrap;
}
.language-switch button {
  border: 0;
  padding: 10px 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.language-switch button:hover, .language-switch button[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: .24em;
}
.language-switch button:focus-visible { outline: 2px solid #48573a; outline-offset: 1px; }
.site-header a:hover, .site-header a[aria-current] {
  text-decoration: underline;
  text-underline-offset: .24em;
}
.home {
  min-height: calc(100svh - 71px);
  display: grid;
  place-items: center;
  padding: 36px var(--edge) 54px;
}
.cover { display: block; width: min(100%, 590px); }
.cover-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.55;
  overflow: hidden;
  background: #d8dccb;
}
.cover-art::before, .cover-art::after, .cover-art span {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  border: 1px solid #727e60;
  border-radius: 50%;
}
.cover-art::before { width: 67%; transform: translateX(-14%); }
.cover-art::after { width: 67%; transform: translateX(14%); }
.cover-art span { width: 43%; border-color: #a2a58d; }
.cover-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #4d5245;
  font-size: .875rem;
}
.cover:hover .cover-caption { text-decoration: underline; text-underline-offset: .24em; }
.inner {
  padding: clamp(36px, 8vw, 110px) var(--edge);
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr);
  gap: 24px;
}
.section-label { font-size: 1rem; font-weight: 500; }
.section-label a { text-decoration: underline; text-underline-offset: .25em; }
.section-content { max-width: 780px; }
.section-content h1, .section-content h2 {
  font-size: clamp(1.5rem, 5vw, 3.25rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.section-content p { line-height: 1.65; margin-top: 15px; }
.project-gallery {
  display: grid;
  gap: clamp(16px, 3vw, 36px);
  margin-top: clamp(24px, 5vw, 58px);
}
.project-gallery img { display: block; width: 100%; height: auto; }
.project-gallery img.portrait { width: min(100%, 520px); }
.works-content { max-width: 1100px; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px) clamp(14px, 2vw, 30px);
  padding: 0;
  list-style: none;
}
.work-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.work-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #eae8e0;
}
.work-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-open:hover .work-title {
  text-decoration: underline;
  text-underline-offset: .22em;
}
.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  font-size: .875rem;
  line-height: 1.4;
}
.work-year { flex: none; color: #585a50; font-variant-numeric: tabular-nums; }
.work-thumb img, .work-viewer img {
  -webkit-touch-callout: none;
  user-select: none;
}
.work-viewer {
  width: fit-content;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  background: #22231f;
  color: #faf9f3;
}
.work-viewer::backdrop { background: #1a1b18e8; }
.work-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 14px;
}
.work-viewer-caption { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.work-viewer-caption h2 { font-size: 1rem; font-weight: 500; }
.work-viewer-caption span { color: #d3d1c7; font-size: .875rem; }
.work-viewer-close {
  border: 1px solid #858579;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 6px 11px;
  cursor: pointer;
}
.work-viewer-close:focus-visible { outline: 2px solid #faf9f3; outline-offset: 2px; }
.work-viewer img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(calc(100vw - 32px), 1440px);
  max-height: calc(100svh - 116px);
  margin: auto;
  object-fit: contain;
}
.section-content .contact-heading { margin-top: 52px; font-size: 1.1rem; }
.contact-email { text-decoration: underline; text-underline-offset: .24em; }
.empty { color: #585a50; }
.project-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.project-list li { border-bottom: 1px solid var(--line); }
.project-list a {
  display: block;
  font-size: clamp(1.1rem, 2.8vw, 2.1rem);
  padding: 19px 8px 19px 0;
}
.project-list a:hover { color: #48573a; text-decoration: underline; text-underline-offset: .23em; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 550px) {
  .site-header nav { min-height: 58px; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: clamp(5px, 2vw, 12px); }
  .site-header a { font-size: .875rem; }
  .home { min-height: calc(100svh - 58px); }
  .inner { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-meta { flex-direction: column; gap: 2px; }
}
