/* 0. Set rem unit */
html {
  font-size: 1em;
}

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
    /* p. Scroll smooth */
    scroll-behavior: smooth;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* 10. Offsets for scroll anchors*/
[id] {
  scroll-margin-top: 5rem;
}


:root {
  --color-bg: #101018;
  --color-text: #f8f8ff;
  --color-link: #ff0022;
  --color-btn: #ff0022;
}

html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

main {
  margin-block: 2rem;
  margin-inline: auto;
  width: 100%;
  max-width: 98%;
}

@media (min-width: 800px) {
  main {
    max-width: 1020px;
    display: grid;
    grid-template-columns: 33% 1fr;
    gap: 2rem;
  }
}

main>section {
  margin-block-start: 1.5rem;
}



h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto Slab", monospace;
  font-weight: 500;
  margin: 0;
  padding: 0;
  margin-block-end: .5lh;
  font-size: 2.25rem;
}

p {
  margin: 0;
  margin-block-end: 1lh;
  font-size: 1.25rem;
}

a {
  color: var(--color-link);
}


/*** FIND OUT OF :is() SELECTOR HERE IS APPROPRIATE ***/
:is(.visually-hidden) {
  font-size: 0;
  height: 0;
  overflow: hidden;
  margin-block-start: 0 !important;
}

ul:is(.unstyled),
ol:is(.unstyled) {
  margin: 0;
  padding: 0;
  text-indent: 0;
  list-style: none;
}

.button,
[type=submit],
[type=button],
[role=button],
[type="file"]::file-selector-button {
  appearance: none;
  border: none;
  background-color: var(--color-btn);
  color: var(--color-text);
  border-radius: 0.5rem;
  display: inline-block;
  padding: 6px 12px;
  cursor: pointer;

  &:hover {
    background: oklch(from var(--color-btn) calc(l * 1.25) c h);
  }
}

[type="file"]:hover::file-selector-button {
  background: oklch(from var(--color-btn) calc(l * 1.25) c h);
}