/* ── Thoughts Index ── */
.thoughts-hero {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--sm-border);
  position: relative;
  overflow: hidden;
}
.thoughts-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.thoughts-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.thoughts-hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 16px;
}
.thoughts-hero-tagline {
  font-size: 16px;
  color: var(--sm-muted);
  line-height: 1.7;
  max-width: 560px;
}

.thoughts-featured,
.thoughts-archive {
  padding: 80px 0;
  border-bottom: 1px solid var(--sm-border);
}

/* ── Featured Article ── */
.featured-article {
  display: flex;
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: var(--sm-surface);
  border: 1px solid var(--sm-border);
  border-radius: 16px;
  padding: 40px;
  margin-top: 24px;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.featured-article:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.08);
}
.featured-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  align-self: center;
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--sm-border);
}
.featured-number .date-month {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--sm-violet-glow);
  letter-spacing: 2px;
}
.featured-number .date-year {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 22px;
  color: var(--sm-faint);
  letter-spacing: -0.5px;
}
.featured-body {
  flex: 1;
  min-width: 0;
}
.featured-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--sm-faint);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.featured-title {
  font-family: var(--f-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--sm-text);
  margin-bottom: 12px;
  line-height: 1.3;
}
.featured-excerpt {
  font-size: 15px;
  color: var(--sm-muted);
  line-height: 1.7;
  max-width: 560px;
}
.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.featured-tags .pill {
  font-size: 10px;
  padding: 2px 8px;
}

/* ── Blog Layout ── */
.thoughts-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: start;
}
.thoughts-main {
  min-width: 0;
}
.thoughts-sidebar {
  position: sticky;
  top: 88px;
  padding-top: 36px;
}
.sidebar-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--sm-border);
}
.sidebar-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.sidebar-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sm-faint);
  margin-bottom: 12px;
}
.sidebar-text {
  font-size: 13px;
  color: var(--sm-muted);
  line-height: 1.7;
}
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar-tags .pill {
  font-size: 10px;
  padding: 2px 8px;
  text-decoration: none;
}
.sidebar-link {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--sm-muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s;
}
.sidebar-link:hover {
  color: var(--sm-violet-glow);
}

/* ── Archive List ── */
.thoughts-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--sm-border);
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  overflow: hidden;
}
.thought-card {
  display: flex;
  gap: 0;
  text-decoration: none;
  background: var(--sm-surface);
  padding: 28px 32px;
  transition: background 0.2s;
}
.thought-card:hover { background: var(--sm-surface-alt); }
.thought-card-date-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  align-self: center;
  padding-right: 20px;
  margin-right: 20px;
  border-right: 1px solid var(--sm-border);
}
.thought-card-date-big .date-month {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--sm-violet-glow);
  letter-spacing: 1.5px;
}
.thought-card-date-big .date-year {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 16px;
  color: var(--sm-faint);
  letter-spacing: -0.5px;
}
.thought-card-body {
  flex: 1;
  min-width: 0;
}
.thought-card-date {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--sm-faint);
  margin-bottom: 6px;
}
.thought-card-title {
  font-family: var(--f-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--sm-text);
  margin-bottom: 8px;
}
.thought-card-excerpt {
  font-size: 14px;
  color: var(--sm-muted);
  line-height: 1.6;
}
.thought-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.thought-card-tags .pill {
  font-size: 10px;
  padding: 2px 8px;
}

@media (max-width: 960px) {
  .thoughts-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .thoughts-sidebar {
    position: static;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--sm-border);
  }
}
@media (max-width: 768px) {
  .thoughts-hero { padding: 100px 0 40px; text-align: center; }
  .thoughts-hero-tagline { margin: 0 auto; }
  .thoughts-featured,
  .thoughts-archive { padding: 48px 0; }
  .featured-article { flex-direction: column; gap: 16px; padding: 28px; text-align: center; align-items: center; }
  .featured-number { border-right: none; padding-right: 0; margin-right: 0; }
  .featured-number .date-year { font-size: 18px; }
  .featured-tags { justify-content: center; }
  .featured-excerpt { max-width: none; }
  .thought-card { flex-direction: column; gap: 8px; text-align: center; align-items: center; }
  .thought-card-date-big { border-right: none; padding-right: 0; margin-right: 0; }
  .thought-card-date-big .date-year { font-size: 14px; }
  .thought-card-tags { justify-content: center; }
  .thoughts-sidebar { text-align: center; }
  .sidebar-tags { justify-content: center; }
}

