:root {
  --bg: #fcfcff;
  --bg-soft: #f7f7ff;
  --text: #22212f;
  --muted: #676476;
  --line: rgba(123, 106, 162, 0.2);
  --violet: #7b5bc7;
  --gold: #cba76d;
  --blue: #7ab2de;
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 42px rgba(82, 53, 123, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(175, 156, 241, 0.18), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 225, 170, 0.25), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #faf7ff 46%, #fdfdff 100%);
  font-family: "Inter", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: "Poppins", "Inter", sans-serif;
  line-height: 1.15;
  margin: 0;
}

.bg-orb {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-a {
  width: 280px;
  height: 280px;
  top: -90px;
  left: -80px;
  background: radial-gradient(circle, rgba(124, 87, 201, 0.5), transparent 70%);
}

.orb-b {
  width: 360px;
  height: 360px;
  right: -120px;
  top: 18%;
  background: radial-gradient(circle, rgba(111, 173, 226, 0.45), transparent 75%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(14px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.main-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav .owner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.main-nav .owner-link span {
  line-height: 1;
}

.main-nav .owner-link img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(123, 106, 162, 0.18);
}

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

.flash-stack {
  position: fixed;
  right: 16px;
  top: 86px;
  z-index: 80;
  display: grid;
  gap: 8px;
  max-width: min(90vw, 380px);
}

.flash {
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(35, 24, 56, 0.16);
  font-size: 0.92rem;
}

.flash-success {
  border-color: rgba(67, 172, 112, 0.45);
}

.flash-error {
  border-color: rgba(197, 79, 79, 0.45);
}

.section {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) 0;
}

.hero {
  min-height: min(810px, 100vh);
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
}

.magic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-panel {
  max-width: 880px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(245, 235, 255, 0.75));
  border: 1px solid rgba(133, 112, 171, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 44px);
}

.hero-label {
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  font-size: 0.78rem;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(2rem, 5.2vw, 4rem);
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, #7b5bc7, #9c73dd);
  box-shadow: 0 10px 24px rgba(99, 67, 156, 0.35);
}

.btn-secondary {
  color: var(--violet);
  border: 1px solid rgba(121, 92, 178, 0.35);
  background: #fff;
}

.btn-mini {
  font-size: 0.84rem;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(131, 105, 173, 0.35);
  color: var(--violet);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 30px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-head p {
  margin-top: 11px;
  color: var(--muted);
}

.compare-card {
  background: var(--card);
  border: 1px solid rgba(123, 106, 162, 0.1);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.compare-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto;
  width: min(920px, 100%);
  aspect-ratio: 16 / 10;
  box-shadow: 0 14px 30px rgba(73, 47, 119, 0.16);
  cursor: pointer;
}

.compare-before,
.compare-after {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-after-wrap {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(83, 55, 130, 0.28);
}

.compare-handle::before {
  content: "↔";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(123, 97, 174, 0.3);
  color: var(--violet);
  font-weight: 800;
}

.compare-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.compare-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 10px;
}

.compare-thumb {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 7px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compare-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(72, 49, 110, 0.16);
}

.compare-thumb img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.compare-thumb small {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--muted);
}

.before-after-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.before-after-pair-item {
  margin: 0;
}

.before-after-pair-item[data-media-type] {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.before-after-pair-item[data-media-type]:hover {
  transform: translateY(-2px);
}

.before-after-pair-item img {
  width: 100%;
  height: clamp(260px, 42vw, 560px);
  object-fit: contain;
  background: transparent;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
}

.before-after-pair-item figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.media-grid {
  display: grid;
  gap: 14px;
}

.collections-list {
  display: grid;
  gap: 14px;
}

.collection-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.6vw, 22px);
}

/* Works page: keep cards visually light, like the transparent hero frame */
.collections-list .collection-card {
  background: var(--card);
  border: 1px solid rgba(123, 106, 162, 0.1);
  box-shadow: var(--shadow);
}

.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.collection-head h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
}

.collection-head span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.collection-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 2fr);
  gap: 12px;
}

.collection-before-card img {
  aspect-ratio: 3 / 4;
}

