/*
Theme Name: Pinboard Social
Theme URI: https://example.com/pinboard-social
Author: Replit
Description: An image-first social feed for WordPress with editable photo pins, likes, comments, and sharing.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pinboard-social
*/

:root {
  --pb-paper: #faf8f2;
  --pb-ink: #292e32;
  --pb-muted: #777b78;
  --pb-line: #e8e2d7;
  --pb-accent: #c95643;
  --pb-sage: #dce8df;
  --pb-card-radius: 20px;
  --pb-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--pb-paper);
  color: var(--pb-ink);
  font-family: var(--pb-font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--pb-accent);
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.pb-skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--pb-ink);
  color: #fff;
}

.pb-skip-link:focus {
  transform: translateY(0);
}

.pb-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgb(232 226 215 / 88%);
  background: rgb(250 248 242 / 95%);
  backdrop-filter: blur(16px);
}

.pb-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--pb-ink);
}

.pb-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--pb-accent);
  box-shadow: 0 5px 14px rgb(201 86 67 / 19%);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.pb-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.075em;
}

.pb-brand img {
  display: block;
  width: auto;
  max-height: 46px;
}

.pb-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pb-header nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pb-header nav a {
  color: #656b68;
  font-size: 13px;
  font-weight: 600;
}

.pb-header nav a:hover,
.pb-header nav .current-menu-item > a {
  color: var(--pb-accent);
}

.pb-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pb-header-action,
.pb-button,
.pb-like-button,
.pb-share-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.pb-header-action:hover,
.pb-share-button:hover {
  background: #f0ede6;
  color: var(--pb-accent);
}

.pb-page {
  width: min(100% - 40px, 1480px);
  margin: 0 auto;
}

.pb-feed {
  padding-top: clamp(30px, 5vw, 66px);
  padding-bottom: 56px;
}

.pb-feed-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.pb-eyebrow {
  margin: 0 0 10px;
  color: var(--pb-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pb-feed h1,
.pb-single h1,
.pb-archive-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.06;
}

.pb-feed h1 em {
  color: var(--pb-accent);
  font-style: normal;
}

.pb-feed-description {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--pb-muted);
  font-size: 14px;
}

.pb-feed-note {
  max-width: 230px;
  padding: 14px 17px;
  border: 1px solid var(--pb-line);
  border-radius: 18px;
  background: #f5f1e9;
  color: #7e827c;
  font-size: 11px;
  text-align: right;
}

.pb-feed-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--pb-ink);
  font-size: 15px;
}

.pb-category-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 27px;
  overflow-x: auto;
  padding: 2px 0 5px;
  scrollbar-width: thin;
}

.pb-category-nav a {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid var(--pb-line);
  border-radius: 999px;
  background: #fbf9f3;
  color: #6c716b;
  font-size: 12px;
  font-weight: 700;
  transition: all 160ms ease;
}

.pb-category-nav a:hover,
.pb-category-nav a[aria-current="page"] {
  border-color: var(--pb-ink);
  background: #2d3532;
  color: #fffaf1;
}

.pb-grid {
  column-count: 4;
  column-gap: 24px;
}

.pb-grid[data-columns="3"] {
  column-count: 3;
}

.pb-grid[data-columns="5"] {
  column-count: 5;
}

.pb-pin {
  display: inline-block;
  width: 100%;
  margin: 0 0 25px;
  break-inside: avoid;
  animation: pb-rise 450ms both;
}

.pb-pin-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--pb-card-radius);
  background: #e8e2d7;
}

.pb-pin-image-link {
  display: block;
}

.pb-pin-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 500ms cubic-bezier(.2, .7, .25, 1);
}

.pb-grid[data-image-ratio="portrait"] .pb-pin-image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.pb-pin:hover .pb-pin-image {
  transform: scale(1.035);
}

.pb-pin-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 7px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pb-pin:hover .pb-pin-actions,
.pb-pin:focus-within .pb-pin-actions {
  opacity: 1;
  transform: translateY(0);
}

.pb-like-button {
  min-height: 38px;
  padding: 0 14px;
  background: rgb(255 253 248 / 96%);
  color: var(--pb-ink);
  box-shadow: 0 3px 12px rgb(30 35 32 / 12%);
}

.pb-like-button:hover,
.pb-like-button[aria-pressed="true"] {
  background: var(--pb-accent);
  color: #fff;
}

.pb-like-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.pb-pin-copy {
  padding: 11px 2px 0;
}

