:root {
  --black: #090a0a;
  --ink: #111312;
  --gold: #c3a15d;
  --gold-light: #d7b86f;
  --gold-dark: #705522;
  --white: #f7f7f4;
  --cream: #eeeae2;
  --muted: #b5b3ad;
  --line: #303231;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font: 16px/1.65 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

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

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

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 1rem;
  padding: .8rem 1rem;
  transform: translateY(-120%);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 92px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4%;
  border-bottom: 1px solid var(--line);
  background: rgb(9 10 10 / 96%);
  backdrop-filter: blur(12px);
}

header nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.3vw, 2.4rem);
}

header nav a {
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
}

header nav a:not(.submit):hover,
header nav a:not(.submit):focus-visible { color: var(--gold-light); }

.submit,
.primary {
  display: inline-block;
  padding: .95rem 1.4rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.submit:hover,
.primary:hover,
.submit:focus-visible,
.primary:focus-visible { background: var(--gold-light); }

.hero {
  min-height: 70vh;
  padding: clamp(7rem, 13vh, 10rem) 8%;
  background:
    radial-gradient(circle at 74% 30%, #35414f 0, transparent 34%),
    linear-gradient(135deg, #080909, #171a1c);
}

.kicker {
  margin: 0;
  color: var(--gold-light);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.cta h2,
.project-title,
.project-hero h1,
.content-block h2 {
  font-family: var(--serif);
  font-weight: 400;
}

.hero h1 {
  max-width: 1100px;
  margin: 1.2rem 0;
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.025em;
}

.intro {
  max-width: 620px;
  margin: 0;
  color: #d3d1ca;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.projects {
  padding: clamp(5rem, 9vw, 8rem) 4%;
  scroll-margin-top: 92px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: .4rem 0 0;
  font-size: clamp(3.2rem, 6vw, 6rem);
  line-height: .95;
}

.section-head > p {
  margin: 0 0 .5rem;
  color: #c1beb6;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.project-card {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.project-image {
  display: grid;
  height: 300px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #252827, #111313);
}

.project-image img:not(.image-fallback) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .3s ease;
}

.project-card:hover .project-image img:not(.image-fallback),
.project-card:focus-visible .project-image img:not(.image-fallback) {
  filter: brightness(1.08);
  transform: scale(1.018);
}

.image-fallback {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  opacity: .55;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: #aaa8a2;
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.card-meta .number { color: var(--gold-light); }

.project-title {
  display: block;
  margin: .35rem 0;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.08;
}

.project-location {
  display: block;
  color: #aaa8a2;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.empty {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  border: 1px solid var(--line);
  text-align: center;
}

.empty h3 { margin-top: 0; font: 400 2rem/1.1 var(--serif); }

.loading-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.loading-grid i {
  height: 300px;
  background: linear-gradient(100deg, #151717 25%, #222524 40%, #151717 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.dialog-open { overflow: hidden; }

dialog {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  background: var(--cream);
  color: var(--ink);
}

dialog::backdrop { background: rgb(0 0 0 / 84%); }

.status-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(2rem, 8vw, 7rem);
  background: radial-gradient(circle at 50% 10%, #25231e 0, #111210 38%, var(--black) 72%);
}

.status-shell {
  width: min(42rem, 100%);
  padding: clamp(2.5rem, 7vw, 5rem);
  border: 1px solid #423b2d;
  background: rgb(9 10 10 / 78%);
  text-align: center;
}

.status-shell img { width: 5rem; margin: 0 auto 2rem; }
.status-shell h1 { margin: .5rem 0 1.25rem; font: 400 clamp(2.6rem, 8vw, 5rem)/.98 var(--serif); }
.status-shell > p:not(.kicker) { max-width: 34rem; margin: 0 auto 2rem; color: #c9c5bd; }
.status-shell > a { color: var(--gold-light); font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.status-shell > a:hover, .status-shell > a:focus-visible { color: var(--white); }

.detail-not-found {
  display: grid;
  min-height: calc(100dvh - 68px);
  place-content: center;
  padding: clamp(3rem, 10vw, 8rem);
  background: radial-gradient(circle at 50% 18%, #e4ded2 0, var(--cream) 48%, #d3cabb 100%);
  text-align: center;
}

.detail-not-found img { width: 5rem; margin: 0 auto 2rem; }
.detail-not-found h1 { max-width: 44rem; margin: .5rem auto 1.25rem; font: 400 clamp(2.7rem, 7vw, 5.5rem)/.98 var(--serif); }
.detail-not-found > p:not(.kicker) { max-width: 34rem; margin: 0 auto; color: #5b574f; }

.detail-nav {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  border-bottom: 1px solid var(--line);
  background: rgb(9 10 10 / 97%);
  color: var(--white);
}

.detail-nav button {
  min-height: 44px;
  padding: .65rem 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
}

.project-hero {
  position: relative;
  display: flex;
  min-height: 590px;
  align-items: center;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 8rem) 5%;
  background: #171a19;
  color: var(--white);
}

.project-hero-photo,
.project-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-hero-photo { object-fit: cover; }
.project-hero-photo.image-fallback { padding: 14%; object-fit: contain; opacity: .22; }

.project-hero-shade {
  background: linear-gradient(90deg, rgb(7 8 8 / 94%) 0, rgb(7 8 8 / 72%) 48%, rgb(7 8 8 / 12%) 78%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
}

.project-hero h1 {
  margin: .9rem 0 1.1rem;
  overflow-wrap: anywhere;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  line-height: .95;
}

.project-hero .summary {
  display: -webkit-box;
  max-width: 550px;
  margin: 0;
  overflow: hidden;
  color: #e0ded7;
  font-size: 1.05rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.project-by {
  display: grid;
  gap: .25rem;
  margin-top: 2.1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}

.project-by small {
  color: var(--gold-light);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.project-by strong { font: 400 1.45rem/1.25 var(--serif); }
.project-by span { color: #c7c4bc; font-size: .85rem; }

.share-project,
.back-to-grid,
.retry {
  padding: .75rem 1rem;
  border: 1px solid #726344;
  background: transparent;
  color: inherit;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.share-project { margin-top: 1.5rem; color: var(--white); }
.share-project:hover, .share-project:focus-visible, .retry:hover { border-color: var(--gold-light); color: var(--gold-light); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 1.5rem 4%;
  border-bottom: 1px solid #d2cdc3;
  background: #f7f5f0;
}

.fact {
  min-width: 0;
  padding: .7rem 1.5rem;
  border-right: 1px solid #d2cdc3;
}

.fact:last-child { border-right: 0; }
.fact small { display: block; margin-bottom: .25rem; color: var(--gold-dark); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fact strong { display: block; overflow-wrap: anywhere; font-weight: 600; }

.content-area {
  padding: clamp(3rem, 6vw, 6rem) 5%;
  background: #f7f5f0;
}

.story {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.content-block h2,
.story-section h2,
.project-team > h2 {
  margin: 0 0 .7rem;
  color: var(--gold-dark);
  font: 800 .75rem/1.3 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.content-block > p,
.story-section p { color: #353633; line-height: 1.8; }

.story-section { margin-top: 2rem; }

.main-image {
  display: grid;
  min-height: 470px;
  place-items: center;
  overflow: hidden;
  background: #e2dfd8;
}

.main-image img:not(.image-fallback) { width: 100%; height: 100%; object-fit: cover; }

.villa-gallery {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  margin: clamp(3rem, 6vw, 6rem) 0;
  background: var(--ink);
  color: var(--white);
}

.villa-gallery-image { min-height: 620px; overflow: hidden; }
.villa-gallery-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.villa-gallery-image .image-fallback { width: 100%; height: 100%; padding: 26%; object-fit: contain; opacity: .35; }

.villa-gallery-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 4vw, 4rem);
}

.villa-gallery-copy small,
.maker-profile > div > small {
  color: var(--gold-light);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.villa-gallery-copy h2,
.maker-profile h2 {
  margin: 1rem 0;
  font: 400 clamp(2.2rem, 4vw, 3.3rem)/1.05 var(--serif);
}

.villa-gallery-copy p { color: #c8c5bd; }

.maker-profile {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: clamp(3rem, 6vw, 6rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid #d2cabd;
  background: var(--cream);
}

.maker-profile > div > p { color: #484842; }

.maker-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-content: start;
  padding-left: 3rem;
  border-left: 1px solid #cfc7b8;
}

.maker-facts span { display: block; margin-bottom: .35rem; color: var(--gold-dark); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.maker-facts strong { display: block; }

.profile-contacts,
.project-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.4rem;
}

.profile-contact {
  display: inline-block;
  padding: .8rem 1rem;
  border: 1px solid var(--gold-dark);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.profile-contact:hover,
.profile-contact:focus-visible { background: var(--gold); color: var(--ink); }
.profile-contact.secondary { border-color: #8b8982; }

.lower-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr .85fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #d2cdc3;
}

.project-team-list { display: grid; gap: .65rem; margin-top: 1rem; }

.project-team-member {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .15rem .75rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid #d2cabd;
  background: #fbfaf7;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
}

.project-team-member > span { grid-row: 1 / 4; color: var(--gold-dark); font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.project-team-member strong { overflow-wrap: anywhere; font: 400 1.08rem/1.2 var(--serif); }
.project-team-member small { color: #575750; line-height: 1.35; }
.project-team-member em { grid-column: 2; margin-top: .35rem; color: var(--gold-dark); font-size: .68rem; font-style: normal; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.project-team-link { cursor: pointer; }
.project-team-link:hover, .project-team-link:focus-visible { border-color: var(--gold-dark); background: #fff; }

.founding {
  padding: 2rem;
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.founding img { width: 4.5rem; margin: 0 auto 1.2rem; }
.founding h2 { margin: .5rem 0; font: 400 1.5rem/1.15 var(--serif); }
.founding p { color: #c8c5bd; font-size: .9rem; }
.founding a { display: inline-block; margin-top: .8rem; color: var(--gold-light); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.founding a:hover,
.founding a:focus-visible { color: var(--white); }

.related {
  padding: clamp(3rem, 6vw, 5rem) 5%;
  background: var(--ink);
  color: var(--white);
}

.related-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.related-head h2 { margin: .4rem 0 0; font: 400 clamp(2.2rem, 4vw, 3.5rem)/1 var(--serif); }
.related-grid { margin-top: 2rem; }
.related-grid .project-image { height: 230px; }

.publication {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding: clamp(5rem, 10vw, 9rem) 8%;
  background: #f4f1ea;
  color: var(--ink);
}

.publication-intro h2 {
  max-width: 570px;
  margin: .8rem 0 1.5rem;
  font: 400 clamp(3rem, 5.5vw, 5.3rem)/.98 var(--serif);
}

.publication-intro > p:not(.kicker) { max-width: 540px; color: #4d4d47; font-size: 1.05rem; }
.publication-intro .primary { margin-top: 1.2rem; }
.publication-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid #bdb5a8; }
.publication-steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 1.4rem; padding: 1.7rem 0; border-bottom: 1px solid #bdb5a8; }
.publication-steps li > span { color: var(--gold-dark); font-size: .72rem; font-weight: 800; letter-spacing: .13em; }
.publication-steps h3 { margin: 0 0 .35rem; font: 400 1.55rem/1.15 var(--serif); }
.publication-steps p { margin: 0; color: #56564f; }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(4rem, 8vw, 7rem) 5%;
}

.cta h2 { max-width: 780px; margin: .4rem 0 0; font-size: clamp(2.6rem, 5vw, 4.7rem); line-height: 1; }
.cta .light { flex: 0 0 auto; }

footer {
  display: grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  gap: 3rem;
  padding: 3rem 5%;
  border-top: 1px solid var(--line);
}

footer p { color: #aaa8a2; }
footer a { color: var(--white); }

@media (max-width: 1000px) {
  .grid,
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: 1fr 1fr; }
  .founding { grid-column: 1 / -1; }
  .publication { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  html { scroll-behavior: auto; }
  header { height: 78px; padding: 12px 5%; }
  header nav {
    position: absolute;
    top: 77px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100dvh - 77px);
    overflow-y: auto;
    padding: 1.4rem 5% 2rem;
    border-bottom: 1px solid var(--line);
    background: var(--black);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  header nav.open { display: flex; }
  header nav a:not(.submit) { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  header nav .submit { margin-top: 1.2rem; text-align: center; }
  .projects { scroll-margin-top: 78px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(2n) { border-right: 0; }
  .fact:nth-child(-n + 2) { border-bottom: 1px solid #d2cdc3; }
  .villa-gallery { grid-template-columns: 1fr; }
  .villa-gallery-image { min-height: 500px; }
  .maker-profile { grid-template-columns: 1fr; }
  .maker-facts { padding: 2rem 0 0; border-top: 1px solid #cfc7b8; border-left: 0; }
  footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .hero { min-height: 74vh; padding: 5.5rem 6%; }
  .hero h1 { font-size: clamp(3.1rem, 15vw, 4.5rem); }
  .projects { padding: 4.5rem 6%; }
  .section-head { align-items: start; flex-direction: column; gap: .7rem; }
  .section-head > p { margin: 0; }
  .grid,
  .related-grid { grid-template-columns: 1fr; }
  .project-image { height: 310px; }
  .detail-nav { height: 60px; padding: 0 5%; }
  .detail-nav button { font-size: .72rem; }
  .project-hero { min-height: 540px; padding: 4.5rem 6%; }
  .project-hero-shade { background: linear-gradient(90deg, rgb(7 8 8 / 92%), rgb(7 8 8 / 61%)); }
  .project-hero h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .project-hero .summary { font-size: .98rem; -webkit-line-clamp: 5; }
  .facts { grid-template-columns: 1fr; padding: 0 6%; }
  .fact, .fact:nth-child(2n) { padding: 1.1rem 0; border-right: 0; border-bottom: 1px solid #d2cdc3; }
  .fact:last-child { border-bottom: 0; }
  .content-area { padding: 3rem 6%; }
  .main-image { min-height: 360px; }
  .villa-gallery-image { min-height: 420px; }
  .villa-gallery-copy { padding: 2rem; }
  .maker-profile { padding: 2rem; }
  .maker-facts { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: 1fr; }
  .founding { grid-column: auto; }
  .related { padding: 3rem 6%; }
  .related-head { align-items: start; flex-direction: column; }
  .related-grid .project-image { height: 310px; }
  .publication { padding: 4.5rem 6%; }
  .publication-steps li { grid-template-columns: 2.3rem 1fr; gap: .8rem; }
  .cta { align-items: flex-start; padding: 4rem 6%; flex-direction: column; }
  footer { grid-template-columns: 1fr; padding: 3rem 6%; }
}

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