/*
  Styles for Bhavyarsh Masale static site
  - Mobile-first, responsive
  - Clean, modern typography
*/

:root {
  --brand: #b91c1c; /* red-700 */
  --brand-600: #dc2626; /* red-600 */
  --ink: #0f172a; /* slate-900 */
  --muted: #64748b; /* slate-500 */
  --bg: #fffaf7;
  --card: #ffffff;
  --ring: rgba(185, 28, 28, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

/* Top contact bar */
.topbar { background: #ffffff; border-bottom: 1px solid #f1f5f9; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; font-size: 0.875rem; }
.topbar-links { display: flex; align-items: center; gap: 14px; }
.contact-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; opacity: 0.9; }
.contact-link:hover { color: var(--brand); opacity: 1; }
.icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.25;
  margin: 0 0 0.6rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f1f5f9;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; }
.brand-text { font-weight: 700; }

/* Image logo support */
.brand-logo { height: 36px; width: auto; display: block; border-radius: 8px; }

.nav { display: none; gap: 16px; }
.nav-link { color: var(--ink); text-decoration: none; opacity: 0.8; }
.nav-link:hover, .nav-link.active { color: var(--brand); opacity: 1; }

@media (min-width: 768px) {
  .nav { display: flex; }
}

/* Small-screen adjustments for the top contact bar */
@media (max-width: 640px) {
  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 0;
    row-gap: 6px;
  }
  .topbar-links {
    flex-wrap: wrap;
    gap: 10px;
  }
  .contact-link { font-size: 0.84rem; }
}

.hero { padding: 32px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.hero-copy p { color: var(--muted); }
.hero-cta { display: flex; gap: 12px; margin: 14px 0 8px; }

.btn { display: inline-block; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: #fff; color: var(--ink); border-color: #e2e8f0; }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.search-wrap { margin-top: 10px; }
.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  outline: none;
  box-shadow: 0 0 0 0 var(--ring);
}
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

.hero-art { display: none; position: relative; }
.hero-art img { width: 100%; max-width: 420px; border-radius: 16px; }
.spice-circle { position: absolute; inset: -16px; border-radius: 24px; background: radial-gradient(80% 60% at 30% 20%, rgba(220,38,38,0.2), transparent 60%); z-index: -1; }

@media (min-width: 960px) {
  .hero { padding: 56px 0 40px; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-art { display: block; justify-self: end; }
  h1 { font-size: 2.6rem; }
}

.section { padding: 28px 0; }
.section-head { margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.blog-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--card); border: 1px solid #f1f5f9; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.card-cover { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 1.1rem; margin: 0; }
.card-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.card-excerpt { color: var(--ink); opacity: 0.9; }
.card-actions { margin-top: auto; display: flex; }
.card-actions a { width: 100%; text-align: center; }

.site-footer { border-top: 1px solid #f1f5f9; margin-top: 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-link { color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--brand); }
.footer-bottom { padding: 10px 0 16px; }

.footer-contact { display: grid; grid-template-columns: 1fr; gap: 10px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.footer-social a:hover { color: var(--brand); }

@media (min-width: 768px) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } }

/* Blog page */
.post { padding: 16px 0 24px; }
.post-header { margin-bottom: 6px; }
.post-category { color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.post-excerpt { color: var(--muted); }
.post-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); margin: 10px 0; }
.post-cover { width: 100%; height: auto; border-radius: 16px; margin: 12px 0; }
.post-content { max-width: 760px; }
.post-content h2 { margin-top: 1.2rem; }
.post-content img { max-width: 100%; border-radius: 12px; }
.post-content blockquote { border-left: 4px solid var(--brand); padding-left: 12px; color: #334155; }
.post-content ul, .post-content ol { padding-left: 20px; }

.post-toc { position: sticky; top: 84px; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: #fff; margin: 16px 0; }
.post-toc a { display: block; color: var(--muted); text-decoration: none; margin: 6px 0; }
.post-toc a:hover { color: var(--brand); }

@media (min-width: 1024px) {
  .post { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
  .post-header { grid-column: 1 / -1; }
  .post-content { grid-column: 1; }
  .post-toc { grid-column: 2; align-self: start; }
}

.related { padding-top: 0; }

/* Resources section */
.post-resources { margin-top: 16px; border: 1px solid #e2e8f0; background: #fff; border-radius: 12px; padding: 12px; }
.post-resources a { color: var(--brand); text-decoration: none; }
.post-resources a:hover { text-decoration: underline; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: white; box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  text-decoration: none;
}
.wa-float:hover { filter: brightness(0.95); }
/* Ensure WhatsApp icon is visible and sized well */
.wa-float .icon { width: 26px; height: 26px; }
@media (max-width: 480px) {
  .wa-float { right: 12px; bottom: 12px; width: 48px; height: 48px; }
  .wa-float .icon { width: 22px; height: 22px; }
}


