/* ============================================================
   Photoblog — clintmcmahon.com
   Minimal editorial design
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Fixed header ----------------------------------------- */

.pb-header {
  padding: 1.4rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.pb-site-name {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  transition: color 0.2s;
}
.pb-site-name:hover { color: #999; }

.pb-header-byline {
  font-size: 0.69rem;
  color: #bbb;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.pb-header-byline-link {
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}
.pb-header-byline-link:hover { color: #111; }

.pb-header-date {
  font-size: 0.69rem;
  color: #bbb;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---- Main layout ------------------------------------------ */

.pb-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2.5rem 4rem;
}

/* ---- Image rows ------------------------------------------- */

.pb-rows {
  width: 100%;
  max-width: min(92vw, 1000px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Each row is a horizontal strip — one or more images side by side */
.pb-row {
  display: flex;
  gap: 4px;
  width: 100%;
}

.pb-image {
  flex: 1;
  min-width: 0;
  display: block;
  width: 0;        /* forces equal flex distribution regardless of natural size */
  height: auto;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.pb-image.is-loaded { opacity: 1; }

/* ---- Metadata row below image ----------------------------- */

.pb-meta {
  width: 100%;
  max-width: min(92vw, 1000px);
  margin-top: 1.4rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.pb-caption-area {
  flex: 1;
  min-width: 0;
}

.pb-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #111;
  margin: 0 0 0.4rem;
}

.pb-caption {
  font-size: 0.8rem;
  color: #222;
  line-height: 1.7;
  margin: 0;
}
.pb-caption p { margin: 0 0 0.5em; }

/* ---- Navigation ------------------------------------------- */

.pb-nav {
  display: flex;
  gap: 1.75rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.pb-nav a {
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbb;
  text-decoration: none;
  transition: color 0.18s;
}
.pb-nav a:hover { color: #111; }

/* ---- Comments --------------------------------------------- */

.pb-comments {
  width: 100%;
  max-width: min(92vw, 1000px);
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #ebebeb;
}

.pb-comments-heading {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bbb;
  margin: 0 0 1.75rem;
}

.pb-comment-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.pb-comment-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.pb-comment-meta {
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.pb-comment-author {
  font-weight: 500;
  color: #111;
}

.pb-comment-time {
  color: #ccc;
  margin-left: 0.5rem;
}

.pb-comment-body {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.65;
}

.pb-no-comments {
  font-size: 0.8rem;
  color: #bbb;
  margin: 0 0 2rem;
}

/* ---- Comment form ----------------------------------------- */

.pb-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

.pb-input,
.pb-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.45rem 0;
  font-size: 0.8rem;
  font-family: inherit;
  color: #111;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}
.pb-input:focus,
.pb-textarea:focus {
  border-color: #111;
}
.pb-input::placeholder,
.pb-textarea::placeholder {
  color: #ccc;
}

.pb-textarea {
  min-height: 80px;
}

.pb-submit {
  align-self: flex-start;
  background: none;
  border: 1px solid #ddd;
  padding: 0.45rem 1.4rem;
  font-size: 0.69rem;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.pb-submit:hover {
  border-color: #111;
  color: #111;
}

/* ---- Footer nav ------------------------------------------- */

.pb-footer {
  width: 100%;
  max-width: min(92vw, 1000px);
  margin-top: 3rem;
  padding: 1.75rem 0 3rem;
  display: flex;
  justify-content: center;
}

.pb-footer-nav {
  display: flex;
  gap: 2rem;
}

.pb-footer-link {
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ccc;
  text-decoration: none;
  transition: color 0.18s;
}
.pb-footer-link:hover { color: #111; }

/* ---- Header nav link (about page back arrow) -------------- */

.pb-header-nav {
  font-size: 0.69rem;
  color: #bbb;
  letter-spacing: 0.07em;
  text-align: right;
  text-decoration: none;
  transition: color 0.2s;
}
.pb-header-nav:hover { color: #111; }

/* ---- About page ------------------------------------------- */

.pb-about {
  width: 100%;
  max-width: 600px;
  padding-top: 0.5rem;
}

.pb-about-heading {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bbb;
  margin: 0 0 2.5rem;
}

.pb-about-body {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #333;
}

.pb-about-body p {
  margin: 0 0 1.4em;
}

.pb-about-body a {
  color: #111;
  text-decoration-color: #ddd;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.pb-about-body a:hover { text-decoration-color: #111; }

/* ---- Keyboard hint ---------------------------------------- */

.pb-keys {
  position: fixed;
  bottom: 1.75rem;
  right: 2.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #ddd;
  pointer-events: none;
  user-select: none;
}

/* ---- Responsive ------------------------------------------- */

@media (max-width: 640px) {
  .pb-header {
    padding: 1.1rem 1.25rem;
    grid-template-columns: 1fr 1fr;
  }
  .pb-header-byline { display: none; }
  .pb-header-date { text-align: right; }
  .pb-main {
    padding: 0.5rem 1.25rem 3rem;
  }
  .pb-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  .pb-nav {
    order: -1;
    gap: 1.25rem;
  }
  .pb-keys { display: none; }
}
