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

* {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --neutral: #808080;
  --accent: #ff5733;

  --border: 1px solid var(--dark);

  --space-xs: 0.25rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 6rem;
}

@font-face {
  font-family: Golos;
  src: url("../fonts/golos-text_vf.ttf");
}
@font-face {
  font-family: Astra;
  src: url("../fonts/pt-astra-serif_regular.ttf");
}

body {
  font-family: Golos, "Open Sans";
  min-height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  justify-content: space-between;

  color: var(--foreground);
  background: var(--background);

  ::selection {
    background: var(--accent);
  }


  word-break: break-word;
  word-wrap: break-word;
}

main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

*[tooltip] {
  position: relative;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  left: 0;
  right: 0;
  top: 0;
  backdrop-filter: blur(2rem) !important;
  -webkit-backdrop-filter: blur(2rem) !important;

  /* :first-child {
    text-decoration: none;

    &:hover {
      color: var(--accent);
    } */
  }

  *[tooltip]:hover:before {
    content: attr(tooltip);
    background: var(--foreground);
    color: var(--background);
    top: 1.125rem;
    position: absolute;
    white-space: nowrap;
  }
}

footer {
  border: var(--border);

  .footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }

  .footer-section-description {
    color: var(--neutral) !important;
    font-family: Golos, "Open Sans";
    text-transform: uppercase;
    font-weight: 400;
  }

  .footer-section-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);

    .footer-section-list-item {
      list-style-position: inside;
      list-style-type: none;
    }
  }
  *[tooltip]:hover:before {
    content: attr(tooltip);
    background: var(--foreground);
    color: var(--background);
    left: 8rem;
    position: absolute;
    white-space: nowrap;
  }
}

h1,
h2,
h3,
h4,
h5,
.footer-section-title,
.footer-section-list-item,
.navigation-item {
  text-transform: uppercase;
  line-height: 1;
}

.navigation-item-accent {
  font-family: Astra;
  color: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
p, time {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

h1 {
  font-size: calc(4vw + 4vh + 2vmin);
}

h2,
.list-item-details {
  font-family: Astra, Georgia;
  text-transform: none;
  font-size: calc(3vw + 3vh + 0.75vmin);
  margin-top: var(--space-l) !important;
}
/* h3 {
  margin-top: var(--space-s);
  font-size: calc(2vw + 2vh + 0.5vmin);
}

h4 {
  font-size: 1rem;
  margin-top: var(--space-s);
} */

p, time {
  font-family: Astra;
}

a,
button {
  font-size: clamp(1.1rem, 0.4vw + 0.75rem, 1.5rem) !important;
}

a,
button {
  text-decoration: underline;
  color: inherit;
  text-decoration-thickness: from-font;
  font-weight: 450;
  padding: 0;
  margin: 0;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;

  &:hover {
    text-decoration: none;
  }

  /* &:disabled { */
  /* color: var(--neutral); */
  /* } */
}

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

li {
  list-style-position: inside;

  &::marker {
    color: var(--neutral);
    display: inline;
  }
  p {
    display: inline;
  }
}

.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

button {
  background: none;

  &:hover {
    background: none;
  }
}
header {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);

  .hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }

  .hero-description {
    font-weight: 200;
    color: var(--neutral);
    font-family: Golos;
  }
}

.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  max-width: 48rem;
  margin: var(--space-l) auto;
}

.list-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);

  .list-item-details,
  .list-item-date {
    color: var(--neutral);
  }
}

.accent {
  color: var(--accent);
}

.card {
  padding: var(--space-s);
  border-radius: var(--space-s);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-s);

  h2 {
    font-size: 2rem;
    color: var(--background);
    text-transform: uppercase;
  }

  p {
    color: var(--background);
    font-weight: 100;
    font-size: 1.2rem !important;
  }

  .card-details-top {
    display: flex;
    width: 100%;
    font-family: Golos;
    font-size: 1rem !important;
    justify-content: space-between;
  }

  .card-details-bottom {
    display: flex;
    width: 100%;
    font-family: Golos;
    font-size: 1rem !important;
    justify-content: end;
    gap: var(--space-s);
  }
}


