/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Dynamic Space Background */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #0f0f23 0%, #000000 100%);
  overflow: hidden;
  position: relative;
}

/* Canvas Starfield */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Moon - Large Crater Moon (Moon 6) */
.moon {
  position: fixed;
  top: 10%;
  right: 15%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  /* Moon 6 - Large Crater Moon */
  background: 
    radial-gradient(circle at 30% 30%, #f0f0f0 0%, #e0e0e0 40%, #c8c8c8 100%);
  box-shadow: 
    inset -15px -15px 25px rgba(0,0,0,0.2),
    0 0 25px rgba(255,255,255,0.4);
  animation: moonFloat 8s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

/* Moon 6 crater pattern overlay */
.moon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    /* Large prominent crater */
    radial-gradient(circle at 40% 45%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 20%, transparent 35%),
    /* Medium crater */
    radial-gradient(circle at 70% 25%, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 15%, transparent 25%),
    /* Small craters */
    radial-gradient(circle at 25% 75%, rgba(0,0,0,0.3) 0%, transparent 12%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.25) 0%, transparent 10%);
  animation: none;
}

/* Subtle atmospheric glow */
.moon::after {
  content: '';
  position: absolute;
  top: -25px;
  left: -25px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 70%,
    rgba(135, 206, 250, 0.06) 80%,
    rgba(255, 255, 255, 0.03) 90%,
    transparent 100%
  );
  animation: atmosphereGlow 6s ease-in-out infinite;
  z-index: -1;
}

/* Moon Craters */
.crater {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    rgba(30,30,30,0.7) 0%,     /* Very dark center */
    rgba(60,60,60,0.4) 30%,    /* Dark walls */
    rgba(0,0,0,0.2) 60%,       /* Rim shadow */
    transparent 85%
  );
  box-shadow: 
    inset 2px 1px 3px rgba(0,0,0,0.6),        /* Deeper shadow */
    inset -1px -1px 1px rgba(255,255,255,0.15), /* Rim highlight */
    0 1px 2px rgba(0,0,0,0.2);                 /* External shadow */
}

.crater-1 {
  width: 14px;
  height: 14px;
  top: 25px;
  left: 30px;
}

.crater-2 {
  width: 8px;
  height: 8px;
  top: 65px;
  left: 75px;
}

.crater-3 {
  width: 10px;
  height: 10px;
  top: 85px;
  left: 35px;
}

.crater-4 {
  width: 5px;
  height: 5px;
  top: 45px;
  left: 60px;
}

.crater-5 {
  width: 6px;
  height: 6px;
  top: 30px;
  left: 70px;
}


@keyframes moonFloat {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1);
    box-shadow: 
      inset -8px 8px 15px rgba(255,255,255,0.3),
      inset 15px -15px 40px rgba(0,0,0,0.2),
      0 0 40px rgba(255,255,255,0.3),
      0 0 80px rgba(135,206,250,0.15),
      0 0 120px rgba(255,255,255,0.05),
      0 0 160px rgba(135,206,250,0.03);
  }
  50% { 
    transform: translateY(-15px) rotate(1deg) scale(1.05);
    box-shadow: 
      inset -10px 10px 20px rgba(255,255,255,0.35),
      inset 18px -18px 45px rgba(0,0,0,0.25),
      0 0 50px rgba(255,255,255,0.4),
      0 0 100px rgba(135,206,250,0.2),
      0 0 140px rgba(255,255,255,0.08),
      0 0 180px rgba(135,206,250,0.05);
  }
}

@keyframes moonRotate {
  0% { 
    transform: rotate(0deg);
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% { 
    transform: rotate(360deg);
    opacity: 0.6;
  }
}

@keyframes atmosphereGlow {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1) rotate(0deg); 
  }
  50% { 
    opacity: 0.5; 
    transform: scale(1.08) rotate(180deg); 
  }
}




/* Enhanced Nebula Clouds */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(35px);
  z-index: 2;
}

/* Hydrogen-Alpha Red Nebula */
.nebula:nth-child(1) {
  top: 15%;
  left: 8%;
  width: 180px;
  height: 140px;
  background: radial-gradient(ellipse, 
    rgba(255, 99, 132, 0.4) 0%, 
    rgba(255, 159, 64, 0.2) 40%, 
    transparent 70%);
  animation: nebulaShift1 12s ease-in-out infinite;
}

/* Oxygen III Blue-Green Nebula */
.nebula:nth-child(2) {
  top: 55%;
  right: 15%;
  width: 160px;
  height: 110px;
  background: radial-gradient(ellipse, 
    rgba(0, 255, 127, 0.4) 0%, 
    rgba(64, 224, 208, 0.25) 50%, 
    transparent 70%);
  animation: nebulaShift2 10s ease-in-out infinite 3s;
}

/* Mixed Hydrogen Magenta Nebula */
.nebula:nth-child(3) {
  bottom: 25%;
  left: 55%;
  width: 140px;
  height: 95px;
  background: radial-gradient(ellipse, 
    rgba(255, 20, 147, 0.4) 0%, 
    rgba(138, 43, 226, 0.3) 60%, 
    transparent 70%);
  animation: nebulaShift3 8s ease-in-out infinite 6s;
}

