/*
 * Phosphor component styles.
 * Tokens come from theme.json presets (--wp--preset--color--*, --wp--preset--font-family--*).
 * Shared by front end and editor (add_editor_style).
 */

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: #0d0f0e;
  color: #d8dfd6;
  min-height: 100vh;
}
::selection { background: rgba(255, 160, 40, 0.25); }

/* ---------- layout frame: full-bleed section + constrained inner ---------- */
.pg-in {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.pg-sec {
  padding-top: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.pg-sec-head {
  margin-bottom: 8px;
  align-items: baseline;
}
.pg-sec-head h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}
/* "~/ " prefix on section titles only (scoped: never post content) */
.pg-sec-head h2.wp-block-heading::before {
  content: "~/ ";
  color: var(--wp--preset--color--amber);
}
.pg-more { margin: 0; font-size: 13px; }
.pg-more a {
  color: var(--wp--preset--color--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.pg-more a:hover { text-decoration: underline; }

/* ---------- topbar ---------- */
.pg-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 15, 14, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.pg-topbar .pg-in { padding-top: 14px; padding-bottom: 14px; }
.pg-topbar .wp-block-site-title { margin: 0; line-height: 1.2; }

/* ---------- navigation ---------- */
.pg-nav {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pg-nav .wp-block-navigation-item__content {
  color: var(--wp--preset--color--txt2);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.pg-nav .wp-block-navigation-item__content:hover,
.pg-nav .wp-block-navigation-item__content:focus {
  color: var(--wp--preset--color--amber);
  border-bottom-color: var(--wp--preset--color--amber);
  text-decoration: none;
}
.pg-nav .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--bg2);
}
.pg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  text-transform: uppercase;
}

/* ---------- hero ---------- */
.pg-hero {
  padding-top: 96px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.pg-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--amber);
  margin: 0;
}
.pg-h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 16px 0 0;
}
.pg-hero .pg-h1 { max-width: 20ch; }
/* blinking caret after the hero headline */
.pg-hero .pg-h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.95em;
  background: var(--wp--preset--color--amber);
  vertical-align: -0.1em;
  margin-left: 0.18em;
  animation: pg-blink 1.1s steps(1) infinite;
}
@keyframes pg-blink { 50% { opacity: 0; } }
.pg-lede {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 17px;
  color: var(--wp--preset--color--txt2);
  max-width: 56ch;
  margin: 24px 0 0;
}
.pg-cta { margin-top: 32px; }

/* ---------- stats row ---------- */
.pg-stats { margin-top: 48px; }
.pg-stats .wp-block-column {
  border-left: 1px solid var(--wp--preset--color--line);
  padding-left: 16px;
}
.pg-stats .wp-block-column:first-child { border-left: 0; padding-left: 0; }
.pg-stat-n {
  font-size: 26px !important;
  font-weight: 500 !important;
  color: var(--wp--preset--color--amber);
  margin: 0;
  line-height: 1.1;
}
.pg-stat-l {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  color: var(--wp--preset--color--txt2);
  margin: 6px 0 0;
}

/* ---------- buttons ---------- */
.wp-block-button__link {
  border-radius: 2px;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  text-align: center;
}
.pg-btn-amber .wp-block-button__link {
  background: var(--wp--preset--color--amber);
  border-color: var(--wp--preset--color--amber);
  color: #120e06;
}
.pg-btn-amber .wp-block-button__link:hover {
  background: #ffb34d;
  border-color: #ffb34d;
  color: #120e06;
}
.pg-btn-ghost .wp-block-button__link {
  background: transparent;
  border-color: var(--wp--preset--color--line);
  color: var(--wp--preset--color--txt);
}
.pg-btn-ghost .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--amber);
  color: var(--wp--preset--color--amber);
}

/* ---------- post cards ---------- */
.pg-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pg-cards > li { list-style: none; min-width: 0; }
@media (max-width: 960px) { .pg-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pg-cards { grid-template-columns: 1fr; } }

