/* ══════════════════════════════════════════════════════════
   Piano Admission USA — Shared Blog Styles
   Light "bone / black / cobalt-red" theme, Fraunces + Inter.
   Matches the main site (index.html). Replaces the old
   dark midnight/navy/gold theme that lived inline in each post.
   ══════════════════════════════════════════════════════════ */
:root {
  --bone: #F5F2ED;
  --bone-dark: #EDE9E2;
  --black: #0A0A09;
  --black-soft: #1A1A18;
  --cobalt: #C8102E;
  --cobalt-dark: #9A0B23;
  --cobalt-light: #E23A4A;
  --mid: #6B6860;
  --rule: rgba(10, 10, 9, 0.12);
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  /* Backward-compat aliases so legacy inline var() refs in post
     bodies (e.g. style="color: var(--gold)") resolve correctly. */
  --gold: var(--cobalt);
  --gold-light: var(--cobalt-dark);
  --midnight: var(--black);
  --navy: var(--bone-dark);
  --cream: var(--black);
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--bone);
  color: var(--black);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.logo {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2.5vw, 36px);
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--black-soft);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--cobalt);
  transition: width 0.3s cubic-bezier(.16, 1, .3, 1);
}
.nav-links a:hover { color: var(--cobalt); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--cobalt);
  border: none;
  color: #fff;
  padding: 0.7rem 1.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--ff-body);
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}
.nav-cta:hover { background: var(--cobalt-dark); transform: translateY(-1px); }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0;
}
.mobile-toggle span {
  width: 25px; height: 2px;
  background: var(--black);
  transition: all 0.3s ease;
}

/* ─── BLOG INDEX: page header + listing ─── */
.page-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 9rem 5% 2rem;
  text-align: center;
}
.section-label {
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 1rem;
}
.page-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
}

.blog-listing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 5% 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(10, 10, 9, 0.3);
}

.blog-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.blog-date { color: var(--mid); font-size: 0.8rem; }
.blog-category,
.article-category {
  background: rgba(200, 16, 46, 0.1);
  color: var(--cobalt);
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 0.9rem;
}
.blog-excerpt {
  color: var(--mid);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.blog-read-more {
  color: var(--cobalt);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: gap 0.2s, color 0.2s;
}
.blog-read-more:hover { color: var(--cobalt-dark); }

/* ─── ARTICLE (post) ─── */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 8rem 5% 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cobalt);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: opacity 0.25s ease;
}
.back-link:hover { opacity: 0.7; }

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.article-date { color: var(--mid); font-size: 0.9rem; }

.article-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1.75rem;
}

.article-intro {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--black-soft);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.article-content h2 {
  font-family: var(--ff-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 3rem 0 1.25rem;
}
.article-content h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--black);
  margin: 2rem 0 1rem;
}
.article-content p {
  margin-bottom: 1.4rem;
  color: var(--black-soft);
}
.article-content ul,
.article-content ol {
  margin: 1.4rem 0;
  padding-left: 1.4rem;
}
.article-content li {
  margin-bottom: 0.7rem;
  color: var(--black-soft);
}
.article-content strong { color: var(--black); font-weight: 600; }
.article-content a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--cobalt-dark); }

/* Components */
.key-stat {
  background: #fff;
  border-left: 3px solid var(--cobalt);
  border-radius: 0 4px 4px 0;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  box-shadow: 0 12px 30px -22px rgba(10, 10, 9, 0.4);
}
.key-stat .stat-number {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cobalt);
  line-height: 1.1;
}
.key-stat .stat-label { font-size: 0.9rem; color: var(--mid); }

.requirements-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}
.requirements-table th {
  background: var(--bone-dark);
  color: var(--black);
  padding: 1rem;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--cobalt);
}
.requirements-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--black-soft);
}
.requirements-table tr:hover { background: rgba(200, 16, 46, 0.03); }

.insider-tip {
  background: rgba(200, 16, 46, 0.06);
  border: 1px solid rgba(200, 16, 46, 0.18);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 6px;
}
.insider-tip::before {
  content: '💡 Insider Tip';
  display: block;
  font-weight: 700;
  color: var(--cobalt);
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.insider-tip p { color: var(--black-soft); margin-bottom: 0; }

.article-cta {
  background: var(--black);
  border-radius: 8px;
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}
.article-cta h3 {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}
.article-cta p { margin-bottom: 1.5rem; color: rgba(245, 242, 237, 0.8); }

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  padding: 1rem 2.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}
.btn-primary:hover { background: var(--cobalt-light); transform: translateY(-2px); }
/* Override .article-content a (red, underlined) when the link is a button */
.article-content a.btn-primary,
.article-cta a.btn-primary { color: #fff; text-decoration: none; }
.article-content a.btn-primary:hover,
.article-cta a.btn-primary:hover { color: #fff; }

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.related-articles h2 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 1rem;
}
.related-articles ul { list-style: none; padding: 0; }
.related-articles li { margin-bottom: 0.7rem; }
.related-articles a {
  color: var(--cobalt);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s ease;
}
.related-articles a:hover { color: var(--cobalt-dark); text-decoration: underline; }

/* ─── FOOTER ─── */
footer {
  background: var(--bone-dark);
  border-top: 1px solid var(--rule);
  padding: 3rem 5%;
  text-align: center;
  margin-top: 4rem;
}
.footer-logo {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--black-soft);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--cobalt); }
.footer-bottom p { color: var(--mid); font-size: 0.82rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
  .nav-links, .nav-cta { display: none; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 40px -24px rgba(10, 10, 9, 0.3);
    z-index: 1000;
  }
  .nav-links.active li { width: 100%; }
  .nav-links.active a {
    display: block;
    width: 100%;
    padding: 14px 5%;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.active li:last-child a { border-bottom: none; }
  .article-container { padding-top: 6.5rem; }
  .blog-listing { grid-template-columns: 1fr; }
  .page-header { padding-top: 7rem; }
  .requirements-table { font-size: 0.85rem; }
  .requirements-table th,
  .requirements-table td { padding: 0.6rem; }
}
