/* Apps page — compact library cards that reuse portfolio tokens */

.apps-main {
  width: min(100% - 3rem, 1280px);
  margin: 0 auto;
}

.apps-hero {
  padding: clamp(2.75rem, 5vw, 4rem) 0 clamp(2.5rem, 4vw, 3.5rem);
}

.apps-hero .hero-kicker {
  margin: 0;
}

.apps-hero h1 {
  max-width: 820px;
  margin: 1rem 0 .75rem;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.apps-hero-intro {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.apps-section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-strong);
  scroll-margin-top: 1rem;
}

.apps-section > header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.apps-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.04em;
}

.apps-section > header > p {
  margin: 0;
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.app-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.app-card.is-featured {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(53, 104, 212, .08);
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid #dce2eb;
  color: var(--muted);
  font: .78rem "IBM Plex Mono", monospace;
}

.app-status {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #5ebc93;
}

.app-status[data-status="maintenance"] {
  background: #d4a017;
}

.app-status[data-status="archived"] {
  background: #9aa5b5;
}

.app-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .85rem;
  padding: 1.25rem;
}

.app-card-heading {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}

.app-monogram,
.app-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 11px;
}

.app-monogram {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--accent);
  font: 600 1rem Inter, "Helvetica Neue", Arial, sans-serif;
}

.app-icon {
  object-fit: cover;
  border: 1px solid rgba(23, 32, 51, .08);
  background: var(--surface-muted);
}

.app-card-heading > div {
  min-width: 0;
}

.app-card-heading > div > span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
}

.app-card h3 {
  margin: .2rem 0 0;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}

.app-card-body > p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.app-highlight {
  margin: 0;
  color: var(--accent);
  font: 500 .78rem "IBM Plex Mono", monospace;
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font: 500 .72rem "IBM Plex Mono", monospace;
}

.app-card-footer {
  margin-top: auto;
  padding-top: .35rem;
}

.app-card .project-link {
  margin-top: 0;
}

.app-card .project-note {
  margin: 0;
}

.app-card-props {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .75rem;
  padding: .9rem 1.25rem;
  border-top: 1px solid #dce2eb;
  background: var(--surface-muted);
  font-size: .8rem;
}

.app-card-props code {
  color: var(--accent);
  font: 500 .78rem "IBM Plex Mono", monospace;
  white-space: nowrap;
}

.app-card-props span {
  color: var(--muted);
}

.featured-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 640px;
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  text-decoration: none;
}

.apps-preview-cta {
  margin: 1.75rem 0 0;
}

.apps-cta-panel {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.apps-cta-panel p {
  margin: 0 0 .75rem;
  color: var(--muted);
}

@media (max-width: 950px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .apps-main {
    width: calc(100% - 2rem);
  }

  .apps-section {
    padding: 3.25rem 0;
  }

  .apps-section > header {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card-props {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
}