article {
  margin: 0 auto var(--space-s) auto;
  width: 100%;
  max-width: 48rem;


  img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    object-fit: cover;
    margin-bottom: var(--space-m);
    margin-top: var(--space-m);
  }

  .tag {
    font-size: 1.25rem;
    color: var(--accent);
    font-style: italic;

  }

  h1 {
    font-size: calc(3vw + 3vh + 0.5vmin);
    margin-bottom: var(--space-m);
  }

  h3 { 
    color: var(--neutral);
    font-family: Astra, Georgia;
     font-size: 1.5rem !important;
  }

  p, a, li {
    font-family: Astra;
    font-size: 1.5rem !important;
    line-height: 1.25;
    margin: var(--space-s) 0;
  }

  sup>a {
    font-size: 1rem !important;
    color: var(--neutral);
    text-decoration: none;
  }
}

.footnotes {
  margin-top: var(--space-l);

  ol>li {
    line-height: 1;
    margin: 0;
  }
  ol>li>p, ol>li::marker {
    font-size: 1.125rem !important;
    color: var(--neutral);
    font-family: Astra;
  }

  ol>li>p>a {
    font-size: 1.125rem !important;
  }

  #footnote-label {
    display: none;
  }
}

.article-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);

  .article-header-genre {
    color: var(--accent) !important;
  }
  
  h1 {
    font-size: calc(3vw + 3vh + 0.5vmin);
    margin-bottom: var(--space-m);
  }

  .article-header-description, .article-header-details {
    font-family: Golos;
    font-size: 1rem !important;
    font-weight: 100;
    color: var(--neutral);
  }

  .article-header-tags {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-xs);
  }
}

.tags-list {
  list-style: none;
  text-transform: uppercase;
  color: var(--neutral);
}

.tags-list-item>a {
  text-decoration: none !important;
}

@media (prefers-color-scheme: light) {
  :root {
    --foreground: #111111;
    --background: #eeeeee;
  }

  .card {
    background-color: var(--foreground);

    &:hover {
      background-color: var(--accent);
      color: var(--background);
    }
  
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --foreground: #eeeeee;
    --background: #111111;
  }

  .card {
    background-color: var(--foreground);

    &:hover {
      background-color: var(--accent);
      color: var(--background);
    }
  }
}


@media (width <= 48rem) {
  main {
    padding: var(--space-s);
  }
  nav,
  footer {
    padding: var(--space-s);
  }
  
  .hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
    letter-spacing: -0.25rem;
    font-size: 3rem;
    font-weight: 400;
  }

  .hero-description {
    font-size: 1.2rem !important;
    font-weight: 200;
    color: var(--neutral);
    font-family: Golos;
  }

  footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);

    .footer-section {
      width: 100%;
    }
  }

  .cards-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }

  .tags-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-s);
    grid-template-rows: max-content;
  }
}

@media (width >= 48rem) {
  main {
    padding: var(--space-m);
  }

  nav,
  footer {
    padding: var(--space-s) var(--space-m);
  }

  footer {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--space-l);

    .footer-section {
      max-width: 35vw;
    }
  }

  .hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
    letter-spacing: -0.25rem;
    font-size: 4rem;
    font-weight: 400;
  }

  .hero-description {
    font-size: 1.2rem !important;
    font-weight: 200;
    color: var(--neutral);
    font-family: Golos;
  }

  .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-s);
    grid-template-rows: max-content;
  }

  .tags-list {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
}

@media (width >= 64rem) {

  .hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
    letter-spacing: -0.25rem;
    font-size: 5rem;
  }

  .hero-description {
    font-size: 1.5rem !important;
    font-weight: 200;
    color: var(--neutral);
    font-family: Golos;
  }
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-s);
    grid-template-rows: max-content;
  }
}