:root {
  --bg: #f6f1e8;
  --surface: #fbf8f1;
  --text: #26231f;
  --muted: #7a746c;
  --border: #d8d0c4;
  --accent: #5f574b;
  --soft: #ece5da;
  --max-width: 1180px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.74), transparent 28rem),
    linear-gradient(180deg, var(--bg), #efeadf 70%, #f8f5ef);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(246, 241, 232, 0.78);
  border-bottom: 1px solid rgba(216, 208, 196, 0.75);
  display: flex;
  height: var(--header-height);
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  border: 1px solid var(--border);
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  height: 2.65rem;
  letter-spacing: 0.18em;
  place-items: center;
  width: 2.65rem;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.section-shell {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3.5rem);
}

.hero {
  min-height: calc(100vh - var(--header-height));
  padding-top: clamp(4.5rem, 9vw, 8rem);
}

.hero-grid {
  align-items: end;
  display: grid;
  gap: clamp(2.5rem, 7vw, 7rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  margin: 0 0 1.4rem;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(4.6rem, 12vw, 10.5rem);
  line-height: 0.88;
  margin-bottom: 1.5rem;
  max-width: 9ch;
}

h2 {
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 0.96;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.02em;
}

.hero-text {
  border-left: 1px solid var(--border);
  color: var(--muted);
  max-width: 34rem;
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}

.button-link {
  border: 1px solid var(--text);
  display: inline-flex;
  letter-spacing: 0.14em;
  margin-top: 1.4rem;
  padding: 0.85rem 1.15rem;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-link:hover,
.button-link:focus-visible {
  background: var(--text);
  color: var(--surface);
  transform: translateY(-2px);
}

.section-heading {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1fr);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading p {
  align-self: end;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 35rem;
}

.section-heading span {
  color: var(--accent);
  white-space: nowrap;
}

.section-heading.compact {
  display: block;
  margin-bottom: 2rem;
}

.gallery {
  display: grid;
  gap: clamp(1rem, 2vw, 1.4rem);
  grid-auto-flow: dense;
  grid-auto-rows: 12rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  grid-row: span 2;
  min-width: 0;
}

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

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

.work-image {
  background: linear-gradient(135deg, #ddd5c8, #f3eee5 45%, #cfc5b6);
  border: 1px solid var(--border);
  cursor: pointer;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.work-image::before {
  color: rgba(95, 87, 75, 0.56);
  content: attr(data-title);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  left: 1.1rem;
  letter-spacing: -0.04em;
  line-height: 1;
  max-width: 8ch;
  position: absolute;
  top: 1rem;
  z-index: 1;
}

.work-image::after {
  border: 1px solid rgba(255, 255, 255, 0.48);
  content: "";
  inset: 0.65rem;
  pointer-events: none;
  position: absolute;
}

.work-image img {
  height: 100%;
  object-fit: cover;
  opacity: 1;
  position: relative;
  transition: opacity 220ms ease, transform 700ms ease;
  width: 100%;
  z-index: 2;
}

.work-image img.is-missing {
  opacity: 0;
}

.work-image:hover img:not(.is-missing),
.work-image:focus-visible img:not(.is-missing) {
  opacity: 0.9;
  transform: scale(1.035);
}

.work-meta h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.work-meta p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.about-panel,
.contact-grid {
  border-top: 1px solid var(--border);
  display: grid;
  gap: clamp(1.5rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1.2fr);
  padding-top: clamp(1.5rem, 4vw, 2.6rem);
}

.about-panel p,
.contact-grid p {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.about-panel p:first-child {
  color: var(--text);
  grid-column: 2;
}

.about-panel p:last-child {
  grid-column: 2;
}

address {
  display: grid;
  font-style: normal;
  gap: 0.85rem;
}

address a {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding-bottom: 0.55rem;
  transition: border-color 180ms ease, color 180ms ease;
}

address a:hover,
address a:focus-visible {
  border-color: var(--text);
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  font-size: 0.86rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 1.7rem clamp(1.25rem, 4vw, 3.5rem) 2.4rem;
}

.site-footer p {
  margin-bottom: 0;
}

.lightbox {
  align-items: center;
  background: rgba(31, 28, 24, 0.78);
  display: none;
  inset: 0;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  position: fixed;
  z-index: 100;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.28);
  max-height: 92vh;
  max-width: min(980px, 100%);
  padding: clamp(0.85rem, 2vw, 1.25rem);
  position: relative;
  width: 100%;
}

.lightbox-close {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1.7rem;
  height: 2.75rem;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.75rem;
  z-index: 2;
}

.lightbox-image-wrap {
  align-items: center;
  background: linear-gradient(135deg, #ddd5c8, #f7f2ea, #c7bdaf);
  display: flex;
  justify-content: center;
  min-height: min(62vh, 36rem);
  overflow: hidden;
}

.lightbox-image {
  max-height: min(62vh, 36rem);
  object-fit: contain;
  width: 100%;
}

.lightbox-image.is-missing {
  display: none;
}

.lightbox-caption {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1rem;
}

.lightbox-caption h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  margin-bottom: 0;
}

.lightbox-caption p {
  color: var(--muted);
  margin: 0.4rem 0 0;
  text-align: right;
}

@media (max-width: 900px) {
  .hero-grid,
  .section-heading,
  .about-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .gallery {
    grid-auto-rows: 11rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-panel p:first-child,
  .about-panel p:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .site-nav {
    gap: 0.85rem;
  }

  .site-nav a {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(3.6rem, 21vw, 5.2rem);
  }

  .gallery {
    display: block;
  }

  .work-card,
  .work-card.tall,
  .work-card.wide {
    margin-bottom: 1.6rem;
  }

  .work-image {
    aspect-ratio: 4 / 5;
  }

  .work-card.wide .work-image {
    aspect-ratio: 1 / 1;
  }

  .site-footer,
  .lightbox-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox-caption p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
