@font-face {
  font-family: 'Neue Display Grotesk';
  src: local('Neue Display Grotesk');
}

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

:root {
  --font: 'Neue Display Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #999;
  --left-width: 320px;
  --pad: 48px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */

.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Left panel ── */

.left {
  width: var(--left-width);
  flex-shrink: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  position: sticky;
  top: 0;
}

.left-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

h1 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.back-link:hover .back-arrow {
  transform: translateX(-3px);
}

.back-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.bio {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 220px;
}

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

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav a {
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--muted);
}

/* ── Left bottom socials ── */

.left-bottom {
  display: flex;
  gap: 16px;
}

.social {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.social:hover {
  color: var(--fg);
}

.bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.01em;
  padding: 7px 12px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 18px;
  border: 5px solid transparent;
  border-top-color: var(--fg);
}

.bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.left-bottom {
  position: relative;
}

.email-copy {
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s ease;
}

@keyframes swapOut {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes swapIn {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.email-copy.swap-out {
  animation: swapOut 0.15s ease forwards;
}

.email-copy.swap-in {
  animation: swapIn 0.15s ease forwards;
}

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.email-copy.pop {
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── Right scrollable panel ── */

.right {
  flex: 1;
  height: 100vh;
  overflow-y: scroll;
  padding: var(--pad);
  scrollbar-width: none;
}

.right::-webkit-scrollbar {
  display: none;
}

/* ── Gallery ── */

.gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: flex-end;
}

.img-block {
  width: 75%;
  height: calc(100vh - var(--pad) * 2);
  overflow: hidden;
  flex-shrink: 0;
}

.img-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.img-block.natural {
  height: auto;
}

.img-block.natural img {
  height: auto;
  object-fit: unset;
}

.img-row {
  display: flex;
  gap: 16px;
  width: 75%;
}

.img-row .img-block {
  flex: 1;
  width: 50%;
  height: calc((100vh - var(--pad) * 2) * 0.6);
  overflow: hidden;
}

.img-row.tall-row .img-block {
  height: calc(100vh - var(--pad) * 2);
}

.img-row .img-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.img-row .img-block.contain {
  background: #f5f4f2;
}

.img-row .img-block.contain img {
  object-fit: contain;
}

.img-block.zoom-in img {
  transform: scale(1.12);
}

.img-block.ad-block {
  border: 0.5px solid #d8d4d0;
  width: 75%;
  height: auto;
  align-self: flex-end;
}

.img-block.ad-block img {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
  border-radius: 0;
}

.img-block.book.zoom img {
  transform: scale(1.06);
}

.img-block.book {
  height: calc(100vh - var(--pad) * 2);
}

.img-block.book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.img-block.framed {
  background: #f5f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-block.framed img {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: unset;
  border-radius: 1px;
}

.gallery > .img-block + .img-block {
  background: #f5f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery > .img-block + .img-block img {
  width: auto;
  height: auto;
  max-width: 42%;
  max-height: 42%;
  object-fit: unset;
}

.gallery > .img-block + .img-block .placeholder {
  width: 40%;
  height: 40%;
  border-radius: 1px;
}

.placeholder {
  width: 100%;
  height: 100%;
  background: #f2f0ed;
  border-radius: 2px;
}

/* ── Mobile ── */

@media (max-width: 768px) {
  :root {
    --pad: 24px;
  }

  html, body {
    height: auto;
  }

  .layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* unwrap .left so we can reorder its children alongside .right */
  .left {
    display: contents;
  }

  .left-top {
    order: 1;
    padding: var(--pad) var(--pad) 32px;
  }

  .right {
    order: 2;
    height: auto;
    overflow: visible;
    padding: 0 var(--pad) var(--pad);
  }

  .left-bottom {
    order: 3;
    padding: 32px var(--pad) var(--pad);
    position: relative;
  }

  .bio {
    max-width: 100%;
  }

  .bio br {
    display: none;
  }

  .bio-lead {
    padding-right: 0.35em;
  }

  .img-block.ad-block {
    width: 100% !important;
    height: auto !important;
    margin-right: 0 !important;
    align-self: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  .img-block.ad-block img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* gallery full width, left-aligned */
  .gallery {
    align-items: stretch;
  }

  .img-block {
    width: 100%;
    height: 72vw;
  }

  .img-row {
    width: 100%;
    flex-direction: column;
  }

  .img-row .img-block {
    width: 100%;
    height: 72vw;
  }

  .img-row.tall-row .img-block {
    height: 130vw;
  }

  .img-block.book {
    height: 72vw;
  }

  /* hide squiggly line on mobile */
  #almaLine { display: none; }

  /* hide speech bubble on mobile */
  .bubble {
    display: none;
  }
}