.pg-card {
  border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--card);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-card:hover {
  border-color: var(--wp--preset--color--amber);
  box-shadow: 0 0 0 1px var(--wp--preset--color--amberdim);
}
.pg-card .pg-thumb {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--wp--preset--color--bg2);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.pg-card .pg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* placeholder block when a post has no featured image */
.pg-card:not(:has(.pg-thumb img))::before {
  content: "no image";
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: var(--wp--preset--color--bg2);
  border-bottom: 1px solid var(--wp--preset--color--line);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--amberdim);
}
.pg-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pg-card-title {
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1.35;
  margin: 0;
}
.pg-card-title a {
  color: #edf2ea;
  text-decoration: none;
}
.pg-card-title a:hover { color: var(--wp--preset--color--amber); }
.pg-ex { margin: 0; flex: 1; }
.pg-ex p {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--wp--preset--color--txt2);
  margin: 0;
}
.pg-card .pg-meta,
.pg-meta {
  display: block;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11.5px;
  color: var(--wp--preset--color--txt2);
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--wp--preset--color--line);
}
.pg-card .pg-meta time { color: var(--wp--preset--color--txt2); }
.pg-card .pg-meta a { color: var(--wp--preset--color--txt2); text-decoration: none; }
.pg-card .pg-meta a:hover { color: var(--wp--preset--color--amber); }

/* ---------- projects ---------- */
.pg-proj-main {
  background: linear-gradient(160deg, #191307, var(--wp--preset--color--card) 60%);
  border: 1px solid var(--wp--preset--color--amberdim);
  padding: 48px;
  height: 100%;
}
.pg-proj-title {
  font-size: 32px !important;
  font-weight: 500 !important;
  color: var(--wp--preset--color--amber);
  margin: 12px 0 0;
}
.pg-proj-p {
  font-family: var(--wp--preset--font-family--sans);
  color: var(--wp--preset--color--txt2);
  max-width: 50ch;
  margin: 12px 0 0;
}
.pg-proj-main .wp-block-buttons { margin-top: 24px; }
.pg-proj-side { gap: 24px; height: 100%; }
.pg-tile {
  border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--card);
  padding: 24px;
  flex: 1;
}
.pg-tile h4 {
  font-size: 17px !important;
  font-weight: 500 !important;
  color: #edf2ea;
  margin: 0;
}
.pg-tile p {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  color: var(--wp--preset--color--txt2);
  margin: 6px 0 0;
}
.pg-pill {
  display: inline-block !important;
  align-self: flex-start;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px !important;
  padding: 3px 10px;
  border: 1px solid var(--wp--preset--color--line);
  color: var(--wp--preset--color--txt2);
  margin-top: 12px !important;
  background: transparent;
}

/* ---------- shelf (eBay) ---------- */
.pg-item {
  border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--card);
  padding: 16px;
  text-align: center;
  height: 100%;
}
.pg-ph {
  aspect-ratio: 1;
  background: #12160f;
  border: 1px dashed var(--wp--preset--color--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 22px;
  color: var(--wp--preset--color--amberdim);
  margin-bottom: 12px;
}
.pg-item h4 {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #edf2ea;
  margin: 0;
}
.pg-price {
  font-family: var(--wp--preset--font-family--mono) !important;
  font-size: 15px !important;
  color: var(--wp--preset--color--amber) !important;
  margin: 6px 0 0;
}
.pg-st {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px !important;
  color: var(--wp--preset--color--txt2);
  margin: 4px 0 0;
}

/* ---------- topics ---------- */
.pg-topic {
  flex-direction: column;
  gap: 12px;
}
.pg-topic .wp-block-button { width: 100%; }
.pg-topic .wp-block-button__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 500;
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--line);
  color: var(--wp--preset--color--txt);
  padding: 18px 24px;
}
.pg-topic .wp-block-button__link:hover {
  background: rgba(255, 160, 40, 0.1);
  border-color: var(--wp--preset--color--amber);
  color: var(--wp--preset--color--txt);
}
.pg-topic .wp-block-button__link .pg-count {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 13px;
  color: var(--wp--preset--color--amber);
}

/* ---------- pagination ---------- */
.pg-pag {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}
.pg-pag .wp-block-query-pagination__page-numbers {
  display: flex;
  gap: 8px;
}
.pg-pag a,
.pg-pag .current {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
  padding: 6px 12px;
  border: 1px solid var(--wp--preset--color--line);
  color: var(--wp--preset--color--txt2);
  text-decoration: none;
}
.pg-pag a:hover {
  border-color: var(--wp--preset--color--amber);
  color: var(--wp--preset--color--amber);
}
.pg-pag .current {
  border-color: var(--wp--preset--color--amberdim);
  color: var(--wp--preset--color--amber);
}

/* ---------- page heads (blog / archive / search) ---------- */
.pg-pagehead { padding-top: 64px; padding-bottom: 0; border-bottom: 0; }
.pg-pagehead .pg-h1 { margin-top: 0; max-width: none; }
.pg-pagehead .pg-h1::after { display: none; }
.pg-pagehead .pg-lede { margin-top: 16px; }

