/*--------------------------------------------------------------
# Blog & Games
# Additions for corcoranp.com. Kept in their own file so the
# iPortfolio template CSS stays untouched and upgradeable.
--------------------------------------------------------------*/

:root {
  --cp-accent: #149ddd;
  --cp-accent-bright: #37b3ed;
  --cp-ink: #173b6c;
  --cp-dark: #040b14;
  --cp-dark-2: #0a1a2f;
  --cp-dark-3: #12283f;
  --cp-muted: #6c839c;
  --cp-line: #e3ecf5;
}

/*--- shared -------------------------------------------------*/
.section-lead {
  max-width: 62ch;
  color: #5a6b7d;
  font-size: 15px;
  line-height: 1.75;
}

.pill {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eaf4fb;
  color: var(--cp-ink);
  white-space: nowrap;
}

/*--- blog listing -------------------------------------------*/
.post-list { display: grid; gap: 26px; }

.post-card {
  display: block;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--cp-line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.post-card:hover {
  border-color: var(--cp-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(20, 157, 221, .10);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  color: var(--cp-muted);
  margin-bottom: 9px;
}
.post-meta time { font-variant-numeric: tabular-nums; }

.byline { color: var(--cp-ink); }
.byline b {
  font-weight: 600;
  color: var(--cp-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: -.01em;
}
.article .byline { font-size: 12.5px; }
.post-card h3 {
  font-family: "Raleway", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--cp-ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
.post-card:hover h3 { color: var(--cp-accent); }
.post-card p { margin: 0; color: #5a6b7d; font-size: 14.5px; line-height: 1.7; }
.post-more {
  display: inline-block;
  margin-top: 13px;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--cp-accent);
}

/*--- blog: the lead post & journal bar -----------------------*/
/* .journal reuses the shelf's .library / .lib-bar / .chip chrome so the
   blog index and the games shelf read as the same component. */
.journal .post-list { margin-top: 0; }

.post-kicker {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cp-accent);
  border-radius: 3px;
  padding: 3px 9px;
  margin-bottom: 12px;
}
.post-lead {
  padding: 28px 30px 30px;
  border-color: #cfe2f2;
  background:
    linear-gradient(180deg, #f7fbff 0%, #fff 58%);
}
.post-lead h3 { font-size: 26px; line-height: 1.25; }
.post-lead p { font-size: 15.5px; }

.journal-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--cp-line);
}
.journal-foot p { margin: 0; font-size: 14px; color: var(--cp-muted); }
.journal-foot a { color: var(--cp-accent); font-weight: 600; }

@media (max-width: 575px) {
  .post-lead { padding: 22px 18px 24px; }
  .post-lead h3 { font-size: 21px; }
}

/*--- post art ------------------------------------------------*/

/* The listing card becomes image + text, and collapses to one column on a
   phone. width/height on the img reserve the box so nothing jumps while the
   picture loads. */
/* Cover art on a listing card.
   ONE treatment for every card, deliberately. The journal script moves
   .post-lead to whichever card is first VISIBLE, so it changes as soon as
   anyone filters by topic — a lead-only banner would appear and vanish under
   the reader. srcset lets the browser pick the weight instead. */
.post-thumb {
  display: block;
  margin-bottom: 16px;
  border-radius: 5px;
  overflow: hidden;
  background: #eef3f8;
  line-height: 0;
}
.post-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .35s ease;
}
.post-card:hover .post-thumb img { transform: scale(1.03); }

.article-hero {
  margin: 0 0 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cp-line);
  background: #eef3f8;
}
.article-hero img { display: block; width: 100%; height: auto; }
.article-hero figcaption {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  color: var(--cp-muted);
  padding: 7px 12px;
  background: #fbfdff;
  border-top: 1px solid var(--cp-line);
}


