/* The Traveling Photog: shared styles for every page */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg: #f7f4ee;
  --ink: #111;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Header: full-bleed photo with the nav sitting on top of it */
.hero {
  position: relative;
  height: clamp(320px, 32vw, 640px);
  background: #000 center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.5rem 6vw 0;
  color: #fff;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  font-size: 1.15rem;
}
.site-nav ul a { text-decoration: none; padding-bottom: 3px; white-space: nowrap; }
.site-nav ul a:hover,
.site-nav ul a.active { border-bottom: 1.5px solid #fff; }
.site-nav .social { display: flex; gap: 1.4rem; margin-left: 1.5rem; }
.site-nav .social a { border: 0; }
.site-nav svg { width: 22px; height: 22px; fill: #fff; display: block; }

/* About page: text left, photo right, photo sits on the bottom line */
.about {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 5vw;
  align-items: end;
  padding: 7rem 6vw 6rem;
  max-width: 1600px;
  margin: 0 auto;
}
.about h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  line-height: 1.15;
  margin-bottom: 3.5rem;
  max-width: 14ch;
}
.about p {
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.75;
  margin-bottom: 1.6rem;
}
.about p:last-child { margin-bottom: 0; }
.about img { width: 100%; display: block; }

/* Shorter header photo on post pages */
.hero-small { height: clamp(220px, 20vw, 380px); }

/* Shared small labels */
.post-date, .label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* Blog post page */
.post {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 6vw 5rem;
}
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  text-decoration: none;
  opacity: 0.6;
  margin-bottom: 2.5rem;
}
.back-link:hover { opacity: 1; }
.post h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: 1.15;
  margin: 1rem 0 3rem;
  text-wrap: balance;
}
.post-image { margin: 0 0 3.5rem; }
.post-image img { width: 100%; display: block; }
.post-body p {
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  line-height: 1.8;
  margin-bottom: 1.6rem;
}
.post-body em { font-style: italic; }
.post-divider { border: 0; text-align: center; margin: 3rem 0; }
.post-divider::before { content: "\00B7\2003\00B7\2003\00B7"; opacity: 0.5; }
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid #ddd;
}
.post-nav a {
  font-family: var(--serif);
  font-size: 1.15rem;
  text-decoration: none;
  max-width: 48%;
}
.post-nav a span {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.4rem;
}
.post-nav .next { text-align: right; margin-left: auto; }
.post-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Blog index (home page) */
.blog-index {
  max-width: 1300px;
  margin: 0 auto;
  padding: 6rem 6vw 4rem;
}
.index-intro { margin-bottom: 3rem; }
.index-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.index-intro p { font-size: 1.15rem; opacity: 0.7; }
.post-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5vw;
  align-items: center;
  padding: 4rem 0;
  border-top: 1px solid #ddd;
  text-decoration: none;
}
.post-card.flip { grid-template-columns: 1fr 1.4fr; }
.post-card.flip .post-card-thumb { order: 2; }
.post-card-thumb { aspect-ratio: 3 / 2; overflow: hidden; background: #eee; }
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.03); }
.post-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  line-height: 1.2;
  margin: 0.8rem 0 1.2rem;
  text-wrap: balance;
}
.post-card-excerpt { font-size: 1.1rem; line-height: 1.7; opacity: 0.8; margin-bottom: 1.4rem; }
.read-more {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

/* Contact page */
.contact {
  max-width: 760px;
  margin: 0 auto;
  padding: 6rem 6vw 5rem;
}
.contact h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.contact-intro { font-size: 1.2rem; line-height: 1.7; margin-bottom: 3rem; }
.contact-form { display: flex; flex-direction: column; }
.contact-form label {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.6; margin-bottom: 0.5rem;
}
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 1.05rem;
  padding: 0.9rem 1rem; margin-bottom: 1.6rem;
  border: 1px solid #ccc; background: #fff; border-radius: 0;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #111; }
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form button {
  align-self: flex-start;
  font: inherit; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: #111; color: #fff; border: 0; padding: 1rem 2.2rem; cursor: pointer;
}
.contact-form button:hover { opacity: 0.8; }
.find-me { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid #ddd; }
.find-me .label { margin-bottom: 1rem; }
.find-me a { margin-right: 1.4rem; font-size: 1.05rem; text-underline-offset: 4px; }

footer {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.55;
  padding: 3rem 6vw 4rem;
}

/* Phones and small tablets */
@media (max-width: 900px) {
  .site-nav { flex-direction: column; align-items: flex-start; gap: 1.2rem; padding-top: 2rem; }
  .site-nav ul { flex-wrap: wrap; gap: 1rem 1.3rem; font-size: 1rem; }
  .site-nav .social { margin-left: 0; }
  .about { grid-template-columns: 1fr; padding-top: 4rem; }
  .about h1 { margin-bottom: 2rem; }
  .post, .contact, .blog-index { padding-top: 3.5rem; }
  .post-card, .post-card.flip { grid-template-columns: 1fr; gap: 1.5rem; padding: 3rem 0; }
  .post-card.flip .post-card-thumb { order: 0; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .post-nav .next { text-align: left; margin-left: 0; }
}

/* Plain header (every page except About): no photo, dark text */
.plain-header { border-bottom: 1px solid #e2e2e2; }
.plain-header .site-nav { color: var(--ink); padding: 2.6rem 6vw 2.4rem; }
.plain-header .site-nav ul a:hover,
.plain-header .site-nav ul a.active { border-bottom-color: var(--ink); }
.plain-header .site-nav svg { fill: var(--ink); }

/* Work with Me: text left, tall photo right */
.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: start;
  padding: 7rem 6vw 6rem;
  max-width: 1600px;
  margin: 0 auto;
}
.work h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  line-height: 1.2;
  margin-bottom: 3rem;
}
.work h1 span {
  display: block;
  font-weight: 400;
  font-style: italic;
}
.work .lead {
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
  line-height: 1.55;
}
.work p {
  font-size: clamp(1.02rem, 1.2vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}
.work img { width: 100%; display: block; margin-top: 4rem; }
.button {
  display: inline-block;
  margin-top: 2.5rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 1.6rem 7rem;
}
.button:hover { opacity: 0.8; }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .work img { margin-top: 0; }
  .button { padding: 1.3rem 3rem; }
}

/* Photos inside a post */
.post-body figure { margin: 3rem 0; }
.post-body figure img { width: 100%; display: block; }
.post-body figcaption { font-size: 0.9rem; opacity: 0.6; margin-top: 0.7rem; text-align: center; }

/* Post with no photo: a quiet text tile in its place on the blog home */
.post-card-thumb.no-photo { display: flex; align-items: center; justify-content: center; background: #111; color: #fafafa; padding: 2rem; text-align: center; }
.post-card-thumb.no-photo span { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.8rem); }
.post-body blockquote { border-left: 2px solid #111; padding-left: 1.4rem; margin: 2rem 0; font-style: italic; }
.post-body blockquote p { margin-bottom: 0.8rem; }
.post-body h2, .post-body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 2.5rem 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Photos: index of sets */
.photos-index { max-width: 1400px; margin: 0 auto; padding: 6rem 6vw 5rem; }
.photos-index h1, .gallery-page h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1.15; margin-bottom: 1rem; }
.photos-intro { font-size: 1.15rem; opacity: 0.7; margin-bottom: 3.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5rem 2.5rem; }
.gallery-card { text-decoration: none; }
.gallery-thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #eee; margin-bottom: 1rem; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.03); }
.gallery-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.3; margin-bottom: 0.4rem; }

/* Photos: one set */
.gallery-page { max-width: 1400px; margin: 0 auto; padding: 5rem 6vw 5rem; }
.gallery-intro { margin: 1.5rem 0 3.5rem; }
.gallery-intro p { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.8; margin-bottom: 1.2rem; }
.gallery-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gallery-photos a { display: block; aspect-ratio: 1 / 1; overflow: hidden; cursor: zoom-in; }
.gallery-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.gallery-photos a:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; z-index: 100; cursor: zoom-out; padding: 3vh 3vw; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.2rem; }
  .gallery-photos { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .photos-index, .gallery-page { padding-top: 3.5rem; }
}
