/* =============================================================================
   Reset.

   portfolio.css was written against Tailwind's preflight and quietly depends on
   it — most of all on headings inheriting their size and weight, and on form
   controls inheriting their font. Pulling the whole framework in for a reset
   would be a build step and 20 KB for rules this file states in 60 lines.
   ============================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
}

body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings carry their scale from the design tokens, never from the browser. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

b,
strong {
  font-weight: bolder;
}

/* Without this, every control silently falls back to the system UI font — and
   on an Arabic page that means one element in a different typeface. */
button,
input,
select,
optgroup,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background-color: transparent;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img,
svg,
video,
canvas,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  text-indent: 0;
}

::placeholder {
  opacity: 1;
  color: color-mix(in oklab, currentColor 45%, transparent);
}

[hidden] {
  display: none !important;
}

/* Respect the setting rather than the fashion: motion sickness is real, and
   the page must stay usable with every animation switched off. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
