/* Homepage composition; colors follow the active site theme. */
.home-hero .hero-inner {
  padding-block: clamp(24px, 3vw, 40px);
}

.home-hero-copy {
  min-width: 0;
  max-width: 940px;
  margin-inline: auto;
  padding: clamp(20px, 2.5vw, 32px);
  text-align: center;
}

.home-eyebrow {
  color: var(--color-brand);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .04em;
}

.home-hero .hero-title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.12;
  max-width: 30ch;
  margin-inline: auto;
}

.home-hero .hero-sub {
  max-width: 65ch;
  margin-inline: auto;
  text-align: center;
}

.home-actions {
  justify-content: center;
}

.home-price-note {
  margin-bottom: 0;
  color: var(--color-muted-strong);
  font-size: var(--text-sm);
}

.home-work-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  min-width: 0;
  max-width: 700px;
  margin-inline: auto;
  justify-items: center;
}

.home-work-section {
  padding-top: var(--space-6);
}

#main-content a.home-project {
  display: block;
  width: 100%;
  max-width: 340px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  color: var(--color-fg);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s ease;
}

#main-content a.home-project:hover {
  border-color: var(--color-brand);
  color: var(--color-fg);
}

.home-project:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 4px;
}

.home-project img {
  display: block;
  width: calc(100% - 20px);
  height: auto;
  margin: 10px 10px 0;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 4px);
}

.home-project-caption {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
}

.home-project-caption > span {
  color: var(--color-brand);
  font-size: var(--text-sm);
  text-decoration: underline;
}

@media (min-width: 640px) {
  .home-work-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-content a.home-project { transition: none; }
}

/* Theme-based hero image swap: show light by default, dark in dark mode */
.hero-bg .hero-img--dark { display: none; }
html[data-theme="dark"] .hero-bg .hero-img--light { display: none; }
html[data-theme="dark"] .hero-bg .hero-img--dark { display: block; }

/* Bottom sections side-by-side on home page */
.bottom-sections {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 768px) {
  .bottom-sections {
    grid-template-columns: 1fr 1fr;
  }
}
