/* =========================
   COLOR SYSTEM
========================= */
:root {
  --header-bg: #0f141a;
  --header-text: #ffffff;
  --header-muted: #a0a6ad;
}
:root {
  --bg-main: #121417;
  --bg-panel: #1b1f24;
  --bg-header: #0f141a;
  --header-h: 64px;
  --text-main: #e6e6e6;
  --text-muted: #a0a6ad;

  --border-soft: #2a2f36;

  --accent-blue: #4a78a8;
}
html[data-theme="light"] {
  --header-bg: #f5f7fa;
  --header-text: #111111;
  --header-muted: #555555;
}
/* =========================
   BASE RESET
========================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
}

a,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   HEADER
========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;          /* ensures full-width without relying on width:100% */
  height: var(--header-h);
  z-index: 10000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
}

body {
  padding-top: var(--header-h);
}

/* Centering container */
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left */
.header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.site-name,
.site-name a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--header-text);
}

.page-title {
  font-size: 0.95rem;
  color: var(--header-muted);
}

/* Right nav */
.nav-right {
  color: var(--header-text);
  display: flex;
  gap: 20px;
}

.nav-right a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-right a:hover {
  color: var(--accent-blue);
}

.site-name a,
.site-name a:hover,
.site-name a:visited,
.site-name a:active {
  text-decoration: none;
}

/* =========================
   MOBILE HEADER
========================= */
@media (max-width: 768px) {

  .site-header-inner {
    padding: 8px 12px;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .header-left {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .site-name,
  .site-name a {
    font-size: 1rem;
  }

  .page-title {
    font-size: 0.85rem;
  }

  .nav-right {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;

    white-space: nowrap;
    overflow-x: auto;
    flex: 1;

    scrollbar-width: none;
  }

  .nav-right::-webkit-scrollbar {
    display: none;
  }

  .nav-right a {
    font-size: 0.85rem;
    flex-shrink: 0;
  }

}

/* =========================
   FOOTER
========================= */
.site-footer {
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 9999;
  background: var(--header-bg);
  border-top: 1px solid var(--border-soft);
}

/* Offset main content so it doesn't hide behind footer */

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.site-footer img {
  width: 30px;
  height: 30px;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.site-footer a:hover img {
  opacity: 1;
  transform: translateY(-2px);
}


/* =========================
   MAIN CONTENT
========================= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 24px;
}

h1 {
  font-size: 2.2rem;
  margin-top: 0;
}

/* Mobile-only: reduce global H1 size */
@media (max-width: 768px) {
  h1 {
    font-size: 1.45rem;
    line-height: 1.2;
  }
}

p {
  max-width: 70ch;
  color: var(--text-muted);
}

html {
  scroll-behavior: smooth;
}
