/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  background: #09090f;
  color: #fff;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll; /* Forces a single scrollbar on html, preventing horizontal layout shift */
}

body {
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow: visible; /* Prevents nested scrollbar on body */
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Glow orb */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  max-width: 90vw;
  max-height: 90vw;
}

/* Nav pill */
.nav-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Stagger delays */
.delay-100 {
  animation-delay: 0.1s;
  opacity: 0;
}

.delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

.delay-300 {
  animation-delay: 0.3s;
  opacity: 0;
}

.delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
}

.delay-500 {
  animation-delay: 0.5s;
  opacity: 0;
}

/* Nav link underline */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #a78bfa;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.4s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 300px;
  opacity: 1;
}

/* ===== HOME PAGE (page-home) ===== */
.page-home .orb-1 {
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.page-home .orb-2 {
  width: min(400px, 70vw);
  height: min(400px, 70vw);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  bottom: -60px;
  right: -60px;
}

.page-home .orb-3 {
  width: min(300px, 60vw);
  height: min(300px, 60vw);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
  bottom: 100px;
  left: -40px;
}

/* Blog section heading */
.page-home .blog-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 2rem;
}

/* Article card */
.page-home .article-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}

.page-home .article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15);
}

/* Cover image wrapper */
.page-home .article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.page-home .article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.page-home .article-card:hover .article-cover img {
  transform: scale(1.04);
}

.page-home .article-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(9, 9, 15, 0.65) 100%);
  pointer-events: none;
}

/* Card body */
.page-home .article-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Category tag */
.page-home .article-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 0.25rem;
}

/* Article title in card */
.page-home .article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin: 0;
}

/* Author + date */
.page-home .article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.page-home .article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
}

.page-home .article-meta .avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Read more link */
.page-home .article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #a78bfa;
  text-decoration: none;
  margin-top: 0.5rem;
  width: fit-content;
  transition: gap 0.25s ease;
}

.page-home .article-read-more:hover {
  gap: 0.6rem;
}

/* Blog grid */
.page-home .blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

@media (max-width: 640px) {
  .page-home .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ARTICLE PAGE (page-article) ===== */
.page-article .orb-1 {
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
}

.page-article .orb-2 {
  width: min(350px, 70vw);
  height: min(350px, 70vw);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  top: 60vh;
  right: -50px;
}

.page-article .orb-3 {
  width: min(280px, 60vw);
  height: min(280px, 60vw);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
  top: 40vh;
  left: -40px;
}

.page-article .article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.page-article .article-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.page-article .article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0;
}

.page-article .article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.page-article .article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
}

.page-article .article-meta .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.page-article .divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 2rem 0;
}

/* Prose */
.page-article .prose {
  max-width: 100%;
}

.page-article .prose p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #c8c8d8;
  margin: 0 0 1.5rem;
}

.page-article .prose h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 700;
  color: #fff;
  margin: 2.5rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
}

.page-article .prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-article .prose ul li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #c8c8d8;
}

.page-article .prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.page-article .prose li strong,
.page-article .prose p strong {
  color: #e5e7eb;
  font-weight: 600;
}

.page-article .prose .callout {
  border-left: 3px solid #7c3aed;
  background: rgba(124, 58, 237, 0.07);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: #c4b5fd;
  font-size: 0.97rem;
  line-height: 1.75;
}

/* Back link */
.page-article .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-article .back-link:hover {
  color: #a78bfa;
}

/* LinkedIn CTA */
.page-article .linkedin-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #a78bfa;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.page-article .linkedin-cta:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
}
