:root {
  --bg: #ffffff;
  --logo: #9b6fd4;
  --muted: rgba(0, 0, 0, 0.4);
  --gap: 5px;
  --header-h: 68px;
  --card-radius: 4px;
  --icon-bg: rgba(0, 0, 0, 0.06);
}

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

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: #111;
}

@keyframes home-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes home-intro-char-rise {
  0% {
    opacity: 0;
    transform: translateY(34px);
  }
  70% {
    opacity: 1;
    transform: translateY(-7px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ── Hamburger Toggle ── */
.menu-toggle {
  position: fixed;
  top: 100px;
  left: 100px;
  width: 58px;
  height: 58px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: 0 6px;
  cursor: pointer;
  z-index: 200;
  transition: transform 0.2s ease;
}

.menu-toggle:hover {
  transform: scale(1.05);
}

.menu-toggle span {
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span {
  background: #111;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(14px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-14px) rotate(-45deg);
}

/* ── Fullscreen Menu ── */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.fullscreen-menu[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.menu-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fullscreen-menu[aria-hidden="false"] .menu-content {
  transform: translateY(0);
}

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

.nav-link {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #e07593;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #000;
  transform: translateX(5px);
}

.logo {
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #e07593;
}

/* ── Middle Left Text ── */
.middle-left-text {
  position: fixed;
  top: 50%;
  left: 100px;
  transform: translateY(-50%);
  font-size: 100px;
  font-weight: 700;
  color: #fff;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  letter-spacing: -0.02em;
}

.middle-left-text .dot {
  font-size: 40px;
  color: #fff;
  line-height: 0.6;
  margin-left: 2px;
  margin-top: 16px;
}

/* ── Top Right Text ── */
.top-right-text {
  position: fixed;
  top: 100px;
  right: 100px;
  text-align: right;
  z-index: 100;
  font-size: clamp(1.35rem, 2.3vw, 3rem);
  line-height: 1.32;
  letter-spacing: 0.05em;
  color: #fff;
}

.top-right-text div:first-child {
  margin-bottom: 4px;
}

.top-right-text a {
  pointer-events: auto;
}

.top-right-text strong {
  font-weight: 700;
  transition: color 0.3s ease;
}

.top-right-text strong:hover {
  color: #e07593;
}

/* ── Bottom Right Socials ── */
.bottom-right-socials {
  position: fixed;
  bottom: 100px;
  right: 100px;
  z-index: 100;
}

.bottom-right-socials .social-icon {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Home intro splash screen */
.home-intro {
  position: fixed;
  inset: 0;
  background: #e07493;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 420ms ease;
}

.home-intro.is-exiting {
  opacity: 0;
  pointer-events: none;
}

.home-intro-logo {
  display: flex;
  align-items: flex-start;
  letter-spacing: -0.02em;
  font-size: 100px;
  font-weight: 700;
  color: #fff;
}

.home-intro-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(34px);
  animation: home-intro-char-rise 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-intro-logo .home-intro-char:nth-child(1) { animation-delay: 120ms; }
.home-intro-logo .home-intro-char:nth-child(2) { animation-delay: 240ms; }
.home-intro-logo .home-intro-char:nth-child(3) { animation-delay: 360ms; }
.home-intro-logo .home-intro-char:nth-child(4) { animation-delay: 480ms; }
.home-intro-logo .home-intro-char:nth-child(5) { animation-delay: 600ms; }
.home-intro-logo .home-intro-char:nth-child(6) { animation-delay: 720ms; }
.home-intro-logo .home-intro-char:nth-child(7) { animation-delay: 840ms; }
.home-intro-logo .home-intro-char:nth-child(8) { animation-delay: 960ms; }

.home-intro-logo .home-intro-char.dot {
  font-size: 0.32em;
  color: #fff;
  line-height: 0;
  margin-left: 0.05em;
  margin-top: 0.34em;
}

/* Home page: reveal key elements one by one */
body.home-page .menu-toggle,
body.home-page .middle-left-text,
body.home-page .top-right-text,
body.home-page .bottom-right-socials,
body.home-page .gallery-main {
  opacity: 0;
  animation: home-fade-in 700ms ease forwards;
}

body.home-page.home-intro-active .menu-toggle,
body.home-page.home-intro-active .middle-left-text,
body.home-page.home-intro-active .top-right-text,
body.home-page.home-intro-active .bottom-right-socials,
body.home-page.home-intro-active .gallery-main {
  opacity: 0;
  animation: none;
}

body.home-page .menu-toggle {
  animation-delay: 90ms;
}

body.home-page .middle-left-text {
  animation-delay: 220ms;
}

body.home-page .top-right-text {
  animation-delay: 360ms;
}

body.home-page .bottom-right-socials {
  animation-delay: 500ms;
}

body.home-page .gallery-main {
  animation-delay: 650ms;
}

/* ── Top Right Mironet (Other Pages) ── */
.top-right-mironet {
  position: fixed;
  top: 100px;
  right: 100px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
  cursor: pointer;
}

.top-right-mironet:hover {
  color: #e07593;
}

.top-right-mironet .dot {
  font-size: 14px;
  color: #fff;
  line-height: 0.6;
  margin-left: 2px;
  margin-top: 4px;
  transition: color 0.3s ease;
}

.top-right-mironet:hover .dot {
  color: #e07593;
}

/* ── Footer Socials (Other Pages) ── */
.site-footer {
  height: 150px;
  background: #e07593;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.footer-socials .social-icon {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Social icons ── */
.social-set {
  display: flex;
  gap: 10px;
}

.social-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--icon-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.5);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  background: rgba(224, 117, 147, 0.15);
  color: #e07593;
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

/* ── Gallery ── */
.gallery-main {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.columns-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0;
  
  position: absolute;
  top: -30vh;
  left: -30vw;
  width: 160vw;
  height: 160vh;
  
  transform: rotate(15deg);
  transform-origin: center center;
}

/* ── Each column ── */
.scroll-column {
  overflow: hidden;
  height: 100%;
  position: relative;
}

/* Fade edges top & bottom */
.scroll-column::before,
.scroll-column::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 2;
  pointer-events: none;
}

.scroll-column::before {
  top: 0;
  background: linear-gradient(to bottom, #ffffff 0%, transparent 100%);
}

.scroll-column::after {
  bottom: 0;
  background: linear-gradient(to top, #ffffff 0%, transparent 100%);
}

/* ── Scroll tracks ── */
.scroll-track {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  /* --speed set inline per column */
}

.scroll-track--down {
  animation: scroll-down var(--speed, 28s) linear infinite;
}

.scroll-track--up {
  animation: scroll-up var(--speed, 28s) linear infinite;
}

/* Column 1 & 3: top → bottom */
@keyframes scroll-down {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0%);  }
}

/* Column 2: bottom → top */
@keyframes scroll-up {
  from { transform: translateY(0%);  }
  to   { transform: translateY(-50%); }
}

/* ── Cards ── */
.scroll-card {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--card-radius);
  position: relative;
  background: #1a1a1a;
}

.scroll-card img {
  width: 100%;
  height: auto;
  display: block;
}

.card-hover-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: transparent;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.scroll-card:hover .card-hover-text {
  opacity: 1;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .scroll-track {
    animation: none;
  }

  .home-intro-char {
    animation: none;
    opacity: 1;
    transform: none;
  }

  body.home-page .menu-toggle,
  body.home-page .middle-left-text,
  body.home-page .top-right-text,
  body.home-page .bottom-right-socials,
  body.home-page .gallery-main {
    opacity: 1;
    animation: none;
  }
}

/* ── Responsive: single col on mobile ── */
@media (max-width: 480px) {
  .site-header {
    padding: 0 20px;
  }
}

/* ── About Page ── */
body.about-page {
  background: rgba(233, 153, 194, 0.3);
}

.about-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 80px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
  padding: 150px 150px 100px 150px;
}

.about-photo {
  flex: 1;
  max-width: 680px;
}

.about-photo img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(224, 117, 147, 0.4);
  display: block;
  margin-top: 40px;
}

.about-text {
  flex: 1;
  max-width: 680px;
  color: #e07593;
  font-size: 1.1rem;
  line-height: 1.75;
}

.about-text h1 {
  font-size: 32px;
  margin-top: 40px;
  margin-bottom: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e07593;
}

.about-text p {
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .about-container {
    padding: 100px 150px 100px 250px;
    gap: 50px;
  }
}

/* Phone / small tablet — About: image first, text below; compact header chrome */
@media (max-width: 768px) {
  .menu-toggle {
    top: max(clamp(28px, 7vw, 40px), calc(env(safe-area-inset-top, 0px) + 16px));
    left: clamp(12px, 3.5vw, 20px);
    width: 48px;
    height: 48px;
    gap: 9px;
    padding: 0 5px;
  }

  .menu-toggle span {
    height: 4px;
    border-radius: 3px;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
  }

  .top-right-mironet {
    top: max(clamp(24px, 6vw, 34px), calc(env(safe-area-inset-top, 0px) + 12px));
    right: clamp(12px, 3.5vw, 20px);
    font-size: clamp(1.2rem, 5.2vw, 1.45rem);
  }

  /* Size • to match the tittle of “i” in “mironet” (scales with logo text) */
  .top-right-mironet .dot {
    font-size: 0.34em;
    line-height: 0;
    margin-top: 0.32em;
    margin-left: 0.05em;
  }

  /* Fullscreen menu — phone-sized nav + socials */
  .fullscreen-menu .menu-content {
    gap: clamp(20px, 5.5vw, 32px);
    padding: clamp(16px, 5vw, 28px) clamp(18px, 5vw, 28px) max(24px, env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: min(420px, 100%);
    box-sizing: border-box;
  }

  .fullscreen-menu .logo {
    font-size: clamp(1.05rem, 4vw, 1.45rem);
    letter-spacing: 0.12em;
    line-height: 1.25;
    padding: 0 4px;
  }

  .fullscreen-menu .main-nav {
    gap: clamp(10px, 3vw, 16px);
  }

  .fullscreen-menu .nav-link {
    font-size: clamp(1.28rem, 4.8vw, 1.75rem);
    line-height: 1.2;
  }

  .fullscreen-menu .header-socials .social-set {
    gap: 10px;
  }

  .fullscreen-menu .header-socials .social-icon {
    width: 36px;
    height: 36px;
  }

  .fullscreen-menu .header-socials .social-icon svg {
    width: 17px;
    height: 17px;
  }

  /* Home (index): mironet• middle-left; intro copy top-right */
  .middle-left-text {
    top: 50%;
    left: max(clamp(16px, 5vw, 28px), env(safe-area-inset-left, 0px));
    right: auto;
    transform: translateY(-50%);
    font-size: clamp(2.35rem, 13vw, 4rem);
    font-weight: 700;
    align-items: flex-start;
    pointer-events: none;
    line-height: 1;
  }

  .middle-left-text .dot {
    font-size: 0.32em;
    line-height: 0;
    margin-top: 0.34em;
    margin-left: 0.05em;
  }

  .home-intro-logo {
    font-size: clamp(2.35rem, 13vw, 4rem);
    line-height: 1;
  }

  .home-intro-logo .dot {
    font-size: 0.32em;
    line-height: 0;
    margin-top: 0.34em;
    margin-left: 0.05em;
  }

  .top-right-text {
    top: max(clamp(28px, 7vw, 40px), calc(env(safe-area-inset-top, 0px) + 16px));
    right: max(clamp(14px, 4vw, 22px), env(safe-area-inset-right, 0px));
    left: auto;
    width: min(15.5em, 66vw);
    text-align: right;
    font-size: clamp(1.12rem, 4.9vw, 1.45rem);
    line-height: 1.35;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.2);
  }

  .top-right-text div:first-child {
    margin-bottom: 5px;
    font-weight: 500;
  }

  .bottom-right-socials {
    bottom: max(clamp(20px, 5vw, 36px), env(safe-area-inset-bottom, 0px));
    right: 50%;
    transform: translateX(50%);
  }

  .bottom-right-socials .social-icon {
    width: 36px;
    height: 36px;
  }

  .bottom-right-socials .social-icon svg {
    width: 17px;
    height: 17px;
  }

  body.about-page .about-container {
    flex-direction: column;
    align-items: stretch;
    padding: clamp(88px, 22vw, 120px) clamp(16px, 4vw, 24px) clamp(48px, 10vw, 72px);
    gap: clamp(20px, 5vw, 32px);
    min-height: auto;
  }

  body.about-page .about-photo {
    flex: none;
    order: 1;
    width: 100%;
    max-width: min(420px, 100%);
    margin-inline: auto;
  }

  body.about-page .about-photo img {
    margin-top: 0;
  }

  body.about-page .about-text {
    flex: none;
    order: 2;
    width: 100%;
  }

  body.about-page .about-text h1 {
    margin-top: 0;
    font-size: clamp(1.5rem, 5vw, 1.85rem);
  }

  body.about-page .about-text p {
    font-size: 1rem;
  }

  body.contact-page .contact-container {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: max(clamp(88px, 22vw, 120px), env(safe-area-inset-top, 0px));
    padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right, 0px));
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
    gap: clamp(24px, 6vw, 36px);
    min-height: auto;
  }

  body.contact-page .contact-left,
  body.contact-page .contact-right {
    max-width: none;
    width: 100%;
  }

  body.contact-page .contact-left p {
    font-size: clamp(0.95rem, 3.4vw, 1.08rem);
    margin-bottom: clamp(20px, 5vw, 32px);
  }

  body.contact-page .contact-info p {
    font-size: clamp(0.92rem, 3.2vw, 1rem);
    word-break: break-word;
  }

  body.contact-page .contact-right {
    padding: clamp(22px, 5vw, 36px);
    border-radius: clamp(14px, 3vw, 20px);
  }

  body.contact-page .contact-form {
    gap: clamp(18px, 4vw, 24px);
  }

  body.contact-page .contact-left h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    margin-bottom: 12px;
  }

  body.contact-page .form-group label {
    font-size: 0.9rem;
  }

  body.contact-page .form-group input,
  body.contact-page .form-group textarea {
    font-size: 16px;
    min-height: 48px;
    padding: 14px 14px;
  }

  body.contact-page .form-group textarea {
    min-height: 140px;
    resize: vertical;
  }

  body.contact-page .submit-btn {
    width: 100%;
    align-self: stretch;
    min-height: 48px;
    box-sizing: border-box;
  }

  .site-footer .footer-socials .social-icon {
    width: 36px;
    height: 36px;
  }

  .site-footer .footer-socials .social-icon svg {
    width: 17px;
    height: 17px;
  }
}

