@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
@import url('https://rsms.me/inter/inter.css');

/*
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*
    2. Remove default margin
  */
* {
  margin: 0;
}
/*
    3. Allow percentage-based heights in the application
  */
html,
body {
  height: 100%;
}
/*
    Typographic tweaks!
    4. Add accessible line-height
    5. Improve text rendering
  */
body {
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/*
    6. Improve media defaults
  */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/*
    7. Remove built-in form typography styles
  */
input,
button,
textarea,
select {
  font: inherit;
}
/*
    8. Avoid text overflows
  */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
/*
    9. Create a root stacking context
  */
#root,
#__next {
  isolation: isolate;
}

/* ACTUAL STYLES */

:root {
  --main-width: 75%;
  --sans-font: 'Inter';
  --serif-font: 'Spectral';
}

::selection {
  color: #000000;
  background: #eaf265;
}

body {
  font-size: 18px;
  font-family: var(--sans-font);
}

h1.title {
  display: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--sans-font);
}

header {
  background-color: #131313;
  color: white;
  height: 80vh;
}

#canvas {
  background-image: url('collage.png');
  background-size: contain;
  height: 40%;
  width: 100%;
  animation: slide 30s infinite linear;
}

@keyframes slide {
  from {
    background-position: 0%;
  }
  to {
    background-position: 100%;
  }
}

header #titles {
  padding: 10px;
  padding: 10%;
}

#page-wrapper {
  display: flex;
}

nav,
main {
  padding: 2vw;
  padding-top: 4vw;
}

nav {
  flex: 1;
  position: relative;
}

nav h5 {
  position: -webkit-sticky;
  position: sticky;
  top: 1vw;
  list-style: none;
  padding: 0;
}

nav ul {
  position: -webkit-sticky;
  position: sticky;
  top: 25%;
  list-style: none;
  padding: 0;
  margin-top: 30%;
}

nav ul li {
  line-height: 1;
  margin-bottom: 1em;
}

nav ul li a {
  text-decoration: none;
  color: inherit;
  font-size: 0.8em;
  display: block;
  line-height: 1.35;
  transition: 0.2s all;
}

nav ul li a.active {
  margin-left: 10px;
  font-weight: 600;
}

main {
  flex: 5;
  scroll-snap-type: y mandatory;
}

.section {
  margin-bottom: 1vw;
  font-family: var(--serif-font);
}

.section p {
  width: var(--main-width);
  letter-spacing: -0.02em;
}

.sidenote {
  float: right;
  width: calc(100% - var(--main-width));
  margin-right: calc(-1 * calc(100% - var(--main-width)));
  position: relative;
  padding: 0 2vw;
  font-size: 0.8em;
  line-height: 1.3;
}

h2,
p {
  margin-bottom: 1vw;
}

h2 {
  font-weight: 500;
}

.section {
  margin-bottom: 4vw;
}

main a {
  color: inherit;
  text-underline-offset: 1px;
}

main a:hover {
  color: #c93636;
}

.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2vw 0;
}

figure {
  margin: 1vw 0;
}

/* figure img {
  max-width: 800px;
} */

.row > * {
  flex: 1;
}
