/* ═══════════════════════════════════════════
   PALAXA.IN — Dharmic Minimal Theme
   ═══════════════════════════════════════════ */

:root {
  --accent: #ec2727;
  --accent-deep: #c92020;
  --accent-light: #f04848;
  --accent-faint: rgba(236, 39, 39, 0.05);
  --accent-border: rgba(236, 39, 39, 0.16);
  --ink: #1a1a1a;
  --ink-light: #3a3a3a;
  --ink-muted: #6b6560;
  --ink-faint: #9e9890;
  --white: #FFFFFF;
  --off-white: #FAFAF8;
  --gray-50: #F7F7F7;
  --gray-100: #F0F0F0;
  --border-subtle: rgba(26, 26, 26, 0.08);
  --border-warm: rgba(236, 39, 39, 0.12);
  --dark: #0f0f0d;
}

/* ═══════ RESET & BASE ═══════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-deep); }

img { max-width: 100%; height: auto; display: block; }

/* ═══════ SITE HEADER ═══════ */
.site-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.site-wordmark {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.site-wordmark:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.wordmark-text {
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--ink);
}
.header-nav-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.site-nav a {
  font-family: 'Source Serif 4', serif;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }
.social-links {
  display: flex;
  gap: 14px;
  padding-left: 18px;
  border-left: 1px solid var(--border-subtle);
}
.social-links a {
  color: var(--ink-faint);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.social-links a:hover { color: var(--accent); }
.social-links svg { width: 15px; height: 15px; }

/* ═══════ LAYOUT ═══════ */
.page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 32px;
}
.page-wrap-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 32px;
}

/* ═══════ DIVIDER ═══════ */
.section-divider {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}
.divider-line {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════ PAGE HEADINGS ═══════ */
.page-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.page-intro {
  font-size: 16px;
  color: var(--ink-muted);
  margin-bottom: 32px;
  font-weight: 300;
  max-width: 560px;
}

/* ═══════ HOMEPAGE ═══════ */
.home-hero { padding: 56px 0 24px; }
.home-greeting {
  font-family: 'Source Serif 4', serif;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-greeting::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent-light);
  opacity: 0.4;
}
.home-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
  max-width: 640px;
}
.home-title em { font-style: italic; color: var(--accent-deep); }
.home-subtitle {
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-light);
  max-width: 580px;
  margin-bottom: 40px;
  font-weight: 300;
}
.thesis-block {
  border-left: 3px solid var(--accent);
  padding: 20px 28px;
  background: var(--accent-faint);
  border-radius: 0 6px 6px 0;
  margin-bottom: 48px;
}
.thesis-block p {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-light);
  font-style: italic;
}
.thesis-block .attribution {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  font-style: normal;
  color: var(--ink-muted);
  margin-top: 10px;
}
.explore-heading {
  font-family: 'Source Serif 4', serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 20px;
  font-weight: 500;
}
.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}
.explore-card {
  padding: 24px 24px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--white);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.explore-card:hover {
  border-color: var(--border-warm);
  box-shadow: 0 2px 12px rgba(236, 39, 39, 0.04);
  transform: translateY(-1px);
}
.card-label {
  font-family: 'Source Serif 4', serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 500;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}
.card-desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
  font-weight: 300;
}

/* ═══════ IDEAS — LIST ═══════ */
.stage-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.stage-tag {
  font-size: 12px;
  font-family: 'Source Serif 4', serif;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  color: var(--ink-muted);
  background: var(--white);
  text-decoration: none;
  transition: all 0.2s;
}
.stage-tag:hover { border-color: var(--accent); color: var(--accent); }
.stage-tag.active { background: var(--accent); color: white; border-color: var(--accent); }

