/* ==========================================================================
   base.css — page-wide basics
   --------------------------------------------------------------------------
   1. Reset          sensible defaults for every element
   2. Page           background, text, the full-height content column
   3. Shared         small classes used by many components
   4. Accessibility  skip link, focus ring, reduced motion
   Component styles are in components.css; colours and sizes in tokens.css.
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--color-bg); }
body, h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }

/* ---------- 2. Page ---------- */
body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;               /* nothing can push the page sideways */
  overflow-wrap: break-word;      /* long words wrap instead of overflowing */
}

/* The centred column everything sits in (#app in index.html).
   It's a full-height column and <main> grows to fill it, so the footer
   always sits at the bottom of the screen, even on short pages. */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;             /* phones: ignores the collapsing address bar */
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}
.page > main { flex: 1 0 auto; }

::selection { background: var(--color-accent); color: var(--color-on-accent); }

@media (max-width: 600px) {
  :root { --page-gutter: 16px; }
}

/* ---------- 3. Shared ---------- */

/* Small grey supporting text: dates, clients, years */
.meta { font-size: var(--text-xs); color: var(--color-muted); }

/* Small grey title for cards and groups ("Experience", "Skills & tools") */
.section-label { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }

/* Arrow that brightens when its .is-hoverable parent is hovered */
.arrow { display: inline-block; color: var(--color-muted); transition: color var(--ease); }
.is-hoverable:hover .arrow { color: var(--color-text); }

/* ---------- 4. Accessibility ---------- */

/* "Skip to content": hidden until a keyboard user presses Tab */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--color-text); color: var(--color-bg); font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* One clear focus ring for keyboard users, everywhere */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }
#main:focus,
#main h1:focus { outline: none; }   /* focus moves here after navigation; no ring needed */

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
