/* ================================================================
   LAYOUT — Container, page sections, responsive grids
   ================================================================ */

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

@media (max-width: 640px) {
  .container { padding: 0 var(--sp-4); }
}

/* ── Sections ───────────────────────────────────────────────── */
/*
  Padding scales from 2.5rem (40px) on small screens up to 5rem (80px)
  on wide screens, proportional to viewport width in between.
*/
.section {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  scroll-margin-top: 60px; /* offset for fixed nav */
}

.section__header {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.section__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section__notice {
  margin-top: var(--sp-3);
  font-size: 0.8rem;
  color: var(--text-faint);
  max-width: 520px;
  line-height: 1.6;
}

.section__notice a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}

.section__notice a:hover {
  color: var(--text);
}

/* ── Projects grid ──────────────────────────────────────────── */
/*
  Add a project: edit js/data/projects.js
  Grid is 3 columns on desktop, 2 on tablet, 1 on mobile
*/
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ── Gallery grid (CSS columns masonry) ─────────────────────── */
/*
  Add a photo: edit js/data/photos.js
  Layout uses CSS columns for a masonry-like feel
*/
.gallery-grid {
  columns: 3;
  column-gap: var(--sp-3);
}

.gallery-grid .gallery-item {
  break-inside: avoid;
  margin-bottom: var(--sp-3);
}

@media (max-width: 900px) {
  .gallery-grid { columns: 2; }
}

@media (max-width: 580px) {
  .gallery-grid { columns: 1; }
}

.gallery-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--sp-8) 0;
}
