/* ==========================================================================
   Reset & base element styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

/* Locks the page to the AI Portfolio Explorer gateway (#hero) — no scrolling
   past it until the visitor explicitly leaves via the "Web View" chip or a
   response's "Explore this section" action (see js/explorer.js). Present by
   default in the HTML so there's no flash of scrollable content before JS
   runs. */
html.chat-locked,
html.chat-locked body {
  overflow: hidden;
  height: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

code {
  font-family: var(--font-mono);
}

/* Accessibility helpers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 1rem;
  background: var(--accent-1);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Placeholder callouts — clearly flag content the user still needs to supply */
.placeholder-inline {
  display: inline-block;
  background: var(--placeholder-bg);
  border: 1px dashed var(--placeholder-border);
  color: var(--placeholder-text);
  font-size: 0.78em;
  font-weight: 600;
  padding: 0.1em 0.5em;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.text-accent {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
