:root {
  color-scheme: dark;
  --charred: #17130f;
  --wood: #2a211a;
  --parchment: #efe5d3;
  --ink: #252019;
  --muted: #bba98f;
  --oak: #b98955;
  --rust: #a85f38;
  --cream: #f6efe3;
  --line-dark: rgba(246, 239, 227, 0.16);
  --max: 1360px;
  --pad: clamp(20px, 4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--charred);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--charred);
  color: var(--cream);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--parchment);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 8px var(--pad);
  border-bottom: 1px solid rgba(185, 137, 85, 0.42);
  background:
    repeating-linear-gradient(92deg, rgba(255,255,255,.018) 0 1px, transparent 1px 22px),
    #1b1510;
  box-shadow: 0 8px 26px rgba(0,0,0,.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font-family: Rockwell, "Roboto Slab", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1;
}
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand span { display: grid; gap: 5px; }
.brand small {
  color: var(--oak);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
nav a { color: #ddd0bd; font-size: .92rem; font-weight: 700; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: white; }
.nav-contact { padding: 9px 15px; border: 1px solid rgba(185, 137, 85, .72); border-radius: 3px; }
.nav-contact:hover, .nav-contact:focus-visible { border-color: var(--parchment); background: rgba(185,137,85,.12); }

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .55fr);
  gap: clamp(50px, 8vw, 130px);
  align-items: end;
  min-height: 470px;
  padding: clamp(72px, 8vw, 112px) max(var(--pad), calc((100vw - var(--max)) / 2));
  overflow: hidden;
  border-bottom: 1px solid rgba(185, 137, 85, .32);
  background:
    radial-gradient(circle at 14% 8%, rgba(185, 137, 85, .12), transparent 30%),
    repeating-linear-gradient(94deg, rgba(255,255,255,.018) 0 1px, transparent 1px 24px),
    linear-gradient(145deg, #1c1611, var(--charred) 62%);
}
.intro::after {
  content: "";
  position: absolute;
  right: max(var(--pad), calc((100vw - var(--max)) / 2));
  bottom: 0;
  width: min(34vw, 430px);
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--rust));
}

.eyebrow {
  margin: 0 0 17px;
  color: #d2a674;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.45;
  text-transform: uppercase;
}
h1, h2, p { text-wrap: pretty; }
h1, h2 {
  margin: 0;
  font-family: Rockwell, "Roboto Slab", Georgia, serif;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.02;
}
h1 { max-width: 900px; font-size: clamp(3.1rem, 5.7vw, 5.7rem); }
h1 em { color: #c6a276; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.intro-note {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 0 10px clamp(28px, 4vw, 54px);
  border-left: 1px solid rgba(185, 137, 85, .42);
}
.intro-note p { max-width: 460px; margin: 0 0 26px; color: #c9bba7; font-size: clamp(1rem, 1.2vw, 1.14rem); }
.text-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  align-self: flex-start;
  padding: 3px 0 6px;
  border-bottom: 2px solid var(--rust);
  text-decoration: none;
  font-weight: 750;
}

