/* ═══════════════════════════════════════════════
   ATHLETIC THEME — athletic.yudocaa.in
   Bold · High contrast · Sports journal
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius: 4px;
  --radius-lg: 8px;
}

/* ── DARK THEME (default) ── */
:root, [data-theme="dark"] {
  --black:   #0A0A0A;
  --white:   #F5F5F0;
  --grey-1:  #141414;
  --grey-2:  #1E1E1E;
  --grey-3:  #2A2A2A;
  --grey-4:  #3A3A3A;
  --grey-5:  #6A6A6A;
  --grey-6:  #9A9A9A;
  --acid:    #C8FF00;
  --acid-dim:#8CB200;
  --acid-hover: #d4ff1a;
  --red:     #FF3D3D;
  --teal:    #00C9A7;
  --amber:   #FFB800;
  --border:  #1E1E1E;
  --pill-red-bg: rgba(255,61,61,.15);
  --pill-red-border: rgba(255,61,61,.3);
  --pill-teal-bg: rgba(0,201,167,.12);
  --pill-teal-border: rgba(0,201,167,.25);
  --pill-amber-bg: rgba(255,184,0,.12);
  --pill-amber-border: rgba(255,184,0,.25);
  --callout-bg: rgba(200,255,0,0.04);
  --hero-glow: rgba(200,255,0,0.03);
  --code-bg: var(--grey-2);
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --black:   #F5F5F0;
  --white:   #1A1A1A;
  --grey-1:  #EAEAE5;
  --grey-2:  #E0E0DB;
  --grey-3:  #CCCCC7;
  --grey-4:  #B0B0AB;
  --grey-5:  #787873;
  --grey-6:  #5A5A55;
  --acid:    #4A7A00;
  --acid-dim:#3D6600;
  --acid-hover: #5A9400;
  --red:     #D42E2E;
  --teal:    #009E83;
  --amber:   #CC9300;
  --border:  #CCCCC7;
  --pill-red-bg: rgba(212,46,46,.1);
  --pill-red-border: rgba(212,46,46,.25);
  --pill-teal-bg: rgba(0,158,131,.1);
  --pill-teal-border: rgba(0,158,131,.25);
  --pill-amber-bg: rgba(204,147,0,.1);
  --pill-amber-border: rgba(204,147,0,.25);
  --callout-bg: rgba(74,122,0,0.06);
  --hero-glow: rgba(74,122,0,0.04);
  --code-bg: #E0E0DB;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }
@media (min-width: 1200px) { html { zoom: 1.75; } }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
h1 { font-size: clamp(48px, 8vw, 96px); }
h2 { font-size: clamp(32px, 5vw, 56px); }
h3 { font-size: clamp(22px, 3vw, 36px); }
h4 { font-size: 20px; }
h5 { font-size: 16px; }

p { font-size: 15px; color: var(--grey-6); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--font-mono); }

/* ── LAYOUT ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  border-bottom: 1px solid var(--grey-3);
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
  height: 56px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--acid);
  margin-right: 40px;
  flex-shrink: 0;
}
.nav-brand span { color: var(--white); }
.nav-links { display: flex; gap: 0; flex: 1; }
.nav-link {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--grey-5);
  padding: 0 16px; height: 56px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover, .nav-link.active { color: var(--white); border-bottom-color: var(--acid); }
.nav-meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--grey-5);
  margin-left: auto;
}
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 20px; cursor: pointer; }

/* ── HERO ── */
.hero {
  background: var(--grey-1);
  border-bottom: 1px solid var(--grey-3);
  padding: 80px 24px 60px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 50%; height: 100%;
  background: linear-gradient(135deg, transparent 40%, var(--hero-glow) 100%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--acid);
  text-transform: uppercase; letter-spacing: .15em;
  margin-bottom: 16px;
}
.hero-title { color: var(--white); margin-bottom: 20px; }
.hero-title .accent { color: var(--acid); }
.hero-sub { font-size: 16px; color: var(--grey-6); max-width: 560px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hstat { border-left: 3px solid var(--acid); padding-left: 16px; }
.hstat-val {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 900;
  color: var(--white); line-height: 1;
}
.hstat-lbl { font-size: 11px; color: var(--grey-5); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

/* ── SECTION LABEL ── */
.sec-label {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--acid);
  text-transform: uppercase; letter-spacing: .15em;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--grey-3); }

/* ── CARDS ── */
.card {
  background: var(--grey-1);
  border: 1px solid var(--grey-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--grey-4); transform: translateY(-2px); }