@keyframes nebulaShift1 {
  0%, 100% { 
    opacity: 0.6; 
    transform: scale(1) rotate(0deg);
    filter: blur(35px) hue-rotate(0deg);
  }
  33% { 
    opacity: 0.9; 
    transform: scale(1.1) rotate(5deg);
    filter: blur(30px) hue-rotate(15deg);
  }
  66% { 
    opacity: 0.7; 
    transform: scale(0.95) rotate(-3deg);
    filter: blur(40px) hue-rotate(-10deg);
  }
}

@keyframes nebulaShift2 {
  0%, 100% { 
    opacity: 0.7; 
    transform: scale(1) rotate(0deg);
    filter: blur(35px) hue-rotate(0deg);
  }
  50% { 
    opacity: 0.95; 
    transform: scale(1.15) rotate(-8deg);
    filter: blur(25px) hue-rotate(25deg);
  }
}

@keyframes nebulaShift3 {
  0%, 100% { 
    opacity: 0.65; 
    transform: scale(1) rotate(0deg);
    filter: blur(35px) hue-rotate(0deg);
  }
  25% { 
    opacity: 0.85; 
    transform: scale(1.05) rotate(3deg);
    filter: blur(30px) hue-rotate(-15deg);
  }
  75% { 
    opacity: 0.9; 
    transform: scale(1.12) rotate(-5deg);
    filter: blur(28px) hue-rotate(20deg);
  }
}


/* Container for centering content */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  z-index: 15;
}

/* Enhanced Main Text */
.greeting {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 6rem;
  font-weight: 100;
  color: #ffffff;
  text-shadow: 
    /* Inner glow */
    0 0 5px rgba(255, 255, 255, 1),
    0 0 10px rgba(255, 255, 255, 0.9),
    /* Mid glow */
    0 0 20px rgba(135, 206, 250, 0.7),
    0 0 30px rgba(135, 206, 250, 0.5),
    /* Outer glow */
    0 0 40px rgba(135, 206, 250, 0.3),
    0 0 60px rgba(135, 206, 250, 0.1);
  margin: 0;
  letter-spacing: 0.3em;
  text-align: center;
  position: relative;
  animation: cosmicFloat 6s ease-in-out infinite;
}

/* Individual Letter Styling */
.letter {
  display: inline-block;
  position: relative;
}

/* Individual letter shimmer effects */
.letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: letterShimmer 3s ease-in-out infinite;
  z-index: 1;
}

/* Staggered letter animations */
.letter-1 { 
  animation: letterFloat1 5s ease-in-out infinite;
}
.letter-2 { 
  animation: letterFloat2 5s ease-in-out infinite 0.5s;
}
.letter-3 { 
  animation: letterFloat3 5s ease-in-out infinite 1s;
}

/* Individual letter shimmer delays */
.letter-1::before { animation-delay: 0s; }
.letter-2::before { animation-delay: 0.7s; }
.letter-3::before { animation-delay: 1.4s; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes letterShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes letterFloat1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes letterFloat2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(-1deg); }
}

@keyframes letterFloat3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}


@keyframes cosmicFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1);
    text-shadow: 
      0 0 5px rgba(255, 255, 255, 1),
      0 0 10px rgba(255, 255, 255, 0.9),
      0 0 20px rgba(135, 206, 250, 0.7),
      0 0 30px rgba(135, 206, 250, 0.5),
      0 0 40px rgba(135, 206, 250, 0.3),
      0 0 60px rgba(135, 206, 250, 0.1);
  }
  25% {
    transform: translateY(-8px) scale(1.01);
    text-shadow: 
      0 0 8px rgba(255, 255, 255, 1),
      0 0 15px rgba(255, 255, 255, 0.95),
      0 0 25px rgba(135, 206, 250, 0.8),
      0 0 35px rgba(255, 20, 147, 0.4),
      0 0 50px rgba(135, 206, 250, 0.4),
      0 0 70px rgba(135, 206, 250, 0.2);
  }
  50% { 
    transform: translateY(-20px) scale(1.03);
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 1),
      0 0 20px rgba(255, 255, 255, 1),
      0 0 30px rgba(135, 206, 250, 0.9),
      0 0 45px rgba(135, 206, 250, 0.7),
      0 0 60px rgba(0, 255, 127, 0.5),
      0 0 80px rgba(135, 206, 250, 0.3);
  }
  75% {
    transform: translateY(-8px) scale(1.01);
    text-shadow: 
      0 0 8px rgba(255, 255, 255, 1),
      0 0 15px rgba(255, 255, 255, 0.95),
      0 0 25px rgba(135, 206, 250, 0.8),
      0 0 35px rgba(255, 99, 132, 0.4),
      0 0 50px rgba(135, 206, 250, 0.4),
      0 0 70px rgba(135, 206, 250, 0.2);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .greeting {
    font-size: 4rem;
    letter-spacing: 0.2em;
  }
  
  .moon {
    width: 80px;
    height: 80px;
    top: 5%;
    right: 5%;
  }
  
  .nebula {
    transform: scale(0.8);
  }
}

@media (max-width: 480px) {
  .greeting {
    font-size: 3rem;
    letter-spacing: 0.15em;
  }
  
  .letter::before {
    display: none; /* Disable shimmer on small screens for performance */
  }
  
  .moon {
    width: 60px;
    height: 60px;
    top: 3%;
    right: 3%;
  }
  
  .nebula {
    transform: scale(0.6);
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

