/*
Theme Name: K5N Courtside
Theme URI: https://www.k5n.us/
Author: k5n.us
Description: A custom theme for k5n.us — open source software, software development, college hoops, and other stuff. Calendar-grid motif, developer typography (IBM Plex), and a Cavalier navy & orange palette.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: k5n-courtside
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --navy: #1f2a44;        /* Cav navy — masthead, footers, headings */
  --navy-deep: #141c30;
  --orange: #e57200;      /* Court orange — links, accents, the basketball */
  --orange-dark: #c25f00;
  --paper: #f7f8fa;       /* cool paper, not cream */
  --ink: #232a3b;
  --grid: #d8dde6;        /* calendar grid lines */
  --green: #3fa878;       /* terminal green — open-source/code accents */
  --max-content: 760px;
  --max-wide: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--orange-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

code, pre, kbd {
  font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  font-size: 0.9em;
}
pre {
  background: var(--navy-deep);
  color: #e8ecf5;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  border-left: 3px solid var(--green);
}
code { background: #e9edf3; padding: 0.1em 0.35em; border-radius: 3px; }
pre code { background: none; padding: 0; }

/* ---------- Masthead ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--orange);
}
.site-header__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-logo img, .site-logo svg { height: 44px; width: auto; display: block; }
.site-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}
.site-title a { color: #fff; text-decoration: none; }
.site-tagline {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: #9fb0d0;
  letter-spacing: 0.02em;
}

/* ---------- Nav ---------- */
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  color: #dfe6f3;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--orange); }

/* ---------- Banner (the signature calendar grid) ---------- */
.site-banner { background: var(--navy-deep); }
.site-banner img, .site-banner svg { display: block; width: 100%; height: auto; }

/* ---------- Layout ---------- */
.site-main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
}
@media (max-width: 900px) { .site-main { grid-template-columns: 1fr; } }

/* ---------- Post cards: each post is a "day cell" ---------- */
.post-card {
  background: #fff;
  border: 1px solid var(--grid);
  border-radius: 8px;
  margin-bottom: 1.75rem;
  overflow: hidden;
}
.post-card__inner { padding: 1.5rem 1.75rem 1.6rem; }
.post-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.post-card__eyebrow img { height: 16px; width: 16px; }
.post-card h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.post-card h2 a { color: var(--navy); text-decoration: none; }
.post-card h2 a:hover { color: var(--orange-dark); }

/* Date chip styled like a calendar cell */
.date-cell {
  float: right;
  margin-left: 1rem;
  text-align: center;
  border: 1px solid var(--grid);
  border-radius: 6px;
  overflow: hidden;
  min-width: 58px;
  font-family: 'IBM Plex Mono', monospace;
  background: #fff;
}
.date-cell__month {
  display: block;
  background: var(--orange);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
}
.date-cell__day { display: block; font-size: 1.35rem; font-weight: 600; color: var(--navy); padding: 2px 6px 4px; }

.read-more {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}

/* ---------- Single post ---------- */
.entry-content { max-width: var(--max-content); }
.entry-content img { max-width: 100%; height: auto; border-radius: 6px; }
.entry-title { font-size: 2rem; margin: 0 0 0.5rem; }
.entry-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: #6b7488;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--grid);
}

/* ---------- Sidebar ---------- */
.site-sidebar .widget {
  background: #fff;
  border: 1px solid var(--grid);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.site-sidebar .widget-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 0.5rem;
  margin: 0 0 0.9rem;
}
.site-sidebar ul { list-style: none; margin: 0; padding: 0; }
.site-sidebar li { padding: 0.35rem 0; border-bottom: 1px dashed var(--grid); }
.site-sidebar li:last-child { border-bottom: none; }

/* ---------- Pagination ---------- */
.pagination { font-family: 'IBM Plex Mono', monospace; display: flex; gap: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #9fb0d0;
  border-top: 4px solid var(--orange);
  margin-top: 2rem;
}
.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: #dfe6f3; }
.site-footer a:hover { color: var(--orange); }

@media (prefers-reduced-motion: no-preference) {
  .post-card { transition: border-color 160ms ease, box-shadow 160ms ease; }
  .post-card:hover { border-color: var(--orange); box-shadow: 0 2px 10px rgba(31, 42, 68, 0.08); }
}
