/* I do not want to deal with manually editing hex codes */
/* Also codesandbox doesn't like css variables*/
:root {
  --bg-light-gray: #e7e6e6;
  --bg-white: #ffffff;
  --text-dark-blue: #2c3e50;
  --text-medium-blue: #34495e;
  --text-light-gray: #7f8c8d;
  --shadow-black: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.2);
}

/* Reset everything, I don't want to deal with edge casess */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* mobile first  design */
body {
  background-color: var(--bg-light-gray);
  font-family: "Crimson Text", serif;
  line-height: 1.6;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main container, default is for mobile */
main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: var(--bg-white);
  border-radius: 15px;
  box-shadow: 0 4px 20px var(--shadow-black);
  text-align: center;
}

/* Headings with fancy fonts from google */
.article-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark-blue);
  margin-bottom: 0.5rem;
  text-align: center;
}

.poem-title {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-medium-blue);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Subtitle paragraph */
.article-description {
  font-size: 1rem;
  color: var(--text-light-gray);
  margin-bottom: 2rem;
  text-align: center;
}

/* Poem container */
.poem {
  margin: 2rem 0;
  text-align: center;
}

/* Poem text styling */
.poem-content {
  font-family: "Crimson Text", serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dark-blue);
  margin-bottom: 0.25rem;
  text-align: center;
  max-width: 100%;
}

/* Figure caption with image and text - specific to poem figure */
.poem figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem;
  margin-top: 0.25rem;
}

/* Image styling - circle cropped */
.author-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--text-medium-blue);
  box-shadow: 0 2px 10px var(--shadow-dark);
}

/* Caption text */
.poem-details {
  font-family: "Playfair Display", serif;
  font-size: 0.9rem;
  color: var(--text-medium-blue);
  font-weight: 600;
}

/* Hide footer */
codecraft-web-project-footer {
  display: none;
}

/*Unfortunate fact, google.com doesn't properly render on my iphone SE, it doeesn't allow access to the full toolbar*/
/* iPhone SE case */
@media screen and (max-width: 395px) {
  body {
    padding: 0.75rem;
  }

  main {
    padding: 1rem;
  }

  .article-title {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
  }

  .poem-title {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .article-description {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .poem-content {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.2rem;
  }

  .poem figcaption {
    gap: 0.75rem;
    padding: 0.2rem;
    margin-top: 0.2rem;
  }

  .author-img {
    width: 60px;
    height: 60px;
    border-width: 2px;
  }

  .poem-details {
    font-size: 0.75rem;
  }
}

/* Tablet styles - 768px and up */
@media screen and (min-width: 768px) {
  body {
    padding: 2rem;
  }

  main {
    max-width: 700px;
    padding: 2.5rem;
  }

  .article-title {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
  }

  .poem-titlte {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .article-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
  }

  .poem-content {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 0.5rem;
  }

  /* Image and text side by side on tablet */
  .poem figcaption {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 1.5rem;
  }

  .author-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
  }
}

/* Desktop styles - 1024px and up */
@media screen and (min-width: 1024px) {
  body {
    padding: 3rem;
  }

  main {
    max-width: 800px;
    padding: 3rem;
  }

  .article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .poem-titlte {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .article-description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
  }

  .poem-content {
    font-size: 1.2rem;
    line-height: 2.2;
    margin-bottom: 0.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .poem figcaption {
    gap: 2rem;
    padding: 1rem;
  }

  .author-img {
    width: 120px;
    height: 120px;
  }
}

/* Large desktop styles - 1200px and up */
@media screen and (min-width: 1200px) {
  main {
    max-width: 900px;
    padding: 4rem;
  }

  .article-title {
    font-size: 3rem;
  }

  .poem-titlte {
    font-size: 2rem;
  }

  .poem-content {
    font-size: 1.3rem;
    line-height: 2.4;
  }
}