/* ── Contact Page ── */
body.contact-page {
  background: rgba(224, 117, 147, 0.3);
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
  padding: 150px 100px 100px 100px;
}

.contact-left {
  flex: 1;
  max-width: 500px;
}

.contact-left h1 {
  font-size: 4rem;
  font-weight: 700;
  color: #e07493;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.contact-left p {
  font-size: 1.15rem;
  color: #e07493;
  line-height: 1.6;
  margin-bottom: 40px;
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #e07593;
}

.contact-info strong {
  color: #000;
}

.contact-right {
  flex: 1;
  max-width: 600px;
  margin-top: clamp(20px, 3vw, 42px);
  background: #fff;
  padding: 60px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(224, 117, 147, 0.2);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: #111;
  background: #fdfdfd;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e07593;
  box-shadow: 0 0 0 4px rgba(224, 117, 147, 0.1);
}

.submit-btn {
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #e07593;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  align-self: flex-start;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #d06280;
  transform: translateY(-2px);
}

/* ── Portfolio Page ── */
body.portfolio-page {
  background: rgba(224, 117, 147, 0.3);
  /* One value: main padding + logo `right` stay on the same vertical line (incl. dot) */
  --portfolio-page-edge: 100px;
}

body.portfolio-page :is(h1, h2, h3, h4, h5, h6, p, a, span, strong, em, li) {
  color: #e07593;
}

