@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Quicksand:wght@400;500;600&display=swap');

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: #213622;
  line-height: 1.7;
}

body {
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(180deg, #eaf6eb 0%, #d8edd9 40%, #c6e6c8 100%);
}

/* tiny stars */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 42px 42px;
}

/* keep actual content above decorative background */
header,
nav,
main,
footer,
.page-wrapper {
  position: relative;
  z-index: 1;
}

/* =========================
   PAGE BACKGROUND PLANETS
   ========================= */

.planet-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.planet {
  position: absolute;
  border-radius: 50%;
  opacity: 0.42;
  transform: translate(-50%, -50%);
  box-shadow:
    inset -12px -12px 24px rgba(0, 0, 0, 0.12),
    inset 10px 10px 18px rgba(255, 255, 255, 0.08);
}

/* shared planet textures */
.gas {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(80, 120, 85, 0.55) 0px,
      rgba(80, 120, 85, 0.55) 8px,
      rgba(120, 160, 122, 0.38) 8px,
      rgba(120, 160, 122, 0.38) 16px,
      rgba(95, 140, 100, 0.48) 16px,
      rgba(95, 140, 100, 0.48) 24px
    ),
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.06) 58%,
      rgba(0, 0, 0, 0.14) 100%
    );
}

.crater {
  background:
    radial-gradient(circle at 28% 30%, rgba(70, 105, 74, 0.45) 0 8%, transparent 9%),
    radial-gradient(circle at 64% 38%, rgba(70, 105, 74, 0.42) 0 10%, transparent 11%),
    radial-gradient(circle at 42% 68%, rgba(70, 105, 74, 0.38) 0 7%, transparent 8%),
    radial-gradient(circle at 70% 72%, rgba(70, 105, 74, 0.35) 0 6%, transparent 7%),
    radial-gradient(
      circle at 30% 30%,
      rgba(160, 195, 165, 0.30),
      rgba(120, 155, 126, 0.20) 60%,
      rgba(70, 95, 75, 0.28) 100%
    );
}

/* rings */
.ringed,
.ring {
  overflow: visible;
}

.ringed::after,
.ring::after {
  content: "";
  position: absolute;
  width: 145%;
  height: 26%;
  left: -22.5%;
  top: 37%;
  border: 2px solid rgba(90, 130, 95, 0.28);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

/* moons */
.moon {
  overflow: visible;
}

.moon::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  border: 1px dashed rgba(120, 150, 125, 0.18);
  border-radius: 50%;
}

.moon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: -8px;
  left: 72%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #dfeee2, #8fae95);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.10);
}

/* background planet positions */
.p1 {
  width: 120px;
  height: 120px;
  left: 4%;
  top: 8%;
}

.p2 {
  width: 95px;
  height: 95px;
  left: 25%;
  top: 10%;
}

.p3 {
  width: 110px;
  height: 110px;
  left: 96%;
  top: 12%;
}

.p4 {
  width: 85px;
  height: 85px;
  left: 92%;
  top: 40%;
}

.p5 {
  width: 100px;
  height: 100px;
  left: 6%;
  top: 50%;
}

.p6 {
  width: 140px;
  height: 140px;
  left: 95%;
  top: 88%;
}

.p7 {
  width: 90px;
  height: 90px;
  left: 30%;
  top: 90%;
}

.p8 {
  width: 115px;
  height: 115px;
  left: 70%;
  top: 75%;
}

.p10 {
  width: 80px;
  height: 80px;
  left: 85%;
  top: 60%;
}

/* =========================
   HEADER
   ========================= */

header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #a7d6ac 0%, #8fc99a 100%);
  color: #213622;
  text-align: center;
  padding: 52px 20px 38px 20px;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 24px rgba(33, 54, 34, 0.08);
}

/* header-only planets */
.header-planets {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.h-planet {
  position: absolute;
  border-radius: 50%;
  opacity: 0.24;
  box-shadow:
    inset -10px -10px 18px rgba(0, 0, 0, 0.10),
    inset 8px 8px 14px rgba(255, 255, 255, 0.08);
}

.h-planet.gas {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(80, 120, 85, 0.50) 0px,
      rgba(80, 120, 85, 0.50) 8px,
      rgba(120, 160, 122, 0.34) 8px,
      rgba(120, 160, 122, 0.34) 16px
    ),
    radial-gradient(
      circle at 30% 30%,
      rgba(255,255,255,0.20),
      rgba(255,255,255,0.05) 58%,
      rgba(0,0,0,0.12) 100%
    );
}

