/* Cards: modular project tiles and content panels. */

.rt-panel {
  border: var(--rt-border-sign) solid var(--rt-color-rail);
  background: var(--rt-color-surface);
}

.rt-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rt-space-4);
  padding: var(--rt-space-3) var(--rt-space-4);
  border-bottom: 1px solid var(--rt-color-line);
}

.rt-panel__title {
  margin: 0;
  font-size: var(--rt-text-title);
  line-height: var(--rt-leading-title);
}

.rt-panel__body {
  padding: var(--rt-space-4);
}

.rt-project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--rt-space-3);
}

.rt-project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-column: span var(--rt-card-span, 4);
  min-height: 13rem;
  border: var(--rt-border-sign) solid var(--rt-color-rail);
  background: var(--rt-color-surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--rt-duration-base) var(--rt-ease-sign), box-shadow var(--rt-duration-base) var(--rt-ease-sign);
}

.rt-project-card::before {
  height: 0.5rem;
  background: var(--rt-card-line, var(--rt-track-accent, var(--rt-v3-orange)));
  content: "";
}

.rt-project-card:hover {
  box-shadow: 6px 6px 0 var(--rt-color-rail);
  transform: translate(-3px, -3px);
}

.rt-project-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rt-space-3);
  padding: var(--rt-space-4) var(--rt-space-4) 0;
}

.rt-project-card__code {
  color: var(--rt-color-muted);
  font-family: var(--rt-font-data);
  font-size: var(--rt-text-small);
  font-weight: 600;
}

.rt-project-card__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  aspect-ratio: 1;
  background: var(--rt-card-line, var(--rt-track-accent, var(--rt-v3-orange)));
  color: var(--rt-card-on-line, var(--rt-track-accent-ink, var(--rt-v3-ink)));
}

.rt-project-card__body {
  padding: var(--rt-space-4);
}

.rt-project-card__title {
  margin: 0;
  font-size: var(--rt-text-title);
  line-height: var(--rt-leading-title);
}

.rt-project-card__desc {
  margin: var(--rt-space-2) 0 0;
  color: var(--rt-color-muted);
  font-size: var(--rt-text-small);
}

.rt-project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rt-space-3);
  padding: 0 var(--rt-space-4) var(--rt-space-4);
  color: var(--rt-color-muted);
  font-family: var(--rt-font-data);
  font-size: var(--rt-text-small);
}

.rt-project-card__arrow {
  font-size: 1.5rem;
  transform: rotate(90deg);
}

.rt-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rt-space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}

.rt-tag {
  border: 1px solid var(--rt-color-line);
  background: var(--rt-color-paper);
  padding: 0.125rem var(--rt-space-2);
  color: var(--rt-color-muted);
  font-size: var(--rt-text-small);
}

.rt-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--rt-space-3);
}

.rt-contact-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--rt-space-3);
  min-height: 5rem;
  border: var(--rt-border-sign) solid var(--rt-color-rail);
  background: var(--rt-color-surface);
  padding: var(--rt-space-3) var(--rt-space-4);
  color: inherit;
  text-decoration: none;
}

.rt-contact-card:hover {
  background: var(--rt-color-gate-yellow);
  color: var(--rt-v3-ink);
}

.rt-contact-card__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  aspect-ratio: 1;
  background: var(--rt-card-line, var(--rt-color-rail));
  color: #FFFFFF;
}

.rt-contact-card__name {
  font-weight: 700;
}

.rt-contact-card__value {
  display: block;
  color: var(--rt-color-muted);
  font-family: var(--rt-font-data);
  font-size: var(--rt-text-small);
}

.rt-contact-card:hover .rt-contact-card__value {
  color: var(--rt-v3-ink);
}

.rt-contact-card__arrow {
  font-size: 1.5rem;
}

@media (max-width: 900px) {
  .rt-project-card {
    grid-column: span 6;
  }
}

@media (max-width: 620px) {
  .rt-project-grid {
    grid-template-columns: 1fr;
  }

  .rt-project-card {
    grid-column: auto;
    min-height: 0;
  }

  .rt-project-card:hover {
    box-shadow: none;
    transform: none;
  }
}