body.portfolio-page .top-right-mironet,
body.portfolio-page .top-right-mironet .dot {
  color: #fff;
}

body.portfolio-page .top-right-mironet:hover,
body.portfolio-page .top-right-mironet:hover .dot {
  color: #e07593;
}

/* Fullscreen menu (all pages): page links pink, black on hover; MIHAELA MIRONET black, pink on hover */
.fullscreen-menu .nav-link {
  color: #e07593;
  font-weight: 700;
}

.fullscreen-menu .nav-link:hover {
  color: #000;
}

.fullscreen-menu .logo {
  color: #000;
}

.fullscreen-menu .logo:hover {
  color: #e07593;
}

.portfolio-main {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: 200px var(--portfolio-page-edge) 100px;
  overflow-x: hidden;
}

.portfolio-editorial {
  max-width: 1760px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(130px, 14vw, 240px);
}

.portfolio-editorial > .project-row {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

/* Desktop: explicit horizontal row — image + copy never stack until mobile breakpoint */
.project-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  /* Reference: wide editorial gutter ≈ 10–15% of row width */
  gap: 11%;
  width: 100%;
}

.project-row.project-row--reverse {
  flex-direction: row-reverse;
}

/* Editorial stagger — padding only */
.portfolio-editorial > .project-row:nth-child(1) {
  padding-right: clamp(0px, 3vw, 56px);
}

