:root {
  --white: #fff;
  --black: #000;
  --soft: #f5f5f5;
  --muted: #777;
  --serif: "Cormorant Garamond", "Bodoni 72", Didot, Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--white);
}
body {
  margin: 0;
  color: var(--black);
  font-family: var(--sans);
  line-height: 1.55;
}
body.has-modal {
  overflow: hidden;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #a9782a;
  outline-offset: 3px;
}
.portfolio-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.65rem clamp(1.1rem, 4vw, 4rem);
  color: #fff;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.portfolio-brand {
  width: min(350px, 40vw);
}
.portfolio-brand img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  object-position: left;
}
.portfolio-header nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.portfolio-header nav a {
  opacity: 0.82;
}
.portfolio-header nav a:hover {
  opacity: 1;
}
.portfolio-contact {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.portfolio-hero {
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 5rem)
    clamp(3rem, 6vw, 5rem);
  text-align: center;
  background: var(--soft);
}
.portfolio-hero p {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.portfolio-hero h1 {
  margin: 0;
  font: 400 clamp(2.7rem, 7vw, 6rem) / 0.95 var(--serif);
}
.portfolio-hero span {
  display: block;
  margin: 1.2rem auto 0;
  color: var(--muted);
}
.portfolio-shell {
  max-width: 1680px;
  margin: auto;
  padding: clamp(1rem, 3vw, 3rem);
}
.portfolio-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 20px);
}
.portfolio-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border-radius: 3px;
  background: #ecebea;
  aspect-ratio: 4/5;
  text-align: left;
}
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.45s ease,
    transform 0.55s ease;
}
.portfolio-card img.is-loaded {
  opacity: 1;
}
.portfolio-card:hover img {
  transform: scale(1.045);
}
.portfolio-card__overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 2.5rem 0.8rem 0.75rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.portfolio-card:hover .portfolio-card__overlay,
.portfolio-card:focus-visible .portfolio-card__overlay {
  opacity: 1;
  transform: none;
}
.portfolio-card__overlay strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio-card__overlay span {
  flex: none;
  font-size: 0.68rem;
}
.portfolio-status {
  grid-column: 1/-1;
  padding: 4rem;
  text-align: center;
  color: var(--muted);
}
.post-modal {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: #050505;
}
.post-modal::backdrop {
  background: #050505;
}
.post-modal[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}
.post-modal__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.88);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.post-modal__close svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.post-modal__close:hover {
  background: #000;
  transform: scale(1.06);
}
.post-modal__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}
.post-modal__track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.post-modal__track.is-moving {
  transition: transform 0.38s cubic-bezier(0.76, 0, 0.24, 1);
}
.post-modal__track.is-settling {
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.post-modal__slide {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
}
.post-modal__slide picture {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}
.post-modal__slide img {
  max-width: 100%;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1;
}
.post-modal__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%);
}
.post-modal__nav svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.post-modal__nav--previous {
  left: 14px;
}
.post-modal__nav--next {
  right: 14px;
}
.post-modal__nav:disabled {
  display: none;
}
.post-modal__count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 0.75rem;
}
.post-modal__copy {
  align-self: stretch;
  overflow: auto;
  padding: clamp(4.5rem, 7vw, 6rem) 2rem 2rem;
  color: #111;
  background: #fff;
}
.post-modal__date {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.post-modal__copy h2 {
  margin: 0 0 1.2rem;
  font: 400 2rem/1.05 var(--serif);
}
.post-modal__caption {
  white-space: pre-line;
  font-size: 0.9rem;
}
.post-modal__caption:empty {
  display: none;
}
@media (max-width: 1100px) {
  .portfolio-posts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .portfolio-header {
    min-height: 64px;
  }
  .portfolio-brand {
    width: 185px;
  }
  .portfolio-brand img {
    height: 46px;
  }
  .portfolio-header nav a:not(.portfolio-contact) {
    display: none;
  }
  .portfolio-contact {
    padding: 0.55rem 0.7rem;
    font-size: 0.65rem;
  }
  .portfolio-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .portfolio-shell {
    padding: 7px;
  }
  .portfolio-card__overlay {
    opacity: 1;
    transform: none;
    padding: 2rem 0.55rem 0.5rem;
  }
  .portfolio-card__overlay strong {
    font-size: 0.68rem;
  }
  .post-modal[open] {
    display: grid;
    grid-template: 1fr auto/1fr;
  }
  .post-modal__stage {
    min-height: 0;
  }
  .post-modal__slide img {
    max-height: 72dvh;
  }
  .post-modal__copy {
    max-height: 28dvh;
    padding: 1rem 1.15rem 1.5rem;
  }
  .post-modal__copy h2 {
    font-size: 1.45rem;
    margin-bottom: 0.7rem;
  }
  .post-modal__nav {
    width: 40px;
    height: 40px;
  }
  .post-modal__close {
    top: 8px;
    right: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
