/*-----------------------------------*\
  #blog-styles.css — Shared Blog Page Styles
\*-----------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,700;1,500;1,700&display=swap');

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--blog-bg);
  color: var(--blog-text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ---- READING PROGRESS BAR ---- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--blog-accent);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--blog-accent);
}

/* ---- BACK BUTTON ---- */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--blog-card-bg);
  color: var(--blog-accent);
  border: 1px solid var(--blog-accent-dim);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.back-btn:hover {
  background: var(--blog-accent);
  color: var(--blog-bg);
  transform: translateX(-4px);
}

.back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.back-btn:hover svg { transform: translateX(-3px); }

/* ---- HERO SECTION ---- */
.blog-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--blog-hero-bg);
  z-index: 0;
}

/* Animated floating orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: floatOrb var(--orb-duration, 8s) ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(var(--tx, 30px), var(--ty, -30px)) scale(1.15); }
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--blog-hero-overlay);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  width: 100%;
}

.hero-tag {
  display: inline-block;
  background: var(--blog-accent);
  color: var(--blog-bg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--blog-heading);
  margin-bottom: 20px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--blog-text-muted);
}

.hero-meta .sep { opacity: 0.4; }

.read-time {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---- MAIN ARTICLE ---- */
.blog-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ---- TYPOGRAPHY ---- */
.blog-article p {
  font-size: 16px;
  line-height: 1.95;
  color: var(--blog-text);
  margin-bottom: 24px;
}

.blog-article h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--blog-heading);
  margin: 48px 0 20px;
  position: relative;
  padding-left: 20px;
}

.blog-article h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--blog-accent);
  border-radius: 4px;
}

.blog-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blog-heading);
  margin: 32px 0 12px;
}

/* ---- YELLOW HIGHLIGHT ---- */
.hl {
  background: linear-gradient(120deg, #ffe600 0%, #ffd000 100%);
  color: #1a1a00;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}

/* ---- BLOCKQUOTE ---- */
blockquote {
  position: relative;
  margin: 40px 0;
  padding: 28px 32px 28px 44px;
  background: var(--blog-quote-bg);
  border-left: 4px solid var(--blog-accent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--blog-heading);
  line-height: 1.7;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: -12px;
  left: 14px;
  font-size: 80px;
  color: var(--blog-accent);
  font-family: 'Playfair Display', serif;
  line-height: 1;
  opacity: 0.6;
}

blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  font-family: 'Poppins', sans-serif;
  color: var(--blog-text-muted);
}

/* ---- PULL QUOTE ---- */
.pull-quote {
  margin: 44px -20px;
  padding: 32px 40px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  color: var(--blog-accent);
  border-top: 1px solid var(--blog-accent-dim);
  border-bottom: 1px solid var(--blog-accent-dim);
  position: relative;
  line-height: 1.5;
}

/* ---- TIP / CALLOUT BOX ---- */
.callout {
  display: flex;
  gap: 16px;
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-accent-dim);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 32px 0;
}

.callout-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.callout-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--blog-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.callout-body p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.7;
}

/* ---- NUMBERED TIP LIST ---- */
.tip-list {
  list-style: none;
  counter-reset: tips;
  margin: 16px 0 32px;
}

.tip-list li {
  counter-increment: tips;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 20px 22px;
  background: var(--blog-card-bg);
  border-radius: 14px;
  border: 1px solid var(--blog-border);
  transition: transform 0.2s ease, border-color 0.3s ease;
}

.tip-list li:hover {
  transform: translateX(6px);
  border-color: var(--blog-accent-dim);
}

.tip-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--blog-accent);
  opacity: 0.5;
  line-height: 1;
  flex-shrink: 0;
  min-width: 36px;
}

.tip-text { flex: 1; }

.tip-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--blog-heading);
  margin-bottom: 6px;
}

.tip-text p {
  font-size: 14px;
  margin-bottom: 0;
}

/* ---- SUB-BULLET LIST ---- */
.sub-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.sub-list li {
  font-size: 14px;
  padding: 4px 0 4px 20px;
  position: relative;
  margin-bottom: 0;
  color: var(--blog-text);
  line-height: 1.6;
}

.sub-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blog-accent);
}

/* ---- PROJECT LINKS SECTION ---- */
.project-links-section {
  margin: 48px 0 0;
  padding: 36px;
  background: var(--blog-card-bg);
  border-radius: 18px;
  border: 1px solid var(--blog-accent-dim);
  text-align: center;
}

.project-links-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--blog-heading);
  margin-bottom: 8px;
}

.project-links-section p {
  font-size: 14px;
  color: var(--blog-text-muted);
  margin-bottom: 24px;
}

.proj-link-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.proj-btn-live {
  background: var(--blog-accent);
  color: var(--blog-bg);
}

.proj-btn-live:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.proj-btn-github {
  background: transparent;
  color: var(--blog-accent);
  border: 1.5px solid var(--blog-accent);
}

.proj-btn-github:hover {
  background: var(--blog-accent);
  color: var(--blog-bg);
  transform: translateY(-3px);
}

/* ---- DIVIDER ---- */
.blog-divider {
  border: none;
  height: 1px;
  background: var(--blog-border);
  margin: 44px 0;
  opacity: 0.5;
}

/* ---- AUTHOR TAG ---- */
.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px;
  background: var(--blog-card-bg);
  border-radius: 16px;
  border: 1px solid var(--blog-border);
  margin: 48px 0 0;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blog-accent);
  flex-shrink: 0;
}

.author-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--blog-heading);
  margin-bottom: 3px;
}

.author-info span {
  font-size: 13px;
  color: var(--blog-text-muted);
}

/* ---- SCROLL REVEAL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- FOOTER ---- */
.blog-footer {
  text-align: center;
  padding: 40px 24px;
  font-size: 13px;
  color: var(--blog-text-muted);
  border-top: 1px solid var(--blog-border);
}

/* ---- INLINE BLOG IMAGE ---- */
.blog-inline-img {
  margin: 36px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--blog-accent-dim);
}

.blog-inline-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-inline-img:hover img { transform: scale(1.02); }

.blog-inline-img figcaption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--blog-text-muted);
  font-style: italic;
  text-align: center;
  background: var(--blog-card-bg);
  border-top: 1px solid var(--blog-border);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .hero-content { padding: 60px 20px 40px; }
  .blog-article { padding: 40px 20px 60px; }
  .pull-quote { margin: 40px -4px; padding: 24px 20px; }
  .callout { flex-direction: column; gap: 10px; }
  .back-btn span { display: none; }
  .back-btn { padding: 10px 12px; }
  .project-links-section { padding: 24px 20px; }
}
