/* =========================================================
   Chess With Kaden — shared stylesheet
   Clean & light theme
   ========================================================= */

:root {
  --bg:            #ffffff;
  --bg-soft:       #f4f7f9;
  --bg-card:       #ffffff;
  --text:          #18202b;
  --text-muted:    #5b6675;
  --border:        #e4e9ee;
  --accent:        #2f8f5b;   /* chess green */
  --accent-dark:   #246d46;
  --accent-soft:   #e7f3ec;
  --gold:          #d9a441;
  --shadow:        0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --radius:        14px;
  --max:           1080px;
  --font-head:     "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 .5em;
  font-weight: 600;
}

p { margin: 0 0 1rem; color: var(--text-muted); }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Navbar ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .piece { color: var(--accent); font-size: 1.4rem; line-height: 1; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: .5rem .8rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent-dark); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .55rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 360px at 80% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 2.5rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.hero p.lead { font-size: 1.15rem; max-width: 38ch; }

.hero-avatar {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card h3 { font-size: 1.15rem; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(16,24,40,.10); }

/* ---------- Rating widgets ---------- */
.rating-card .rating-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.rating-card .score { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--text); }
.rating-card .label { font-weight: 600; color: var(--text); }
.rating-card .sub { font-size: .85rem; color: var(--text-muted); }

.progress {
  height: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: .9rem 0 .5rem;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
.progress-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-muted); }

/* ---------- Social cards ---------- */
.social-card .head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.social-card .ico { font-size: 1.4rem; }
.social-card .handle { font-size: .9rem; word-break: break-word; }

/* ---------- Blog ---------- */
.post-meta { font-size: .85rem; color: var(--text-muted); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: .15rem .55rem;
  border-radius: 999px;
}
.post-card h3 { margin-bottom: .35rem; }
.post-card .excerpt { color: var(--text-muted); margin: .5rem 0 .75rem; font-size: .97rem; }
.read-more { font-weight: 600; color: var(--accent-dark); }

/* Article (single post) */
.article { padding: 3rem 0; }
.article .container { max-width: 720px; }
.article h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: .6rem; }
.article .post-meta { margin-bottom: 2rem; }
.article p { font-size: 1.08rem; color: #2c3540; }
.article h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.article blockquote {
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
}
.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer-inner p { margin: 0; font-size: .9rem; }
.footer-links { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-avatar { margin: 0 auto; order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: .5rem 1rem 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem .6rem; border-radius: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
