.project-intro {
  position: relative;
  z-index: 1;
  padding: clamp(10rem, 14vw, 13rem) max(clamp(1.5rem, 7vw, 8rem), calc((100vw - 87.5rem) / 2)) clamp(4.5rem, 7vw, 7rem);
  background: #fff;
  color: #111;
}

.project-intro-inner { width: 100%; max-width: 87.5rem; margin: 0 auto; }

.project-kicker {
  margin: 0 0 1rem;
  color: #666;
  font-size: 1.05rem;
  font-weight: 600;
}

.project-intro h1 {
  max-width: 75rem;
  margin: 0;
  font-size: 50px;
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.055em;
}

.project-intro-meta {
  display: flex;
  align-items: center;
  margin-top: clamp(.9rem, 1.5vw, 1.25rem);
}

.project-category {
  min-width: 10rem;
  padding-left: 1.4rem;
  border-left: 1px solid #ddd;
}

.project-category span,
.project-category strong { display: block; }
.project-category span { margin-bottom: .35rem; color: #999; font-size: .72rem; }
.project-category strong { font-size: 1.05rem; }

.project-tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.project-tags span { padding: .55rem .9rem; border-radius: 999px; background: #f2f2f2; color: #666; font-size: .75rem; }
.project-empty-space { min-height: 12svh; background: var(--page-bg, #fff); }

.detail-contact {
  display: flex;
  min-height: 82svh;
  padding: clamp(5rem, 10vw, 9rem) max(clamp(1.5rem, 7vw, 8rem), calc((100vw - 87.5rem) / 2)) clamp(2.5rem, 4vw, 4rem);
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  color: #111;
}

.detail-contact h2 {
  margin: clamp(4rem, 12vw, 9rem) 0;
  font-size: clamp(calc(3.6rem + 10px), calc(5vw + 10px), calc(6rem + 10px));
  font-weight: 560;
  line-height: .96;
  letter-spacing: -.06em;
}

.detail-contact-layout {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(3rem, 8vw, 8rem);
  padding-bottom: clamp(1rem, 2vw, 2rem);
}

.detail-contact-group { min-width: 0; }
.detail-contact-label { margin: 0 0 2rem; color: #aaa; font-size: 1rem; }
.detail-contact-lines { display: grid; gap: 1.15rem; }
.detail-contact-lines p { display: flex; align-items: baseline; gap: 1.25rem; margin: 0; font-size: 16px; }
.detail-contact-lines span { min-width: 5.5em; color: #666; }
.detail-contact-lines b { font-weight: 400; }
.detail-contact-lines a { position: relative; border-bottom: 1px solid rgba(18,18,18,.24); }

.detail-contact-lines a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: -.2rem;
  left: 0;
  height: 1px;
  background: currentColor;
  transition: right .3s ease;
}

.detail-contact-lines a:hover::after { right: 0; }

.detail-back-to-top {
  position: fixed;
  z-index: 24;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #121212;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .25s ease, background-color .25s ease;
}

.detail-back-to-top:hover { transform: translateY(-3px); background: #2d2d2d; }

@media (max-width: 700px) {
  .project-intro { padding-top: 8rem; padding-bottom: 4rem; }
  .project-intro h1 { font-size: clamp(2.25rem, 10vw, 3.125rem); }
  .project-intro-meta { align-items: flex-start; flex-direction: column; gap: 1.5rem; }
  .project-category { min-width: 0; }
  .detail-contact {
    min-height: auto;
    display: block;
    padding-top: clamp(4.5rem, 16vw, 7rem);
    padding-bottom: 3rem;
  }
  .detail-contact h2 {
    margin: 0 0 clamp(5rem, 20vw, 8rem);
    font-size: 40px;
    line-height: 1.08;
  }
  .detail-contact-layout { grid-template-columns: 1fr; gap: 4.5rem; padding-bottom: 1rem; }
  .detail-contact-label { margin-bottom: 1rem; font-size: 1rem; }
  .detail-contact-lines { gap: .8rem; }
  .detail-contact-lines p { display: grid; grid-template-columns: 5.25rem minmax(0,1fr); gap: .8rem; font-size: 15px; }
  .detail-contact-lines span { min-width: 0; }
  .detail-contact-lines a { width: fit-content; overflow-wrap: anywhere; }
  .detail-back-to-top { width: 3rem; height: 3rem; right: max(1rem, env(safe-area-inset-right,0px)); }
}
