:root {

  /* Core palette */
  --bg: #202123;        /* softer charcoal */
  --fg: #ececf1;        /* softer off-white */
  --muted: #a9b0bb;     /* balanced muted gray */
  --accent: #4e8cff;    /* slightly brighter controlled blue */

  /* Hairline borders tuned for charcoal UI */
  --hairline-strong: rgba(255,255,255,0.16);
  --hairline:        rgba(255,255,255,0.11);
  --hairline-soft:   rgba(255,255,255,0.08);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);

  /* Typography */
  font: 16px/1.55 -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;

  /* Dark-mode crispness (reduces “fat/bold” perception on macOS/iOS) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main content column */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px 48px;
  text-align: left;
}

/* ---------------------------
   Header + logo + nav
   --------------------------- */

/*
  Header spacing policy:
  - Top padding gives the logo air.
  - Left/right padding matches .wrap for perfect alignment.
*/
.site-header {
  max-width: 900px;           /* match .wrap column */
  margin: 0 auto;
  padding: 48px 20px 24px;    /* top | left/right | bottom */
  text-align: left;
}

/* Logo: block-level so it never collides with nav */
.site-logo {
  display: block;
  margin: 0 0 10px 0;
  max-width: 340px;
  width: 55%;
  height: auto;
}

/*
  Brand line under logo (YouTube-consistent).
  Use ONLY in the header:
    <div class="site-tagline">Adventure · Integrity · Engineering</div>
*/
.site-tagline {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 18px 0;
  opacity: 0.95;
  font-weight: 400;
}

/* Navigation sits under logo/tagline */
.site-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 6px 0;
  padding: 0 0 6px 0;
  line-height: 1.2;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.site-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* Active tab (if your templates add class="active") */
.site-nav a.active {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------------------------
   Homepage hero (minimal landing page)
   --------------------------- */

.hero {
  text-align: left;
  margin: 0.10rem 0 2rem;
}

/*
  IMPORTANT:
  - Do NOT use .site-tagline on the homepage anymore.
  - Use .home-tagline for “Thoughtfully engineered solutions.”
*/
.home-tagline {
  color: var(--muted);
  margin: 18px 0 0 0;
  font-size: 1.0rem;
  letter-spacing: 0.02em;
  opacity: 0.90;
  font-weight: 400;
}

/* If you ever re-enable a title, keep it simple */
.site-title {
  font-size: 2.6rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

/* ---------------------------
   Index sections (Papers / Projects / etc.)
   --------------------------- */

.content-index {
  max-width: none;
  margin: 0 0 4rem;
  text-align: left;
}

.content-index h2 {
  margin-top: 3rem;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.content-index ul {
  list-style: none;
  padding-left: 0;
  margin: 0.9rem 0 0 0;
}

.content-index li {
  margin: 0.6rem 0;
}

.content-index a {
  color: var(--accent);
  text-decoration: none;
}

.content-index a:hover {
  text-decoration: underline;
}

/* ---------------------------
   Paper / content pages
   --------------------------- */

.doc {
  text-align: left;
  font-weight: 400;
}

.doc h1,
.doc h2,
.doc h3 {
  text-align: left;
  font-weight: 600;
}

.doc h1 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
}

.doc p {
  margin: 0.75rem 0;
}

.doc ul,
.doc ol {
  margin: 0.75rem 0;
  padding-left: 1.2rem;
}

.doc li {
  margin: 0.35rem 0;
}

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

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

/* ---------------------------
   Footer legal block
   --------------------------- */

/*
  Footer spacing policy:
  - Present and anchored, not “buried”.
  - Tight spacing between border and text; modest bottom padding.
*/
.ck-footer {
  margin-top: 64px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.ck-footer__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px; /* align with .wrap */
}

.ck-footer p {
  margin: 8px 0;
}

/* ---------------------------
   Responsive adjustments
   --------------------------- */

@media (max-width: 768px) {
  .site-header {
    padding: 32px 18px 16px;
  }

  .site-logo {
    width: 70%;
    max-width: 320px;
  }

  .site-tagline {
    font-size: 1.0rem;
    margin-bottom: 14px;
  }

  .wrap {
    padding: 14px 18px 40px;
  }

  .site-title {
    font-size: 2.1rem;
  }

  .home-tagline {
    margin-top: 14px;
    font-size: 0.98rem;
  }
}

/* Notes date (subtle) */
.note-date {
  display: inline-block;
  margin-right: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.9;
}