.portfolio-editorial > .project-row:nth-child(2) {
  padding-left: clamp(0px, 5vw, 88px);
}

.portfolio-editorial > .project-row:nth-child(3) {
  padding-right: clamp(0px, 2.5vw, 44px);
}

.portfolio-editorial > .project-row:nth-child(4) {
  padding-left: clamp(0px, 4vw, 72px);
}

.portfolio-editorial > .project-row:nth-child(5) {
  padding-right: clamp(0px, 3.5vw, 52px);
}

.project-row > a.project-image-link {
  flex: 0 1 58%;
  min-width: 0;
  align-self: center;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.project-row > a.project-image-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 2px;
}

.project-row > a.project-image-link:hover .project-image {
  opacity: 0.94;
}

.project-image {
  width: 100%;
  max-width: min(900px, 100%);
  min-width: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
  transition: opacity 0.25s ease;
}

a.project-heading-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.project-heading-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

a.project-heading-link:hover {
  opacity: 0.92;
}

.project-copy {
  flex: 0 1 auto;
  width: min(22rem, 100%);
  max-width: 22rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  color: #fff;
}

.project-row .project-copy {
  text-align: left;
}

.project-row.project-row--reverse .project-copy {
  text-align: right;
}

/* Portfolio scroll reveal: JS adds .is-revealed when row enters viewport */
body.portfolio-page .project-row:not(.is-revealed):not(.project-row--reverse) .project-image {
  opacity: 0;
  transform: translateX(clamp(-1.75rem, -6vw, -4rem));
}

