:root {
  --paper: #f7f7f5;
  --ink: #202020;
  --muted: #77736d;
  --line: #dedbd5;
  --soft: #eeece8;
  --accent: #5b6f61;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Yu Gothic", YuGothic, sans-serif;
  letter-spacing: 0;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

button {
  font: inherit;
}

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

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: var(--header-height);
  padding: 0 clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid rgba(222, 219, 213, 0.72);
  background: rgba(247, 247, 245, 0.94);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-size: 38px;
  font-weight: 500;
  white-space: nowrap;
}

.brand-tagline {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.05;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.4vw, 48px);
  color: var(--muted);
  font-size: 12px;
}

.primary-nav a {
  transition: color 180ms ease;
}

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

.menu-button {
  display: none;
  min-width: 68px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

main {
  padding-top: var(--header-height);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  overflow: hidden;
  background: #111;
}

.hero-click-target {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 48%, rgba(0, 0, 0, 0.1));
}

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

.hero-caption {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 26px;
  z-index: 20;
  display: flex;
  gap: 18px;
  align-items: center;
  color: #f5f3ed;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.hero-caption p,
.hero-caption span {
  margin: 0;
}

.hero-caption p::after {
  content: none;
}

.section {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 92px clamp(18px, 8vw, 96px);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.section-heading h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.section-heading h1::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-left: 18px;
  vertical-align: middle;
  background: var(--line);
}

.news-section {
  min-height: 44vh;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 54px;
  align-items: center;
}

.news-section .section-heading {
  margin: 0;
}

.news-list {
  display: grid;
}

.news-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.news-list a:hover {
  color: var(--ink);
}

.gallery-section {
  padding-top: 44px;
}

.gallery-controls {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: -10px 0 28px;
}

.category-tabs {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.category-tabs button {
  min-height: 38px;
  min-width: 112px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.category-tabs button:hover,
.category-tabs button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.architecture-counter {
  min-height: 86px;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(152px, max-content));
  gap: 10px 18px;
  align-content: start;
}

.architecture-counter[hidden] {
  display: none;
}

.architecture-counter__metric {
  min-height: 38px;
  padding: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 0;
  background: var(--paper);
  color: rgba(0, 0, 0, 0.9);
  transition: color 520ms ease;
}

.architecture-counter__label {
  color: rgba(0, 0, 0, 0.62);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  transition: color 520ms ease;
}

.architecture-counter__value {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.architecture-counter__unit {
  margin-left: 6px;
  color: rgba(0, 0, 0, 0.9);
  font-size: 14px;
  font-weight: 500;
  transition: color 520ms ease;
}

.architecture-counter__metric.is-counter-active,
.architecture-counter__metric.is-counter-active .architecture-counter__label,
.architecture-counter__metric.is-counter-active .architecture-counter__unit {
  color: #ff5fa2;
}

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px;
  gap: 4px;
}

.work-card {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--soft);
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 180ms ease;
}

.work-card:hover::after {
  background: rgba(0, 0, 0, 0.18);
}

.work-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(32, 32, 32, 0.38);
  border: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.work-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 18px;
  display: grid;
  gap: 5px;
  color: #f5f3ed;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.work-card:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.work-card figcaption span {
  color: rgba(245, 243, 237, 0.76);
  font-size: 11px;
}

.work-card.wide {
  grid-column: span 2;
}

.work-card.tall {
  grid-row: span 2;
}

.profile-section {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(320px, 42vw) minmax(320px, 640px);
  gap: 7vw;
  align-items: start;
  padding-top: 120px;
  padding-bottom: 120px;
}

.profile-image {
  height: min(650px, 72vh);
  background: var(--soft);
}

.profile-image img {
  object-fit: contain;
}

.profile-copy {
  padding-right: 5vw;
}

.profile-copy h2 {
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", "Yu Mincho", YuMincho, serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.35;
  word-break: keep-all;
}

.profile-copy p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.profile-copy .lead {
  color: var(--ink);
  font-size: 15px;
}

.contact-section {
  padding-top: 0;
  padding-bottom: 120px;
}

.contact-panel {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.contact-panel span {
  font-size: 12px;
}

.contact-panel span::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-left: 16px;
  vertical-align: middle;
  background: var(--line);
}

.contact-panel strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 400;
}