.card-accent-top { height: 3px; background: var(--acid); }
.card-body { padding: 20px; }
.card-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  text-transform: uppercase;
  color: var(--white); margin-bottom: 6px;
}
.card-meta { font-size: 12px; color: var(--grey-6); font-family: var(--font-mono); }
.card-desc { font-size: 15px; color: var(--white); opacity: 0.75; margin-top: 8px; line-height: 1.6; }

/* ── GRID LAYOUTS ── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

/* ── TAGS / PILLS ── */
.pill {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 2px;
}
.pill-acid    { background: var(--acid); color: var(--black); }
.pill-red     { background: var(--pill-red-bg); color: var(--red); border: 1px solid var(--pill-red-border); }
.pill-teal    { background: var(--pill-teal-bg); color: var(--teal); border: 1px solid var(--pill-teal-border); }
.pill-amber   { background: var(--pill-amber-bg); color: var(--amber); border: 1px solid var(--pill-amber-border); }
.pill-ghost   { background: transparent; color: var(--grey-6); border: 1px solid var(--grey-4); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 10px 20px; border-radius: var(--radius);
  border: none; cursor: pointer; transition: all .15s;
}
.btn-acid { background: var(--acid); color: var(--black); }
.btn-acid:hover { background: var(--acid-hover); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--grey-4); }
.btn-ghost:hover { border-color: var(--white); }

/* ── STAT BLOCKS ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 1px; background: var(--grey-3); border: 1px solid var(--grey-3); border-radius: var(--radius-lg); overflow: hidden; }
.stat-block { background: var(--grey-1); padding: 20px 16px; }
.stat-val {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 900;
  color: var(--white); line-height: 1;
}
.stat-val.acid { color: var(--acid); }
.stat-lbl { font-size: 11px; color: var(--grey-6); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; font-family: var(--font-mono); }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--grey-5); padding: 10px 14px;
  border-bottom: 1px solid var(--grey-3);
  text-align: left; background: var(--grey-1);
}
.data-table td { padding: 12px 14px; font-size: 15px; color: var(--white); opacity: 0.8; border-bottom: 1px solid var(--grey-3); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--grey-2); }

/* ── LOG ENTRIES ── */
.log-entry {
  border-left: 2px solid var(--grey-3);
  padding: 0 0 32px 24px; position: relative;
  margin-bottom: 0;
}
.log-entry::before {
  content: '';
  position: absolute; left: -5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grey-3);
}
.log-entry.today::before { background: var(--acid); }
.log-entry:last-child { border-left-color: transparent; }
.log-date {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--acid); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .1em;
}
.log-title {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 800; text-transform: uppercase;
  color: var(--white); margin-bottom: 10px;
}
.log-body { font-size: 15px; color: var(--white); opacity: 0.8; line-height: 1.7; }

/* ── EXERCISE SETS ── */
.set-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--grey-3);
  font-size: 15px;
}
.set-row:last-child { border-bottom: none; }
.set-num { font-family: var(--font-mono); font-size: 12px; color: var(--grey-6); width: 24px; }
.set-type { width: 80px; }
.set-weight { font-weight: 600; color: var(--white); flex: 1; }
.set-reps { font-family: var(--font-mono); color: var(--grey-6); }
.set-note { font-size: 13px; color: var(--grey-6); }

/* ── RECIPE CARDS ── */
.recipe-card { cursor: pointer; }
.recipe-cat-bar { height: 3px; }
.recipe-card[data-cat="dinner"]  .recipe-cat-bar { background: var(--amber); }
.recipe-card[data-cat="lunch"]   .recipe-cat-bar { background: var(--teal); }
.recipe-card[data-cat="snack"]   .recipe-cat-bar { background: var(--red); }
.recipe-card[data-cat="breakfast"] .recipe-cat-bar { background: var(--acid); }

/* ── MACRO BAR ── */
.macro-bar-wrap { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; margin: 12px 0; }
.macro-seg-p { background: var(--teal); }
.macro-seg-c { background: var(--amber); }
.macro-seg-f { background: var(--red); }

/* ── PROGRESS CHART ── */
.prog-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.prog-lbl { font-size: 12px; font-family: var(--font-mono); color: var(--grey-6); width: 80px; text-transform: uppercase; }
.prog-track { flex: 1; height: 6px; background: var(--grey-3); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.prog-val { font-size: 13px; color: var(--white); opacity: 0.7; width: 80px; text-align: right; font-family: var(--font-mono); }

/* ── PAGE HEADER ── */
.page-header { padding: 48px 0 32px; border-bottom: 1px solid var(--grey-3); margin-bottom: 40px; }
.page-header-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 14px; border-radius: var(--radius);
  border: 1px solid var(--grey-3); background: transparent;
  color: var(--grey-5); cursor: pointer; transition: all .15s;
}
.filter-btn:hover { color: var(--white); border-color: var(--grey-4); }
.filter-btn.active { background: var(--acid); color: var(--black); border-color: var(--acid); }