body.portfolio-page .project-row:not(.is-revealed):not(.project-row--reverse) .project-copy {
  opacity: 0;
  transform: translateX(clamp(1.75rem, 6vw, 4rem));
}

body.portfolio-page .project-row--reverse:not(.is-revealed) .project-copy {
  opacity: 0;
  transform: translateX(clamp(-1.75rem, -6vw, -4rem));
}

body.portfolio-page .project-row--reverse:not(.is-revealed) .project-image {
  opacity: 0;
  transform: translateX(clamp(1.75rem, 6vw, 4rem));
}

body.portfolio-page .project-row.is-revealed .project-image,
body.portfolio-page .project-row.is-revealed .project-copy {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

body.portfolio-page .project-row:not(.project-row--reverse).is-revealed .project-copy {
  transition-delay: 0.12s;
}

body.portfolio-page .project-row--reverse.is-revealed .project-image {
  transition-delay: 0.12s;
}

.project-copy h2 {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #463f49;
}

.project-copy h2 + .project-category {
  margin-top: 0.35rem;
}

.project-category {
  font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #463f49;
  opacity: 1;
}

.project-subtitle {
  font-size: clamp(0.9375rem, 1.15vw, 1.125rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: #fff;
  opacity: 0.85;
}

.portfolio-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: fit-content;
  margin: clamp(48px, 8vw, 88px) 0 0 auto;
  padding-right: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.portfolio-page .portfolio-arrow:not(.is-revealed) {
  opacity: 0;
  transform: translateX(14px);
}

body.portfolio-page .portfolio-arrow.is-revealed {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-arrow::before {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

/* ── Portfolio project detail (single case study pages) ── */
body.project-detail-page .portfolio-main {
  padding-top: clamp(140px, 18vh, 200px);
}

.project-detail-inner {
  max-width: 920px;
  margin: 0 auto;
}

.project-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: clamp(0.85rem, 2.4vw, 1.5rem);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.project-detail-back:hover {
  opacity: 1;
}

.project-detail-hero {
  margin: 0 0 2.25rem;
}

.project-detail-hero img {
  width: 100%;
  max-height: min(72vh, 820px);
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.project-detail-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.65rem;
}

.project-detail-text .project-category {
  margin-bottom: 1.5rem;
}

.project-detail-text .project-detail-body {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.project-detail-text .project-detail-body p + p {
  margin-top: 1rem;
}

/* Social project page — stacked: heading, large image, description under image */
body.project-detail-page--social .project-detail-inner {
  max-width: min(1200px, 100%);
}

body.project-detail-page--social .project-detail-text--social-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

body.project-detail-page--social .project-detail-text--social-head .project-category {
  margin-bottom: 0;
}

body.project-detail-page--social .project-social-block {
  margin-bottom: clamp(3.25rem, 9vw, 5.5rem);
}

body.project-detail-page--social .project-social-block:last-of-type {
  margin-bottom: 0;
}

body.project-detail-page--social .project-social-block-heading {
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e07593;
  text-align: center;
  margin: clamp(1rem, 2.8vw, 1.5rem) 0 1rem;
}

body.project-detail-page--social .project-social-block-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  margin: clamp(1.25rem, 3.5vw, 1.75rem) 0 0;
}

body.project-detail-page--social .project-social-block-text p {
  margin: 0;
}

body.project-detail-page--social .project-social-block-text .project-social-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  transition: color 160ms ease;
}

body.project-detail-page--social .project-social-block-text .project-social-link:hover {
  color: #000;
}

body.project-detail-page--social .project-social-block-figure {
  margin: 0;
}

body.project-detail-page--social .project-social-block-figure img {
  width: 100%;
  max-width: 100%;
  max-height: min(82vh, 920px);
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 4px;
  object-fit: contain;
  object-position: center;
}

/* Motion project page — two full-width project case studies */
body.project-detail-page--motion .project-detail-inner {
  max-width: min(1200px, 100%);
}

body.project-detail-page--motion .project-detail-text--motion-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

body.project-detail-page--motion .project-detail-text--motion-head .project-category {
  margin-bottom: 0;
}

body.project-detail-page--motion .project-motion-block {
  margin-bottom: clamp(3.25rem, 9vw, 5.5rem);
}

body.project-detail-page--motion .project-motion-block:last-of-type {
  margin-bottom: 0;
}

body.project-detail-page--motion .project-motion-block-heading {
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e07593;
  text-align: center;
  margin: clamp(1rem, 2.8vw, 1.5rem) 0 1rem;
}

body.project-detail-page--motion .project-motion-block-figure {
  margin: 0;
}

body.project-detail-page--motion .project-motion-block-figure img,
body.project-detail-page--motion .project-motion-video {
  width: 100%;
  max-width: 100%;
  max-height: min(88vh, 980px);
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 4px;
  object-fit: contain;
  object-position: center;
}

body.project-detail-page--motion .project-motion-video {
  background: #000;
}

body.project-detail-page--motion .project-motion-video-link {
  display: block;
  text-decoration: none;
}

body.project-detail-page--motion .project-motion-block-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  margin: clamp(1.25rem, 3.5vw, 1.75rem) 0 0;
}

body.project-detail-page--motion .project-motion-block-text p {
  margin: 0;
}

body.project-detail-page--motion .project-motion-block-text p + p {
  margin-top: 1rem;
}

body.project-detail-page--motion .project-motion-block-text .motion-subheading {
  display: inline-block;
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* UX/UI page — Harvest N16 case study layout */
body.project-detail-page--ux .project-detail-inner {
  max-width: min(1200px, 100%);
}

body.project-detail-page--ux .project-detail-text--ux-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

body.project-detail-page--ux .project-detail-text--ux-head .project-category {
  margin-bottom: 0;
}

body.project-detail-page--ux .project-ux-block + .project-ux-block {
  margin-top: clamp(3rem, 8vw, 4.75rem);
}

body.project-detail-page--ux .project-ux-block-heading {
  text-align: center;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e07593;
  margin: 0 0 clamp(1rem, 2.8vw, 1.5rem);
}

body.project-detail-page--ux .project-ux-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(0.8rem, 2.6vw, 1.3rem);
  margin-bottom: clamp(1.5rem, 3.5vw, 2rem);
  max-width: min(980px, 100%);
  margin-inline: auto;
}

body.project-detail-page--ux .project-ux-gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}

body.project-detail-page--ux .project-ux-gallery-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: clamp(0.8rem, 2.6vw, 1.3rem);
}

