/* =============================================
   HOOPSIPER – Article / Blog Post Page CSS
   ============================================= */
:root {
  --bg-primary: #0d0e14;
  --bg-secondary: #13141c;
  --bg-card: #1a1b26;
  --bg-card-hover: #1f2133;
  --accent: #ffb800;
  --accent-hover: #ffd04d;
  --accent-soft: rgba(255, 184, 0, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #9395a5;
  --text-muted: #5c5e72;
  --border: #23253a;
  --border-accent: rgba(255, 184, 0, 0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'Fira Code', monospace;
  --js: #ffb800;
  --js-bg: rgba(255, 184, 0, 0.1);
  --note-blue: rgba(96, 165, 250, 0.12);
  --note-blue-border: rgba(96, 165, 250, 0.3);
  --note-yellow: rgba(255, 184, 0, 0.1);
  --note-yellow-border: rgba(255, 184, 0, 0.35);
  --note-green: rgba(74, 222, 128, 0.1);
  --note-green-border: rgba(74, 222, 128, 0.3);
  --note-red: rgba(248, 113, 113, 0.1);
  --note-red-border: rgba(248, 113, 113, 0.3);
}

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

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden
}

a {
  text-decoration: none;
  color: inherit
}

::-webkit-scrollbar {
  width: 5px
}

::-webkit-scrollbar-track {
  background: var(--bg-primary)
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent)
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 14, 20, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.5px
}
.nav-logo img{
  width: 200px;
}

.nav-logo .hs {
  color: var(--accent)
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 800;
  color: #000
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none
}

.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 13px;
  border-radius: var(--radius-sm);
  transition: all .2s
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card)
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft)
}

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center
}

.btn-outline {
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  font-family: var(--font)
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font)
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px)
}

/* ── ARTICLE HERO ── */
.article-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 36px 10% 32px;
  position: relative;
  overflow: hidden
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 184, 0, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 184, 0, .025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none
}

.article-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 184, 0, .05) 0%, transparent 70%);
  pointer-events: none
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 100%
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 14px
}

.breadcrumb a {
  color: var(--accent);
  transition: opacity .2s
}

.breadcrumb a:hover {
  opacity: .75
}

.breadcrumb span {
  color: var(--text-muted)
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px
}

.art-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--mono);
  background: var(--js-bg);
  color: var(--js);
  border: 1px solid rgba(255, 184, 0, .2)
}

.art-tag.green {
  background: rgba(74, 222, 128, .1);
  color: #4ade80;
  border-color: rgba(74, 222, 128, .25)
}

.art-tag.blue {
  background: rgba(96, 165, 250, .1);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, .25)
}

.art-read-time {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--mono)
}

.art-level {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 5px
}

.level-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--medium, #fb923c)
}

.article-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 14px
}

.article-hero h1 .highlight {
  color: var(--accent)
}

.article-hero .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.7;
  margin-bottom: 20px
}

.author-row {
  display: flex;
  align-items: center;
  gap: 12px
}

.author-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), #ff6b35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  color: #000;
  flex-shrink: 0
}
.author-avatar img{
  width: 40px;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.author-name {
  font-size: .88rem;
  font-weight: 600
}

.author-date {
  font-size: .74rem;
  color: var(--text-muted);
  font-family: var(--mono)
}

.progress-bar-wrap {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 99
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff6b35);
  width: 0%;
  transition: width .1s linear
}

/* ── PAGE LAYOUT ── */
.article-layout {
  display: flex;
  gap: 0;
  max-width: 100%;
  padding: 0 5%;
  margin: 0 auto;
  padding-top: 36px;
  padding-bottom: 60px
}

/* ── TOC SIDEBAR ── */
.toc-sidebar {
  width: 220px;
  flex-shrink: 0;
  margin-right: 48px;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto
}

.toc-title {
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 12px
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px
}

.toc-item a {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  transition: all .2s;
  line-height: 1.4
}

.toc-item a:hover {
  color: var(--text-primary);
  border-left-color: var(--accent)
}

.toc-item.active a {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0
}

.toc-item.sub a {
  padding-left: 22px;
  font-size: .78rem
}

.toc-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0
}

.toc-share {
  margin-top: 14px
}

.toc-share-title {
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px
}

.share-btns {
  display: flex;
  gap: 7px;
  flex-wrap: wrap
}

.share-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font)
}

.share-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent)
}

/* ── ARTICLE BODY ── */
.article-body {
  flex: 1;
  min-width: 0;
  max-width: 740px
}

/* typography */
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.5px;
  margin: 40px 0 14px;
  padding-top: 8px;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 28px
}

.article-body h2:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-primary)
}

.article-body p {
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 600
}

.article-body em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px
}

