/*
   Theme: The Glory of Ink
   Color Palette:
   - #f6ecd7 (Beige from logo)
   - #2d2320 (Dark ink black)
   - #bfa77a (Feather brown)
   - #fffbe9 (Lightest beige for cards)
*/

body {
  background: #f6ecd7;
  color: #2d2320;
  font-family: "Georgia", serif;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 1em 0 0.5em 0;
  background: #f6ecd7;
}

.header-flex .logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.logo {
  width: 70px;
  border-radius: 50%;
  box-shadow: 0 2px 8px #bfa77a;
  margin-right: 1em;
  flex-shrink: 0;
}

.logo-title h1 {
  margin: 0;
  font-size: 2.2em;
  word-break: break-word;
}

.logo-title .subtitle {
  margin: 0;
  font-size: 1.2em;
  color: #bfa77a;
}

nav {
  background: #2d2320;
  padding: 0.5em;
  text-align: center;
}

nav a {
  color: #f6ecd7;
  margin: 0 1em;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #bfa77a;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1em;
  box-sizing: border-box;
  text-align: center;

  flex: 1; 
}

main h2 {
  margin-bottom: 1em;
}

#poem-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5em;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;

  align-items: stretch;
}

.poem-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.poem-preview {
  background: #fffbe9;
  padding: 1.2em;
  border-radius: 10px;
  box-shadow: 0 2px 8px #bfa77a33;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  min-height: -webkit-fill-available;

}

.poem-preview:hover {
  transform: translateY(-15px);
  box-shadow: 0 4px 12px #bfa77a55;
}

.poem-preview h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: #2d2320;
}

.poem-preview p {
  color: #444;
  font-size: 0.95em;
  line-height: 1.4;
}

.poem-full {
  flex: 1;
  max-width: 700px;
  margin: 30px auto;
  background: #fffbe9;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 2px 12px #bfa77a33;
  text-align: center;
}

.poem-full h2 {
  margin-top: 0;
}

.poem-full pre {
  white-space: pre-wrap;
  font-family: "Georgia", serif;
  font-size: 1.15em;
  background: none;
  border: none;
  margin: 1em 0;
  text-align: left;
}

footer {
  text-align: center;
  padding: 1em 0;
  background: #2d2320;
  color: #f6ecd7;
  font-size: 0.9em;
  width: 100%;
  box-sizing: border-box;
}

.contact {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fffbe9;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.contact h2 {
  margin-bottom: 1rem;
  color: #2d2320;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: 1.1rem;
}

.contact-list li {
  margin: 0.8rem 0;
}

.contact-list i {
  margin-right: 8px;
  color: #bfa77a;
}

.contact-list a {
  color: #2d2320;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.contact-list a:hover {
  color: #bfa77a;
  text-decoration: underline;
}

@media (max-width: 768px) {
  #poem-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  #poem-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .header-flex .logo-title {
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
  }
  .logo {
    width: 50px;
    margin-right: 0;
  }
  .logo-title h1 {
    font-size: 1.5em;
  }
  nav a {
    margin: 0 0.5em;
    font-size: 1em;
  }
  .poem-full {
    padding: 1em;
    max-width: 100%;
  }
}

.logo-title h1 a {
  text-decoration: none;
  color: inherit;
}

.logo-text {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: #2d2320;
}

.poem-title {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: #2d2320;
  margin-bottom: 0.5em;
  letter-spacing: 1.5px;
}

.instagram-poem {
  display: inline-block;
  margin-top: 1em;
  padding: 0.5em 1em;
  background: #2d2320;
  color: #f6ecd7;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.2s ease, color 0.2s ease;
}