/* likeaghost.css — universal theme + compact header/footer (class-driven) */

/* Font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ---------- Theme Vars ---------- */
:root {
  --bg: #0b0d0f;
  --fg: #c9cdd2;      /* dark gray text */
  --muted: #8b9097;
  --hairline: #2b3036;
  --accent: var(--fg);
  --focus-ring: 2px solid rgba(160,180,200,.35);

  /* layout tokens */
  --pad-x: 24px;
  --pad-y: 12px;
  --gap: 16px;
  --radius: 10px;

  /* nav sizing */
  --logo-h: 36px;
  --nav-gap: 18px;
  --dropdown-minw: 220px;

  /* footer */
  --footer-pad-y: 10px;
}

.theme-light {
  --bg: #f7f7f8;
  --fg: #2a2e33;      /* dark gray text */
  --muted: #5a6068;
  --hairline: #d6d8db;
  --accent: var(--fg);
  --focus-ring: 2px solid rgba(30,60,120,.25);
}

/* Dark theme (explicit, default root already matches) */
.theme-dark {
  --bg: #0b0d0f;
  --fg: #c9cdd2;
  --muted: #8b9097;
  --hairline: #2b3036;
  --accent: var(--fg);
  --focus-ring: 2px solid rgba(160,180,200,.35);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sticky footer layout wrapper */
.site {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Content area flexes; footer sticks to bottom when content is short */
main { flex: 1 0 auto; }
header, footer { flex: 0 0 auto; }

/* Page content area (your doc area) */
.page {
  margin: 0;
  padding: 16px var(--pad-x);
  max-width: 100%;
  width: 100%;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  margin: 0 0 .25em 0;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--fg);
}
h1 { font-size: clamp(28px, 6vw, 42px); font-weight: 800; }
h2 { font-size: clamp(16px, 3.4vw, 20px); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
h3 { font-size: clamp(15px, 3.2vw, 18px); }

.section { margin: 20px 0; }

.rule {
  height: 1px; width: 100%;
  border: 0; background: var(--hairline);
  margin: 16px 0;
}

ul { list-style: none; padding: 0; margin: 8px 0; }
li { margin: 4px 0; font-weight: 500; }

.muted { color: var(--muted); }
.note { margin-top: 14px; font-size: .925rem; letter-spacing: .02em; }

/* ---------- Links ---------- */
a {
  color: inherit;             /* same as text */
  text-decoration: none;
}
a:visited { color: inherit; }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: var(--focus-ring);
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.button, .btn {
  --btn-bg: #0b0d0f;
  --btn-fg: #ffffff;
  --btn-bg-hover: #151a1f;
  --btn-border: rgba(0,0,0,.12);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .02s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover, .btn:hover { background: var(--btn-bg-hover); }
.button:active, .btn:active { transform: translateY(1px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-border: rgba(255,255,255,.25);
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.theme-light .btn--ghost {
  --btn-border: rgba(0,0,0,.25);
}
.btn--accent {
  --btn-bg: var(--fg);
  --btn-fg: #fff;
  --btn-bg-hover: rgba(120,130,140,.95);
  --btn-border: transparent;
}
.btn:focus-visible, .button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- Header (compact, logo left, centered nav) ---------- */
.header {
  margin: 0;
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--hairline);
}
.hdr {
  display: flex;
  align-items: center;
  gap: var(--gap);
}
.hdr__logo {
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
}
.hdr__logo img {
  height: var(--logo-h);
  width: auto;
  display: block;
}

/* Centered nav while logo hugs the left */
.hdr__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}
.hdr__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
  margin: 0;
  padding: 0;
}
.menu__item { position: relative; }

/* Dropdown */
.dropdown {
  display: none; /* toggled by JS */
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: var(--dropdown-minw);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 20;
}
.dropdown a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
}
.dropdown a:hover {
  text-decoration: underline;
}

/* Header utility group (e.g., theme toggle) sits right */
.hdr__utils {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Footer (sticky-ready, compact) ---------- */
.footer {
  margin: 0;
  padding: var(--footer-pad-y) var(--pad-x);
  border-top: 1px solid var(--hairline);
}
.ftr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ftr__links {
  display: flex;
  gap: 14px;
}

/* ---------- Responsive tweaks ---------- */
@media (min-width: 900px) {
  html, body { line-height: 1.3; }
  h1, h2, h3 { margin-bottom: .2em; }
  ul { margin-top: 4px; }
  li { margin: 2px 0; }
  .section { margin: 18px 0; }
  .rule { margin: 14px 0; }
}

@media (max-width: 600px) {
  .page { padding: 18px; }
  .hdr__nav { justify-content: flex-start; } /* mobile: nav aligns left by default */
}