/* ── Thoughts Grid (legacy compat) ── */
.thoughts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--sm-border);
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  overflow: hidden;
}

.article-content {
  padding: 60px 0 80px;
  min-width: 0;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: start;
}
.article-sidebar {
  position: sticky;
  top: 88px;
  padding: 60px 0;
}
.article-sidebar-section {
  margin-bottom: 24px;
}
.article-sidebar-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sm-faint);
  margin-bottom: 10px;
}
.article-sidebar .pill {
  margin: 0 4px 6px 0;
}
.share-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--sm-surface-alt);
  color: var(--sm-text);
  border: 1px solid var(--sm-border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.share-btn:hover {
  border-color: var(--sm-teal);
  background: var(--sm-surface);
  color: var(--sm-teal-glow);
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .article-sidebar {
    position: static;
    padding: 0 0 40px;
    text-align: center;
  }
  .article-sidebar .share-btns { justify-content: center; }
  .article-sidebar .article-tags { justify-content: center; }
  .article-sidebar .pill { margin: 0 3px 6px; }
}
.article-date {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--sm-faint);
  margin-bottom: 32px;
}
.article-content h2 {
  font-family: var(--f-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--sm-text);
  margin: 40px 0 16px;
}
.article-content h2:first-of-type { margin-top: 0; }
.article-content p {
  font-size: 16px;
  color: var(--sm-muted);
  line-height: 1.85;
  margin-bottom: 20px;
  text-align: justify;
}
.article-content hr {
  border: none;
  border-top: 1px solid var(--sm-border);
  margin: 48px 0;
}
.article-content p strong { color: var(--sm-text); }
.article-content a {
  color: var(--sm-link);
}
.article-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}
.article-content ul li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--sm-muted);
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-content ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid var(--sm-violet);
}
.article-content code {
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--sm-surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-content pre {
  position: relative;
  margin: 32px -24px;
  padding: 24px 28px;
  background: var(--sm-surface);
  border: 1px solid var(--sm-border);
  border-left: 3px solid var(--sm-teal-glow);
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
  .article-content pre {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    padding: 20px 16px;
  }
}
.article-content pre code {
  display: block;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -0.01em;
  white-space: pre;
  color: var(--sm-text);
  tab-size: 2;
}
.article-content pre .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--sm-surface-alt);
  border: 1px solid var(--sm-border);
  border-radius: 6px;
  color: var(--sm-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
  user-select: none;
}
.article-content pre:hover .copy-btn {
  opacity: 1;
}
.article-content pre .copy-btn:hover {
  color: var(--sm-teal-glow);
  border-color: var(--sm-teal-glow);
}
.article-content pre .copy-btn.copied {
  color: var(--sm-teal-glow);
  border-color: var(--sm-teal-glow);
}
.article-content blockquote {
  border-left: 3px solid var(--sm-violet);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--sm-muted);
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
}
.article-tags .pill {
  font-size: 11px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.article-tags a.pill:hover {
  border-color: var(--sm-teal);
  color: var(--sm-text);
}
.article-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  margin: 24px 0;
}
.article-content figure {
  margin: 32px 0;
}
.article-content figure img {
  margin: 0 0 8px;
}
.article-content figcaption {
  font-size: 0.85rem;
  color: var(--sm-muted);
  text-align: center;
}
.article-content figcaption a {
  color: var(--sm-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content figcaption a:hover {
  color: var(--sm-text);
}
