.portfolio-section {
  display: block;
  padding-top: 110px;
  padding-bottom: 120px;
  background: #f6f5f0;
}

.work-top {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 9vw;
  align-items: end;
  margin-bottom: 72px;
}

.work-top h2 {
  font-size: clamp(48px, 6.5vw, 90px);
}

.work-note {
  max-width: 490px;
  margin: 0 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 17px;
}

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

.project-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.18, .75, .22, 1), border-color .3s ease, box-shadow .4s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--ink);
  box-shadow: 0 18px 40px rgba(17, 18, 15, .08);
}

.project-visual {
  height: auto;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 18, 15, .28);
}

.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.88) contrast(.98);
  transition: transform .65s cubic-bezier(.18, .75, .22, 1), filter .45s ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.025);
  filter: saturate(.98) contrast(1);
}

.project-visual > span {
  position: absolute;
  top: 18px;
  right: 22px;
  min-width: 35px;
  padding: 8px 9px 7px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(239, 238, 232, .45);
  font: 600 11px Manrope;
  text-align: center;
  z-index: 2;
}

.project-visual > small {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 7px 11px;
  border: 1px solid rgba(17, 18, 15, .45);
  background: rgba(246, 245, 240, .92);
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  z-index: 2;
}

.project-blue .project-visual { background: #cdd9fb; color: var(--blue); }
.project-orange .project-visual { background: #e9a187; color: #6b2410; }
.project-ink .project-visual { background: var(--ink); color: #efeee8; }
.project-paper .project-visual { background: #deddd6; color: var(--ink); }

.project-body {
  padding: clamp(25px, 3.2vw, 42px);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.project-meta small {
  font-size: 11px;
  color: #777971;
}

.project-body h3 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.08;
}

.project-body p {
  min-height: 56px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  direction: ltr;
}

.project-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  font: 500 10px Manrope;
  text-transform: uppercase;
  letter-spacing: .25px;
}

.project-details {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.project-details summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.project-details summary::-webkit-details-marker { display: none; }

.project-details summary b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font: 500 20px/1 Manrope;
  transition: transform .3s ease, background .3s ease, color .3s ease;
}

.project-details[open] summary b {
  transform: rotate(45deg);
  background: var(--ink);
  color: white;
}

.project-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0 20px;
}

.project-detail-grid small,
.project-delivery span {
  display: block;
  margin-bottom: 7px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
}

.project-detail-grid p {
  min-height: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.project-details ul {
  margin: 0;
  padding: 0 20px 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.project-details li {
  padding: 3px 0;
}

.project-delivery {
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}

.project-delivery b {
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 800px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .work-top {
    grid-template-columns: 1fr;
    gap: 35px;
    margin-bottom: 52px;
  }

  .work-note {
    max-width: 620px;
  }

  .project-visual {
    height: auto;
  }

  .project-body p {
    min-height: 0;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 460px) {
  .portfolio-section {
    padding-top: 78px;
    padding-bottom: 82px;
  }

  .portfolio-grid {
    gap: 18px;
  }

  .project-visual {
    height: auto;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .project-details summary {
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-visual img {
    transition: none;
  }
}