/*--- an article ---------------------------------------------*/
.article { max-width: 68ch; }
.article h1 {
  font-family: "Raleway", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--cp-ink);
  line-height: 1.22;
  margin: 0 0 14px;
  text-wrap: balance;
}
.article .post-meta { margin-bottom: 26px; }
.article h2 {
  font-family: "Raleway", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--cp-ink);
  margin: 34px 0 12px;
}
.article p { font-size: 15.5px; line-height: 1.8; color: #45535f; margin: 0 0 18px; }
.article ul { font-size: 15.5px; line-height: 1.8; color: #45535f; margin: 0 0 18px; padding-left: 20px; }
.article li { margin-bottom: 7px; }
.article a { color: var(--cp-accent); }
.article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  background: #f1f6fb;
  border: 1px solid var(--cp-line);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--cp-ink);
}
.article pre {
  background: var(--cp-dark);
  color: #cfe3f5;
  padding: 16px 18px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.article blockquote {
  border-left: 3px solid var(--cp-accent);
  padding: 2px 0 2px 18px;
  margin: 0 0 20px;
  color: var(--cp-ink);
  font-size: 16px;
  line-height: 1.7;
}
.article-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--cp-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

/*--- games: the shelf ---------------------------------------*/
.library {
  background: linear-gradient(180deg, var(--cp-dark) 0%, var(--cp-dark-2) 100%);
  color: #cfe0f0;
  border-radius: 10px;
  padding: 30px;
}
.library .section-lead { color: #93a9c0; }

.lib-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.lib-stat { display: flex; flex-direction: column; gap: 1px; }
.lib-stat b {
  font-family: "Raleway", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.lib-stat small {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6f89a3;
}
.lib-filters { margin-left: auto; display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  color: #93a9c0;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  padding: 5px 13px;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.chip:hover { color: #fff; border-color: rgba(255, 255, 255, .28); }
.chip[aria-pressed="true"] { background: var(--cp-accent); border-color: var(--cp-accent); color: #fff; }

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 22px;
}
.game {
  display: flex;
  flex-direction: column;
  background: var(--cp-dark-3);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 7px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.game:hover {
  transform: translateY(-4px);
  border-color: var(--cp-accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  color: inherit;
}
.game-cover { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.game-cover svg { display: block; width: 100%; height: 100%; }
.game-status {
  position: absolute;
  top: 9px;
  left: 9px;
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(4, 11, 20, .82);
  backdrop-filter: blur(4px);
}
.game-status.playable { color: #6ee7a8; }
.game-status.prototype { color: #f3c969; }
.game-status.soon { color: #8fa6bd; }

.game-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.game-body h3 {
  font-family: "Raleway", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.game-body p { margin: 0; font-size: 13px; line-height: 1.6; color: #93a9c0; flex: 1; }
.game-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  color: #9fb6cc;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px;
  padding: 2px 7px;
}
.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  color: #6f89a3;
}
.game-foot .open { color: var(--cp-accent-bright); font-weight: 500; }

.lib-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 34px 10px;
  color: #6f89a3;
  font-size: 14px;
}

/*--- a game's own page --------------------------------------*/
.game-hero {
  background: linear-gradient(180deg, var(--cp-dark) 0%, var(--cp-dark-2) 100%);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
}
.game-hero .shot { aspect-ratio: 21 / 9; background: #000; }
.game-hero .shot svg { display: block; width: 100%; height: 100%; }
.game-hero .meta { padding: 24px 28px 26px; color: #cfe0f0; }
.game-hero h1 {
  font-family: "Raleway", sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.game-hero .tagline { color: #93a9c0; font-size: 15px; margin: 0 0 18px; max-width: 60ch; line-height: 1.7; }
.play-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* Back to the shelf sits left; download and play are pushed to the right. */
.play-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cp-accent);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: 5px;
  text-decoration: none;
  transition: background .18s;
}
.btn-play:hover { background: var(--cp-accent-bright); color: #fff; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #cfe0f0;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  transition: border-color .18s, color .18s;
}
.btn-ghost:hover { border-color: var(--cp-accent); color: #fff; }

/* Share sits with the other secondary actions; a button, not a link. */
#share { cursor: pointer; font: inherit; font-size: 13px; background: none; }
#share .share-label { min-width: 6.2em; display: inline-block; text-align: left; }
#share.is-done { border-color: #46b978; color: #bdf0d2; }
#share.is-done i { color: #46b978; }

.play-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #8ba3bb;
  max-width: 72ch;
}
.play-note i { color: var(--cp-accent); margin-right: 3px; }
.play-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  background: rgba(255, 255, 255, .07);
  border-radius: 3px;
  padding: 1px 6px;
  color: #d3e6f7;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, .08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 24px;
}
.spec {
  background: var(--cp-dark-2);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spec dt {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6f89a3;
}
.spec dd { margin: 0; font-size: 13.5px; color: #dceaf6; }

.keys {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}
.keys th, .keys td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--cp-line); }
.keys th {
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--cp-muted);
  font-weight: 500;
}
.keys kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #f1f6fb;
  border: 1px solid #d6e3f0;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--cp-ink);
  white-space: nowrap;
}

@media (max-width: 575px) {
  .library { padding: 22px 18px; }
  .lib-filters { margin-left: 0; width: 100%; }
  .game-hero .meta { padding: 20px 18px 22px; }
  .game-hero h1 { font-size: 24px; }
  .play-row { flex-direction: column; align-items: stretch; }
  .play-actions { margin-left: 0; flex-direction: column; align-items: stretch; }
  .play-row .btn-play, .play-row .btn-ghost { justify-content: center; }
  .article h1 { font-size: 25px; }
}
