/*
Theme Name: Arjun's Cricket Dictionary
Theme URI: https://arjunvaria.com
Author: Arjun Varia
Author URI: https://arjunvaria.com
Description: A simple, kid-friendly WordPress theme for a cricket blog. Cricket silhouette background, dropdown post navigation, video + text post layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arjuns-cricket-dictionary
Tags: blog, one-column, custom-header, custom-menu, featured-images
*/

/* ============================================================
   Arjun's Cricket Dictionary — WordPress theme
   Based on the HTML mockup
   ============================================================ */

:root {
  --color-notion-blue: #0075de;
  --color-active-blue: #005bab;
  --text-primary: rgba(0, 0, 0, 0.95);
  --text-secondary: #615d59;
  --text-muted: #a39e98;
  --surface-card: #ffffff;
  --surface-page: #ffffff;
  --border-whisper: 1px solid rgba(0, 0, 0, 0.1);
  --radius-comfortable: 12px;
  --radius-pill: 9999px;
  --radius-micro: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'lnum', 'locl';
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-color: #f4f2ef;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('assets/cricket-bg.png') center top / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,242,239,0.4) 0%, rgba(244,242,239,0.15) 40%, rgba(244,242,239,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

.site-header,
.site-main,
.site-footer { position: relative; z-index: 2; }

a { color: var(--color-notion-blue); }

/* ===== Top bar ===== */
.site-header {
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--border-whisper);
}
.site-header .author {
  font-family: 'Fraunces', 'Inter', serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -1px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-header .author .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-notion-blue);
  display: inline-block;
}
.site-header nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

/* ===== Posts dropdown ===== */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  background: var(--color-notion-blue);
  border: none;
  font: inherit;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 2px 8px rgba(0, 117, 222, 0.25), 0 1px 2px rgba(0,0,0,0.05);
  letter-spacing: -0.2px;
}
.dropdown-toggle .chev {
  width: 16px; height: 16px;
  transition: transform 200ms ease;
}
.dropdown.open .dropdown-toggle .chev { transform: rotate(180deg); }
.dropdown-toggle:hover { background: var(--color-active-blue); transform: scale(1.04); box-shadow: 0 4px 14px rgba(0,117,222,0.32), 0 1px 2px rgba(0,0,0,0.05); }
.dropdown-toggle:active { transform: scale(0.96); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 320px;
  background: #ffffff;
  border: var(--border-whisper);
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 6px 16px rgba(0,0,0,0.05),
    0 24px 48px rgba(0,0,0,0.05);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
  max-height: 70vh;
  overflow-y: auto;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-menu .menu-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 6px;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 120ms ease;
}
.dropdown-menu a:hover { background: #f4f3f1; text-decoration: none; }
.dropdown-menu a .ltr {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 117, 222, 0.08);
  color: var(--color-notion-blue);
  border-radius: 6px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
}
.dropdown-menu a .ttl {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}
.dropdown-menu a .dt {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}
.dropdown-menu .empty {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 40px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: var(--border-whisper);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.125px;
  color: var(--text-secondary);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 28px;
}
.badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #0aa05d;
  box-shadow: 0 0 0 0 rgba(10, 160, 93, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(10, 160, 93, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(10, 160, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 160, 93, 0); }
}

h1.site-title {
  font-family: 'Fraunces', 'Inter', serif;
  font-weight: 700;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.02;
  letter-spacing: -2.5px;
  color: #0a2540;
  margin: 0 0 18px;
}
h1.site-title em {
  font-style: italic;
  font-weight: 600;
  color: #d4451a;
}

.subtitle {
  font-size: 19px;
  line-height: 1.5;
  color: #2a3a4a;
  max-width: 620px;
  margin: 0 0 8px;
  font-weight: 500;
}
.byline {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 56px;
}
.byline strong { color: var(--text-secondary); font-weight: 500; }

/* ===== Posts list ===== */
.posts-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 980px;
}
.posts-label::before,
.posts-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

.posts {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.post-card {
  background: var(--surface-card);
  border: var(--border-whisper);
  border-radius: var(--radius-comfortable);
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.03),
    0 2px 6px rgba(0,0,0,0.02),
    0 6px 18px rgba(0,0,0,0.02);
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}
.post-card:hover {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 10px rgba(0,0,0,0.04),
    0 14px 32px rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.16);
}
.post-card .letter {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -3px;
  color: var(--color-notion-blue);
  margin-bottom: 4px;
}
.post-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin: 0;
}
.post-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
  margin: 0;
}
.post-card .meta {
  margin-top: 8px;
  padding-top: 12px;
  border-top: var(--border-whisper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.post-card .read {
  color: var(--color-notion-blue);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 150ms ease;
}
.post-card:hover .read { gap: 8px; }
.post-card .vbadge {
  position: absolute;
  top: 14px; right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 999px;
}
.post-card .vbadge svg { width: 10px; height: 10px; }

/* ===== Single post / page ===== */
.article {
  max-width: 760px;
  margin: 60px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
}
.article-header {
  padding: 44px 52px 28px;
  border-bottom: var(--border-whisper);
}
.article-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-notion-blue);
  margin-bottom: 12px;
}
.article-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -1.8px;
  color: #0a2540;
  margin: 0 0 12px;
}
.article-meta {
  font-size: 14px;
  color: var(--text-muted);
}
.article-video {
  background: #0a0a0a;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
}
.article-video iframe,
.article-video video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.article-video .wp-block-embed,
.article-video .wp-block-embed__wrapper,
.article-video .wp-block-video { width: 100%; height: 100%; margin: 0; }
.article-body {
  padding: 36px 52px 52px;
  font-size: 17px;
  line-height: 1.7;
  color: #2a2a2a;
}
.article-body > * { text-wrap: pretty; }
.article-body p { margin: 0 0 20px; }
.article-body h2, .article-body h3, .article-body h4 {
  font-family: 'Inter', sans-serif;
  color: #0a2540;
  margin: 32px 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.25;
}
.article-body h2 { font-size: 28px; }
.article-body h3 { font-size: 22px; }
.article-body h4 { font-size: 18px; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 20px; }
.article-body li { margin-bottom: 6px; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body blockquote {
  border-left: 3px solid var(--color-notion-blue);
  padding-left: 18px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body iframe { max-width: 100%; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14px;
  text-decoration: none;
  color: var(--color-notion-blue);
  font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
  padding: 28px 40px 36px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: var(--border-whisper);
  margin-top: 60px;
}
.site-footer .heart { color: var(--color-notion-blue); }

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .dropdown-toggle { padding: 10px 16px; font-size: 14px; }
  .hero { padding: 56px 20px 40px; }
  h1.site-title { letter-spacing: -1.5px; }
  .byline { margin-bottom: 40px; }
  .article { margin: 24px 16px; border-radius: 12px; }
  .article-header { padding: 28px 24px 20px; }
  .article-title { font-size: 32px; letter-spacing: -1px; }
  .article-body { padding: 24px; font-size: 16px; }
}
