/*
Theme Name: CourtDepth
Theme URI: https://courtdepth.com
Author: CourtDepth
Author URI: https://courtdepth.com
Description: Dark, data-first theme for CourtDepth, with the interactive NBA rotation planner built in as a shortcode and page template.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: courtdepth
Tags: dark, one-column, sports, custom-menu, block-styles
*/

:root {
  --cd-bg: #080c24;
  --cd-panel: #111737;
  --cd-panel-2: #161d42;
  --cd-rule: #28316a;
  --cd-rule-soft: #1d2550;
  --cd-text: #edf0fa;
  --cd-dim: #c3cae4;
  --cd-muted: #7f8ab8;
  --cd-gold: #f2b233;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cd-bg);
  color: var(--cd-text);
  font-family: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cd-gold); }
a:hover { color: #ffd270; }

.cd-skip {
  position: absolute;
  left: -9999px;
}
.cd-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: var(--cd-panel);
  padding: 8px 14px;
  border-radius: 6px;
}

.cd-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* header */
.cd-header {
  border-bottom: 1px solid var(--cd-rule);
  background: linear-gradient(180deg, #0b1030, var(--cd-bg));
}
.cd-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.cd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cd-text);
}
.cd-brand-mark { display: block; }
.cd-brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.cd-brand-name span { color: var(--cd-gold); }
.cd-brand-tag {
  font-size: 11px;
  color: var(--cd-muted);
  margin-top: -2px;
}
.cd-nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cd-nav a {
  color: var(--cd-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.cd-nav a:hover,
.cd-nav .current-menu-item > a {
  color: var(--cd-text);
}

/* content */
.cd-main { padding: 26px 0 40px; }
.cd-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0 0 6px;
}
.cd-meta {
  font-size: 12px;
  color: var(--cd-muted);
  margin-bottom: 18px;
}
.cd-entry { max-width: 70ch; }
.cd-entry h2 { font-size: 20px; margin: 28px 0 8px; }
.cd-entry img { max-width: 100%; height: auto; border-radius: 8px; }
.cd-entry blockquote {
  border-left: 3px solid var(--cd-gold);
  margin: 20px 0;
  padding-left: 16px;
  color: var(--cd-dim);
}
.cd-card {
  background: var(--cd-panel);
  border: 1px solid var(--cd-rule);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cd-card h2 { margin: 0 0 4px; font-size: 18px; }
.cd-card h2 a { color: var(--cd-text); text-decoration: none; }
.cd-card p { margin: 0; color: var(--cd-dim); font-size: 14px; }

/* rotation planner mount */
.cd-rotation {
  background: var(--cd-panel);
  border: 1px solid var(--cd-rule);
  border-radius: 12px;
  padding: 4px;
  margin: 0 0 20px;
  overflow-x: auto;
}
.cd-rotation > div { min-width: 1020px; }
.cd-rotation-wide { max-width: 1400px; }
.cd-rotation-note {
  font-size: 12px;
  color: var(--cd-muted);
  margin: 0 0 18px;
}

/* footer */
.cd-footer {
  border-top: 1px solid var(--cd-rule);
  padding: 18px 0 26px;
  font-size: 12px;
  color: var(--cd-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cd-pagination { display: flex; gap: 10px; font-size: 14px; }

@media (max-width: 760px) {
  .cd-shell { padding: 0 12px; }
  .cd-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cd-title { font-size: 22px; }
  .cd-main { padding: 16px 0 28px; }

  /* the planner lays itself out for narrow screens, so stop forcing a
     1020px canvas and the sideways scroll that came with it */
  .cd-rotation {
    overflow-x: visible;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
  }
  .cd-rotation > div { min-width: 0; }
}
