/* ==========================================================
   A Fit TEAM: shared styles (tokens, base, site header/footer, wordmark)
   Page-specific styles live in assets/css/pages/<page>.css and are
   scoped under <main class="page">.
   ========================================================== */
:root {
  --bg: #0E1320;
  --panel: #171E2E;
  --panel-2: #1B2335;
  --edge: #232C40;
  --text: #E6EAF2;
  --body: #B4BDCD;
  --muted: #8D97AB;
  --t: #4FC3F7;   /* Travel & Tech */
  --e: #FFC247;   /* Education & Eats */
  --a: #FF6F61;   /* Apps & Adventure */
  --m: #B794FF;   /* Music & Musing */
  --c: var(--e);  /* current pillar color, set per page below */
  --on-c: #1A1405;
}
.pillar-t { --c: var(--t); --on-c: #06202C; }
.pillar-e { --c: var(--e); --on-c: #1A1405; }
.pillar-a { --c: var(--a); --on-c: #2A0D09; }
.pillar-m { --c: var(--m); --on-c: #1E1033; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.page { flex: 1; }
img, svg { max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -40px; z-index: 50;
  background: var(--text); color: var(--bg); font-weight: 600;
  padding: 6px 10px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Site header: logo left, menu right ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; border-radius: 10px; }
.brand img {
  display: block; width: 40px; height: 40px; border-radius: 10px;
  box-shadow: 0 0 0 1px var(--edge);
  transition: box-shadow .2s ease;
}
.brand:hover img { box-shadow: 0 0 0 1px var(--muted); }

.site-menu { position: relative; }
.site-menu summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 600; font-size: 13px;
  padding: 8px 14px; border: 1px solid var(--edge); border-radius: 999px;
  transition: border-color .2s ease;
}
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary:hover, .site-menu[open] summary { border-color: var(--muted); }
.menu-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.site-menu nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 14px;
  padding: 8px; box-shadow: 0 16px 36px rgba(0,0,0,0.5);
}
.nav-groups { list-style: none; display: grid; gap: 2px; }
.nav-group { display: grid; grid-template-columns: 22px 1fr 1fr; align-items: center; gap: 2px; padding: 2px 4px; }
.nav-group + .nav-group { border-top: 1px solid var(--edge); }
.g-t { --g: var(--t); } .g-e { --g: var(--e); } .g-a { --g: var(--a); } .g-m { --g: var(--m); }
.nav-letter { color: var(--g); font-weight: 900; font-size: 14px; text-align: center; }
.nav-group a {
  color: var(--body); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 9px 10px; border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}
.nav-group a:hover { color: var(--text); background: color-mix(in srgb, var(--g) 12%, transparent); }
.nav-group a[aria-current="page"] { color: var(--g); font-weight: 600; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

/* ---------- Site footer: grouped social icons ---------- */
.site-footer { margin-top: 32px; }
.site-footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 20px 20px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  border-top: 1px solid var(--edge);
}
.social { list-style: none; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; }
.social-group { display: flex; align-items: center; gap: 4px; }
.social-group + .social-group { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--edge); }
.social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--muted); transition: color .15s ease, background-color .15s ease;
}
.social a:hover { color: var(--text); background: var(--panel); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.copyright { color: var(--muted); font-size: 12px; }

/* ---------- [L]etter wordmark (pillar page titles) ---------- */
.wm {
  display: inline-flex; align-items: baseline; flex: none;
  color: var(--text);
  font-size: clamp(40px, 6vw, 68px); font-weight: 800; line-height: 1;
  letter-spacing: -0.025em;
}
.wm-flap {
  position: relative; display: inline-grid; place-items: center;
  min-width: 0.92em; height: 1.1em; padding: 0 0.11em; margin-right: 0.06em;
  border-radius: 0.11em;
  background: linear-gradient(180deg, #1B2335 0%, var(--panel) 50%, #141A28 50%, #121827 100%);
  border: 1px solid var(--edge);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  letter-spacing: 0;
}
.wm-flap::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; transform: translateY(-1px); background: rgba(0,0,0,0.65);
}
.wm-flap > span { color: var(--c); font-weight: 900; }

/* Crumb links on sub-pages (e.g. "Education" above "AP US History") */
.page a.crumb { display: block; text-decoration: none; }
.page a.crumb:hover { color: var(--text); }

/* ---------- 404 ---------- */
.notfound { max-width: 720px; margin: 0 auto; padding: 56px 20px; text-align: center; }
.notfound .wm { font-size: clamp(48px, 9vw, 96px); }
.notfound p { margin: 16px 0 24px; font-size: 16px; }
.notfound .nav-groups { display: inline-grid; text-align: left; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 8px; min-width: 260px; }