/* ---------- single post / page ---------- */
.pg-single { padding-top: 48px; padding-bottom: 64px; border-bottom: 0; }
.pg-single .pg-h1 {
  max-width: 22ch;
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 46px);
}
.pg-chip {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.pg-chip a,
.pg-chip span {
  color: var(--wp--preset--color--amber);
  text-decoration: none;
}
.pg-chip a:hover { text-decoration: underline; }
.pg-metaline {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 13px;
  color: var(--wp--preset--color--txt2);
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.pg-metaline a { color: var(--wp--preset--color--txt2); text-decoration: none; }
.pg-metaline a:hover { color: var(--wp--preset--color--amber); }
.pg-metaline .wp-block-post-author-name::before { content: "· "; }

.pg-prose {
  max-width: 720px;
  margin: 40px auto 0;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--wp--preset--color--txt);
}
.pg-prose > * + * { margin-top: 18px; }
.pg-prose h2 {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 22px;
  font-weight: 500;
  color: #edf2ea;
  margin-top: 40px;
}
.pg-prose h3 {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 18px;
  font-weight: 500;
  color: #edf2ea;
  margin-top: 32px;
}
.pg-prose h4 {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 16px;
  margin-top: 28px;
}
.pg-prose a {
  color: var(--wp--preset--color--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-prose img {
  border: 1px solid var(--wp--preset--color--line);
  display: block;
}
.pg-prose figure { margin-top: 28px; margin-bottom: 28px; }
.pg-prose figcaption {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12.5px;
  color: var(--wp--preset--color--txt2);
  text-align: center;
  margin-top: 8px;
}
.pg-prose pre {
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--line);
  padding: 16px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.55;
}
.pg-prose code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.9em;
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--line);
  padding: 1px 5px;
}
.pg-prose pre code { border: 0; background: none; padding: 0; }
.pg-prose ul, .pg-prose ol { padding-left: 22px; }
.pg-prose li { margin-bottom: 8px; }
.pg-prose blockquote {
  border-left: 3px solid var(--wp--preset--color--amber);
  padding: 4px 20px;
  color: var(--wp--preset--color--txt2);
  font-style: normal;
}
.pg-prose hr {
  border: 0;
  border-top: 1px solid var(--wp--preset--color--line);
  margin: 32px 0;
}
.pg-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pg-prose th, .pg-prose td {
  border: 1px solid var(--wp--preset--color--line);
  padding: 8px 12px;
  text-align: left;
}
.pg-prose .wp-block-separator { margin: 32px auto; }
.pg-prose .wp-block-buttons { margin-top: 24px; }

.pg-postfoot {
  max-width: 720px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--wp--preset--color--line);
  gap: 24px;
}
.pg-postfoot a {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
  color: var(--wp--preset--color--amber);
  text-decoration: none;
}
.pg-postfoot a:hover { text-decoration: underline; }

/* ---------- 404 ---------- */
.pg-404 { padding-top: 96px; padding-bottom: 96px; }
.pg-404 .pg-h1 { max-width: none; }
.pg-404 .pg-h1::after { display: none; }
.pg-404 .wp-block-search { margin-top: 32px; max-width: 480px; }

/* ---------- footer ---------- */
.pg-footer {
  background: var(--wp--preset--color--bg2);
  border-top: 1px solid var(--wp--preset--color--line);
  padding-top: 64px;
  padding-bottom: 32px;
}
.pg-fdesc {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 14px;
  color: var(--wp--preset--color--txt2);
  max-width: 40ch;
  margin: 12px 0 0;
}
.pg-fh {
  font-size: 11.5px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--amber);
  margin: 0 0 16px;
}
.pg-flist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
}
.pg-flist li { margin-bottom: 8px; }
.pg-flist a {
  color: var(--wp--preset--color--txt2);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--sans);
}
.pg-flist a:hover { color: var(--wp--preset--color--amber); }
.pg-fbottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--wp--preset--color--line);
  gap: 16px;
}
.pg-fbottom p {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  color: var(--wp--preset--color--txt2);
  margin: 0;
}

/* ---------- generic tweaks ---------- */
.wp-block-post-terms a { text-decoration: none; }
.wp-block-query-pagination { list-style: none; }
.wp-block-columns { margin-top: 0; margin-bottom: 0; }