.h-planet.crater {
  background:
    radial-gradient(circle at 28% 30%, rgba(70, 105, 74, 0.40) 0 8%, transparent 9%),
    radial-gradient(circle at 64% 38%, rgba(70, 105, 74, 0.36) 0 10%, transparent 11%),
    radial-gradient(circle at 42% 68%, rgba(70, 105, 74, 0.30) 0 7%, transparent 8%),
    radial-gradient(
      circle at 30% 30%,
      rgba(160, 195, 165, 0.24),
      rgba(70, 95, 75, 0.22) 100%
    );
}

/* header rings */
.h-planet.ringed,
.h-planet.ring {
  overflow: visible;
}

.h-planet.ringed::after,
.h-planet.ring::after {
  content: "";
  position: absolute;
  width: 145%;
  height: 26%;
  left: -22.5%;
  top: 37%;
  border: 2px solid rgba(90, 130, 95, 0.24);
  border-radius: 50%;
  transform: rotate(-18deg);
}

/* header moon */
.h-planet.moon {
  overflow: visible;
}

.h-planet.moon::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  border: 1px dashed rgba(120, 150, 125, 0.14);
  border-radius: 50%;
}

.h-planet.moon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: -5px;
  left: 72%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #dfeee2, #8fae95);
}

.h-planet.small {
  width: 38px;
  height: 38px;
}

.h-planet.medium {
  width: 62px;
  height: 62px;
}

.h-planet.large {
  width: 78px;
  height: 78px;
}

/* place header planets inside the header only */
.header-planets .h-planet:nth-child(1) {
  left: 8%;
  top: 20%;
}

.header-planets .h-planet:nth-child(2) {
  right: 10%;
  top: 24%;
}

.header-planets .h-planet:nth-child(3) {
  right: 28%;
  bottom: 12%;
}

header h1,
header p {
  position: relative;
  z-index: 2;
}

header h1 {
  margin: 0;
  font-size: 3rem;
  letter-spacing: 0.2px;
}

header p {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 400;
}

/* =========================
   PAGE SHELL
   ========================= */

.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
}

h1, h2, h3, nav a {
  font-family: 'Merriweather', serif;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
  background-color: rgba(234, 246, 235, 0.92);
  border-bottom: 1px solid #9fcfa3;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(33, 54, 34, 0.04);
}

nav a {
  text-decoration: none;
  color: #213622;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 10px;
  background-color: rgba(159, 207, 163, 0.22);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
  color: #355c38;
  background-color: rgba(159, 207, 163, 0.38);
  text-decoration: none;
  transform: translateY(-1px);
}

main {
  padding: 44px 0 0 0;
}

p {
  font-size: 1.15rem;
}

a {
  color: #284a2d;
}

a:hover {
  color: #355c38;
}

.card,
.intro-box,
.section-text {
  background: rgba(247, 252, 247, 0.92);
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(33, 54, 34, 0.08);
  border: 1px solid rgba(159, 207, 163, 0.35);
}

.section-text a {
  color: #284a2d;
  font-weight: 600;
  text-decoration: underline;
}

.section-text a:hover {
  color: #355c38;
}

.home-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-top: 10px;
}

.text-column {
  flex: 1.4;
  min-width: 0;
}

.image-column {
  flex: 0.9;
  text-align: center;
}

.hero-image {
  width: 100%;
  max-width: 425px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(33, 54, 34, 0.14);
  border: 3px solid rgba(234, 246, 235, 0.8);
  display: block;
  margin: 0 auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-image:hover,
.media-file:hover,
.news-image:hover,
.image-row img:hover {
  transform: scale(1.025);
  box-shadow: 0 12px 28px rgba(33, 54, 34, 0.18);
}

.caption {
  font-size: 1rem;
  margin-top: 12px;
  max-width: 360px;
  color: #325336;
}

.intro-quote {
  text-align: center;
  font-style: italic;
  font-size: 1.5rem;
  margin: 10px auto 20px auto;
  max-width: 850px;
  color: #284a2d;
}

.intro-text {
  text-align: center;
  font-size: 1.12rem;
  max-width: 900px;
  margin: 0 auto 50px auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0 0 24px 0;
  letter-spacing: 0.3px;
  color: #213622;
}

.section-title::after {
  content: " ✦";
  color: #76a67b;
  font-size: 0.95em;
}

.section-title.right {
  text-align: right;
}

.section-title.left {
  text-align: left;
}

.dust-devil-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 60px;
}

.dust-devil-layout .media-column {
  flex: 0.95;
  text-align: left;
}

.dust-devil-layout .text-column {
  flex: 1.2;
  text-align: right;
}