.idea-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.idea-item:first-child { border-top: 1px solid var(--border-subtle); }
.idea-item a { color: var(--ink); text-decoration: none; }
.idea-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  transition: color 0.2s;
}
.idea-title:hover { color: var(--accent); }
.idea-meta {
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.idea-stage {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-block;
}
.stage-rough { background: #FFF3E0; color: #E65100; }
.stage-shaping { background: #E8EAF6; color: #283593; }
.stage-forged { background: #E8F5E9; color: #2E7D32; }
.idea-audio {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
}
.idea-audio:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-faint);
}
.idea-audio svg { width: 14px; height: 14px; }

/* ═══════ IDEAS — SINGLE ═══════ */
.post-header { margin-bottom: 40px; }
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.post-meta {
  font-size: 14px;
  color: var(--ink-faint);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tag {
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  color: var(--ink-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.post-tag:hover { border-color: var(--accent); color: var(--accent); }

.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 500;
  margin: 48px 0 16px;
}
.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 500;
  margin: 36px 0 12px;
}
.post-content p { margin-bottom: 20px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 24px;
  margin: 24px 0;
  background: var(--accent-faint);
  border-radius: 0 6px 6px 0;
}
.post-content blockquote p {
  font-style: italic;
  color: var(--ink-light);
  margin-bottom: 0;
}
.post-content code {
  font-size: 0.9em;
  background: var(--gray-50);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-content pre {
  background: var(--gray-50);
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 24px 0;
}
.post-content ul, .post-content ol {
  margin: 16px 0 20px 24px;
}
.post-content li { margin-bottom: 6px; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content img { border-radius: 6px; margin: 24px 0; }

/* ═══════ LIBRARY ═══════ */
.library-title-row {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.library-title-row .active-tab { color: var(--ink); }
.library-title-row .inactive-tab {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s;
}
.library-title-row .inactive-tab:hover { color: var(--accent); }
.library-title-row .tab-divider { color: var(--ink-faint); margin: 0 6px; font-weight: 300; }
.library-subtitle {
  font-size: 16px;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 36px;
}
.book-count {
  font-size: 12px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  background: var(--gray-100);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: 'Source Serif 4', serif;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 20px;
}
.book-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s;
}
.book-card:hover { transform: translateY(-3px); }
.book-cover {
  width: 100%;
  aspect-ratio: 0.65;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 0 1px rgba(0,0,0,0.15);
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.12), transparent);
  pointer-events: none;
}
.book-title-sm {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 2px;
}
.book-author { font-size: 12px; color: var(--ink-faint); font-weight: 300; }

/* ═══════ VISUALS ═══════ */
.vibes-grid {
  column-count: 3;
  column-gap: 14px;
  margin-top: 28px;
}
.vibe-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.vibe-item img { width: 100%; display: block; border-radius: 6px; }
.vibe-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: white;
  font-family: 'Source Serif 4', serif;
  font-size: 12px;
  font-weight: 300;
  opacity: 0;
  transition: opacity 0.3s;
}
.vibe-item:hover .vibe-label { opacity: 1; }

/* ═══════ NOW — TIMELINE ═══════ */
.now-date {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 36px;
  font-weight: 300;
}
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
  transform: translateX(-50%);
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  position: relative;
  align-items: start;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--border-subtle);
}
.timeline-visual {
  display: flex;
  justify-content: flex-end;
  padding-right: 28px;
}
.timeline-image {
  width: 100%;
  max-width: 260px;
  border-radius: 6px;
  overflow: hidden;
}
.timeline-image img { width: 100%; display: block; }
.timeline-content { padding-left: 28px; padding-top: 2px; }
.timeline-period {
  font-family: 'Source Serif 4', serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 6px;
}
.timeline-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}
.timeline-text {
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.7;
  font-weight: 300;
}

/* ═══════ PROJECTS ═══════ */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.project-card {
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.25s;
}
.project-card:hover {
  border-color: var(--border-warm);
  box-shadow: 0 2px 12px rgba(236, 39, 39, 0.04);
}
.project-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}
.project-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
}
.project-desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
  font-weight: 300;
}

/* ═══════ CONNECT ═══════ */
.connect-invite {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
  max-width: 560px;
  margin-bottom: 36px;
}
.connect-channels { display: flex; gap: 16px; flex-wrap: wrap; }
.connect-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: all 0.2s;
}
.connect-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(236, 39, 39, 0.06);
}
.connect-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ═══════ GENERIC PAGE CONTENT ═══════ */
.page-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 500;
  margin: 40px 0 16px;
}
.page-content p { margin-bottom: 20px; }
.page-content a { text-decoration: underline; text-underline-offset: 3px; }

/* ═══════ TAGS PAGE ═══════ */
.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.tag-cloud a {
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  color: var(--ink-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════ FOOTER ═══════ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  margin-top: 48px;
}
.footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-text { font-size: 13px; color: var(--ink-faint); font-weight: 300; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--ink-faint); transition: color 0.2s; display: flex; }
.footer-links a:hover { color: var(--accent); }
.footer-links svg { width: 16px; height: 16px; }

/* ═══════ ANIMATIONS ═══════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-hero > * { animation: fadeUp 0.6s ease forwards; opacity: 0; }
.home-greeting { animation-delay: 0.1s; }
.home-title { animation-delay: 0.2s; }
.home-subtitle { animation-delay: 0.3s; }
.thesis-block { animation-delay: 0.4s; }
.explore-heading { animation-delay: 0.5s; }
.explore-grid { animation-delay: 0.55s; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 720px) {
  .header-nav-row { flex-direction: column; gap: 12px; }
  .social-links { border-left: none; padding-left: 0; }
  .home-title { font-size: 32px; }
  .explore-grid, .project-grid { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .vibes-grid { column-count: 2; }
  .timeline-item { grid-template-columns: 1fr; gap: 16px; }
  .timeline::before { left: 16px; }
  .timeline-item::before { left: 16px; }
  .timeline-visual { justify-content: flex-start; padding-right: 0; padding-left: 40px; }
  .timeline-content { padding-left: 40px; }
  .post-title { font-size: 28px; }
  .page-wrap, .page-wrap-wide { padding: 48px 20px; }
}
