/* ==========================================================================
   Minimal Academic Monograph Theme — Justified & Subtle Metadata
   ========================================================================== */

:root {
  --bg-color: #fcfcfc;
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --text-faint: #8e8e93;        /* Unified faint tone for metadata */
  --accent-color: #114b7a;
  --border-light: rgba(0, 0, 0, 0.08);
  --font-serif: "Georgia", "STIX Two Text", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max-width: 660px;            /* Ideal width for LaTeX-like justified block text */
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-color: #121314;
  --text-main: #e3e4e8;
  --text-muted: #9598a1;
  --text-faint: #63666e;
  --accent-color: #6bb3e2;
  --border-light: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.75;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header & Nav */
.site-header {
  padding: 2.5rem 0 1.5rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text-main);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem;
}

.theme-toggle:hover {
  color: var(--text-main);
}

/* Sections */
.section {
  margin-top: 4rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

/* Document Justification & Typography */
.prose p, .entry-body {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

/* Faint / "Semi-Invisible" Metadata Formatting */
.meta-subtle {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  transition: color 0.2s ease;
}

/* Slight increase in contrast when hovering an entry to easily read details */
.entry:hover .meta-subtle {
  color: var(--text-muted);
}

.contact-line {
  margin-top: 1.8rem;
}

.contact-line a {
  color: var(--accent-color);
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

/* Entry List */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.compact-list {
  gap: 1rem;
}

.entry-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.entry-body {
  font-size: 0.98rem;
  color: var(--text-main);
}

/* Bullet list override */
.text-links {
  list-style: none;
  margin-top: 1rem;
}

.text-links li {
  margin-bottom: 0.8rem;
  font-size: 0.98rem;
}

.text-links a {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
}

.text-links a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--border-light);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* Footer */
.site-footer {
  margin-top: 6rem;
  padding: 3rem 0;
  font-size: 0.85rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border-light);
}

.site-footer a {
  color: var(--text-faint);
}

.site-footer a:hover {
  color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .site-header {
    padding: 1.5rem 0;
  }
  .site-nav {
    gap: 0.9rem;
  }
  .prose p, .entry-body {
    text-align: left; /* Left align on small phones to prevent bad spacing */
  }
}