.collection-after-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.media-grid.photos {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-grid.videos {
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-card {
  border: 0;
  padding: 0;
  text-align: left;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(76, 45, 123, 0.12);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.collections-list .media-card {
  background: transparent;
  box-shadow: none;
}

/* In works variants, keep frame on the variant card only, not on images */
.collections-list .collection-feature-card img {
  border: 0;
}

.collections-list .collection-bubble-card {
  border: 0;
}

.media-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(76, 45, 123, 0.2);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-card span {
  display: block;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.pages-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  color: var(--violet);
  border: 1px solid rgba(123, 91, 199, 0.3);
  font-weight: 700;
}

.contact-card {
  background: linear-gradient(145deg, rgba(239, 232, 255, 0.7), rgba(240, 246, 255, 0.74));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  padding: clamp(18px, 3vw, 34px);
}

.contact-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.contact-card p {
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 100, 159, 0.28);
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: 2px solid rgba(123, 91, 199, 0.25);
  border-color: rgba(123, 91, 199, 0.5);
}

.footer {
  width: min(1140px, 92vw);
  margin: 0 auto 30px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.footer a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-top: 5px;
}

.footer-socials span {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(37, 28, 53, 0.52);
}

.modal.open {
  display: flex;
}

.modal-dialog {
  position: relative;
  width: min(560px, 95vw);
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(119, 97, 165, 0.26);
  padding: 22px;
  box-shadow: 0 18px 40px rgba(45, 27, 72, 0.26);
}

.modal-media {
  width: min(920px, 95vw);
}

.modal-media img,
.modal-media video {
  width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  background: rgba(244, 238, 255, 0.95);
  color: var(--violet);
}

.compare-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.works-head {
  text-align: center;
}

.works-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.works-head p {
  margin-top: 10px;
  color: var(--muted);
}

.empty-note {
  margin: 0;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .media-grid.photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .media-grid.videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .collection-layout {
    grid-template-columns: 1fr;
  }

  .collection-after-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
  }

  .media-grid.photos,
  .media-grid.videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-after-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .compare-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .media-grid.photos,
  .media-grid.videos {
    grid-template-columns: 1fr;
  }

  .collection-after-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 20px 14px;
  }

  .flash-stack {
    left: 12px;
    right: 12px;
    max-width: unset;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Client design update: milk-beige palette + pink/teal threads + large center photo */
:root {
  --bg: #f6efe6;
  --bg-soft: #fbf5ec;
  --text: #3e312c;
  --muted: #7d6c61;
  --line: rgba(186, 150, 132, 0.25);
  --violet: #d786a5;
  --gold: #c8a277;
  --blue: #5ab8c1;
  --card: rgba(255, 250, 243, 0.9);
  --shadow: 0 18px 42px rgba(143, 95, 78, 0.16);
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(239, 191, 210, 0.26), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(138, 217, 221, 0.2), transparent 40%),
    linear-gradient(180deg, #fdf7ee 0%, #f8efe5 48%, #fdf7ee 100%);
}

.orb-a {
  background: radial-gradient(circle, rgba(225, 152, 184, 0.52), transparent 70%);
}

.orb-b {
  background: radial-gradient(circle, rgba(105, 196, 201, 0.45), transparent 75%);
}

.side-thread {
  position: fixed;
  top: 80px;
  bottom: 20px;
  width: 12px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

.side-thread::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      180deg,
      #e99bb9 0 14px,
      rgba(255, 255, 255, 0.7) 14px 20px,
      #6bc7cc 20px 34px,
      rgba(255, 255, 255, 0.72) 34px 40px
    );
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.side-thread-left {
  left: clamp(4px, 1vw, 16px);
}

.side-thread-right {
  right: clamp(4px, 1vw, 16px);
}

.topbar {
  background: rgba(255, 248, 240, 0.8);
}

.hero-panel {
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.88), rgba(252, 240, 233, 0.76));
  border: 1px solid rgba(207, 171, 154, 0.28);
}

