/* =============================================================
   projects.css — Projects listing page styles
   Project accordion cards (.project-card), skeleton loading state,
   empty state, card header/body/tags, mobile responsive.
   Loaded via projects/index.njk.
   ============================================================= */

/* ---------- Intro / Hero ---------- */
.projects-intro {
  margin-top: 8rem;
  margin-bottom: 3rem;
  padding-top: 3rem;
  max-width: 1024px;
  min-height: 10vh;
  font-family: inherit;
  font-size: var(--font-size-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #000;
}

/* Subtitle line */
.projects-intro small {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  opacity: 0.65;
  font-weight: 400;
  color: #000;
}

/* ---------- Skeleton / Loading ---------- */
.projects-deck {
  position: relative;
  margin: 0;
  min-height: 20vh;
  padding: 0;
  border: none;
}

.skeleton-card {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
  padding: 3rem 4rem;
  border: 2px solid #000;
  background: #fff;
}

.skeleton-line {
  height: 2rem;
  border-radius: 4px;
  background: #eee;
  margin-bottom: 1.2rem;
}

.skeleton-line:first-child {
  width: 55%;
  height: 2.8rem;
}

.skeleton-line:last-child {
  width: 35%;
}

/* ---------- Error / Empty State ---------- */
.projects-deck .empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #000;
}

.projects-deck .empty-state .empty-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.projects-deck .empty-state p {
  font-size: var(--font-size-md);
  opacity: 0.7;
}

/* ---------- Project Accordion Item ---------- */
.project-card {
  border: 2px solid #000;
  margin-bottom: 0.5rem;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

/* Accordion header row */
.project-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 1.5rem;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
  pointer-events: none;
  gap: 1rem;
}

.project-card:hover .card-header {
  background: rgba(0,0,0,0.03);
}

.card-header-left {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  flex-wrap: wrap;
  pointer-events: none;
}

/* Title */
.project-card h3 {
  font-family: inherit;
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
  pointer-events: none;
  line-height: 1.2;
}

/* Year badge */
.card-year {
  font-family: var(--font-family);
  font-size: var(--font-size-xsm);
  opacity: 0.6;
  font-weight: 400;
  white-space: nowrap;
}

/* Status dot */
.card-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  flex-shrink: 0;
}

.card-status.wip {
  background: #000;
  opacity: 0.5;
}

/* Chevron / accordion icon */
.card-chevron {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 300;
  text-align: center;
}

.project-card.selected .card-chevron {
  transform: rotate(45deg);
}

/* ---------- Expandable Body (accordion panel) ---------- */
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  color: #000;
}

.project-card.selected {
  background: transparent;
}

.project-card.selected .card-body {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

/* Tagline in body */
.card-body .tagline {
  font-size: var(--font-size-md);
  margin: 1rem 0;
  line-height: 1.6;
  pointer-events: none;
  color: #000;
}

/* Description in body */
.card-body .description {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: 1.6rem;
  pointer-events: none;
  color: #000;
}

/* Tags row */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.card-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  font-size: var(--font-size-xsm);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
  color: #000;
}

/* Visit link */
.card-body .project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-md);
  color: #000;
  pointer-events: auto;
}

.card-body .project-link:hover {
  text-decoration: underline;
}

.card-body .project-link .link-arrow {
  display: inline-block;
}

/* ---------- Hover / Focus ---------- */
.project-card:focus-visible {
  outline: 3px solid #000;
  outline-offset: 4px;
  z-index: 15;
}

/* ---------- Mobile ---------- */
@media screen and (max-width: 768px) {
  .projects-intro {
    margin-top: 5rem;
    font-size: var(--font-size-lg);
  }

  .projects-deck {
    padding: 0;
  }

  .project-card {
    border: 2px solid #000;
  }

  .project-card .card-header {
    padding: 1rem 1.5rem;
  }

  .project-card h3 {
    font-size: var(--font-size-md);
  }

  .card-header {
    gap: 0.8rem;
  }

  .card-chevron {
    font-size: 1.4rem;
  }

  .card-body .tagline {
    font-size: var(--font-size-sm);
  }

  .card-body .description {
    font-size: var(--font-size-xsm);
  }
}
