/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-text: #1a1a2e;
  --color-muted: #555;
  --color-accent: #2a2a3e;
  --color-border: #e0e0e0;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header & Nav ── */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
}

/* ── Hero ── */
.hero {
  position: relative;
  height: 60vh;
  min-height: 350px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
}

.hero-text {
  color: #fff;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* ── Sections ── */
section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

/* ── Image Gallery Row ── */
.gallery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.gallery-row img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 4px;
}

/* ── Product Cards ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.product-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top;
}

.product-card-body {
  padding: 1.5rem;
}

.product-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-card-body p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.product-card-body a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── About Layout ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.about-grid img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.about-text p:first-child {
  color: var(--color-text);
  font-size: 1.05rem;
}

/* ── Dev Progress ── */
.progress-screenshots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.progress-screenshots img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* ── Prose (Privacy, Support, Software Projects) ── */
.prose {
  max-width: 750px;
}

.prose h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Quotes ── */
.quotes {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2.5rem;
  margin-top: 3rem;
}

.quotes h2 {
  margin-bottom: 1.5rem;
}

blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    height: 45vh;
    min-height: 250px;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .hero-overlay {
    padding: 1.5rem;
  }

  .gallery-row {
    grid-template-columns: 1fr;
  }

  .gallery-row img {
    height: 220px;
  }

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

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

  .about-grid img {
    height: 300px;
  }

  .progress-screenshots {
    grid-template-columns: 1fr;
  }

  section {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .quotes {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 1rem;
  }

  .hero-text h1 {
    font-size: 1.25rem;
  }

  .product-card img {
    height: 300px;
  }
}
