.projects-section {
  padding-top: 0;
}
.section-intro {
  max-width: 630px;
  color: var(--muted);
  font-size: 14px;
  margin: -12px 0 42px;
}
.project-collection {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}
.project-guardian {
  position: absolute;
  right: 25px;
  top: -55px;
  width: 84px;
  z-index: 3;
}
.project-guardian .chibi-button {
  width: 100%;
}
.project-guardian [data-character="hades"] {
  --action-color: #ffc57c;
  --action-glow: #e76d3c88;
}
.project-guardian [data-character="selene"] {
  --action-color: #c6f0ef;
  --action-glow: #9acbe688;
}
.project-grid {
  display: grid;
  gap: 24px;
}
.project-grid.is-multiple {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.project-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--night);
  overflow: hidden;
}
.project-card-link {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  height: 100%;
  color: var(--ink);
}
.project-card-link:hover {
  color: var(--ink);
}
.project-card-link:focus-visible {
  outline-offset: -5px;
}
.project-copy {
  padding: 32px;
  position: relative;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 21px;
}
.project-category {
  margin: 0;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--gold);
}
.project-status {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 8px;
}
.project-logo {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #000;
  border: 1px solid #5d5a43;
  margin-bottom: 18px;
}
.project-title {
  font-size: 31px;
  color: var(--ink);
  margin: 0 0 13px;
}
.project-description {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
}
.project-tags li {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 3px 8px;
}
.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: var(--mint);
  font-size: 12px;
  margin-top: 27px;
}
.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #555341, #101715 75%);
  min-height: 380px;
}
.project-visual::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid #c4ae7938;
  border-radius: 50%;
  box-shadow:
    0 0 0 22px #c4ae7908,
    0 0 0 44px #c4ae7905;
}
.project-visual::after {
  content: "";
  position: absolute;
  inset: 75% 0 0;
  background: linear-gradient(transparent, #101715);
  pointer-events: none;
}
.project-phones {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  padding: 35px 24px 10px;
}
.phone-frame {
  width: min(38%, 155px);
  padding: 5px;
  background: #171c1b;
  border: 1px solid #7d8170;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 30px #0006;
  transform: translateY(18px) rotate(-8deg);
  transition: transform 0.35s ease;
}
.phone-frame:nth-child(2) {
  transform: translateY(-10px) rotate(8deg);
}
.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}
.project-card-link:hover .phone-frame {
  transform: translateY(5px) rotate(-4deg);
}
.project-card-link:hover .phone-frame:nth-child(2) {
  transform: translateY(-20px) rotate(4deg);
}
.project-grid.is-multiple .project-card-link {
  display: flex;
  flex-direction: column;
}
.project-grid.is-multiple .project-visual {
  min-height: 300px;
  order: -1;
}
.project-see-more {
  margin-top: 25px;
}
.project-page {
  padding-top: 50px;
}
.page-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 45px;
}
.breadcrumb-link {
  color: var(--gold);
  font-size: 12px;
}
.project-page h1 {
  font-size: clamp(40px, 6vw, 72px);
  margin: 0 0 20px;
}
.project-page-lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 660px;
  margin-bottom: 32px;
}
.detail-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 50px;
  align-items: center;
}
.detail-logo {
  width: min(100%, 320px);
  aspect-ratio: 1;
  height: auto;
  background: #000;
  border: 1px solid #77704f;
  display: block;
  margin: auto;
  box-shadow: 12px 12px 0 #c4ae7912;
}
.repo-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 18px;
}
.detail-note {
  font-size: 11px;
  color: var(--muted);
  max-width: 540px;
}
.detail-section {
  padding-top: 65px;
}
.detail-section > h2 {
  margin-bottom: 25px;
}
.detail-section > p {
  max-width: 780px;
  color: var(--muted);
  font-size: 14px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-item {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.feature-number {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 2px;
}
.feature-item h3 {
  color: var(--ink);
  font-size: 17px;
  margin: 13px 0;
}
.feature-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.stack-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 0;
}
.stack-list div {
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.stack-list dt {
  color: var(--gold);
  font-family: var(--heading);
  margin-bottom: 12px;
}
.stack-list dd {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}
.screenshot-grid figure {
  margin: 0;
  min-width: 0;
}
.gallery-preview {
  display: block;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.gallery-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.gallery-expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 5px 10px;
  font-size: 11px;
  background: #17241bf2;
  color: #f7f5ef;
  border-radius: 3px;
}
.screenshot-grid figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.screenshot-grid figcaption strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 3px;
}
.screenshot-dialog {
  width: min(700px, 94vw);
  max-height: 94dvh;
  padding: 20px;
  border: 1px solid var(--gold);
  background: var(--night);
  color: var(--ink);
  overflow-y: auto;
}
.screenshot-dialog::backdrop {
  background: #030908d9;
  backdrop-filter: blur(6px);
}
.screenshot-dialog form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.screenshot-dialog img {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 68dvh;
  height: auto;
  margin: auto;
}
.screenshot-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.screenshot-caption {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.screenshot-dialog button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  font-size: 12px;
}
@media (max-width: 991.98px) {
  .project-copy {
    padding: 25px;
  }
  .project-collection {
    padding: 18px;
  }
  .detail-hero {
    gap: 30px;
  }
}
@media (max-width: 767.98px) {
  .project-card-link,
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .project-visual {
    min-height: 330px;
    order: -1;
  }
  .phone-frame {
    max-width: 125px;
  }
  .project-phones {
    padding-inline: 10px;
  }
  .project-copy {
    padding: 23px 20px;
  }
  .project-collection {
    padding: 12px;
  }
  .project-guardian {
    width: 70px;
    right: 10px;
    top: -47px;
  }
  .projects-section .section-intro {
    padding-right: 40px;
    margin-bottom: 48px;
  }
  .project-logo {
    width: 72px;
    height: 72px;
  }
  .project-page {
    padding-top: 32px;
  }
  .page-tools {
    margin-bottom: 32px;
  }
  .detail-logo {
    max-width: 240px;
  }
  .feature-grid,
  .stack-list {
    grid-template-columns: 1fr;
  }
  .detail-section {
    padding-top: 45px;
  }
  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 23px 14px;
  }
  .gallery-expand {
    font-size: 10px;
    right: 6px;
    bottom: 6px;
  }
  .screenshot-dialog {
    padding: 13px;
  }
}
html[data-motion="off"] .phone-frame {
  transition: none;
}
html[data-motion="off"] .project-card-link:hover .phone-frame {
  transform: translateY(18px) rotate(-8deg);
}
html[data-motion="off"] .project-card-link:hover .phone-frame:nth-child(2) {
  transform: translateY(-10px) rotate(8deg);
}
@media (prefers-reduced-motion: reduce) {
  .phone-frame {
    transition: none;
  }
  .project-card-link:hover .phone-frame {
    transform: translateY(18px) rotate(-8deg);
  }
  .project-card-link:hover .phone-frame:nth-child(2) {
    transform: translateY(-10px) rotate(8deg);
  }
}
@media print {
  .project-guardian,
  .project-visual,
  .page-tools,
  .gallery-expand,
  .screenshot-dialog {
    display: none !important;
  }
  .project-card-link {
    display: block;
  }
}
