/* https://www.joshwcomeau.com/css/custom-css-reset/ */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* 2. Remove default margin */
* {
  margin: 0;
}
/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
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. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* Site stylesm */

:root {
  --primary-bg: #fcfcfc;
  --primary-fg: #212529;
  --link-color: #aa2431;
  --link-light: rgba(170, 36, 49, 0.75);
  --spacing-sm: 0.25rem;
  --spacing-md: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-bg: #212529;
    --primary-fg: #fcfcfc;
    --link-color: #eeacb3;
    --link-light: rgba(238, 172, 179, 0.65);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.5;
  color: var(--primary-fg);
  font-size: 1rem;
}

#home {
  min-height: 100vh;
  background: linear-gradient(
      102deg,
      rgba(255, 255, 255, 0),
      rgba(255, 204, 0, 0.05)
    ),
    linear-gradient(12deg, rgba(33, 37, 41, 0.05), rgba(255, 255, 255, 0)),
    #fcfcfc;
}

@media (prefers-color-scheme: dark) {
  #home {
    background: linear-gradient(
        102deg,
        rgba(255, 255, 255, 0),
        rgba(255, 204, 0, 0.05)
      ),
      linear-gradient(12deg, rgba(252, 252, 252, 0.05), rgba(255, 255, 255, 0)),
      #212529;
  }
}

h1 {
  font-size: 4rem;
  font-weight: bold;
  margin: 0 0 0.67em 0;
}

p {
  margin: 0;
}

main {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

@media only screen and (min-width: 576px) {
  #home {
    display: flex;
    align-items: center;
  }

  h1 {
    margin-top: -2rem;
  }

  main {
    padding: 100px 50px;
  }
}

nav a {
  color: var(--link-color);
  text-decoration: underline dotted var(--link-light);
  display: block;
  margin-top: var(--spacing-md);
}

nav a:hover,
nav a:focus {
  text-decoration: underline solid var(--link-color);
}

nav a::before {
  content: "\27a4";
  margin-right: var(--spacing-sm);
  display: inline-block;
  opacity: 0.2;
}

@media only screen and (min-width: 576px) {
  nav a {
    display: inline-block;
    margin-top: 0;
  }

  nav a + a {
    margin-left: var(--spacing-md);
  }
}
