@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Manrope:wght@400;500&display=swap');

:root {
  --container: 1240px;
  --text: #000;
  --bg: #fff;
  --ui-bg: rgba(255, 255, 255, 0.98);
  --overlay: rgba(0, 0, 0, 0.3);
  --muted-border: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.2;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
}

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

button {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.header {
  padding-top: 2rem;
  padding-bottom: 2rem;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.header-ready .header {
  opacity: 1;
  transform: translateY(0);
}

.header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header__brand {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.header__nav--desktop .header__link {
  font-family: 'Manrope', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-underline-offset: 5px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.header-ready .header__nav--desktop .header__link {
  opacity: 1;
  transform: translateY(0);
}

.header-ready .header__nav--desktop .header__link:nth-child(2) {
  transition-delay: 80ms;
}

.header__link.is-active,
.header__link:hover {
  text-decoration: underline;
}

.header__mobile-button {
  position: relative;
  display: none;
  width: 28px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.header__mobile-button span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: transform 220ms ease, opacity 220ms ease;
}

.header__mobile-button span:nth-child(1) {
  top: 0;
}

.header__mobile-button span:nth-child(2) {
  top: 10px;
}

.header__mobile-button span:nth-child(3) {
  top: 20px;
}

.menu-open .header__mobile-button span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-open .header__mobile-button span:nth-child(2) {
  opacity: 0;
}

.menu-open .header__mobile-button span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ui-bg);
  opacity: 0;
  transition: opacity 220ms ease;
}

.mobile-menu.is-active {
  opacity: 1;
}

.mobile-menu__panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  transform: translateX(32px);
  transition: transform 280ms ease;
}

.mobile-menu.is-active .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__close {
  position: absolute;
  top: 1.2rem;
  right: 1rem;
  border: 0;
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-menu__link {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  text-decoration: none;
}

.mobile-menu__link.is-active,
.mobile-menu__link:hover {
  text-decoration: underline;
}

.site-content {
  padding-top: 0;
  padding-bottom: 3rem;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 0 0 2rem;
}

.social-link {
  width: 24px;
  height: 24px;
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  opacity: 1;
  color: var(--text);
}

.socials__icon {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  fill: currentColor;
}

.social-link:hover .socials__icon,
.social-link:focus-visible .socials__icon {
  fill: url(#instagram-gradient);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.portfolio-card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.portfolio-card__figure {
  position: relative;
  margin: 0;
  width: 100%;
}

.portfolio-card__figure--empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid var(--muted-border);
  background: transparent;
}

.portfolio-card__empty-label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card__title {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  color: #fff;
  font-size: 1.45rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card__overlay,
.portfolio-card:focus-visible .portfolio-card__overlay,
.portfolio-card:hover .portfolio-card__title,
.portfolio-card:focus-visible .portfolio-card__title {
  opacity: 1;
}

.empty-state {
  font-size: 1.2rem;
}

.prose {
  max-width: 760px;
}

.prose h1 {
  margin: 0 0 0.5rem;
  font-size: 3rem;
  font-weight: 400;
}

.prose p {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.lightbox-ui {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 75px 1fr 75px;
  grid-template-rows: 60px 1fr;
  align-items: center;
}

.lightbox-topbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.lightbox-controls {
  display: flex;
}

.lightbox-controls button,
.lightbox-nav {
  width: 50px;
  height: 60px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  touch-action: none;
}

.lightbox-image {
  --zoom: 1;
  --pan-x: 0px;
  --pan-y: 0px;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 90px);
  object-fit: contain;
  transform: translate(var(--pan-x), var(--pan-y)) scale(var(--zoom));
  transform-origin: center center;
  transition: none;
  cursor: default;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.lightbox.is-panning .lightbox-image {
  transition: none;
}

.lightbox-image.zoom-anim {
  transition: transform 180ms ease;
}

.lightbox.is-idle .dimmable-ui {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

@media (max-width: 768px) {
  .header {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .header__brand {
    font-size: 1.8rem;
  }

  .header__nav--desktop {
    display: none;
  }

  .header__mobile-button {
    display: block;
  }

  .lightbox-ui {
    grid-template-columns: 1fr;
    grid-template-rows: 60px 1fr;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-nav[data-action='prev'] {
    left: 0;
  }

  .lightbox-nav[data-action='next'] {
    right: 0;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}
