/* Homepage only: hero + project grid. Uses design tokens from common.css. */

.section-hero {
  padding-top: 11rem;
  padding-bottom: var(--space-2);
}

.hero-content {
  grid-column: 1 / -1;
  max-width: var(--hero-max-width);
}

.hero-label {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-size-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.hero-headline {
  margin: 0;
  font-family: inherit;
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.section-projects {
  padding-bottom: var(--space-5rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: 1rem;
  min-width: 0;
}

.project-grid > * {
  grid-column: span 12;
}

@media (min-width: 48rem) {
  .project-grid > * {
    grid-column: span 6;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-subtle);
  margin-bottom: var(--space-2);
  transition: opacity 180ms ease;
  overflow: hidden;
  border-radius: 0.8rem;
}

.project-card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.project-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.project-year {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: 400;
  color: var(--color-light);
}

.project-year .meta-sep {
  display: inline-block;
  margin: 0 0.35rem;
}

.project-description {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--color-muted);
  line-height: var(--line-height-snug);
}

.project-category {
  font-size: var(--font-size-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.project-link {
    display: block;
    text-decoration: none;
    color: inherit;
  }
  
  .project-link:focus-visible {
    outline: 1px solid var(--color-text);
    outline-offset: 0.1875rem;
  }

  .project-link:hover .project-card-image,
  .project-link:focus-visible .project-card-image {
    opacity: 0.55;
  }

/* Mobile: home hero + project grid use full width (avoid 12-col + gap quirks on narrow viewports) */
@media (max-width: 50rem) {
  .section-hero {
    padding-top: 7rem;
  }

  section.section-hero > .grid-12,
  main.section-projects > .project-grid {
    display: flex;
    flex-direction: column;
    column-gap: 0;
    row-gap: var(--space-2);
    width: 100%;
    min-width: 0;
  }

  section.section-hero .hero-content {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  main.section-projects .project-grid > * {
    grid-column: unset;
    width: 100%;
    min-width: 0;
  }

  .hero-headline,
  .project-title {
    text-wrap: auto;
  }
}

/* Stacked card meta (year above title) up to 1300px */
@media (max-width: 81.25rem) {
  .project-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .project-year {
    order: -1;
  }
}

@media (max-width: 23.4375rem) {
  .section-hero {
    padding-top: 5.5rem;
    padding-bottom: var(--space-1);
  }

  .hero-headline {
    font-size: clamp(1.25rem, 5.2vw, 1.625rem);
  }

  .project-year {
    flex-shrink: 1;
    max-width: 100%;
  }

  .project-year .meta-sep {
    margin: 0 0.25rem;
  }

  .section-projects {
    padding-bottom: var(--space-4);
  }
}