/* Overall look: light, neutral, professional. No animations or motion effects. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #22262a;
  background: #fafaf8;
  line-height: 1.55;
}

/* Homepage header: name + intro, larger treatment since it's the whole homepage */
.site-header {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

/* Avatar photo (top-left) next to the name and intro */
.header-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.avatar-photo {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e3e2dd;
}

.header-text {
  min-width: 0;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 600;
}

/* A specific photo on the homepage, shown below the intro */
.king-photo {
  margin: 2rem 0 0;
}

.king-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e3e2dd;
}

.king-photo figcaption {
  margin: 0.5rem 0 0;
}

/* Hobby-page header: small, just a link back to the homepage */
.page-header {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.page-header a {
  color: #3a3f44;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.page-header a:hover,
.page-header a:focus {
  text-decoration: underline;
}

/* Nav bar with a link to every hobby page, present on every page */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border-top: 1px solid #e3e2dd;
  border-bottom: 1px solid #e3e2dd;
}

.site-nav a {
  color: #3a3f44;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus {
  text-decoration: underline;
}

.site-nav a.active {
  color: #14532d;
  text-decoration: underline;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hobby page content wrapper */
.hobby {
  padding: 2.5rem 0 3rem;
}

.hobby h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

/* Optional quick-jump list to subsections, shown on pages with several of them */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.quick-links a {
  color: #3a3f44;
}

.subsection {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e3e2dd;
}

.subsection:first-of-type {
  border-top: none;
  padding-top: 0;
}

.subsection h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #3a3f44;
  scroll-margin-top: 4.5rem;
}

/* Body copy (class name is a holdover from when this text was unwritten
   placeholder content; the site is fully written now, so it's styled as
   normal, full-contrast text rather than a "fill this in" gray italic) */
.placeholder {
  color: #22262a;
  margin: 0 0 0.5rem;
}

/* Photo grid: responsive, collapses to a single column on narrow phones.
   align-items: start keeps each photo at its own natural height instead of
   stretching to match the tallest photo in its row. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-items: start;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e3e2dd;
  background: #f0efec;
}

/* Two standard display sizes, chosen automatically by each photo's original
   orientation (see resize-photos.ps1), so portrait photos stay portrait and
   landscape photos stay landscape instead of all being cropped the same way. */
.photo-grid img.landscape {
  aspect-ratio: 4 / 3;
}

.photo-grid img.portrait {
  aspect-ratio: 3 / 4;
}

/* Stacked photos with a paragraph of text between each one, instead of a grid.
   Used where there's a note about every individual photo. */
.photo-list {
  margin-top: 0.75rem;
}

.photo-list figure {
  margin: 2rem 0 0;
}

.photo-list figure:first-child {
  margin-top: 0;
}

.photo-list img {
  display: block;
  width: 100%;
  max-width: 380px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e3e2dd;
  background: #f0efec;
}

.photo-list img.landscape {
  aspect-ratio: 4 / 3;
}

.photo-list img.portrait {
  aspect-ratio: 3 / 4;
}

.photo-list p {
  max-width: 380px;
  margin: 0.5rem 0 0;
}

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
}

.site-footer a {
  color: #3a3f44;
  font-size: 0.9rem;
}

/* Phones: tighter spacing, smaller headings, two photos per row minimum */
@media (max-width: 480px) {
  .site-header {
    padding: 2rem 1rem 1rem;
  }

  .site-header h1 {
    font-size: 1.6rem;
  }

  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .avatar-photo {
    width: 96px;
    height: 96px;
  }

  .hobby {
    padding: 1.75rem 0 2.5rem;
  }

  .hobby h1 {
    font-size: 1.4rem;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .site-nav {
    gap: 0.2rem 0.9rem;
  }

  .site-nav a {
    font-size: 0.85rem;
  }
}
