/* ============================================================
   Base reset & typography
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:        #fafafa;
  --color-surface:   #ffffff;
  --color-text:      #1a1a1a;
  --color-muted:     #666666;
  --color-accent:    #0066cc;
  --color-border:    #e0e0e0;
  --font-sans:       system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:       ui-monospace, "SF Mono", Menlo, monospace;
  --radius:          8px;
  --max-width:       860px;
  --spacing:         1.5rem;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ============================================================
   Layout
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.site-title a {
  color: var(--color-text);
  text-decoration: none;
}

.site-tagline {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) var(--spacing);
}

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

/* ============================================================
   Now page sections
   ============================================================ */
.now-section {
  margin-bottom: calc(var(--spacing) * 2.5);
}

.now-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin-bottom: var(--spacing);
}

.now-section p,
.now-section li {
  margin-bottom: 0.6rem;
}

.now-section ul,
.now-section ol {
  padding-left: 1.4rem;
}

/* ============================================================
   iPhone landscape photo grid
   iPhone landscape: 4032 × 3024 px  →  approx 4:3 ratio
   (iPhone 12+ wide camera is 16:9; classic Photo mode is 4:3)
   The grid adapts from 1 → 2 → 3 columns.
   ============================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: var(--spacing);
}

.photo-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-border);
  /* Enforce landscape aspect ratio (4:3) */
  aspect-ratio: 4 / 3;
}

.photo-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: var(--radius);
}

.photo-grid figure:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

.photo-grid figcaption {
  font-size: 0.8rem;
  color: var(--color-muted);
  padding: 0.35rem 0.5rem;
  font-style: italic;
  line-height: 1.3;
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-title {
    font-size: 1.6rem;
  }

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