.contact-page main {
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

.contact-form-section {
  width: min(100%, 840px);
  padding-top: 86px;
}

.contact-form {
  display: grid;
  gap: 22px;
}

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

.form-field label {
  color: var(--muted);
  font-size: 12px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.form-field input {
  min-height: 48px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 220px;
  padding: 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 1px solid var(--ink);
  outline-offset: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-actions button,
.form-actions a {
  min-height: 44px;
  min-width: 116px;
  padding: 0 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 13px;
}

.form-actions a {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.site-contact-form {
  padding: 34px 0 0;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-actions button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.form-target {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.google-form-frame {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.google-form-frame iframe {
  width: 100%;
  min-height: 860px;
  display: block;
  border: 0;
}

.site-footer {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 45;
  color: rgba(32, 32, 32, 0.58);
  font-size: 11px;
  pointer-events: none;
}

.project-page {
  cursor: pointer;
}

.project-main {
  padding-top: var(--header-height);
}

.project-hero {
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  padding: 84px clamp(18px, 8vw, 96px) 72px;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(360px, 1.25fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
  overflow: hidden;
}

.project-meta {
  max-height: 100%;
  padding-right: 12px;
  display: grid;
  gap: 28px;
  overflow-y: auto;
  scrollbar-width: none;
}

.project-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
}

.project-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Yu Mincho", YuMincho, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.project-summary {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.project-summary p {
  margin: 0;
}

.project-images {
  max-height: 100%;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: none;
}

.project-meta::-webkit-scrollbar,
.project-images::-webkit-scrollbar {
  display: none;
}

.project-images figure {
  margin: 0;
  background: var(--soft);
  overflow: hidden;
}

.project-images img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-images figcaption {
  padding: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.project-return {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 45;
  color: rgba(32, 32, 32, 0.58);
  font-size: 11px;
  pointer-events: none;
}

.photograph-detail {
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  padding: 72px clamp(18px, 8vw, 96px) 96px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.photograph-heading {
  position: sticky;
  top: var(--header-height);
  z-index: 5;
  padding: 22px 0 28px;
  background: rgba(247, 247, 245, 0.94);
  backdrop-filter: blur(14px);
}

.photograph-heading .project-title {
  max-width: 960px;
}

.photograph-images {
  width: min(100%, 960px);
  margin: 0 auto;
  position: relative;
  min-height: 0;
}

.photograph-frame {
  position: absolute;
  inset: 0 0 62px;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 1300ms ease, transform 1300ms ease;
}

.photograph-frame.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.photograph-images img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.photograph-nav {
  position: absolute;
  bottom: 4px;
  z-index: 10;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(242, 240, 234, 0.56);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(55, 55, 53, 0.32);
  color: #f2f0ea;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.photograph-nav--previous {
  left: calc(50% - 52px);
}

.photograph-nav--next {
  right: calc(50% - 52px);
}

.photograph-nav:hover:not(:disabled),
.photograph-nav:focus-visible {
  border-color: #f2f0ea;
  background: rgba(55, 55, 53, 0.68);
}

.photograph-nav:focus-visible {
  outline: 2px solid #f2f0ea;
  outline-offset: 3px;
}

.photograph-nav:disabled {
  opacity: 0.2;
  cursor: default;
}

.project-close {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 60;
  color: rgba(32, 32, 32, 0.68);
  font-size: 12px;
}

.photograph-page {
  background: #777774;
  color: #f2f0ea;
}

.photograph-page .site-header,
.photograph-page .photograph-heading {
  border-color: rgba(242, 240, 234, 0.18);
  background: #777774;
  color: #f2f0ea;
  backdrop-filter: none;
}

.photograph-page .primary-nav,
.photograph-page .project-kicker,
.photograph-page .project-close {
  color: rgba(242, 240, 234, 0.74);
}

.photograph-page .primary-nav a:hover,
.photograph-page .primary-nav a.is-current,
.photograph-page .brand,
.photograph-page .brand-tagline,
.photograph-page .project-title {
  color: #f2f0ea;
}

.photograph-page .photograph-frame {
  background: #777774;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 720ms ease, transform 720ms ease;
}

.reveal-ready .reveal.photograph-reveal {
  transition: opacity 1300ms ease, transform 1300ms ease;
}

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

@media (max-width: 900px) {
  :root {
    --header-height: 62px;
  }

  .site-header {
    padding: 0 18px;
  }

  .brand {
    font-size: 30px;
  }

  .brand-block {
    gap: 12px;
    min-width: 0;
  }

  .brand-tagline {
    font-size: 13px;
  }

  .menu-button {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 60;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .primary-nav.is-open,
  .site-header:focus-within .primary-nav {
    display: grid;
  }

  .primary-nav a {
    min-height: 48px;
    display: grid;
    place-items: center;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .hero {
    min-height: calc(88vh - var(--header-height));
    min-height: calc(88dvh - var(--header-height));
  }

  .hero-caption {
    left: 18px;
    right: 18px;
    bottom: 24px;
    justify-content: space-between;
  }

  .hero-caption p::after {
    width: 28px;
    margin-left: 12px;
  }

  .section {
    padding: 72px 18px;
  }

  .news-section {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-list article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .masonry-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 190px;
  }

  .work-card.wide,
  .work-card.tall {
    grid-column: auto;
    grid-row: auto;
  }

  .work-card figcaption {
    opacity: 1;
    transform: none;
  }

  .profile-section {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 80px 18px;
  }

  .profile-image {
    height: 430px;
    margin: 0 -18px;
  }

  .profile-copy {
    padding-right: 0;
  }

  .contact-panel {
    min-height: 156px;
  }

  .project-hero {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    padding: 56px 18px 72px;
  }

  .project-meta {
    max-height: none;
    padding-right: 0;
    overflow: visible;
  }

  .project-images {
    max-height: none;
    overflow: visible;
  }

  .photograph-detail {
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    padding: 18px 18px 46px;
    grid-template-rows: auto minmax(220px, 1fr);
  }

  .photograph-heading {
    top: var(--header-height);
    padding: 10px 0 16px;
  }

  .photograph-heading .project-title {
    font-size: clamp(22px, 6.2vw, 30px);
    line-height: 1.18;
  }

  .project-close {
    right: 14px;
    bottom: 12px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 58px;
  }

  .site-header {
    min-height: var(--header-height);
    padding: 0 14px;
    gap: 10px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-tagline {
    display: none;
  }

  .hero-caption {
    display: grid;
    gap: 8px;
    left: 14px;
    right: 14px;
    bottom: 18px;
  }

  .section {
    padding: 56px 14px;
  }

  .section-heading {
    gap: 10px;
  }

  .gallery-controls {
    display: grid;
    gap: 12px;
    margin: -4px 0 20px;
  }

  .category-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-tabs button {
    min-height: 58px;
    font-size: 18px;
  }

  .architecture-counter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    min-height: 0;
    margin-bottom: 0;
  }

  .architecture-counter__metric {
    min-height: 58px;
    padding: 0;
  }

  .architecture-counter__label {
    font-size: 10px;
  }

  .architecture-counter__value {
    font-size: 18px;
  }

  .masonry-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(230px, 62vw);
    gap: 6px;
  }

  .work-card figcaption {
    padding: 14px;
  }

  .profile-section {
    padding: 64px 14px;
  }

  .profile-image {
    height: min(380px, 78vw);
    margin: 0 -14px;
  }

  .profile-copy h2 {
    font-size: clamp(26px, 8vw, 34px);
    word-break: normal;
  }

  .profile-copy p {
    font-size: 13px;
    line-height: 1.9;
  }

  .project-hero {
    padding: 36px 14px 64px;
  }

  .project-title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .project-summary {
    font-size: 13px;
    line-height: 1.9;
  }

  .project-images {
    gap: 6px;
  }

  .contact-panel {
    display: grid;
    gap: 10px;
    text-align: center;
  }

  .contact-form-section {
    padding-top: 48px;
  }

  .google-form-frame {
    margin: 0 -8px;
  }

  .google-form-frame iframe {
    min-height: 920px;
  }

  .form-field label {
    font-size: 13px;
  }

  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-actions button,
  .form-actions a {
    min-height: 52px;
    font-size: 15px;
  }

  .photograph-detail {
    padding: 12px 14px 42px;
    grid-template-rows: auto minmax(260px, 1fr);
  }

  .photograph-heading {
    padding: 8px 0 10px;
  }

  .photograph-heading .project-title {
    font-size: clamp(20px, 5.8vw, 26px);
    line-height: 1.14;
  }

  .photograph-images {
    width: 100%;
  }

  .photograph-images img {
    max-height: 100%;
  }

  .photograph-nav {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .photograph-frame {
    bottom: 54px;
  }

  .photograph-nav--previous {
    left: calc(50% - 48px);
  }

  .photograph-nav--next {
    right: calc(50% - 48px);
  }

  .photograph-page .primary-nav {
    background: #777774;
  }

  .photograph-page .primary-nav a {
    border-color: rgba(242, 240, 234, 0.18);
  }
}
