/* Resume Aura — reset, base typography, layout scaffold, a11y primitives. */

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
a { color: var(--violet); text-decoration: none; }
img, svg { display: block; }

/* ---- App layout scaffold -------------------------------------------- */
/* Center the app column horizontally. align-items:center is what actually
   centers a flex item on the cross axis — margin:0 auto does NOT work for
   flex items, so #main relies on this. */
#app { min-height: 100%; display: flex; flex-direction: column; align-items: center; }

#main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  outline: none;
  /* leave room for the bottom tab bar + iOS home indicator */
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
#main:focus-visible { outline: none; }

/* When a full-screen flow is active the tab bar is hidden, so drop the pad. */
#app.flow #main { padding-bottom: 0; }

/* ---- Typography helpers --------------------------------------------- */
.display { font-family: var(--font-display); font-weight: 400; line-height: 1.05; }
.display.italic { font-style: italic; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Accessibility primitives --------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: -60px; left: 12px;
  z-index: 1000;
  background: var(--ink);
  color: var(--lemon);
  padding: 10px 16px;
  border-radius: var(--r-10);
  font-weight: 700;
  transition: top 0.15s var(--ease-soft);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top)); }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}
.dark :focus-visible { outline-color: var(--lemon); }

/* Elements with tabindex="-1" are programmatic focus targets (e.g. a sheet
   heading we focus for screen-reader continuity), not interactive controls —
   so they should never show a focus ring. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* Touch targets: every interactive element gets a comfy minimum. */
button, [role="tab"], [role="button"], a.row, label.toggle {
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