body.project-detail-page--ux .project-ux-gallery-item img {
  width: 100%;
  display: block;
  height: clamp(170px, 22vw, 250px);
  object-fit: cover;
  object-position: center;
  transition: transform 180ms ease;
}

body.project-detail-page--ux .project-ux-gallery-item--main img {
  height: clamp(340px, 44vw, 510px);
}

body.project-detail-page--ux .project-ux-gallery-item:hover img {
  transform: scale(1.02);
}

body.project-detail-page--ux .project-ux-block-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
}

body.project-detail-page--ux .project-ux-block-text p {
  margin: 0;
}

body.project-detail-page--ux .project-ux-block-text p + p {
  margin-top: 1rem;
}

body.project-detail-page--ux .project-ux-block-text .ux-subheading {
  display: inline-block;
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.project-detail-page--ux .project-ux-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

body.project-detail-page--ux .project-ux-link:hover {
  color: #000;
}

body.project-detail-page--ux .project-ux-featured-media {
  margin: 0 0 clamp(1.4rem, 3.4vw, 1.9rem);
}

body.project-detail-page--ux .project-ux-featured-media .project-ux-gallery-item img {
  height: auto;
  max-height: min(72vh, 820px);
  object-fit: contain;
}

body.project-detail-page--ux .project-ux-duo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(0.8rem, 2.6vw, 1.3rem);
  margin-top: clamp(1.2rem, 3vw, 1.6rem);
}

