/* =========================================================================
   COSMIC THEME
   Palette pulled straight from the uploaded Milky Way panorama:
     - deep space navy/black   #05070d  (base background)
     - starlight lavender      #b9c6e8  (body text, borders)
     - horizon airglow gold    #e8c26b  (accents, button glow)
     - nebula magenta          #d4537e  (hover glow / highlights)
   ========================================================================= */

body {
  font-family: system-ui, sans-serif;
  margin: 0 auto;
  max-width: 700px;
  padding: 1.5rem;
  color: #dfe6f7;                 /* was #111 -- flipped to a pale starlight
                                      color so text reads against the dark sky */
  position: relative;
  min-height: 100vh;

  /* ---- Milky Way background -------------------------------------------
     Now set directly on body instead of a fixed-position ::before layer.
     That old approach used position: fixed to pin the image to the
     viewport -- but a fixed element doesn't move at all, so setting
     background-attachment: scroll on it had no visible effect (fixed
     positioning overrides attachment). Putting the image on body itself,
     which is a normal, non-fixed block that grows with the page content,
     is what actually lets the background scroll along with everything
     else. background-size: cover still fills the viewport width; because
     there's no gradient overlay anymore, background-color below is what
     keeps the very top/bottom edges filled if the image doesn't fully
     cover a very tall page. -------------------------------------------- */
  background-color: rgba(47, 46, 46, 0.75);      /* deep-space fallback / edge fill */
  background-image: url('img_src/background-bg2.png');
  background-blend-mode: lighten; 
  background-size: 100% auto;
  background-position: center top;
  background-repeat: repeat-y;
  background-attachment: scroll;  /* default, but explicit: scrolls with the page */
}

/* The old .parent::before rule pointed at a cosmic_background.png that
   doesn't exist in this project and isn't used anywhere in index.html, so
   it's been removed -- the background now lives directly on body above. */

/* Screen-reader-only heading -- visually hidden but read by assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0.75rem;
}

/* ---- "Cosmic" button -----------------------------------------------------
   Frosted dark glass so the starfield still shows through, a soft gold
   glow that slowly breathes (cosmic-breathe), and on hover a comet-like
   streak of light sweeps across the button (comet-sweep). Both animations
   are pure CSS keyframes, no JS. ------------------------------------------ */
.controls button,
.cosmic-btn {
  position: relative;
  overflow: hidden;               /* clips the comet-sweep streak below */
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid rgba(232, 194, 107, 0.45);
  border-radius: 6px;
  background: rgba(15, 18, 32, 0.55);
  color: #f2e8cf;
  cursor: pointer;
  backdrop-filter: blur(4px);
  animation: cosmic-breathe 3.2s ease-in-out infinite;
  transition: color 0.2s ease, border-color 0.2s ease;
}

/* .cosmic-btn is the <a>-tag version of the same button used for
   "Pause Orbits" -- used for the About/Projects/Skills/Contact links
   that used to just be plain <h2> text under each section. */
.cosmic-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  padding: 14px 28px;
  border-radius: 10px;
}

/* Slow pulsing glow, like a distant star -- runs constantly at rest */
@keyframes cosmic-breathe {
  0%, 100% { box-shadow: 0 0 4px 0 rgba(232, 194, 107, 0.25); }
  50%      { box-shadow: 0 0 12px 2px rgba(232, 194, 107, 0.55); }
}

/* The comet streak itself: a bright diagonal gradient sitting just off the
   left edge, revealed by animating its position on hover. */
.controls button::before,
.cosmic-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 244, 214, 0.65) 50%,
    transparent 100%
  );
  transform: rotate(0deg);
  pointer-events: none;
}

.controls button:hover,
.cosmic-btn:hover {
  border-color: #e8c26b;
  color: #fff8e6;
}

.controls button:hover::before,
.cosmic-btn:hover::before {
  animation: comet-sweep 0.9s ease forwards;
}

@keyframes comet-sweep {
  from { left: -60%; }
  to   { left: 140%; }
}

.orbit-container {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
}

#orbitSvg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Center hub circle -- these were var(--surface-1) / var(--border-strong) /
   var(--text-primary), which only exist inside Claude's chat UI. Replaced
   with real hex values so this renders correctly in any browser. Now
   styled as a dim glassy "star core" with its own slow glow pulse so it
   feels like the gravity source the orbiting tabs are circling. */
.hub-circle {
  fill: rgba(20, 22, 36, 0.65);
  stroke: #e8c26b;
  stroke-width: 0.75;
  opacity: 1;                     /* raise/lower this to adjust solidity */
  animation: hub-glow 4s ease-in-out infinite;
}

@keyframes hub-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(232, 194, 107, 0.35)); }
  50%      { filter: drop-shadow(0 0 14px rgba(232, 194, 107, 0.75)); }
}

.hub-text {
  font-size: 13px;
  font-weight: 500;
  fill: #f2e8cf;
}

.hint {
  font-size: 13px;
  color: #9aa6c4;
  margin-top: 0.5rem;
}

/* ---- Orbiting tab circles --------------------------------------------
   Each tab now twinkles like a star: opacity and glow drift up and down
   on a loop. The nth-child delays desync the four tabs from each other so
   they don't all pulse in unison, which reads as more natural/starlike. */
