/* Test-only card polish. Keep the floating glass material exclusive to navigation. */
#projects .project-grid { gap: 24px; }
#projects .project-card {
  padding: 28px;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 4px 18px rgba(22,32,44,.045), inset 0 1px 0 rgba(255,255,255,.65);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
html[data-theme="night"] #projects .project-card {
  box-shadow: 0 4px 18px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.035);
}
#projects .project-card > .project-media {
  margin: -28px -28px 26px;
  box-shadow: 0 1px 0 var(--line);
}
#projects .project-card .project-meta {
  margin: 0 0 12px;
  color: var(--blue-strong);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .035em;
}
#projects .project-card h3 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -.035em;
}
#projects .project-card .project-subtitle { margin-top: 9px; font-size: .94rem; line-height: 1.45; }
#projects .project-card > p:not(.project-meta),
#projects .project-card-wide > div > p:not(.project-meta) {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.7;
}
#projects .project-card .evidence-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
#projects .project-card:not(.project-card-wide) .evidence-links { padding-top: 24px; }
#projects .project-card .evidence-links a {
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  padding: 8px 10px;
  font-size: .8rem;
  line-height: 1.4;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--blue-strong);
  background: var(--blue-soft);
  border-radius: 12px;
}
#projects .project-card .evidence-links a:first-child {
  grid-column: 1 / -1;
  min-height: 48px;
  gap: 10px;
  padding: 10px 16px;
  color: var(--blue-strong);
  background: var(--blue-soft);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
}
#projects .project-card .evidence-links a:first-child::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
#projects .project-card .evidence-links a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
#projects .project-card:focus-within { border-color: var(--line-strong); }
#projects .project-card .evidence-tags {
  gap: 6px;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#projects .project-card .evidence-tags span {
  padding: 4px 8px;
  border-color: transparent;
  border-radius: 6px;
  background: var(--bg);
  font-size: .74rem;
  line-height: 1.5;
}
#projects .project-card-wide { gap: 32px; align-items: center; }
#projects .project-card-wide .evidence-links { display: flex; margin-top: 20px; }
#projects .project-card-wide > .evidence-tags { margin: 0; padding-top: 0; border-top: 0; }
@media (hover: hover) and (pointer: fine) {
  #projects .project-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(22,32,44,.085); }
  #projects .project-card .evidence-links a:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
}
@media (max-width: 640px) {
  #projects .project-grid { gap: 22px; }
  #projects .project-card { padding: 22px; }
  #projects .project-card > .project-media { margin: -22px -22px 22px; }
  #projects .project-card-wide { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  #projects .project-card { transition: none; }
}
@media (prefers-contrast: more) {
  #projects .project-card, #projects .project-card:hover, #projects .project-card:focus-within,
  #projects .project-card .evidence-tags span { border-color: currentColor; }
}
@media (forced-colors: active) {
  #projects .project-card .evidence-links a { border: 1px solid ButtonText; }
}
@media print {
  #projects .project-card { box-shadow: none; }
}

#projects .project-thumbnail-link { display:block; width:100%; height:100%; }
#projects .project-title-link { color:inherit; text-decoration:none; }
#projects .project-title-link:hover, #projects .project-title-link:active, #projects .project-title-link:focus { text-decoration:none; }
#projects .project-title-link:focus-visible { outline:3px solid var(--focus); outline-offset:4px; border-radius:4px; }
#projects .project-thumbnail-link:focus-visible { outline:3px solid var(--focus); outline-offset:-4px; }
/* Owner-supplied conceptual thumbnail; show the complete 16:9 image. */
#projects #shared-knowledge > .personal-ai-thumbnail {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
}
#projects #shared-knowledge .personal-ai-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
/* Personal AI action matches the 510px desktop width of KXSF and AI Output Review; shrinks to the container on narrow screens. */
#projects #shared-knowledge .evidence-links {
  display: grid;
  grid-template-columns: minmax(0, 510px);
  justify-content: start;
}
/* Approved destination badges: official Apple artwork and custom GitHub companion. */
#projects .project-card .evidence-links:has(.destination-badge) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 18px; }
@media (max-width: 360px) { #projects .project-card .evidence-links:has(.destination-badge) { column-gap: 12px; } }
#projects .project-card .evidence-links a.destination-badge { position:relative; justify-self:center; width:120px; min-height:44px; padding:0; border-radius:7px; background:transparent; color:#fff; isolation:isolate; }
#projects .official-store-badge { display:block; width:120px; height:40px; }
#projects .project-card .evidence-links a.github-badge { gap:8px; }
#projects .github-badge::before { content:""; position:absolute; inset:2px 0; z-index:-1; background:#000; border:1px solid #a6a6a6; border-radius:7px; }
#projects .github-mark { width:23px; height:23px; flex:none; }
#projects .github-label { display:grid; text-align:left; line-height:1.05; }
#projects .github-label small { font-size:9px; font-weight:500; }
#projects .github-label strong { font-size:19px; font-weight:600; letter-spacing:-.03em; margin-top:2px; }
@media (hover:hover) and (pointer:fine) { #projects .project-card .evidence-links a.store-badge:hover { box-shadow:none; } }