body.project-detail-page--ux .project-ux-duo-grid .project-ux-gallery-item img {
  height: clamp(220px, 28vw, 330px);
}

body.project-detail-page--ux .project-ux-duo-grid .project-ux-gallery-item img.project-ux-image--no-crop {
  object-fit: contain;
}

/* Brand Identity page — case study blocks */
body.project-detail-page--brand .project-detail-inner {
  max-width: min(1200px, 100%);
}

body.project-detail-page--brand .project-detail-text--brand-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

body.project-detail-page--brand .project-detail-text--brand-head .project-category {
  margin-bottom: 0;
}

body.project-detail-page--brand .project-brand-block + .project-brand-block {
  margin-top: clamp(3rem, 8vw, 4.75rem);
}

body.project-detail-page--brand .project-brand-block-heading {
  text-align: center;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e07593;
  margin: 0 0 clamp(1rem, 2.8vw, 1.5rem);
}

body.project-detail-page--brand .project-brand-featured-media {
  margin: 0 0 clamp(1.4rem, 3.4vw, 1.9rem);
}

body.project-detail-page--brand .project-brand-gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}

body.project-detail-page--brand .project-brand-featured-media .project-brand-gallery-item img {
  width: 100%;
  height: auto;
  max-height: min(72vh, 820px);
  object-fit: contain;
  display: block;
}

body.project-detail-page--brand .project-brand-block-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
}

body.project-detail-page--brand .project-brand-block-text p {
  margin: 0;
}

body.project-detail-page--brand .project-brand-block-text p + p {
  margin-top: 1rem;
}

body.project-detail-page--brand .project-brand-block-text .brand-subheading {
  display: inline-block;
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.project-detail-page--brand .project-brand-duo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(1.2rem, 3vw, 1.6rem);
  box-sizing: border-box;
}