.btn-primary {
  background: linear-gradient(140deg, #df95b1, #67bcc4);
  box-shadow: 0 10px 24px rgba(169, 123, 132, 0.35);
}

.btn-secondary {
  border: 1px solid rgba(210, 155, 178, 0.45);
  background: rgba(255, 255, 255, 0.86);
}

.btn-mini {
  border: 1px solid rgba(201, 144, 167, 0.45);
}

.contact-card {
  background: linear-gradient(145deg, rgba(252, 239, 229, 0.8), rgba(238, 248, 249, 0.75));
}

.modal-close {
  background: rgba(255, 240, 244, 0.95);
}

.showcase-stage {
  position: relative;
  width: min(980px, 100%);
  min-height: clamp(540px, 70vw, 820px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 30px);
  isolation: isolate;
}

.showcase-main-card {
  border: 2px solid rgba(233, 156, 189, 0.38);
  background: rgba(255, 255, 255, 0.92);
  width: min(560px, 78vw);
  z-index: 2;
}

.showcase-main-card img {
  aspect-ratio: 4 / 5;
}

.showcase-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.showcase-bubble-card {
  --orbit-angle: calc((360deg / var(--orbit-total)) * var(--orbit-index));
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(84px, 10vw, 128px);
  height: clamp(84px, 10vw, 128px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 8px 16px rgba(156, 117, 120, 0.2);
  pointer-events: auto;
  transform:
    translate(-50%, -50%)
    rotate(var(--orbit-angle))
    translate(clamp(210px, 28vw, 340px))
    rotate(calc(-1 * var(--orbit-angle)));
}

.showcase-bubble-card:hover {
  transform:
    translate(-50%, -50%)
    rotate(var(--orbit-angle))
    translate(clamp(210px, 28vw, 340px))
    rotate(calc(-1 * var(--orbit-angle)))
    scale(1.05);
}

.showcase-bubble-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.collection-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}

.collection-before-card img {
  aspect-ratio: 4 / 5;
}

.collection-feature-card img {
  aspect-ratio: 5 / 4;
}

/* Works page: after-only variant card should stay centered and proportional */
.collections-list .collection-layout {
  grid-template-columns: 1fr;
  justify-items: center;
}

.collections-list .collection-feature-card {
  width: min(100%, 520px);
}

.collections-list .collection-feature-card img {
  width: 100%;
  height: clamp(260px, 42vw, 560px);
  object-fit: contain;
  background: transparent;
}

.collection-bubbles {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.collection-bubble-card {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 8px 18px rgba(153, 113, 116, 0.2);
  flex-shrink: 0;
}

.collection-bubble-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .showcase-stage {
    min-height: clamp(500px, 86vw, 700px);
  }

  .showcase-main-card {
    width: min(500px, 86vw);
  }

  .showcase-bubble-card {
    transform:
      translate(-50%, -50%)
      rotate(var(--orbit-angle))
      translate(clamp(190px, 34vw, 290px))
      rotate(calc(-1 * var(--orbit-angle)));
  }

  .showcase-bubble-card:hover {
    transform:
      translate(-50%, -50%)
      rotate(var(--orbit-angle))
      translate(clamp(190px, 34vw, 290px))
      rotate(calc(-1 * var(--orbit-angle)))
      scale(1.05);
  }
}

@media (max-width: 760px) {
  .showcase-stage {
    min-height: unset;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .showcase-bubbles {
    position: static;
    inset: auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
  }

  .showcase-bubble-card {
    position: relative;
    top: auto;
    left: auto;
    width: 84px;
    height: 84px;
    transform: none;
  }

  .showcase-bubble-card:hover {
    transform: scale(1.04);
  }

  .collection-bubble-card {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 520px) {
  .showcase-bubble-card {
    width: 74px;
    height: 74px;
  }

  .collection-bubble-card {
    width: 96px;
    height: 96px;
  }

  .side-thread {
    display: none;
  }
}

/* Concept update inspired by reference: visual-first portfolio hero */
.hero.hero-portfolio {
  min-height: unset;
  display: grid;
  gap: 18px;
  text-align: left;
  padding-top: clamp(24px, 5vw, 42px);
}

.hero-portfolio-head {
  max-width: 980px;
  margin: 0 auto;
}

.hero-portfolio-head h1 {
  font-size: clamp(2.2rem, 8vw, 5.4rem);
  letter-spacing: 0.02em;
  color: rgba(85, 66, 63, 0.72);
}

.hero-portfolio-head .hero-sub {
  margin-top: 6px;
  max-width: 760px;
}

.hero-portfolio-grid {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 12px;
}

.hero-tile {
  border: 1px solid rgba(214, 175, 169, 0.48);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tile-main {
  border-radius: 40px;
  min-height: min(74vh, 720px);
}

.hero-tile-main img {
  aspect-ratio: 4 / 5;
}

.hero-portfolio-grid-single {
  width: min(760px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.hero-tile-main-compact {
  min-height: auto;
  width: min(640px, 88vw);
  margin: 0 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-tile-main-compact img {
  aspect-ratio: auto;
  max-height: 72vh;
  height: auto;
  object-fit: contain;
}

.hero-tile-stack {
  display: grid;
  gap: 12px;
}

.hero-tile-sm {
  border-radius: 22px;
  min-height: 0;
}

.hero-tile-sm img {
  aspect-ratio: 4 / 3;
}

@media (max-width: 980px) {
  .before-after-pair-grid {
    grid-template-columns: 1fr;
  }

  .hero-portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero-tile-main {
    min-height: unset;
    border-radius: 28px;
  }

  .hero-tile-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-portfolio-head {
    text-align: center;
  }

  .hero-portfolio-grid {
    gap: 10px;
  }

  .hero-tile-main {
    border-radius: 24px;
  }

  .hero-tile-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-tile-sm {
    border-radius: 18px;
  }

  .hero-tile-main-compact {
    width: min(520px, 92vw);
  }

  .hero-tile-main-compact img {
    max-height: 62vh;
  }
}
