/* ============================================
   PythonHindi Blog — Light Theme
   blog.pythonhindi.in
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Source+Sans+3:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:          #fafaf8;
  --bg2:         #f2f0eb;
  --surface:     #ffffff;
  --border:      #e8e4de;
  --text:        #1a1a1a;
  --text-dim:    #6b6560;
  --text-light:  #9d9891;
  --accent:      #e8450a;
  --accent2:     #2563eb;
  --accent3:     #059669;
  --yellow:      #f59e0b;
  --tag-tips:    #dbeafe;
  --tag-tips-t:  #1d4ed8;
  --tag-career:  #dcfce7;
  --tag-career-t:#15803d;
  --tag-money:   #fef3c7;
  --tag-money-t: #b45309;
  --tag-review:  #fce7f3;
  --tag-review-t:#be185d;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --radius:      12px;
  --radius-sm:   8px;
  --max-w:       1140px;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Source Sans 3', system-ui, sans-serif;
  --font-code:   'JetBrains Mono', monospace;
}

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

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

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

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

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---- TOP BAR ---- */
.top-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
}
.top-bar a { color: #fff; text-decoration: underline; }

/* ---- HEADER ---- */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  font-weight: 900;
}
.logo-text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.logo-text span { color: var(--accent); }
.logo-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  transition: all .2s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
}
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-left: 8px;
  transition: opacity .2s;
}
.nav-cta:hover { opacity: .88; text-decoration: none; }

/* hamburger */
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .3s;
}
.mob-menu {
  display: none;
  position: fixed; top: 66px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--text);
  padding: 16px 24px;
  flex-direction: column; gap: 4px;
  z-index: 99;
  box-shadow: var(--shadow);
}
.mob-menu a {
  display: block; padding: 12px 16px;
  font-weight: 600; color: var(--text);
  border-radius: 8px; text-decoration: none;
}
.mob-menu a:hover { background: var(--bg2); }
.mob-menu.open { display: flex; }

/* ---- HERO (index page) ---- */
.hero {
  background: var(--text);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 40px,
    rgba(255,255,255,.02) 40px, rgba(255,255,255,.02) 80px
  );
}
.hero-inner { position: relative; z-index: 1; }
.hero-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.stat { }
.stat-num {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ---- CATEGORY TABS ---- */
.cat-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
}
.cat-tabs-inner {
  display: flex; gap: 0;
  padding: 0;
}
.cat-tab {
  padding: 14px 24px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all .2s;
  text-decoration: none;
  display: block;
}
.cat-tab:hover { color: var(--text); text-decoration: none; }
.cat-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ---- FEATURED POST ---- */
.featured-post {
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 40px 0 32px;
  box-shadow: 4px 4px 0 var(--text);
}
.featured-visual {
  background: var(--text);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.featured-visual-inner {
  font-family: var(--font-code);
  color: #a8e063;
  font-size: 13px;
  line-height: 1.8;
}
.featured-content { padding: 40px; }
.featured-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.featured-content h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text);
}
.featured-content p { color: var(--text-dim); margin-bottom: 24px; line-height: 1.6; }
.read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s;
  text-decoration: none;
}
.read-btn:hover { background: var(--accent); text-decoration: none; }

/* ---- POST GRID ---- */
.section-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1; height: 2px;
  background: var(--border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.post-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text);
  text-decoration: none;
}
.post-card-top {
  background: var(--bg2);
  padding: 28px 24px 20px;
  font-size: 40px;
  line-height: 1;
  border-bottom: 1.5px solid var(--border);
  min-height: 100px;
  display: flex; align-items: flex-end;
}
.post-card-body { padding: 20px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.post-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.tag-tips    { background: var(--tag-tips);   color: var(--tag-tips-t); }
.tag-career  { background: var(--tag-career); color: var(--tag-career-t); }
.tag-money   { background: var(--tag-money);  color: var(--tag-money-t); }
.tag-review  { background: var(--tag-review); color: var(--tag-review-t); }

.post-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
  flex: 1;
}
.post-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 16px; }
.post-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-light);
  padding-top: 12px; border-top: 1px solid var(--border);
}
.read-more {
  font-size: 13px; font-weight: 700;
  color: var(--accent); display: flex; align-items: center; gap: 4px;
}