body.project-detail-page--brand .project-brand-duo-row .project-brand-gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

body.project-detail-page--brand .project-brand-duo-row .project-brand-gallery-item img {
  display: block;
  width: auto;
  max-width: min(520px, 48vw);
  height: auto;
  max-height: clamp(280px, 34vw, 420px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 180ms ease;
}

body.project-detail-page--brand .project-brand-duo-row .project-brand-gallery-item:hover img {
  transform: scale(1.02);
}

body.project-detail-page--brand .project-brand-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(900px, 100%);
  margin: 0 auto clamp(1.4rem, 3.4vw, 1.9rem);
  box-sizing: border-box;
  /* Nudge so the visual mass of the two images reads centered on the page */
  transform: translateX(-40px);
}

body.project-detail-page--brand .project-brand-split-grid .project-brand-gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

body.project-detail-page--brand .project-brand-split-grid .project-brand-gallery-item img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(260px, 34vw, 420px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 180ms ease;
}

body.project-detail-page--brand .project-brand-split-grid .project-brand-gallery-item img.project-brand-image--no-crop {
  object-fit: contain;
  object-position: center;
}

body.project-detail-page--brand .project-brand-split-grid .project-brand-gallery-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 840px) {
  body.project-detail-page--brand .project-brand-duo-row {
    flex-direction: column;
    width: 100%;
    max-width: min(520px, 100%);
  }

  body.project-detail-page--brand .project-brand-duo-row .project-brand-gallery-item img {
    max-width: 100%;
  }

  body.project-detail-page--brand .project-brand-split-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: min(520px, 100%);
    transform: none;
  }
}

.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.88);
  padding: clamp(1rem, 4vw, 2rem);
}

.site-lightbox.is-open {
  display: grid;
}

.site-lightbox-media {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.site-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.site-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.site-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.site-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.site-lightbox-nav--prev {
  left: 1rem;
}

.site-lightbox-nav--next {
  right: 1rem;
}

@media (max-width: 840px) {
  body.project-detail-page--ux .project-ux-gallery-grid {
    grid-template-columns: 1fr;
  }

  body.project-detail-page--ux .project-ux-duo-grid {
    grid-template-columns: 1fr;
  }

  body.project-detail-page--ux .project-ux-gallery-item--main img {
    height: clamp(280px, 58vw, 420px);
  }
}

/* "You may also like" — two related projects with hover overlay */
.project-related {
  margin-top: clamp(3.5rem, 9vw, 5.5rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.project-related-heading {
  text-align: center;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e07593;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.project-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3.5vw, 2.25rem);
  max-width: 880px;
  margin: 0 auto;
}

.project-related-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.project-related-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.project-related-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

.project-related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-related-card:hover .project-related-media img,
.project-related-card:focus-visible .project-related-media img {
  transform: scale(1.04);
}

.project-related-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.project-related-card:hover .project-related-overlay,
.project-related-card:focus-visible .project-related-overlay {
  opacity: 1;
}

.project-related-overlay-title {
  font-size: clamp(0.85rem, 1.9vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e07593;
  text-align: center;
  line-height: 1.35;
  max-width: 95%;
}

@media (max-width: 640px) {
  .project-related-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  body.project-detail-page .portfolio-main {
    padding-top: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.portfolio-page .project-row .project-image,
  body.portfolio-page .project-row .project-copy,
  body.portfolio-page .portfolio-arrow {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .portfolio-main {
    padding: 140px 6vw 100px;
  }

  .portfolio-editorial > .project-row:nth-child(n) {
    padding-left: 0;
    padding-right: 0;
  }

  .project-row,
  .project-row.project-row--reverse {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(22px, 4vw, 36px);
  }

  .project-row > a.project-image-link {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .project-image {
    width: 100%;
    max-width: none;
  }

  .project-copy {
    flex: 0 1 auto;
    max-width: none;
    text-align: left;
  }

  .project-row.project-row--reverse .project-copy {
    text-align: left;
  }

  .portfolio-arrow {
    margin-top: 40px;
  }
}