/* ── CONTENT PROSE ── */
.prose { max-width: 800px; }
.prose h2 { font-size: 28px; margin: 32px 0 12px; }
.prose h3 { font-size: 22px; margin: 32px 0 12px; color: var(--white); }
.prose p  { margin-bottom: 16px; font-size: 17px; color: var(--white); opacity: 0.82; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 16px; }
.prose li { font-size: 17px; color: var(--white); opacity: 0.82; margin-bottom: 6px; line-height: 1.7; }
.prose strong { color: var(--white); font-weight: 600; }
.prose em { color: var(--white); opacity: 0.7; }
.prose a, .log-body a { color: var(--acid); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover, .log-body a:hover { color: var(--acid-hover); }
.prose code { background: var(--code-bg); padding: 2px 6px; border-radius: 3px; font-size: 14px; color: var(--acid); }
.prose pre {
  background: var(--grey-1);
  border: 1px solid var(--grey-3);
  border-left: 3px solid var(--acid);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 20px 0;
  overflow-x: auto;
}
.prose pre code {
  background: none;
  padding: 0;
  font-size: 15px;
  color: var(--white);
  line-height: 1.8;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--grey-3);
  padding: 40px 24px; margin-top: 80px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-family: var(--font-display); font-size: 18px; font-weight: 900; text-transform: uppercase; color: var(--acid); }
.footer-meta { font-family: var(--font-mono); font-size: 11px; color: var(--grey-5); }

/* ── NOTE / CALLOUT ── */
.callout { border-left: 3px solid var(--acid); background: var(--callout-bg); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0; }
.callout p { color: var(--white); opacity: 0.8; margin: 0; font-size: 15px; line-height: 1.7; }
.callout strong { color: var(--acid); opacity: 1; }

/* ── PHOTO GRID ── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 8px; }
.photo-item { aspect-ratio: 3/4; background: var(--grey-2); border-radius: var(--radius); overflow: hidden; position: relative; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 50%); display: flex; align-items: flex-end; padding: 12px; }
.photo-date { font-family: var(--font-mono); font-size: 10px; color: var(--acid); }

/* ── HEVY EMBED ── */
.hevy-embed { background: var(--grey-2); border: 1px solid var(--grey-3); border-radius: var(--radius-lg); padding: 20px; margin: 16px 0; }
.hevy-link { font-family: var(--font-mono); font-size: 12px; color: var(--acid); }

/* ── PLAN PAGE ── */
.plan-week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.plan-day-card { background: var(--grey-1); border: 1px solid var(--grey-3); border-radius: var(--radius-lg); overflow: hidden; }
.plan-day-head { font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 8px 10px; background: var(--grey-2); color: var(--grey-6); border-bottom: 1px solid var(--grey-3); text-transform: uppercase; letter-spacing: .1em; }
.plan-day-body { padding: 12px; min-height: 120px; }
.plan-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grey-3); font-size: 15px; }
.plan-row:last-child { border-bottom: none; }
.plan-row-name { font-weight: 500; color: var(--white); width: 40%; flex-shrink: 0; }
.plan-row-det { color: var(--white); opacity: 0.65; flex: 1; }
.plan-row-vol { font-family: var(--font-mono); font-size: 13px; color: var(--white); opacity: 0.7; white-space: nowrap; text-align: right; }

/* ── DAY DETAIL ── */
.plan-day-card[onclick] { cursor: pointer; transition: border-color .2s, transform .2s; }
.plan-day-card[onclick]:hover { border-color: var(--acid); transform: translateY(-2px); }
.day-detail { animation: daySlideIn .25s ease; }
@keyframes daySlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: none; border: 1px solid var(--grey-4);
  color: var(--white); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-left: 16px; flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--acid); color: var(--acid); }

/* ── ACTIVITY TRACKER ── */
.tracker-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
}
.tracker-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--grey-2);
}
.tracker-cell.logged {
  background: var(--acid);
}
.tracker-cell.today {
  outline: 2px solid var(--acid);
  outline-offset: -1px;
}
.tracker-day-labels {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--grey-5);
  text-align: right;
  padding-right: 4px;
  line-height: 12px;
}
.tracker-legend {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* ── MOBILE ── */
@media(max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .plan-week-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .plan-row { flex-wrap: wrap; }
  .plan-row-name { width: 100%; }
  .nav-links { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--black); border-bottom: 1px solid var(--grey-3); padding: 8px 0; z-index: 99; }
  .nav-link { height: 44px; padding: 0 24px; }
  h1 { font-size: 40px; }
  .hstat-val { font-size: 28px; }
  .hero-stats { gap: 24px; }
}