/* ---- SIDEBAR ---- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin: 40px 0;
}
.sidebar {}
.sidebar-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-card h4 {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text); font-weight: 500; }
.sidebar-list a:hover { color: var(--accent); text-decoration: none; }

.newsletter-box {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.newsletter-box h4 {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 800;
  margin-bottom: 8px;
}
.newsletter-box p { font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 16px; }
.newsletter-box a {
  display: block;
  background: var(--accent);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

/* ---- ARTICLE PAGE ---- */
.article-hero {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 48px 0 40px;
}
.article-breadcrumb {
  font-size: 13px; color: var(--text-light);
  margin-bottom: 20px; display: flex; gap: 6px; align-items: center;
}
.article-breadcrumb a { color: var(--text-dim); }
.article-label {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px;
  margin-bottom: 16px;
}
.article-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; line-height: 1.15;
  color: var(--text); margin-bottom: 20px;
}
.article-meta {
  display: flex; gap: 20px; align-items: center;
  font-size: 14px; color: var(--text-light);
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  margin: 48px 0 64px;
}

/* Article Content */
.article-content { }
.article-content h2 {
  font-family: var(--font-head);
  font-size: 26px; font-weight: 800;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700;
  color: var(--text); margin: 28px 0 12px;
}
.article-content p {
  font-size: 17px; line-height: 1.85;
  color: #2a2a2a; margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  padding-left: 24px; margin-bottom: 20px;
}
.article-content li {
  font-size: 16px; line-height: 1.8;
  margin-bottom: 8px; color: #2a2a2a;
}
.article-content strong { color: var(--text); font-weight: 700; }
.article-content a { color: var(--accent2); font-weight: 600; }

/* Info boxes */
.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--accent2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 15px; line-height: 1.7;
}
.tip-box {
  background: #f0fdf4;
  border-left: 4px solid var(--accent3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin: 24px 0;
  font-size: 15px; line-height: 1.7;
}
.warn-box {
  background: #fffbeb;
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin: 24px 0;
  font-size: 15px; line-height: 1.7;
}
.promo-box {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  display: flex; align-items: center; gap: 24px;
}
.promo-box-text h4 {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 800; margin-bottom: 8px;
}
.promo-box-text p { font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 12px; }
.promo-btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 10px 24px; border-radius: 8px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
  text-decoration: none;
}
.promo-btn:hover { opacity: .88; text-decoration: none; }

/* Code block */
.code-block {
  background: #1a1a1a; border-radius: var(--radius-sm);
  margin: 24px 0; overflow: hidden;
}
.code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: #2a2a2a; border-bottom: 1px solid #3a3a3a;
  font-size: 12px; color: #888; font-family: var(--font-code);
}
.code-block pre {
  padding: 20px; overflow-x: auto;
  font-family: var(--font-code); font-size: 14px;
  line-height: 1.7; color: #e8e8e8;
}
.copy-btn {
  background: #3a3a3a; color: #ccc;
  border: none; padding: 4px 12px; border-radius: 4px;
  font-size: 12px; cursor: pointer; font-family: var(--font-body);
}
.copy-btn:hover { background: var(--accent); color: #fff; }

/* Salary Table */
.salary-table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0; font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.salary-table th {
  background: var(--text); color: #fff;
  padding: 14px 16px; text-align: left;
  font-weight: 700; font-size: 13px;
}
.salary-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.salary-table tr:last-child td { border-bottom: none; }
.salary-table tr:nth-child(even) td { background: var(--bg2); }

/* Number list */
.num-list { list-style: none; counter-reset: items; }
.num-list li {
  counter-increment: items;
  display: flex; gap: 16px; margin-bottom: 20px;
  align-items: flex-start;
}
.num-list li::before {
  content: counter(items);
  min-width: 32px; height: 32px;
  background: var(--accent); color: #fff;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0;
  margin-top: 2px;
}

/* Tags */
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0; }
.article-tag {
  padding: 6px 16px; border-radius: 20px;
  background: var(--bg2); color: var(--text-dim);
  font-size: 13px; font-weight: 600; border: 1px solid var(--border);
}

/* Related posts */
.related-posts { margin: 48px 0 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: border-color .2s, transform .2s;
  text-decoration: none; display: block;
}
.related-card:hover {
  border-color: var(--text); transform: translateY(-2px);
  text-decoration: none;
}
.related-card .post-tag { margin-bottom: 8px; }
.related-card h4 {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 800;
  color: var(--text); line-height: 1.3;
}

/* ---- AD CONTAINER ---- */
.ad-container {
  background: var(--bg2); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  margin: 28px 0; min-height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ad-label { font-size: 10px; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--text); color: rgba(255,255,255,.8);
  padding: 48px 0 24px; margin-top: 64px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .logo-text { color: #fff; }
.footer-desc { font-size: 14px; color: rgba(255,255,255,.6); margin: 12px 0; line-height: 1.6; }
.footer-col h5 {
  font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,.75); font-size: 14px; font-weight: 500; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; text-align: center;
  font-size: 13px; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-visual { display: none; }
  .blog-layout { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 32px; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .promo-box { flex-direction: column; }
}
