/* =========================================================
   Nexus Mythos - Dark Mythic Publish Theme
   Place this file in the ROOT of your Obsidian vault as:
   publish.css
   ========================================================= */

/* ---------- Core palette ---------- */
:root {
  --nm-bg: #0f0d0b;
  --nm-panel: #17130f;
  --nm-panel-2: #1f1913;
  --nm-text: #e7dcc7;
  --nm-muted: #b9aa8d;
  --nm-accent: #b88a3b;
  --nm-accent-soft: rgba(184, 138, 59, 0.22);
  --nm-line: rgba(184, 138, 59, 0.38);
  --nm-glow: rgba(184, 138, 59, 0.12);
  --nm-link: #d9b36a;
  --nm-link-hover: #f0cd87;
}

/* ---------- Site background and text ---------- */
body,
.site-body-left-column,
.site-body-right-column,
.markdown-preview-view {
  background-color: var(--nm-bg);
  color: var(--nm-text);
}

/* ---------- Main content column ---------- */
.site-body-center-column {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.015), rgba(0,0,0,0)),
    var(--nm-bg);
}

/* ---------- Typography ---------- */
.markdown-preview-view,
.markdown-preview-sizer {
  line-height: 1.72;
  letter-spacing: 0.01em;
}

.markdown-preview-view p {
  color: var(--nm-text);
}

.markdown-preview-view em {
  color: var(--nm-muted);
}

/* ---------- Headings ---------- */
.markdown-preview-view h1,
.markdown-preview-view h2,
.markdown-preview-view h3,
.markdown-preview-view h4,
.markdown-preview-view h5,
.markdown-preview-view h6 {
  color: #f1e4c7;
  letter-spacing: 0.03em;
  text-shadow: 0 0 10px var(--nm-glow);
}

.markdown-preview-view h1 {
  border-bottom: 1px solid var(--nm-line);
  padding-bottom: 0.35em;
  margin-bottom: 0.8em;
}

.markdown-preview-view h2 {
  margin-top: 2.2em;
  border-bottom: 1px solid rgba(184, 138, 59, 0.22);
  padding-bottom: 0.2em;
}

/* ---------- Links ---------- */
a,
.internal-link {
  color: var(--nm-link);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover,
.internal-link:hover {
  color: var(--nm-link-hover);
  text-shadow: 0 0 8px var(--nm-glow);
}

/* ---------- Horizontal rules ---------- */
.markdown-preview-view hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(184, 138, 59, 0.8),
    transparent
  );
  margin: 2rem 0;
}

/* ---------- Blockquotes ---------- */
.markdown-preview-view blockquote {
  border-left: 2px solid var(--nm-accent);
  background: linear-gradient(
    to right,
    rgba(184, 138, 59, 0.08),
    rgba(184, 138, 59, 0.02)
  );
  color: var(--nm-text);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin: 1.25rem 0;
  box-shadow: inset 0 0 0 1px rgba(184, 138, 59, 0.08);
}

/* ---------- Tables ---------- */
.markdown-preview-view table {
  border-collapse: collapse;
  width: 100%;
  background: rgba(255,255,255,0.015);
}

.markdown-preview-view th,
.markdown-preview-view td {
  border: 1px solid rgba(184, 138, 59, 0.22);
  padding: 0.65rem 0.75rem;
}

.markdown-preview-view th {
  background: rgba(184, 138, 59, 0.12);
  color: #f1e4c7;
}

/* ---------- Code blocks ---------- */
.markdown-preview-view pre,
.markdown-preview-view code {
  background: #16120f;
  border-radius: 6px;
}

.markdown-preview-view pre {
  border: 1px solid rgba(184, 138, 59, 0.16);
  padding: 0.8rem;
}

/* ---------- Callouts ---------- */
.callout {
  background: linear-gradient(
    to bottom,
    rgba(184, 138, 59, 0.07),
    rgba(255,255,255,0.015)
  );
  border: 1px solid var(--nm-line);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(184, 138, 59, 0.05) inset,
    0 0 18px rgba(0, 0, 0, 0.2);
}

.callout-title {
  color: #f1e4c7;
}

/* ---------- Sidebar navigation ---------- */
.nav-folder-title,
.tree-item-self,
.site-body-left-column a {
  color: var(--nm-text);
}

.nav-folder-title:hover,
.tree-item-self:hover,
.site-body-left-column a:hover {
  background: rgba(184, 138, 59, 0.08);
  color: #f3e6cb;
}

.tree-item-self.is-active,
.nav-file-title.is-active,
.site-body-left-column .is-active {
  background: rgba(184, 138, 59, 0.14);
  border-left: 2px solid var(--nm-accent);
  color: #f4e9d2;
}

/* ---------- Sidebar column styling ---------- */
.site-body-left-column {
  border-right: 1px solid rgba(184, 138, 59, 0.14);
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(0,0,0,0)),
    #120f0c;
}

/* ---------- Search / UI chrome ---------- */
input,
button,
select,
textarea {
  border-radius: 8px;
}

/* ---------- Images ---------- */
.markdown-preview-view img {
  border: 1px solid rgba(184, 138, 59, 0.24);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

/* ---------- Optional decorative panel class ----------
   Use in notes with HTML if desired:
   <div class="mythic-panel"> ... </div>
*/
.mythic-panel {
  background: linear-gradient(
    to bottom,
    rgba(184, 138, 59, 0.08),
    rgba(255,255,255,0.015)
  );
  border: 1px solid var(--nm-line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow:
    inset 0 0 0 1px rgba(184, 138, 59, 0.05),
    0 10px 30px rgba(0,0,0,0.2);
  margin: 1rem 0;
}

/* ---------- Optional ornamental divider ----------
   Use in notes with:
   <div class="ornament"></div>
*/
.ornament {
  height: 1px;
  margin: 2rem auto;
  width: 72%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(184, 138, 59, 0.85),
    transparent
  );
  position: relative;
}

.ornament::before {
  content: "✦";
  position: absolute;
  left: 50%;
  top: -0.7em;
  transform: translateX(-50%);
  color: var(--nm-accent);
  background: var(--nm-bg);
  padding: 0 0.45em;
  text-shadow: 0 0 8px var(--nm-glow);
}

/* ---------- Mobile cleanup ---------- */
@media (max-width: 900px) {
  .markdown-preview-view h1 {
    font-size: 2rem;
  }

  .markdown-preview-view h2 {
    font-size: 1.45rem;
  }
}

/* Brighter left sidebar text */
.site-body-left-column,
.site-body-left-column .tree-item-self,
.site-body-left-column .nav-folder-title,
.site-body-left-column .nav-file-title,
.site-body-left-column a {
  color: #e7dcc7 !important;
}

/* Hover state */
.site-body-left-column .tree-item-self:hover,
.site-body-left-column .nav-folder-title:hover,
.site-body-left-column .nav-file-title:hover,
.site-body-left-column a:hover {
  color: #f3e6cb !important;
  background: rgba(184, 138, 59, 0.08);
}

/* Active/current page */
.site-body-left-column .is-active,
.site-body-left-column .tree-item-self.is-active,
.site-body-left-column .nav-file-title.is-active {
  color: #fff2d6 !important;
  background: rgba(184, 138, 59, 0.14);
  border-left: 2px solid #b88a3b;

}

.markdown-preview-view img[alt="Nexus Mythos Banner"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  border: 1px solid rgba(184, 138, 59, 0.24);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  margin: 0 0 1.5rem 0;
}