.article-body ul li,
.article-body ol li {
  font-size: .93rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.75
}

.article-body ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .8rem;
  top: 3px
}

.article-body ol {
  counter-reset: ol-counter
}

.article-body ol li {
  counter-increment: ol-counter
}

.article-body ol li::before {
  content: counter(ol-counter)'.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .8rem;
  font-family: var(--mono);
  font-weight: 700;
  top: 2px
}

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(255, 184, 0, .3);
  transition: border-color .2s
}

.article-body a:hover {
  border-bottom-color: var(--accent)
}

.inline-code {
  font-family: var(--mono);
  font-size: .82rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: #7dcfff
}

/* code blocks */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0
}

.code-block-header {
  background: var(--bg-secondary);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border)
}

.code-lang {
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px
}

.code-lang::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(255, 184, 0, .5)
}

.copy-btn {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font)
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--border-accent)
}

.copy-btn.copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, .3)
}

.code-content {
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.8;
  overflow-x: auto
}

/* syntax tokens */
.kw {
  color: #bb9af7
}

.fn {
  color: #7dcfff
}

.str {
  color: #9ece6a
}

.cm {
  color: #565f89;
  font-style: italic
}

.op {
  color: var(--accent)
}

.vr {
  color: #e0af68
}

.nm {
  color: #ff9e64
}

.cls {
  color: #f7768e
}

.pn {
  color: #c0caf5
}

.kw2 {
  color: #f7768e
}

.meta {
  color: #9ece6a
}

/* callout boxes */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: .9rem;
  border-left: 3px solid;
  line-height: 1.7
}

.callout-icon {
  font-size: 1rem;
  margin-right: 8px
}

.callout.info {
  background: var(--note-blue);
  border-color: #60a5fa;
  color: #93c5fd
}

.callout.warning {
  background: var(--note-yellow);
  border-color: var(--accent);
  color: #fcd34d
}

.callout.success {
  background: var(--note-green);
  border-color: #4ade80;
  color: #86efac
}

.callout.danger {
  background: var(--note-red);
  border-color: #f87171;
  color: #fca5a5
}

.callout strong {
  color: inherit
}

/* comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .88rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border)
}

.compare-table th {
  background: var(--bg-secondary);
  padding: 11px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: .8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border)
}

.compare-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top
}

.compare-table tr:last-child td {
  border-bottom: none
}

.compare-table tr:hover td {
  background: var(--bg-card-hover)
}

.compare-table td:first-child {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600
}

.badge-good {
  background: rgba(74, 222, 128, .1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, .25);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 700
}

.badge-bad {
  background: rgba(248, 113, 113, .1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, .25);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 700
}

.badge-ok {
  background: rgba(251, 146, 60, .1);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, .25);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 700
}

/* section divider */
.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0
}

/* key takeaways */
.takeaways {
  background: linear-gradient(135deg, rgba(255, 184, 0, .06), rgba(255, 107, 53, .03));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0
}

.takeaways-title {
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px
}

.takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.takeaways ul li {
  font-size: .9rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative
}

.takeaways ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700
}

/* article footer */
.article-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border)
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px
}

.article-tags-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600
}

.article-tag-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: .75rem;
  color: var(--text-secondary);
  font-family: var(--mono);
  transition: all .2s;
  cursor: pointer
}

.article-tag-pill:hover {
  border-color: var(--border-accent);
  color: var(--accent)
}

.author-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px
}

.author-card-avatar {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), #ff6b35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #000;
  flex-shrink: 0
}
.author-card img{
  width: 53px;
}

.author-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px
}

.author-card-role {
  font-size: .78rem;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 8px
}

.author-card-bio {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.65
}

/* related articles */
.related-section {
  margin-top: 40px
}

.related-title {
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 16px
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all .25s;
  cursor: pointer
}

.related-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3)
}

.related-tag {
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 8px
}

.related-card h4 {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 6px;
  transition: color .2s
}

.related-card:hover h4 {
  color: var(--accent)
}

.related-card p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5
}

/* animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.article-hero {
  animation: fadeUp .4s ease both
}

.article-layout {
  animation: fadeUp .4s .1s ease both
}

/* responsive */
@media(max-width:1024px) {
  .toc-sidebar {
    display: none
  }

  .article-layout {
    padding: 28px 4% 48px
  }
}

@media(max-width:600px) {
  nav {
    padding: 0 4%
  }
   .nav-cta .btn-outline{
        display: none;
     }
     .nav-cta .btn-primary{
        height: 43px;
     }

  .nav-links {
    display: none
  }

  .article-layout {
    padding: 20px 4% 36px
  }

  .article-hero {
    padding: 24px 4% 20px
  }
}