/* Omni Resume — base element styling
   Applied after reset, before components. Relies on tokens.css. */

html {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 100%;
  font-weight: var(--font-weight-regular);
  font-optical-sizing: auto;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}

body.no-scroll {
  overflow: hidden;
}

/* Selection, links, focus */
a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

a:active {
  color: var(--color-primary-active);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: var(--focus-outline-offset);
  border-radius: var(--radius-xs);
}

/* Media defaults */
img,
picture,
video {
  max-width: 100%;
  height: auto;
}

/* Form controls */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input[type='search']::-webkit-search-decoration,
input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

button {
  font-family: inherit;
  color: inherit;
}

/* Horizontal rule */
hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin-block: var(--space-8);
}

/* Code */
code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre {
  overflow: auto;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-alt);
  border: var(--border-width-1) solid var(--color-border);
}

code:not(pre code) {
  background-color: var(--color-surface-alt);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
}

/* Selection within dark theme */
[data-theme='dark'] ::selection {
  background-color: var(--color-primary-800);
  color: var(--color-text-strong);
}

/* Disabled state */
[disabled],
[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Accessible hidden helper (used by skip link, live region etc.) */
.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;
}

.visually-hidden:focus-within,
.visually-hidden:active {
  position: static !important;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip-link);
  padding: var(--space-3) var(--space-5);
  background-color: var(--color-primary);
  color: var(--color-primary-contrast);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--color-primary-contrast);
  outline: 3px solid var(--color-neutral-0);
  outline-offset: 2px;
}

/* Print-safe base */
@media print {
  html,
  body {
    background: #ffffff;
    color: #000000;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }

  a[href]::after {
    content: '';
  }
}