/* ── WPDIY Design System ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Syne:wght@400;500;700&display=swap');

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

:root {
  --blue:          #378ADD;
  --blue-light:    #E6F1FB;
  --blue-dark:     #185FA5;
  --teal:          #1D9E75;
  --teal-light:    #E1F5EE;
  --teal-dark:     #0F6E56;
  --amber:         #EF9F27;
  --amber-light:   #FAEEDA;
  --amber-dark:    #854F0B;
  --coral:         #D85A30;
  --coral-light:   #FAECE7;
  --coral-dark:    #993C1D;
  --purple:        #7F77DD;
  --purple-light:  #EEEDFE;
  --purple-dark:   #534AB7;
  --red:           #E24B4A;
  --red-light:     #FCEBEB;
  --red-dark:      #A32D2D;
  --gray-50:       #F7F6F3;
  --gray-100:      #EEECEA;
  --gray-200:      #D3D1C7;
  --gray-400:      #888780;
  --gray-600:      #5F5E5A;
  --gray-900:      #1A1918;
  --text:          #1A1918;
  --text-muted:    #5F5E5A;
  --text-faint:    #888780;
  --bg:            #FAFAF8;
  --bg-surface:    #FFFFFF;
  --bg-raised:     #F7F6F3;
  --border:        rgba(26,25,24,0.1);
  --border-strong: rgba(26,25,24,0.2);
  --font-display:  'Syne', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;
  --radius:        8px;
  --radius-lg:     12px;
  --max-w:         1200px;
  --content-w:     740px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── LAYOUT ── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; width: 100%; }
.content-container { max-width: var(--content-w); margin: 0 auto; padding: 0 40px; width: 100%; }
main { flex: 1; }

/* ── NAV ── */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.site-logo .accent { color: var(--blue); }
.site-logo .tld { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.main-nav { display: flex; gap: 2px; }
.main-nav a {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.02em;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  background: var(--bg-raised);
  color: var(--text);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  background: var(--text);
  color: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
  text-decoration: none;
  display: inline-block;
}
.nav-cta:hover { opacity: 0.75; color: var(--bg-surface); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ── HERO (front page) ── */
.hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 56px;
}
.hero .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--blue-dark);
  background: var(--blue-light);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }

.hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 10px; }

/* Terminal widget */
.hero-terminal {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.terminal-bar {
  background: rgba(255,255,255,0.04);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot:nth-child(1){background:#FF5F57}
.t-dot:nth-child(2){background:#FFBD2E}
.t-dot:nth-child(3){background:#28CA41}
.terminal-label { font-size: 11px; color: rgba(255,255,255,.3); margin-left: 6px; }
.terminal-body { padding: 20px; }
.t-line { font-size: 12px; line-height: 2; }
.t-prompt { color: var(--teal); }
.t-cmd { color: rgba(255,255,255,.85); }
.t-comment { color: rgba(255,255,255,.3); }
.t-output { color: rgba(255,255,255,.5); font-size: 11px; }
.t-pass { color: var(--teal); }
.t-warn { color: var(--amber); }
.t-fail { color: var(--red); }
.t-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--blue); vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.stats-bar .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 20px 40px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-num .unit { font-size: 14px; font-weight: 400; color: var(--blue); letter-spacing: 0; margin-left: 2px; }
.stat-label { font-size: 11px; color: var(--text-faint); letter-spacing: 0.04em; text-transform: uppercase; }

/* ── SECTION WRAPPER ── */
.site-section {
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}
.site-section.alt-bg { background: var(--gray-50); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.section-link { font-size: 12px; color: var(--blue); }
.section-link:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.15s;
  display: inline-block;
  text-align: center;
}
.btn-dark { background: var(--text); color: var(--bg-surface); border-color: var(--text); }
.btn-dark:hover { opacity: 0.8; color: var(--bg-surface); }
.btn-outline { background: transparent; color: var(--text-muted); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--bg-raised); color: var(--text); }

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-headless    { background: var(--blue-light);   color: var(--blue-dark); }
.badge-modernized  { background: var(--teal-light);   color: var(--teal-dark); }
.badge-framework   { background: var(--purple-light); color: var(--purple-dark); }
.badge-performance { background: var(--amber-light);  color: var(--amber-dark); }
.badge-hybrid      { background: var(--blue-light);   color: var(--blue-dark); }
.badge-core        { background: var(--coral-light);  color: var(--coral-dark); }

/* ── EXPERIMENT CARDS ── */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.exp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.exp-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.exp-card .badge { margin-bottom: 14px; }
.exp-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.exp-card p { font-size: 12px; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 16px; }
.exp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.exp-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-faint); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-active   { background: var(--teal); }
.dot-progress { background: var(--amber); }
.dot-done     { background: var(--gray-400); }
.exp-score { font-size: 12px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.score-bar {
  display: inline-block; width: 32px; height: 3px;
  background: var(--gray-100); border-radius: 2px;
  position: relative; overflow: hidden;
}
.score-fill { position: absolute; left:0;top:0;bottom:0; background: var(--blue); border-radius: 2px; }

/* ── TAG FILTER ── */
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-tag {
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.1s;
  background: none;
  font-family: var(--font-mono);
}
.filter-tag:hover,
.filter-tag.active { background: var(--text); color: var(--bg-surface); border-color: var(--text); }

/* ── EVAL CARDS ── */
.eval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.eval-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.eval-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.eval-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.eval-icon svg { width: 14px; height: 14px; }
.eval-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text); }
.eval-card-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

.eval-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.eval-row:last-child { border-bottom: none; }
.eval-row:hover { background: var(--gray-50); }
.eval-name { font-size: 13px; color: var(--text); }
.eval-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.verdict {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.v-pass { background: var(--teal-light);  color: var(--teal-dark); }
.v-warn { background: var(--amber-light); color: var(--amber-dark); }
.v-fail { background: var(--red-light);   color: var(--red-dark); }

/* ── FINDINGS FEED ── */
.feed-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-date { font-size: 11px; color: var(--text-faint); padding-top: 3px; }
.feed-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 4px; letter-spacing: -0.2px;
}
.feed-title a { color: inherit; }
.feed-title a:hover { color: var(--blue); }
.feed-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.feed-tag {
  font-size: 10px; color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 20px; white-space: nowrap; margin-top: 2px;
}

/* ── BLOG ARCHIVE ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.post-card:hover { border-color: var(--border-strong); }
.post-card .badge { margin-bottom: 12px; }
.post-card-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--text); letter-spacing: -0.3px;
  line-height: 1.3; margin-bottom: 8px;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--blue); }
.post-card-excerpt { font-size: 12px; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 16px; }
.post-card-meta {
  font-size: 11px; color: var(--text-faint);
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border);
}

/* ── SINGLE POST ── */
.post-header { padding: 52px 0 40px; border-bottom: 1px solid var(--border); background: var(--bg-surface); }
.post-header .badge { margin-bottom: 16px; }
.post-header h1 {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  letter-spacing: -1.2px; line-height: 1.2;
  color: var(--text); margin-bottom: 12px;
}
.post-meta { font-size: 12px; color: var(--text-faint); display: flex; gap: 16px; }
.post-meta span::before { content: '·'; margin-right: 16px; }
.post-meta span:first-child::before { display: none; }

.post-content { padding: 48px 0; }
.post-content p { font-size: 14px; line-height: 1.9; color: var(--text-muted); margin-bottom: 1.5rem; }
.post-content h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--text); letter-spacing: -0.5px;
  margin: 2.5rem 0 1rem;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--text); margin: 2rem 0 0.75rem;
}
.post-content ul, .post-content ol {
  font-size: 14px; color: var(--text-muted);
  padding-left: 1.5rem; margin-bottom: 1.5rem; line-height: 1.9;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}