.portfolio {
  padding: clamp(76px, 9vw, 130px) max(var(--pad), calc((100vw - var(--max)) / 2));
  background:
    repeating-linear-gradient(93deg, rgba(71, 45, 26, .02) 0 1px, transparent 1px 28px),
    var(--parchment);
  color: var(--ink);
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, .48fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: end;
  padding-bottom: clamp(34px, 5vw, 62px);
}
.section-heading .eyebrow { margin-bottom: 12px; color: #8f4b2b; }
.section-heading h2 { max-width: 820px; font-size: clamp(2.55rem, 4.6vw, 4.8rem); }
.section-heading > p {
  max-width: 480px;
  margin: 0;
  padding-left: 24px;
  border-left: 2px solid rgba(168, 95, 56, .55);
  color: #6e5c49;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(180px, 14vw, 210px);
  gap: clamp(14px, 1.6vw, 22px);
}
.project {
  position: relative;
  grid-row: span 2;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 7px solid #dcc9ae;
  border-radius: 2px;
  background: var(--wood);
  box-shadow: 0 12px 28px rgba(71, 45, 26, .14), 0 0 0 1px rgba(72, 44, 24, .22);
  color: white;
  cursor: zoom-in;
  text-align: left;
  text-decoration: none;
}
.project-tall { grid-row: span 3; }
.project-wide { grid-column: span 2; grid-row: span 2; }
.project img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1), filter 250ms ease;
}
.project-tall img { object-position: center 54%; }
.project-wide img { object-position: center 58%; }
.project::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 16, 11, .9), transparent 48%);
  pointer-events: none;
}
.project:hover img { transform: scale(1.025); }
.project:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.project-label {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 16px;
  left: 18px;
  color: #fff9ef;
  text-shadow: 0 1px 14px rgba(0,0,0,.65);
}
.project-label b { font-family: Rockwell, "Roboto Slab", Georgia, serif; font-size: .96rem; font-weight: 600; letter-spacing: .005em; }
.gallery-unavailable { color: #6e5c49; }

.contact-section {
  padding: clamp(72px, 9vw, 120px) max(var(--pad), calc((100vw - var(--max)) / 2));
  background:
    radial-gradient(circle at 82% 12%, rgba(185,137,85,.1), transparent 28%),
    repeating-linear-gradient(95deg, rgba(255,255,255,.016) 0 1px, transparent 1px 26px),
    var(--charred);
}
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  gap: clamp(46px, 7vw, 105px);
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid rgba(185, 137, 85, .55);
  border-radius: 3px;
  background: rgba(42, 33, 26, .88);
  box-shadow: 12px 12px 0 rgba(0,0,0,.16);
}
.contact-card h2 { max-width: 680px; font-size: clamp(2.55rem, 4.4vw, 4.6rem); }
.contact-card > div:first-child > p:last-child { max-width: 570px; margin: 24px 0 0; color: #c9bba7; }
.contact-details { border-top: 1px solid var(--line-dark); }
.contact-details a, .contact-details > p {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 22px;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-dark);
  text-decoration: none;
}
.contact-details a:first-child b { color: #e1ad76; }
.contact-details a:hover b, .contact-details a:focus-visible b { color: #f2c494; }
.contact-details span { color: #9f8b72; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.contact-details b { overflow-wrap: anywhere; font-size: .96rem; font-weight: 700; transition: color 180ms ease; }
.contact-details i { color: var(--oak); font-style: normal; text-align: right; }

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px var(--pad);
  border-top: 1px solid rgba(185, 137, 85, .22);
  background: #120f0c;
  color: #a89780;
  font-size: .82rem;
}
footer p { margin: 0; }
footer a { text-decoration: none; }
footer > a:last-child { justify-self: end; }
.site-credit { color: #b9aa94; text-align: center; }
.site-credit a { color: #d2a674; font-weight: 750; }
.site-credit a:hover, .site-credit a:focus-visible { color: #f2c494; }

.page-shell {
  width: min(100%, 920px);
  min-height: calc(100svh - 170px);
  margin-inline: auto;
  padding: clamp(70px, 9vw, 125px) var(--pad);
}
.page-shell h1 { margin-bottom: 28px; font-size: clamp(3rem, 6vw, 5.6rem); }
.page-shell article + article { margin-top: 65px; padding-top: 65px; border-top: 1px solid var(--line-dark); }
.page-shell article h1 a { text-decoration: none; }
.entry-content { color: #c9bba7; }
.entry-content a { color: #e1ad76; }
.entry-content img { max-width: 100%; height: auto; }

.lightbox {
  width: min(94vw, 1180px);
  height: min(92svh, 920px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid rgba(185, 137, 85, .52);
  background: #100d0a;
  color: white;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(15, 10, 7, .9); backdrop-filter: blur(7px); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.dialog-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 2px;
  background: rgba(20,14,10,.78);
  color: white;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
}
.dialog-figure { min-height: 0; background: #090705; }
.dialog-figure img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dialog-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 92px;
  padding: 16px 22px;
  border-top: 1px solid var(--line-dark);
  background: var(--wood);
}
.dialog-meta h2 { font-family: Rockwell, "Roboto Slab", Georgia, serif; font-size: 1.05rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.dialog-controls { display: flex; align-items: center; gap: 12px; }
.dialog-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(185, 137, 85, .55);
  border-radius: 2px;
  background: transparent;
  color: white;
  cursor: pointer;
}
.dialog-controls span { min-width: 48px; color: var(--muted); font-size: .78rem; text-align: center; }

.admin-bar .site-header { top: 32px; }

@media (max-width: 1040px) {
  .intro { grid-template-columns: 1fr; gap: 38px; min-height: auto; }
  .intro-note { max-width: 760px; padding: 28px 0 0; border-top: 1px solid rgba(185,137,85,.38); border-left: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .section-heading > p { max-width: 680px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .contact-card { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 720px) {
  .site-header { min-height: 70px; }
  .brand img { width: 50px; height: 50px; }
  .brand span { display: none; }
  nav { gap: 18px; }
  .nav-contact { padding: 8px 12px; }
  .intro { padding-top: 62px; padding-bottom: 68px; }
  h1 { font-size: clamp(3rem, 13vw, 4.7rem); }
  .portfolio { padding-top: 68px; padding-bottom: 78px; }
  .project-grid { grid-auto-rows: 145px; }
  .project-wide { grid-column: span 2; }
  .contact-card { padding: 28px 22px; box-shadow: 7px 7px 0 rgba(0,0,0,.15); }
  .contact-details a, .contact-details > p { grid-template-columns: 72px minmax(0, 1fr) 18px; gap: 10px; }
  footer { grid-template-columns: 1fr auto; align-items: end; }
  .site-credit { grid-column: 1 / -1; grid-row: 1; }
  footer > p:first-child { grid-column: 1; grid-row: 2; }
  footer > a:last-child { grid-column: 2; grid-row: 2; }
}

@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

@media (max-width: 480px) {
  nav > a:first-child { display: none; }
  .intro::after { width: 50vw; }
  .section-heading > p { padding-left: 18px; }
  .project-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .project, .project-tall, .project-wide { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
  .project-wide { aspect-ratio: 3 / 2; }
  .project-label { right: 14px; bottom: 12px; left: 14px; }
  .contact-details a, .contact-details > p { grid-template-columns: 1fr 18px; }
  .contact-details span { grid-column: 1 / -1; }
  .dialog-meta { flex-direction: column; gap: 12px; align-items: stretch; }
  .dialog-controls { justify-content: space-between; width: 100%; }
}

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