/* ================================================
   INSIGHTS — Design System
   Minimal, editorial, research-driven
   ================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #FFFFFF;
  color: #000000;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: #000000;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.875rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.375rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #000000;
}

a {
  color: #000000;
  text-decoration: underline;
  text-decoration-color: #E5E5E5;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: #000000;
}

strong { font-weight: 600; }
em { font-style: italic; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container--wide {
  max-width: 1100px;
}

.container--narrow {
  max-width: 700px;
}

main {
  flex: 1;
}

/* ── Site Header ── */
.site-header {
  border-bottom: 1px solid #E5E5E5;
  padding: 1rem 0;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: #000000;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.7;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #666666;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: #000000;
  text-decoration: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-admin {
  font-size: 0.75rem;
  font-weight: 500;
  color: #666666;
  text-decoration: none;
  border: 1px solid #E5E5E5;
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.btn-admin:hover {
  color: #000000;
  border-color: #000000;
  text-decoration: none;
}

/* ── Site Footer ── */
.site-footer {
  border-top: 1px solid #E5E5E5;
  padding: 2.5rem 0;
  margin-top: 5rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__brand {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
}

.site-footer__links a {
  font-size: 0.8125rem;
  color: #666666;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__links a:hover {
  color: #000000;
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: #999999;
  width: 100%;
}

/* ── Page Header ── */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 3rem;
}

.page-header__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 0.75rem;
}

.page-header__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-header__description {
  margin-top: 0.875rem;
  font-size: 1.0625rem;
  color: #666666;
  max-width: 600px;
  line-height: 1.65;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid #E5E5E5;
  margin: 2rem 0;
}

/* ── Topic Pill ── */
.topic-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666666;
  text-decoration: none;
  border: 1px solid #E5E5E5;
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.topic-pill:hover {
  color: #000000;
  border-color: #000000;
  text-decoration: none;
}

.topic-pill--primary {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.topic-pill--primary:hover {
  background: #333333;
  color: #FFFFFF;
}

/* ── Insight Cards ── */
.insights-grid {
  display: grid;
  gap: 0;
}

.insight-card {
  padding: 2rem 0;
  border-bottom: 1px solid #E5E5E5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

.insight-card:first-child {
  border-top: 1px solid #E5E5E5;
}

.insight-card__body {
  min-width: 0;
}

.insight-card__meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.insight-card__date {
  font-size: 0.8125rem;
  color: #999999;
}

.insight-card__title {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.insight-card__title a {
  text-decoration: none;
  color: #000000;
  transition: opacity 0.15s ease;
}

.insight-card__title a:hover {
  opacity: 0.65;
}

.insight-card__excerpt {
  font-size: 0.9375rem;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 0.875rem;
}

.insight-card__footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.insight-card__author {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666666;
  text-decoration: none;
}

.insight-card__author:hover {
  color: #000000;
}

.insight-card__read-time {
  font-size: 0.8125rem;
  color: #999999;
}

.insight-card__image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(20%);
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-bar__label {
  font-size: 0.8125rem;
  color: #999999;
  margin-right: 0.25rem;
}

.filter-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666666;
  background: none;
  border: 1px solid #E5E5E5;
  border-radius: 100px;
  padding: 0.3rem 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.filter-btn:hover,
.filter-btn--active {
  color: #000000;
  border-color: #000000;
}

/* ── Search Bar ── */
.search-bar {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #000000;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: #000000;
}

.search-input::placeholder {
  color: #BBBBBB;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #BBBBBB;
  pointer-events: none;
  font-size: 0.875rem;
}

/* ── Rich Text Content (Insight body) ── */
.rich-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #111111;
}

.rich-content h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E5E5;
}

.rich-content h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.rich-content p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.rich-content ul,
.rich-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.rich-content li {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.rich-content blockquote {
  border-left: 3px solid #000000;
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  color: #444444;
}

.rich-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: #F5F5F5;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.rich-content pre {
  background: #F5F5F5;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.rich-content a {
  color: #000000;
  text-decoration: underline;
  text-decoration-color: #CCCCCC;
}

.rich-content a:hover {
  text-decoration-color: #000000;
}

/* ── Insight Detail — Hero ── */
.insight-hero {
  padding: 3rem 0 2rem;
}

.insight-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.insight-hero__date {
  font-size: 0.875rem;
  color: #999999;
}

.insight-hero__reading-time {
  font-size: 0.875rem;
  color: #999999;
}

.insight-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.insight-hero__excerpt {
  font-size: 1.125rem;
  color: #555555;
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.insight-hero__image {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  margin: 2rem 0;
  display: block;
  filter: grayscale(10%);
}

/* ── Author Box ── */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 2rem 0;
  border-top: 1px solid #E5E5E5;
}

.author-box__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(15%);
}

.author-box__info {
  flex: 1;
  min-width: 0;
}

.author-box__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 0.25rem;
}

.author-box__name {
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.author-box__name:hover {
  opacity: 0.7;
}

.author-box__credentials {
  font-size: 0.8125rem;
  color: #666666;
  margin-top: 0.2rem;
}

.author-box__bio {
  font-size: 0.9375rem;
  color: #555555;
  line-height: 1.65;
  margin-top: 0.75rem;
}

.author-box__bio p {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

/* ── Author Profile Page ── */
.author-profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 3rem;
}

.author-profile__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(10%);
}

.author-profile__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 0.5rem;
}

.author-profile__name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.author-profile__credentials {
  font-size: 0.9375rem;
  color: #666666;
  margin-bottom: 1rem;
}

.author-profile__bio {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #333333;
}

.author-profile__bio p {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

/* ── Related Insights ── */
.section-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #E5E5E5;
}

/* ── Topic Page ── */
.topic-intro {
  padding: 2.5rem 0;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 3rem;
}

.topic-intro .rich-content h2:first-child {
  margin-top: 0;
}

/* ── FAQ Section ── */
.faq-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid #E5E5E5;
}

.faq-item {
  border-bottom: 1px solid #E5E5E5;
  padding: 1.25rem 0;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item p {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: #444444;
  line-height: 1.7;
}

/* ── Topics Section ── */
.topics-section {
  padding: 2rem 0;
  border-top: 1px solid #E5E5E5;
}

.topics-section__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

/* ── Empty State ── */
.empty-state {
  padding: 4rem 0;
  text-align: center;
  color: #999999;
  font-size: 0.9375rem;
}

/* ── Loading ── */
.loading {
  padding: 4rem 0;
  text-align: center;
  color: #999999;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #999999;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #666666;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #000000;
}

.breadcrumb__sep {
  color: #CCCCCC;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0 1rem;
}

.pagination__btn {
  font-family: inherit;
  font-size: 0.875rem;
  color: #666666;
  background: none;
  border: 1px solid #E5E5E5;
  border-radius: 4px;
  padding: 0.4rem 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination__btn:hover,
.pagination__btn--active {
  color: #000000;
  border-color: #000000;
}

.pagination__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .insight-card {
    grid-template-columns: 1fr;
  }

  .insight-card__image {
    width: 100%;
    height: 160px;
    order: -1;
  }

  .author-profile {
    flex-direction: column;
    gap: 1.25rem;
  }

  .author-box {
    flex-direction: column;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
