/* Taiji Bala Knowledge Blog & Forum — Studio Prose & Micro-interactions */

:root {
  --studio-bg: #fcfbfa;
  --studio-surface: #ffffff;
  --studio-line: #e5e5e0;
  --studio-text: #2b2b2a;
  --studio-muted: #6e6e6a;
  --studio-accent: #1f1f1e;
  --studio-code-bg: #f3f2ee;
}

.dark {
  --studio-bg: #121212;
  --studio-surface: #191919;
  --studio-line: #262626;
  --studio-text: #e3e3e2;
  --studio-muted: #9a9a95;
  --studio-accent: #f4f4f2;
  --studio-code-bg: #1f1f1e;
}

body {
  background-color: var(--studio-bg);
  color: var(--studio-text);
}

/* Custom scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Editorial Markdown Prose */
.studio-prose {
  font-size: 0.965rem;
  line-height: 1.85;
  color: var(--studio-text);
  word-break: break-word;
}

.studio-prose h1,
.studio-prose h2,
.studio-prose h3,
.studio-prose h4 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  line-height: 1.35;
}

.studio-prose h1 { font-size: 1.45rem; }
.studio-prose h2 {
  font-size: 1.2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--studio-line);
}
.studio-prose h3 { font-size: 1.05rem; }

.studio-prose p {
  margin-bottom: 1em;
}

.studio-prose p:last-child {
  margin-bottom: 0;
}

.studio-prose ul,
.studio-prose ol {
  margin: 0.85em 0 1em 1.4em;
}

.studio-prose ul { list-style-type: disc; }
.studio-prose ol { list-style-type: decimal; }

.studio-prose li {
  margin-bottom: 0.35em;
}

.studio-prose blockquote {
  border-left: 3px solid var(--studio-line);
  padding: 0.45rem 1rem;
  margin: 1rem 0;
  color: var(--studio-muted);
  background: var(--studio-code-bg);
  border-radius: 0 0.375rem 0.375rem 0;
}

.studio-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: var(--studio-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  border: 1px solid var(--studio-line);
}

.studio-prose pre {
  background: var(--studio-code-bg);
  border: 1px solid var(--studio-line);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.1rem 0;
}

.studio-prose pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.6;
}

.studio-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.9;
}

.studio-prose a:hover {
  opacity: 0.65;
}

.studio-prose hr {
  border: none;
  border-top: 1px solid var(--studio-line);
  margin: 1.5rem 0;
}

.studio-prose img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 1rem 0;
  border: 1px solid var(--studio-line);
}

.studio-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.studio-prose th,
.studio-prose td {
  border: 1px solid var(--studio-line);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.studio-prose th {
  background: var(--studio-code-bg);
  font-weight: 600;
}

/* Line clamp helper */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fade-in animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.25s ease-out both;
}
