/* global and background */
body {
  margin: 0;
  background-image: url('/pictures/wallpaper/gingham.gif');
  background-repeat: repeat;
  background-attachment: fixed;
  color: navy;
  font-family: "Cinzel Decorative", serif;
}
.page-title {
  text-align: center;
  color: navy;
  font-size: 3.5em;
  margin-top: 40px;
  margin-bottom: 0px;
}

/* home button */
.home-button {
  position: absolute;
  top: 950px; /* brought up a hair */
  left: 20px;
  display: inline-block;
  padding: 7px 15px; 
  background-color: transparent;
  color: navy;
  border: 1px solid navy;
  text-decoration: none;
  font-family: "Cinzel Decorative", serif;
  font-size: 1em;
  transition: all 0.3s ease;
  z-index: 100;
}
.home-button:hover {
  background-color: white;
  color: gold;
  border-color: gold;
  cursor: pointer;
}

/* orbit container */
.about-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  min-height: 100vh;
  padding-bottom: 200px; /* creates extra scroll space below the button */
}
.solar-system {
  position: relative;
  width: 800px;
  height: 800px;
  margin-top: 0px;
}

/* center portrait */
.center-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px; 
  height: 160px;
  object-fit: contain; 
  z-index: 10;
  border: none; 
  cursor: pointer;
}

/* invisible ring bases */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

/* ring animation speeds */
.inner { animation: spinClockwise 115s linear infinite; }
.outer { animation: spinCounter 130s linear infinite; }

/* structural item wrappers */
.orbit-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px; 
}

/* shrunk ring distances to prevent overlapping */
.inner .orbit-item { transform: rotate(var(--angle)) translateY(-130px); }
.outer .orbit-item { transform: rotate(var(--angle)) translateY(-220px); }

/* clickable icons */
.orbit-icon {
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  transition: transform 6s ease; 
}
.orbit-icon:hover {
  transform: scale(1.5);
}

/* counter-spins */
.inner .orbit-icon { animation: stabilizeClockwise 115s linear infinite; }
.outer .orbit-icon { animation: stabilizeCounter 130s linear infinite; }

/* keyframe math */
@keyframes spinClockwise { 100% { transform: rotate(360deg); } }
@keyframes stabilizeClockwise { 100% { transform: rotate(-360deg); } }
@keyframes spinCounter { 100% { transform: rotate(-360deg); } }
@keyframes stabilizeCounter { 100% { transform: rotate(360deg); } }

/* left side panel */
.side-panel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 190px;
  height: 560px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid navy;
  padding: 20px 16px;
  z-index: 20;
}
.side-panel--left { left: -130px; }

.panel-title {
  margin: 0 0 12px 0;
  text-align: center;
  font-size: 1.5em;
  color: navy;
}
.panel-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1em;
  line-height: 1.6;
  color: navy;
}

/* half-ring arc */
.half-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 5;
}
.arc-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  margin: -50px 0 0 -50px;
  /* pushed out an extra 20px */
  transform: rotate(var(--angle)) translateY(-360px);
}
.arc-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  border: none;
  transform: rotate(calc(-1 * var(--angle)));
  transition: transform 0.8s ease;
}
.arc-icon:hover {
  transform: rotate(calc(-1 * var(--angle))) scale(1.5);
}

/* modal window */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-square {
  position: relative;
  width: 400px;
  height: 400px;
  background-color: #fcfcfc;
  border: 2px solid navy;
  padding: 50px 30px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background: transparent;
  border: 2px solid navy;
  color: navy;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.close-btn:hover, .close-btn:active {
  border-color: gold;
  color: gold;
  background-color: white;
}

/* modal typography */
#modal-header {
  margin-bottom: 5px; 
  color: navy; 
}
#modal-body {
  font-size: 1.3em;
  margin-top: 0; 
  line-height: 1.5; 
}
.hidden { display: none !important; }