.tab-circle {
  opacity: 0.6;
  stroke-width: 1.2;
  animation: twinkle 2.6s ease-in-out infinite;
}

.tab-circle:nth-child(1) { animation-delay: 0s; }

@keyframes twinkle {
  0%, 100% {
    opacity: 0.45;
    filter: drop-shadow(0 0 2px currentColor);
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 8px currentColor);
  }
}

.tab-text {
  font-size: 12px;
  font-weight: 500;
  text-anchor: middle;
  fill: #fff;
}

/* Stagger each orbiting group's twinkle timing via the SVG group order,
   so "About Me", "My Projects", "My Skills", "Contact Me" each glow out
   of phase with one another. */
.orbit-container svg > g:nth-child(2) .tab-circle { animation-delay: 0.4s; }
.orbit-container svg > g:nth-child(3) .tab-circle { animation-delay: 0.9s; }
.orbit-container svg > g:nth-child(4) .tab-circle { animation-delay: 1.4s; }
.orbit-container svg > g:nth-child(5) .tab-circle { animation-delay: 1.9s; }

section {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(185, 198, 232, 0.15);
  margin-top: 2rem;
  color: #dfe6f7;
}

/* ---- "Sizable" section-link buttons (index.html) -------------------------
   Replaces the old plain <h2> + horizontal-rule sections with a 2x2 grid
   (1 column on narrow screens) of large, clearly-clickable cards. Each one
   reads its color from the inline --accent custom property set in the
   markup, so it automatically matches that destination's orbiting tab. */
.section-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 1.5rem 0 2.5rem;
}

@media (max-width: 480px) {
  .section-links { grid-template-columns: 1fr; }
}

.section-btn {
  --accent: #b9c6e8;             /* fallback if not set inline */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1.1rem 1.3rem;
  min-height: 64px;               /* keeps the tap target large on mobile */
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(15, 18, 32, 0.55);
  backdrop-filter: blur(4px);
  color: #f2f5fb;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  animation: cosmic-breathe-accent 3.2s ease-in-out infinite;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.section-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.section-btn:hover::before {
  animation: comet-sweep 0.9s ease forwards;
}

/* Same comet-streak trick as the "Pause Orbits" button, but reusing the
   ::before element per-card so each one sweeps in its own accent color. */
.section-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(115deg, transparent 0%, color-mix(in srgb, var(--accent) 70%, white) 50%, transparent 100%);
  opacity: 0.6;
  pointer-events: none;
}

.section-btn-arrow {
  color: var(--accent);
  font-size: 18px;
  transition: transform 0.15s ease;
}

.section-btn:hover .section-btn-arrow {
  transform: translateX(4px);
}

/* Same breathing glow as .controls button, but colored per-card via
   --accent instead of the fixed gold used elsewhere. */
@keyframes cosmic-breathe-accent {
  0%, 100% { box-shadow: 0 0 4px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  50%      { box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 55%, transparent); }
}

/* ---- Standalone destination pages (about/projects/skills/contact.html) --
   Each page reuses this same stylesheet and body background, then adds a
   simple content card plus a prominent "Return to Orbit" button so people
   always have an obvious way back to the main orbit page. */
.page-content {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.page-content h1 {
  margin: 0;
  color: #f2e8cf;
}

.return-btn {
  --accent: #e8c26b;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(15, 18, 32, 0.6);
  color: #f2e8cf;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  animation: cosmic-breathe 3.2s ease-in-out infinite;
}

.return-btn:hover::before {
  animation: comet-sweep 0.9s ease forwards;
}

.return-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 244, 214, 0.65) 50%, transparent 100%);
  pointer-events: none;
}

/* Respect users who've asked the OS for reduced motion: turn off every
   decorative animation added above (script.js already pauses the orbit
   itself for this same media query). */
@media (prefers-reduced-motion: reduce) {
  .controls button,
  .cosmic-btn,
  .hub-circle,
  .tab-circle,
  .section-btn,
  .return-btn {
    animation: none !important;
  }
  .controls button::before,
  .cosmic-btn::before,
  .section-btn::before,
  .return-btn::before {
    display: none;
  }
}

.image-row-intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

@media (max-width: 600px) {
  .image-row-intro {
    flex-direction: column;
  }
}

.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
}

@media (max-width: 600px) {
  .image-row {
    flex-direction: column; /* stacks images vertically on phones */
  }
}

.hd-image {
  width: 250px;
  max-width: 100%;
  height: auto;
}

.hd1-image {
  width: 400px;
  max-width: 100%;
  height: auto;
}

p {
  background-color: #f0f0f0; 
  display: inline-block;
  padding: 10px;
}

h1 {
  background-color: #f0f0f0; 
  display: inline-block;
  padding: 15px;
}

h2 {
  background-color: #f0f0f0; 
  display: inline-block;
  padding: 10px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: white;
  border-radius: 12px;
  padding: 32px 40px;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 260px;
}

.modal-box h2 {
  margin: 0 0 20px;
  color: black;
  font-size: 1.2rem;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-option {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  background: #f2f2f2;
  color: black;
  text-decoration: none;
  transition: background 0.15s ease;
}

.modal-option:hover {
  background: #e0e0e0;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: black;
}

.page-content h1,
.page-content h2,
.page-content p {
  color: black;
}