.project-detail-body {
  background: #f2f2f2;
}

.project-hero {
  padding: 14px 0 48px;
}

.project-hero-container {
  width: min(calc(100% - 80px), 1720px);
}

.project-hero-card {
  position: relative;
  min-height: clamp(420px, 38vw, 680px);
  border-radius: 30px;
  overflow: hidden;
}

.project-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.68) brightness(0.88);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(22, 17, 14, 0.72) 0%, rgba(22, 17, 14, 0.15) 56%, rgba(22, 17, 14, 0.06) 100%),
    linear-gradient(90deg, rgba(22, 17, 14, 0.62) 0%, rgba(22, 17, 14, 0.2) 46%, rgba(22, 17, 14, 0) 76%);
}

.project-hero-content {
  position: absolute;
  left: clamp(24px, 4vw, 86px);
  right: clamp(24px, 4vw, 86px);
  bottom: clamp(26px, 4.2vw, 76px);
  z-index: 2;
  color: #ffffff;
  max-width: min(68vw, 980px);
}

.project-hero-tags {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.project-tag {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.project-tag-accent {
  background: #fa7676;
  color: #ffffff;
}

.project-tag-muted {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.project-hero-content h1 {
  margin-top: 24px;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: var(--fw-title);
}

.project-hero-content p {
  margin-top: 20px;
  max-width: min(60vw, 860px);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(20px, 1.55vw, 32px);
  line-height: 1.38;
}

@media (max-width: 980px) {
  .project-hero {
    padding: 8px 0 38px;
  }

  .project-hero-container {
    width: min(calc(100% - 32px), 1720px);
  }

  .project-hero-card {
    min-height: 500px;
    border-radius: 22px;
  }

  .project-tag {
    font-size: 13px;
    min-height: 30px;
    padding: 0 12px;
  }

  .project-hero-content h1 {
    font-size: clamp(36px, 8vw, 64px);
  }

  .project-hero-content p {
    max-width: 100%;
    font-size: clamp(17px, 3.6vw, 23px);
  }
}

.project-overview {
  padding: 34px 0 86px;
}

.project-overview-container {
  width: min(calc(100% - 80px), 1020px);
}

.project-overview h2 {
  color: var(--text);
  font-size: var(--fs-section-title);
  line-height: 1.02;
  letter-spacing: var(--ls-title);
  font-weight: var(--fw-title);
}

.overview-row {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f0e3e3;
  display: grid;
  grid-template-columns: minmax(180px, 0.54fr) minmax(0, 1.65fr);
  gap: 22px 26px;
}

.overview-label {
  color: #fa7676;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  font-weight: var(--fw-label);
}

.overview-content p {
  color: var(--text-muted);
  font-size: clamp(14px, 1vw, 18px);
  line-height: var(--lh-body);
  font-weight: 400;
}

.overview-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 26px;
}

.overview-result h3 {
  color: var(--text);
  font-size: clamp(46px, 3.5vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: var(--fw-title);
}

.overview-result p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: var(--fs-body);
  line-height: 1.24;
}

@media (max-width: 980px) {
  .project-overview {
    padding: 16px 0 64px;
  }

  .project-overview-container {
    width: min(calc(100% - 32px), 1020px);
  }

  .overview-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-content p {
    font-size: clamp(17px, 4.4vw, 23px);
  }

  .overview-results {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .overview-result h3 {
    font-size: clamp(40px, 9vw, 58px);
  }
}

.project-gallery {
  padding: 0 0 90px;
}

.project-gallery-container {
  width: min(calc(100% - 80px), 1720px);
}

.project-gallery-main {
  margin: 0;
  border-radius: 34px;
  overflow: hidden;
}

.project-gallery-main img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-gallery-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-gallery-item {
  margin: 0;
  border-radius: 30px;
  overflow: hidden;
  min-height: clamp(260px, 26vw, 450px);
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 980px) {
  .project-gallery {
    padding: 0 0 62px;
  }

  .project-gallery-container {
    width: min(calc(100% - 32px), 1720px);
  }

  .project-gallery-main {
    border-radius: 22px;
    min-height: 260px;
  }

  .project-gallery-grid {
    margin-top: 14px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-gallery-item {
    border-radius: 20px;
    min-height: 220px;
  }
}

/* --- Project page additions --- */
.project-hero-content h1 {
  font-weight: var(--fw-display);
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #16090b;
  font-size: 15px;
  font-weight: var(--fw-label);
  letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.3s ease;
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  background: #fff4f4;
}

.project-link-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.project-link-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.project-link svg {
  transition: transform 0.35s var(--ease-out);
}

.project-link:hover svg {
  transform: translate(3px, -3px);
}

.overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.overview-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #f0e3e3;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: var(--fw-label);
  letter-spacing: 0.04em;
}

.overview-content ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overview-content li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: clamp(14px, 1vw, 18px);
  line-height: var(--lh-body);
}

.overview-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.project-gallery-caption {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: var(--fs-caption);
  letter-spacing: 0.02em;
  text-align: center;
}

.project-gallery-item--mobile {
  background: #ebe5e0;
  display: grid;
  place-items: start center;
  padding: 28px 0 0;
}

.project-gallery-item--mobile img {
  width: min(62%, 320px);
  height: auto;
  object-fit: contain;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 24px 48px rgba(44, 34, 34, 0.18);
}

.project-gallery-item--mobile.project-gallery-item--mobile-tall img {
  width: min(62%, 320px);
}

.project-next {
  padding: 0 0 100px;
}

.project-next-container {
  width: min(calc(100% - 80px), 1020px);
}

.project-next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 40px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #f0e3e3;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.project-next-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(44, 34, 34, 0.10);
}

.project-next-label {
  color: var(--primary);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

.project-next-card h3 {
  margin-top: 8px;
  color: var(--text);
  font-size: var(--fs-card-title);
  letter-spacing: var(--ls-title);
  font-weight: var(--fw-title);
}

.project-next-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #dde0e6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #181112;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.4s var(--ease-out);
}

.project-next-card:hover .project-next-arrow {
  background: #f2767c;
  border-color: #f2767c;
  color: #ffffff;
  transform: translateX(4px);
}

@media (max-width: 980px) {
  .project-next {
    padding: 0 0 64px;
  }

  .project-next-container {
    width: min(calc(100% - 32px), 1020px);
  }

  .project-next-card {
    padding: 24px;
    border-radius: 20px;
  }

  .project-gallery-item--mobile img {
    width: min(70%, 300px);
  }
}

.project-hero-image {
  filter: saturate(0.9) brightness(0.8);
}

/* --- Two-column hero with framed screenshot --- */
.project-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: 0;
  padding: clamp(28px, 4.2vw, 72px);
  background:
    radial-gradient(circle at 12% 18%, rgba(250, 118, 118, 0.18), transparent 42%),
    linear-gradient(135deg, #1c090c 0%, #120305 100%);
}

.project-hero-content {
  position: static;
  max-width: none;
}

.project-hero-content h1 {
  margin-top: 22px;
  font-size: clamp(34px, 3.4vw, 58px);
  line-height: 1.04;
}

.project-hero-content p {
  max-width: 560px;
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.5;
}

.project-tag {
  font-size: 13px;
  min-height: 30px;
  padding: 0 12px;
}

.project-hero-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #2a211d;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(0);
  transition: transform 0.6s var(--ease-out);
}

.project-hero-card:hover .project-hero-frame {
  transform: translateY(-6px);
}

.project-hero-frame-bar {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: #3a2f2a;
}

.project-hero-frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.project-hero-frame-bar span:nth-child(1) { background: #fa7676; }
.project-hero-frame-bar span:nth-child(2) { background: #f5c56b; }
.project-hero-frame-bar span:nth-child(3) { background: #7fd1a1; }

.project-hero-frame .project-hero-image {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}

@media (max-width: 980px) {
  .project-hero-card {
    grid-template-columns: 1fr;
    padding: 24px 20px 20px;
    gap: 26px;
  }

  .project-hero-content h1 {
    font-size: clamp(30px, 7vw, 44px);
  }

  .project-hero-content p {
    font-size: 16px;
  }

  .project-hero-frame {
    border-radius: 14px;
  }
}

.project-gallery-item {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.project-gallery-main {
  min-height: 0;
}



/* --- App projects: the hero frame is a screenshot composition, not a browser window --- */
.project-hero-frame--app {
  background: transparent;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.project-hero-frame--app .project-hero-frame-bar {
  display: none;
}

.project-gallery-item--flat {
  background: #ebe5e0;
}

.project-gallery-item--flat img {
  object-fit: contain;
}
