:root {
  --brand-bg: #f5f5f7;
  --brand-surface: #ffffff;
  --brand-text: #1d1d1f;
  --brand-muted: #6e6e73;
  --brand-muted-low: #86868b;
  --brand-border: rgba(0, 0, 0, 0.08);
  --brand-border-soft: rgba(0, 0, 0, 0.055);
  --brand-max: 1180px;
}

.portfolio-detail-page,
.portfolio-detail-page * {
  letter-spacing: 0;
}

.portfolio-detail-page {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  overflow-x: hidden;
}

.portfolio-detail-page .site-header,
.portfolio-detail-page .header-shell,
.portfolio-detail-page .header-inner,
.portfolio-detail-page .brand {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.portfolio-detail-page .brand img {
  filter: brightness(0);
}

.portfolio-detail-page .menu-toggle span {
  background: #1d1d1f;
}

.brand-project-main {
  width: 100%;
  background: var(--brand-bg);
}

.brand-project-hero {
  min-height: 78vh;
  padding: 148px 24px 72px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 0, 0, 0.05), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.brand-project-hero-image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 245, 247, 0.96)),
    var(--brand-image);
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  filter: saturate(0.9) contrast(1.02);
}

.brand-project-hero-inner {
  width: min(100%, var(--brand-max));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.brand-back-link {
  width: fit-content;
  min-height: 36px;
  margin-bottom: 42px;
  padding: 0 14px;
  border: 1px solid var(--brand-border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 560;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.brand-back-link:hover {
  background: #ffffff;
  color: var(--brand-text);
  transform: translateY(-1px);
}

.brand-project-eyebrow,
.brand-projects-heading p {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
  color: var(--brand-muted-low);
  text-transform: uppercase;
}

.brand-project-hero h1 {
  width: max-content;
  max-width: none;
  margin: 0;
  font-size: clamp(32px, 6.4vw, 108px);
  line-height: 0.92;
  font-weight: 720;
  color: var(--brand-text);
  letter-spacing: -0.058em;
  white-space: nowrap;
}

.brand-project-hero p:not(.brand-project-eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.55;
  color: var(--brand-muted);
}

.brand-projects-section {
  width: min(calc(100% - 48px), var(--brand-max));
  margin: 0 auto;
  padding: 76px 0 90px;
}

.brand-projects-heading {
  margin-bottom: 26px;
}

.brand-projects-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1;
  font-weight: 660;
  color: var(--brand-text);
}

.brand-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.brand-project-card {
  min-height: 420px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--brand-border-soft);
  background: #e9e9ec;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.brand-project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54)),
    var(--project-cover);
  background-size: cover;
  background-position: center;
  z-index: -2;
  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
}

.brand-project-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 64%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  z-index: -1;
}

.brand-project-card:hover::before {
  transform: scale(1.04);
}

.brand-project-card-content {
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.brand-project-card-content span {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1;
  font-weight: 680;
  color: rgba(255, 255, 255, 0.74);
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-project-card-content h2,
.brand-project-card-content h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  font-weight: 660;
  color: #ffffff;
}

.brand-project-card-content p {
  max-width: 460px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.82);
}

.brand-project-footer {
  width: min(calc(100% - 48px), var(--brand-max));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--brand-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-project-footer p,
.brand-project-footer span {
  margin: 0;
  font-size: 13px;
  color: var(--brand-muted-low);
}

@media (max-width: 920px) {
  .brand-project-hero {
    min-height: 68vh;
    padding: 128px 18px 58px;
  }

  .brand-project-hero h1 {
    font-size: clamp(22px, 6vw, 52px);
    letter-spacing: -0.052em;
  }

  .brand-projects-section,
  .brand-project-footer {
    width: calc(100% - 36px);
  }

  .brand-projects-grid {
    grid-template-columns: 1fr;
  }

  .brand-project-card {
    min-height: 360px;
    padding: 24px;
    border-radius: 26px;
  }

  .brand-project-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-projects-section,
  .brand-project-footer {
    width: calc(100% - 28px);
  }

  .brand-project-hero h1 {
    font-size: clamp(18px, 5.6vw, 32px);
    letter-spacing: -0.048em;
  }

  .brand-project-card {
    min-height: 320px;
    padding: 22px;
  }

  .brand-project-card-content h2,
  .brand-project-card-content h3 {
    font-size: 28px;
  }

  .brand-project-card-content p {
    font-size: 14px;
  }
}