/* General styles */
body {
  margin: 0;
  color: #f1f1f1;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #0b1020 0, #02030a 55%, #000 100%);
}

* { box-sizing: border-box; }

/* Banner */
.banner {
  background: linear-gradient(90deg, #1f2833, #0b0c10);
  color: #66fcf1;
  text-align: center;
  padding: 40px 20px;
}

/* Navbar */
.navbar {
  background-color: #1f2833;
  padding: 10px 20px;
}

/* Nav list - horizontal layout */
.navbar ul, .navbar-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  justify-content: center;
}

/* Species section heading */
.headText {
  color: #66fcf1;
  font-size: 18px;
  font-weight: bold;
  padding: 8px 0;
  pointer-events: none; /* non-interactive */
}

.navbar li {
  list-style: none;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  padding: 8px 12px;
  display: block;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar a:hover {
  color: #66fcf1;
  background-color: rgba(102, 252, 241, 0.1);
  border-radius: 4px;
}

/* Hamburger menu toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  gap: 6px;
}

.navbar-toggle span {
  width: 24px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.navbar-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Intro section */
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  gap: 24px;
  flex-direction: column;
}

.intro-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.intro-text {
  flex: 1;
}

.intro-image {
  flex: 1;
}

.intro-image img {
  max-width: 100%;
  border-radius: 8px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  /* Show hamburger button on mobile */
  .navbar-toggle {
    display: flex;
  }

  /* Mobile navbar menu */
  .navbar {
    position: relative;
  }

  .navbar-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1f2833;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .navbar-menu.open {
    max-height: 500px;
    border-bottom: 1px solid rgba(102, 252, 241, 0.15);
  }

  .navbar-menu li {
    padding: 0;
  }

  .navbar-menu a {
    padding: 14px 20px;
    border-radius: 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
  }

  .navbar-menu .headText {
    padding: 14px 20px;
    font-size: 12px;
    color: #66fcf1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
  }

  .navbar-menu a:hover {
    background-color: rgba(102, 252, 241, 0.15);
  }

  /* Intro stacks vertically */
  .intro {
    flex-direction: column;
    text-align: center;
  }

  .intro-text,
  .intro-image {
    flex: unset;
    width: 100%;
  }
}

h1 {
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 18px;
  color: rgba(245,245,255,0.82);
}

/* Footer */
footer {
  background-color: #26303c;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer .socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

footer .icon-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: brightness(0.9);
  transition: transform 0.2s ease, filter 0.2s ease;
}

footer .icon-link:hover img {
  transform: scale(1.15);
  filter: brightness(1.2);
}

/* =========================
   Species pages
   ========================= */
.species-card {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
}

.species-left img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}

.species-right h2 {
  margin: 0 0 10px;
  color: #66fcf1;
  font-size: 2rem;
}

.species-lead {
  margin: 0 0 18px;
  color: rgba(230,233,255,0.85);
  line-height: 1.45;
}

/* Gender toggle */
.gender-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 16px;
}

.gender-btn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(5,10,40,0.55);
  color: rgba(245,245,255,0.92);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.gender-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(102,252,241,0.45);
}

.gender-btn.active {
  background: radial-gradient(circle at top left, rgba(102,252,241,0.9), rgba(123,92,255,0.8));
  color: #02030a;
  border-color: rgba(255,255,255,0.10);
}

.gender-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  font-weight: 800;
}

.gender-btn.active .gender-icon {
  background: rgba(0,0,0,0.18);
}

.gender-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.gender-hint {
  font-size: 0.85rem;
  color: rgba(230,233,255,0.62);
  margin-left: 6px;
}

/* Panels */
.stats-panel,
.bio-panel {
  background: rgba(5,10,40,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 16px 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.stat {
  display: grid;
  gap: 4px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.07);
}

.stat .k {
  font-size: 0.8rem;
  color: rgba(230,233,255,0.66);
}

.stat .v {
  font-size: 0.98rem;
  color: rgba(245,245,255,0.92);
  font-weight: 700;
}

.bio-panel h3 {
  margin: 0 0 8px;
  color: rgba(245,245,255,0.95);
  font-size: 1.05rem;
}

.bio-panel p {
  margin: 0;
  color: rgba(230,233,255,0.82);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .species-card {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Books page
   ========================= */
.books-page {
  max-width: 1100px;
  margin: auto;
  padding: 50px 20px;
}

.books-hero {
  text-align: center;
  margin-bottom: 40px;
}

.books-hero h1 {
  color: #66fcf1;
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.books-hero p {
  max-width: 650px;
  margin: auto;
  color: rgba(245,245,255,0.8);
}

.book-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  background: rgba(5,10,40,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  align-items: start;
}

.book-info {
  min-width: 0;
}

.book-info h2 {
  margin-top: 0;
  color: #66fcf1;
}

.book-description {
  line-height: 1.6;
  margin-bottom: 25px;
}

.book-cover {
  width: 220px;
  justify-self: end;
}

.book-cover img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.book-downloads {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.download-btn {
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: white;
  transition: all 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

.download-btn.apple {
  border-color: rgba(255,255,255,0.4);
}

.download-btn.android {
  border-color: #3ddc84;
}

.download-btn.pdf {
  border-color: #ff6b6b;
}

@media (max-width: 768px) {
  .book-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-cover {
    width: 180px;
    justify-self: center;
  }

  .book-cover img {
    max-width: 180px;
  }

  .book-downloads {
    justify-content: center;
  }
}

/* =========================
   Author page
   ========================= */
.author-page {
  max-width: 1100px;
  margin: auto;
  padding: 60px 20px;
}

.author-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
  background: rgba(5,10,40,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 35px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.author-photo img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
}

.author-info h1 {
  color: #66fcf1;
  margin-top: 0;
}

.author-info h2 {
  margin-bottom: 4px;
}

.author-meta {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.author-bio {
  line-height: 1.6;
  margin-bottom: 16px;
}

.author-contact {
  margin-top: 40px;
  text-align: center;
}

.author-contact h2 {
  color: #66fcf1;
}

.author-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.author-link {
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.author-link:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.author-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.author-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.author-icon:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

@media (max-width: 900px) {
  .author-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-photo img {
    max-width: 280px;
    margin: auto;
  }
}