.pb-pin-title {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.pb-pin-caption {
  margin: 5px 0 0;
  color: var(--pb-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pb-pin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.pb-pin-creator {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #5b625e;
  font-size: 11px;
  font-weight: 600;
}

.pb-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--pb-sage);
  color: #416150;
  font-size: 10px;
  font-weight: 800;
}

.pb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pb-pin-stats {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #858983;
  font-size: 11px;
}

.pb-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pb-stat svg,
.pb-like-button svg,
.pb-share-button svg,
.pb-header-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pb-pin-message {
  padding: 62px 20px;
  border: 1px dashed #ddd5c8;
  border-radius: 24px;
  background: #f6f3ec;
  color: var(--pb-muted);
  text-align: center;
}

.pb-pin-message h2 {
  margin: 0 0 7px;
  color: var(--pb-ink);
  font-size: 21px;
  letter-spacing: -0.04em;
}

.pb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pb-pagination .page-numbers {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--pb-line);
  border-radius: 50%;
  background: #fffdf8;
  font-size: 12px;
}

.pb-pagination .current {
  border-color: var(--pb-ink);
  background: var(--pb-ink);
  color: #fff;
}

.pb-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--pb-line);
  color: #999990;
  font-size: 11px;
}

.pb-footer p {
  margin: 0;
}

.pb-single {
  max-width: 880px;
  padding-top: 40px;
  padding-bottom: 65px;
}

.pb-single-header {
  margin-bottom: 24px;
}

.pb-single h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.pb-single-image {
  display: block;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: var(--pb-card-radius);
  object-fit: contain;
}

.pb-single-caption {
  max-width: 700px;
  margin: 22px auto;
  color: #5d625e;
  font-size: 16px;
}

.pb-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 46px;
}

.pb-button {
  min-height: 42px;
  padding: 0 18px;
  background: #efebe2;
  color: var(--pb-ink);
}

.pb-button:hover {
  background: var(--pb-accent);
  color: #fff;
}

.pb-button-primary {
  background: var(--pb-accent);
  color: #fff;
}

.pb-comments {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--pb-line);
}

.pb-comments h2 {
  margin: 0 0 20px;
  font-size: 25px;
  letter-spacing: -0.05em;
}

.comment-list {
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.comment-list .children {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 1px solid var(--pb-line);
  list-style: none;
}

.comment-body {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--pb-line);
  border-radius: 16px;
  background: #fffdf8;
}

.comment-author {
  font-size: 13px;
  font-weight: 800;
}

.comment-metadata,
.comment-awaiting-moderation {
  color: var(--pb-muted);
  font-size: 11px;
}

.comment-content {
  color: #555b57;
  font-size: 13px;
}

.comment-reply-link,
.comment-edit-link {
  color: var(--pb-accent);
  font-size: 12px;
  font-weight: 700;
}

.comment-respond {
  margin-top: 28px;
}

.comment-respond label {
  display: block;
  margin-bottom: 6px;
  color: #535a55;
  font-size: 12px;
  font-weight: 700;
}

.comment-respond input:not([type="submit"]),
.comment-respond textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pb-line);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--pb-ink);
}

.comment-respond input:focus,
.comment-respond textarea:focus {
  border-color: var(--pb-accent);
  outline: 2px solid rgb(201 86 67 / 15%);
}

.comment-respond .submit {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--pb-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.pb-share-status {
  min-height: 20px;
  color: #416150;
  font-size: 12px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@keyframes pb-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .pb-grid,
  .pb-grid[data-columns="5"] {
    column-count: 3;
  }
}

@media (max-width: 760px) {
  .pb-header {
    min-height: 64px;
    gap: 10px;
    padding-inline: 16px;
  }

  .pb-header nav ul {
    gap: 10px;
  }

  .pb-header nav a {
    font-size: 11px;
  }

  .pb-header-actions .pb-header-action span {
    display: none;
  }

  .pb-page {
    width: min(100% - 28px, 1480px);
  }

  .pb-feed-intro {
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .pb-feed-note {
    display: none;
  }

  .pb-grid,
  .pb-grid[data-columns="5"] {
    column-count: 2;
    column-gap: 14px;
  }

  .pb-pin {
    margin-bottom: 17px;
  }

  .pb-pin-actions {
    top: 8px;
    right: 8px;
    left: 8px;
    opacity: 1;
    transform: none;
  }

  .pb-like-button {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .pb-pin-title {
    font-size: 13px;
  }

  .pb-pin-caption {
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .pb-brand-name {
    font-size: 18px;
  }

  .pb-header nav {
    display: none;
  }

  .pb-grid,
  .pb-grid[data-columns="5"] {
    column-gap: 10px;
  }

  .pb-pin-meta {
    align-items: flex-start;
  }

  .pb-pin-creator {
    gap: 5px;
    font-size: 10px;
  }

  .pb-avatar {
    width: 24px;
    height: 24px;
  }

  .pb-pin-stats {
    gap: 7px;
    font-size: 10px;
  }

  .pb-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
