/* patrickgaffney.studio — hand-coded HTML feel, intentionally */

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 15px;
  line-height: 1.6;
  color: #111;
  background: #ffffff;
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Wider container used by the Selected Work gallery on the Photography page,
   so images extend past the 720px text column on desktop. */
.wrap-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px;
  box-sizing: border-box;
}
/* When .wrap-wide is sandwiched between two .wrap divs, tighten the vertical
   gap so the gallery flows naturally instead of having double padding. */
.wrap + .wrap-wide { padding-top: 0; }
.wrap-wide + .wrap { padding-top: 20px; }
/* And tighten the top .wrap's bottom padding so the gallery sits closer to
   the page heading. */
.wrap:has(+ .wrap-wide) { padding-bottom: 0; }
.wrap-wide .gallery { margin-top: 1.5em; }

/* Headings */
h1, h2, h3 {
  font-family: inherit;
  font-weight: 400;
  margin: 0 0 0.6em 0;
}
h1 { font-size: 19px; }
h2 { font-size: 17px; margin-top: 1.6em; }
h3 { font-size: 15px; font-style: italic; }

p { margin: 0 0 1em 0; }

/* Links */
a, a:visited {
  color: #1f3a93;
  text-decoration: underline;
}
a:hover, a:focus { color: #666666; }

/* Top navigation — non-home pages */
.topnav {
  font-size: 14px;
  margin-bottom: 28px;
}
.topnav a { margin-right: 2px; }
.topnav a[aria-current="page"] {
  color: #111;
  text-decoration: none;
  font-style: italic;
}
.topnav .sep { color: #999999; margin: 0 4px; }

/* Dividers */
hr {
  border: none;
  border-top: 1px dotted #dddddd;
  margin: 1.4em 0;
}
.rule-text {
  color: #999999;
  letter-spacing: 4px;
  font-size: 14px;
  text-align: center;
  margin: 1.6em 0;
  user-select: none;
}

/* Footer */
.foot {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px dotted #dddddd;
  font-style: italic;
  color: #666666;
  font-size: 13px;
}
.foot a { color: #666666; }

/* Homepage */
.home {
  text-align: left;
  padding-top: 90px;
}
.home h1 {
  font-size: 22px;
  font-style: italic;
  margin-bottom: 0.4em;
}
.home .intro {
  margin-bottom: 1.6em;
}
.home .links {
  margin: 1em 0;
}
.home .contact {
  margin-top: 5em;
  font-style: italic;
  color: #666666;
  font-size: 13px;
}

/* Music page */
.filter {
  font-size: 14px;
  margin: 0.6em 0 1.4em;
  color: #666666;
}
.filter button {
  font: inherit;
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #1f3a93;
  text-decoration: underline;
  cursor: pointer;
}
.filter button:hover { color: #666666; }
.filter button.active {
  color: #111;
  text-decoration: none;
  font-style: italic;
}
.filter .sep { color: #999999; margin: 0 6px; }

.songs { margin: 0; }
.song {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  grid-column-gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dotted #dddddd;
}
.song:last-child { border-bottom: none; }
.song .cover {
  width: 60px;
  height: 60px;
  display: block;
  background: #eeeeee;
}
.song .meta { line-height: 1.45; }
.song .title { font-style: italic; }
.song .artist { color: #444; }
.song .tags {
  font-size: 13px;
  color: #666666;
}
.song .year {
  color: #666666;
  font-size: 13px;
}
.song .streams {
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
.song .streams a { display: inline-block; }
.song .streams .sep { color: #999999; margin: 0 4px; }

/* Photography page — masonry-style gallery using CSS columns so images
   preserve their aspect ratios and pack irregularly. */
.gallery {
  column-count: 3;
  column-gap: 14px;
  margin: 1em 0 0;
}
.gallery figure {
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 14px 0;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  background: #eeeeee;
}
.gallery figcaption {
  font-style: italic;
  font-size: 13px;
  color: #666666;
  margin-top: 6px;
}

.clients {
  font-style: italic;
  color: #666666;
}

.projects-list {
  margin: 1em 0 0;
  list-style: none;
  padding: 0;
}
.projects-list li {
  padding: 6px 0;
}
.projects-list .title { font-style: italic; }
.projects-list .year { color: #666666; font-size: 13px; }

/* Project subpage */
.project-photos {
  margin-top: 1.6em;
}
.project-photos img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 18px 0;
  cursor: zoom-in;
  background: #eeeeee;
}

/* Lightbox */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 30px;
}
.lb-overlay.open { display: flex; }
.lb-overlay img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.lb-caption {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-style: italic;
  font-size: 13px;
  color: #cccccc;
}

/* Mobile */
@media (max-width: 600px) {
  .wrap { padding: 28px 20px 60px; }
  .home { padding-top: 50px; }
  .gallery { column-count: 2; column-gap: 10px; }
  .gallery figure { margin-bottom: 10px; }
  .song {
    grid-template-columns: 48px 1fr;
    grid-row-gap: 6px;
  }
  .song .cover { width: 48px; height: 48px; }
  .song .streams {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 62px;
  }
}