.post-content pre {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.post-content pre code {
  background: none; padding: 0;
  color: rgba(255,255,255,.8);
  font-size: 12px; line-height: 1.8;
}
.post-content blockquote {
  border-left: 2px solid var(--blue);
  padding: 4px 0 4px 20px;
  margin: 1.5rem 0;
}
.post-content blockquote p { color: var(--text); font-style: italic; }
.post-content a { color: var(--blue); }
.post-content a:hover { text-decoration: underline; }
.post-content img { border-radius: var(--radius-lg); margin: 1.5rem 0; }
.post-content table {
  width: 100%; font-size: 12px; margin-bottom: 1.5rem;
  border-collapse: collapse;
}
.post-content th {
  text-align: left; padding: 10px 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); border-bottom: 1px solid var(--border);
}
.post-content td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); }

/* ── SIDEBAR ── */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  padding: 52px 0;
}
.sidebar { position: sticky; top: 72px; }
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.widget-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 14px;
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li {
  font-size: 12px; color: var(--text-muted);
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a:hover { color: var(--blue); }

/* ── SCORE WIDGET (for experiment posts) ── */
.score-widget {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: rgba(255,255,255,.8);
}
.score-widget .widget-title { color: rgba(255,255,255,.3); }
.score-big {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 700;
  color: #fff; letter-spacing: -2px; line-height: 1;
  margin-bottom: 4px;
}
.score-big span { font-size: 18px; font-weight: 400; color: rgba(255,255,255,.4); }
.score-row { display: flex; justify-content: space-between; font-size: 11px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.score-row:last-child { border-bottom: none; }
.score-row-label { color: rgba(255,255,255,.4); }
.score-row-val { color: var(--teal); }
.score-row-val.warn { color: var(--amber); }
.score-row-val.fail { color: var(--red); }

/* ── PAGINATION ── */
.pagination {
  display: flex; gap: 4px; justify-content: center;
  padding: 40px 0;
}
.pagination a, .pagination span {
  font-size: 12px; padding: 7px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); transition: all 0.1s;
}
.pagination a:hover { background: var(--bg-raised); color: var(--text); }
.pagination .current { background: var(--text); color: var(--bg-surface); border-color: var(--text); }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer .inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); }
.footer-logo .accent { color: var(--blue); }
.footer-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: 12px; color: var(--text-faint); transition: color 0.1s; }
.footer-nav a:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-grid { grid-template-columns: 1fr; }
  .hero .inner { grid-template-columns: 1fr; }
  .hero-terminal { display: none; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .container, .content-container { padding: 0 20px; }
  .site-header .inner { padding: 0 20px; }
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); padding: 8px; }
  .menu-toggle { display: block; }
  .hero { padding: 40px 0 32px; }
  .hero .inner { padding: 0 20px; }
  .hero h1 { font-size: 30px; }
  .stats-bar .inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 16px 20px; }
  .exp-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 56px 1fr; }
  .feed-tag { display: none; }
  .site-footer .inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}
