/* Ancient Text Thematic Overrides 
   Curated by Haku’jin (Alex White), Scribe of the West
*/

:root {
  --md-text-font: "Merriweather", serif;
  --md-code-font: "Roboto Mono", monospace;
  /* Defining the unified Scribe Red for easy maintenance */
  --scribe-red: #a31621;
  --burnt-wood: #3d2b1f;
  --parchment-shadow: rgba(0, 0, 0, 0.5);
}

/* 1. Content Area: The "Grimoire" Page */
.md-content {
  background-color: #1a1a1a; 
  border: 1px solid var(--burnt-wood); 
  padding: 2em;
  border-radius: 4px;
  box-shadow: inset 0 0 50px var(--parchment-shadow);
}

/* 2. Headings: Calligraphic Style */
h1, h2, h3 {
  font-family: "Noto Sans JP", serif;
  color: var(--scribe-red) !important; 
  border-bottom: 1px double #5c4033;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 3. Drop-Cap Logic */
/* Targets the first paragraph of the main typeset area */
.md-typeset p:first-of-type::first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 8px;
  color: var(--scribe-red);
  font-family: "Noto Sans JP";
  text-transform: uppercase;
}

/* 4. Links: Deep Crimson */
.md-typeset a {
  color: var(--scribe-red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.md-typeset a:hover {
  border-bottom: 1px solid var(--scribe-red);
}

/* 5. The Footer: Scribe's Note */
footer .md-footer-meta {
  border-top: 1px solid #5c4033;
  font-style: italic;
  font-size: 0.85em;
  color: #8b949e;
}

/* 6. Admonitions: Wooden Plaque Style */
.md-typeset .admonition.info {
  border-left: .4rem solid var(--scribe-red);
  background-color: #241c1c;
  font-style: italic;
  border-radius: 0;
}

.md-typeset .admonition-title {
  background-color: #381a1a !important;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
}

/* 7. Search Bar & UI Refinements */
/* Making the modern UI elements blend with the ancient theme */
.md-search__input {
  background-color: #161b22 !important;
  border-radius: 0;
  border-bottom: 1px solid var(--burnt-wood);
}

.md-header {
  background-color: #000000 !important; /* Deep contrast for the Hanko logo */
}

/* Customizing the scrollbar to look like weathered metal */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0d1117;
}
::-webkit-scrollbar-thumb {
  background: var(--burnt-wood);
  border-radius: 4px;
}

/* Scribe Signature Styling */
.md-typeset img[alt="Haku’jin Seal"] {
  filter: sepia(0.5) contrast(1.2); /* Gives it a slightly aged ink look */
  margin-top: 20px;
  transition: opacity 0.3s;
}

.md-typeset img[alt="Haku’jin Seal"]:hover {
  opacity: 1; /* Darkens the "ink" when hovered */
}
