/* ============================================================
   ArtistlyHub — main stylesheet
   Editorial, desktop-first, dark, calm.
   ============================================================ */

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

:root {
  /* Low-glare editorial dark — tuned for long reading sessions */
  --bg: #0e1014;
  --bg-elevated: #13171d;
  --card: #161b22;
  --soft: #1c232c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e6e9ec;
  --text-secondary: #c5cbd3;
  --muted: #8b96a3;
  --accent: #b8c5d4;
  --link: #aec4d9;
  --link-underline: rgba(174, 196, 217, 0.42);
  --link-hover: #c8daf0;
  --affiliate: #c9bea0;
  --affiliate-underline: rgba(201, 190, 160, 0.52);
  --affiliate-hover: #ddd4b8;
  --max: 1180px;
  --reading: 740px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 92%;
  max-width: var(--max);
  margin: 0 auto;
}

/* ============================================================
   Site header (search + navigation)
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.site-search {
  border-bottom: 1px solid var(--border-strong);
  background: var(--card);
  padding: 14px 0 12px;
}

.site-search-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-search-input {
  width: 100%;
  font-size: 16px;
  line-height: 1.4;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input::placeholder {
  color: var(--muted);
}

.site-search-input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(174, 196, 217, 0.18);
}

.search-results {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  padding: 12px 14px;
  max-height: 320px;
  overflow-y: auto;
}

.search-results-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.search-result-link:hover {
  background: var(--soft);
  border-color: var(--border);
}

.search-result-link strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.search-result-meta {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-transform: capitalize;
}

.search-results-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 8px 4px 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

.nav-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.menu {
  display: flex;
  gap: 28px;
  align-items: center;
}

.menu a {
  color: var(--muted);
  transition: 0.2s ease;
  font-size: 15px;
}

.menu a:hover {
  color: var(--text);
}

/* ============================================================
   Hero (homepage)
   ============================================================ */

.hero {
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-bottom: 28px;
  max-width: 860px;
  font-weight: 700;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: 0.2s ease;
  font-size: 15px;
}

.btn-primary {
  background: var(--text);
  color: #000;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-secondary {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

/* ============================================================
   Hero card (creator stack)
   ============================================================ */

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  top: -120px;
  right: -120px;
  pointer-events: none;
}

.hero-card h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-card p {
  color: var(--muted);
  max-width: 460px;
}

.card-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.stack-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  transition: 0.2s ease;
  display: block;
}

.stack-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.stack-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.stack-item span {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   Section + articles grid
   ============================================================ */

.section {
  padding: 32px 0 90px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.section h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.section-link {
  color: var(--muted);
  font-size: 14px;
}

.section-link:hover {
  color: var(--text);
}

.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  transition: 0.25s ease;
}

.article:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
}

.article-content {
  padding: 22px;
}

.article-category {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.article h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  font-weight: 600;
}

.article h3 a:hover {
  color: var(--accent);
}

.article p {
  color: var(--muted);
  font-size: 15px;
}

.article-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   Archive page
   ============================================================ */

.archive-hero {
  padding: 70px 0 30px;
}

.archive-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 20px;
}

.archive-intro {
  color: var(--muted);
  font-size: 18px;
  max-width: 700px;
}

.empty-state {
  color: var(--muted);
  font-size: 16px;
  padding: 40px 0;
}

/* ============================================================
   Single article page
   ============================================================ */

.article-page {
  padding: 60px 0 90px;
}

.article-container {
  max-width: var(--reading);
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb .sep {
  margin: 0 8px;
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--text);
}

.article-header {
  margin-bottom: 36px;
}

.article-header h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 12px 0 18px;
  max-width: none;
}

.article-header .article-meta {
  color: var(--muted);
  font-size: 14px;
}

.article-lead {
  font-size: 17px;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding-left: 18px;
  margin-bottom: 36px;
}

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

/* Editorial video embed (frontmatter video_url) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 2.5em;
  border-radius: 8px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Reading path navigation (frontmatter path: "...") */

.reading-path {
  margin: 0 0 32px;
  padding: 1.25em 1.5em;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.reading-path-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5em;
  font-weight: 600;
}

.reading-path-progress {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 1em;
}

.reading-path-progress strong {
  color: var(--text);
  font-weight: 600;
}

.reading-path-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.reading-path-steps li {
  font-size: 15px;
  color: var(--text-secondary);
}

.reading-path-steps li.current {
  color: var(--text);
  font-weight: 600;
}

.reading-path-step-num {
  color: var(--muted);
  margin-right: 0.35em;
}

.reading-path-steps a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}

.reading-path-steps a:hover {
  color: var(--link-hover);
}

.reading-path-current {
  color: var(--text);
}

/* Cognitive blocks (:::insight / :::workflow in markdown) */


.article-body .cognitive-block {
  margin: 1.75em 0;
  padding: 1.25em 1.5em;
  border-radius: 8px;
  border-left: 4px solid var(--border-strong);
  font-size: 17px;
  line-height: 1.7;
}

.article-body .cognitive-block p:last-child {
  margin-bottom: 0;
}

.article-body .cognitive-block.insight {
  background: rgba(174, 196, 217, 0.08);
  border-left-color: var(--link);
}

.article-body .cognitive-block.workflow {
  background: rgba(201, 190, 160, 0.1);
  border-left-color: var(--affiliate);
}

/* Article body — the reading column itself */

.article-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
}

.article-body > * + * {
  margin-top: 0;
}

.article-body h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  font-weight: 600;
  line-height: 1.2;
}

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

.article-body h3 {
  font-size: 22px;
  margin-top: 2em;
  margin-bottom: 0.7em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.article-body h4 {
  font-size: 18px;
  margin-top: 1.75em;
  margin-bottom: 0.65em;
  font-weight: 600;
  line-height: 1.3;
}

.article-body p {
  color: var(--text);
  margin-bottom: 1.6em;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-body a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

.article-body a.affiliate-ref {
  color: var(--affiliate);
  text-decoration: underline;
  text-decoration-color: var(--affiliate-underline);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.article-body a.affiliate-ref:hover {
  color: var(--affiliate-hover);
  text-decoration-color: var(--affiliate-hover);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}

.article-body li {
  margin-bottom: 0.6em;
  color: var(--text);
}

.article-body li:last-child {
  margin-bottom: 0;
}

.article-body blockquote {
  border-left: 3px solid var(--border);
  padding: 4px 0 4px 22px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.4em;
}

.article-body code {
  background: var(--soft);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.article-body pre {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 1.4em;
}

.article-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}

.article-body img,
.article-body svg {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.2em 0;
}

/* Article footer */

.article-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 56px 0 32px;
}

.article-footer {
  color: var(--muted);
  font-size: 15px;
}

.article-attribution {
  margin-bottom: 14px;
}

.article-attribution a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.15em;
}

.pillar-ref {
  font-size: 14px;
}

.pillar-ref a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.15em;
}

/* Related */

.related-articles {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  font-weight: 600;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.related-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: 0.2s ease;
}

.related-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.related-item strong {
  font-size: 16px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.related-item span {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-text {
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

/* ============================================================
   Responsive — desktop-first but doesn't break on mobile
   ============================================================ */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .articles  { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  h1 { font-size: 52px; }
}

@media (max-width: 640px) {
  .nav-inner { height: 66px; }
  .hero { padding-top: 56px; padding-bottom: 56px; }
  .articles { grid-template-columns: 1fr; }
  h1 { font-size: 40px; }
  .hero p { font-size: 16px; }
  .hero-card { min-height: auto; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; }
}
