:root {
  --clr-white: #fff;
  --clr-black: #000;
  --clr-light-grey: #dfdfdf;
  --clr-dark-grey: #2a3238;
  --clr-dark-blue: #001f3d;
  --clr-pink: #f17da4;

  --primary: var(--clr-pink);

  --backdrop : var(--clr-dark-blue);
  --surface: var(--clr-light-grey);
  --card: var(--clr-dark-grey);
  
  --background: var(--backdrop);
  --foreground: var(--surface);

  --font-largest: clamp(2rem, 9vw + 0.5rem, 7rem);
  --font-large: clamp(1.75rem, 4vw + 0.2rem, 2.5rem);
  --font-regular: clamp(1.13rem, 2vw + 0.2rem, 1.75rem);
}

p {
  font-size: var(--font-regular);
}

a {
  color: var(--primary);
  transition: border 0.2s ease;
  text-decoration: none;
}

a:hover, a:focus, a:active {
  border: 1px dashed var(--primary);
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: 'Trirong', serif;
}

header {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1em;
}

.article-info {
  display: grid;
  grid-template-columns: 1fr;
}

main {
  padding-bottom: 2rem;
}

.article-img {
  object-fit: cover;
  object-position: top;
  width: 100%;
  min-height: 70vh;
  margin: 0;
  padding: 0;
}

.headlines {
  display: grid;
  margin: 0 0.5em;
  min-height: 30vh;
}

.title {
  font-size: var(--font-largest);
  align-self: center;
}

.subtitle {
  font-size: var(--font-large);
  text-align: right;
  align-self: end;
}

.text-container {
  margin: 0 auto;
  display: grid;
  width: 100vw;
  height: 90vh;
  position: relative; /* used with text-navigation */
}

.textbox {
  background: var(--card);
  position: relative;
  margin: 1ch;
}

.text {
  background: var(--card);
  overflow-wrap: anywhere;
  position: absolute;
  display: grid;
  width: 100%;
  height: 100%;
  padding: 1ch;
}

.text-navigation {
  width: 100%;
  padding: 0 1em;
  position: absolute;
  bottom: -2em;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
}

.btn {
  background: var(--foreground);
  color: var(--background);
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  height: 40px;
  width: 40px;
  transition: background-color 0.25s ease;
  display: inline-flex;
  justify-content: center;
  align-content: center;
}

.btn:hover, .btn:active {
  background: var(--background);
  color: var(--foreground);
  border: 1px dashed var(--foreground);
}

.btn:focus {
  background: var(--background);
  color: var(--foreground);
  border: 1px dashed var(--primary);
}

.btn-back {
  margin-right: 1em;
}

.arrow-icons {
  align-self: center;
  pointer-events: none;
}

.material-icons.md-36 {
  font-size: 36px;
}

footer {
  min-height: 5rem;
}

.footer-text {
  text-align: center;
  margin: 1em;
}

@media screen and (min-width: 425px) {
  .text {
    overflow-wrap: break-word;
  }

  .text-container {
    width: 80vw;
    height: 80vh;
  }
}

@media screen and (min-width: 768px) {
  .article-info {
    grid-template-columns: 1fr 1fr;
  }

  .headlines {
    margin: 0;
  }

  .article-img {
    min-height: 100vh;
    width: 50vw;
  }
  
  .article-titles {
    width: 50vw;
    height: 100vh;
    padding: 2vh 3vh;
    display: flex;
  }
  
  .title {
    font-size: var(--font-largest);
    margin-bottom: 0.75rem;
  }
  
  .subtitle {
    font-size: var(--font-large);
  }

  .text-container {
    margin: auto;
    width: 85vw;
    height: 90vh;
  }

  .textbox {
    height: 90%;
    width: 80%;
    margin: auto;
  }

  .text-navigation {
    justify-content: space-around;
  }
}

@media screen and (min-width: 1024px) {
  .textbox {
    height: 85%;
    width: 75%;
  }
}