.media-file {
  width: 100%;
  max-width: 450px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(33, 54, 34, 0.14);
  border: 3px solid rgba(234, 246, 235, 0.8);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.year-section .article-title {
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid rgba(33, 54, 34, 0.4);
}

.year-section .article-title:last-of-type {
  border-bottom: none;
}

.research-section {
  margin-bottom: 60px;
}

.research-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.research-layout .text-side {
  flex: 1.2;
}

.research-layout .media-side {
  flex: 0.9;
}

.mars-layout .text-side {
  text-align: left;
}

.mars-layout .media-side {
  text-align: right;
  margin-left: auto;
}

.mars-layout .media-side .media-file,
.mars-layout .media-side .caption {
  margin-left: auto;
  text-align: right;
}

.titan-layout .media-side {
  text-align: left;
  margin-right: auto;
}

.titan-layout .media-side .media-file,
.titan-layout .media-side .caption {
  margin-right: auto;
  text-align: left;
}

.titan-layout .text-side {
  text-align: right;
}

.section {
  margin-top: 45px;
}

.section h2 {
  border-bottom: 2px solid #9fcfa3;
  padding-bottom: 6px;
  margin-bottom: 15px;
}

.item {
  margin-bottom: 18px;
}

.title {
  font-weight: 600;
}

.date {
  float: right;
  font-style: italic;
  color: #355c38;
}

ul {
  margin-top: 6px;
}

li {
  margin-bottom: 6px;
}

.year-section {
  margin-top: 50px;
}

.year-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.article-title {
  font-weight: 600;
  margin-bottom: 15px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.3;
}

.news-image {
  display: block;
  margin: 0 auto;
  max-width: 560px;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(33, 54, 34, 0.14);
  border: 3px solid rgba(234, 246, 235, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.button {
  display: block;
  width: fit-content;
  margin: 15px auto 25px auto;
  padding: 11px 18px;
  background: linear-gradient(135deg, #9fcfa3 0%, #8fc99a 100%);
  color: #213622;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 6px 14px rgba(33, 54, 34, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  background: linear-gradient(135deg, #93c699 0%, #84bc8e 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(33, 54, 34, 0.12);
  color: #213622;
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.image-row img {
  width: 100%;
  max-width: 550px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(33, 54, 34, 0.14);
  border: 3px solid rgba(234, 246, 235, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #9fcfa3, transparent);
  margin: 60px 0;
}

footer {
  background: linear-gradient(135deg, #a7d6ac 0%, #8fc99a 100%);
  color: #213622;
  text-align: center;
  font-size: 0.95rem;
  padding: 25px 20px;
  margin-top: 50px;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid #8bbd8f;
  box-shadow: 0 -4px 14px rgba(33, 54, 34, 0.05);
}

@media (max-width: 800px) {
  .home-layout,
  .dust-devil-layout,
  .research-layout {
    flex-direction: column;
    gap: 24px;
  }

  .text-column,
  .image-column,
  .dust-devil-layout .media-column,
  .dust-devil-layout .text-column,
  .research-layout .text-side,
  .research-layout .media-side {
    width: 100%;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-image,
  .media-file,
  .caption,
  .mars-layout .media-side .media-file,
  .mars-layout .media-side .caption,
  .titan-layout .media-side .media-file,
  .titan-layout .media-side .caption {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .dust-devil-layout .text-column,
  .titan-layout .text-side,
  .mars-layout .text-side {
    text-align: left;
  }

  .section-title.right,
  .section-title.left {
    text-align: left;
  }

  header h1 {
    font-size: 2.2rem;
  }

  nav {
    gap: 10px;
  }

  nav a {
    display: inline-block;
    margin: 0;
  }

  .intro-quote {
    font-size: 1.25rem;
  }

  .p1 { width: 100px; height: 100px; left: 8%; top: 12%; }
  .p2 { width: 82px; height: 82px; left: 34%; top: 10%; }
  .p3 { width: 92px; height: 92px; left: 95%; top: 14%; }
  .p4 { width: 68px; height: 68px; left: 92%; top: 42%; }
  .p5 { width: 84px; height: 84px; left: 10%; top: 52%; }
  .p6 { width: 115px; height: 115px; left: 94%; top: 86%; }
  .p7 { width: 76px; height: 76px; left: 30%; top: 92%; }
  .p8 { width: 92px; height: 92px; left: 74%; top: 78%; }
  .p10 { width: 66px; height: 66px; left: 84%; top: 62%; }

  .header-planets .h-planet:nth-child(1) {
    left: 6%;
    top: 18%;
  }

  .header-planets .h-planet:nth-child(2) {
    right: 8%;
    top: 22%;
  }

  .header-planets .h-planet:nth-child(3) {
    right: 24%;
    bottom: 10%;
  }

  .h-planet.medium {
    width: 54px;
    height: 54px;
  }

  .h-planet.large {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 700px) {
  .image-row {
    flex-direction: column;
    align-items: center;
  }

  .image-row img {
    max-width: 450px;
  }
}

@media (max-width: 600px) {
  .date {
    float: none;
    display: block;
    margin-top: 4px;
  }
}
