html {
  font-size: 20px;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 18% 14%, rgba(58, 42, 114, 0.28), transparent 40%), radial-gradient(circle at 80% 10%, rgba(20, 40, 82, 0.24), transparent 44%), linear-gradient(140deg, #000103 0%, #03060d 45%, #0b142b 72%, #160d33 100%) !important;
  background-color: #000103;
  background-attachment: fixed;
  width: 100%;
  overflow-x: hidden;
}

/* Responsive font sizing for mobile devices */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on media elements */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Ensure tables don't cause horizontal overflow */
table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}
  
body {
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 18% 14%, rgba(58, 42, 114, 0.28), transparent 40%), radial-gradient(circle at 80% 10%, rgba(20, 40, 82, 0.24), transparent 44%), linear-gradient(140deg, #000103 0%, #03060d 45%, #0b142b 72%, #160d33 100%);
  background-attachment: fixed;
  color: #f0f0f0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
  
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  mix-blend-mode: screen;
}

.star-field .star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 8px rgba(175, 216, 255, 0.6);
  opacity: 0.65;
  animation: star-float var(--float-duration, 14s) ease-in-out infinite,
             star-twinkle var(--twinkle-duration, 4.5s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s), var(--twinkle-delay, 0s);
  will-change: transform, opacity;
}

.star-field .star:nth-child(1)  { top: 4%;  left: 14%;  --float-duration: 16s; --float-delay: -2s;  --twinkle-duration: 4.6s; --twinkle-delay: -1.2s; }
.star-field .star:nth-child(2)  { top: 9%;  left: 48%;  --float-duration: 13.5s; --float-delay: -4.5s; --twinkle-duration: 4s;  --twinkle-delay: -2.4s; }
.star-field .star:nth-child(3)  { top: 6%;  left: 76%;  --float-duration: 15s; --float-delay: -3s;  --twinkle-duration: 3.8s; --twinkle-delay: -1.6s; }
.star-field .star:nth-child(4)  { top: 12%; left: 28%;  --float-duration: 18s; --float-delay: -5s;  --twinkle-duration: 4.4s; --twinkle-delay: -0.8s; }
.star-field .star:nth-child(5)  { top: 18%; left: 62%;  --float-duration: 14s; --float-delay: -6s;  --twinkle-duration: 3.9s; --twinkle-delay: -2.7s; }
.star-field .star:nth-child(6)  { top: 22%; left: 10%;  --float-duration: 17s; --float-delay: -7.4s; --twinkle-duration: 4.2s; --twinkle-delay: -1.1s; }
.star-field .star:nth-child(7)  { top: 26%; left: 84%;  --float-duration: 12.5s; --float-delay: -3.5s; --twinkle-duration: 3.6s; --twinkle-delay: -3.1s; }
.star-field .star:nth-child(8)  { top: 30%; left: 36%;  --float-duration: 16.5s; --float-delay: -8s;  --twinkle-duration: 4.8s; --twinkle-delay: -1.5s; }
.star-field .star:nth-child(9)  { top: 34%; left: 58%;  --float-duration: 13s; --float-delay: -2.8s; --twinkle-duration: 4.1s; --twinkle-delay: -0.9s; }
.star-field .star:nth-child(10) { top: 38%; left: 91%;  --float-duration: 15.5s; --float-delay: -6.5s; --twinkle-duration: 4.7s; --twinkle-delay: -2.3s; }
.star-field .star:nth-child(11) { top: 42%; left: 20%;  --float-duration: 14.2s; --float-delay: -5.4s; --twinkle-duration: 3.7s; --twinkle-delay: -1.9s; }
.star-field .star:nth-child(12) { top: 45%; left: 70%;  --float-duration: 17.2s; --float-delay: -9s;  --twinkle-duration: 4.3s; --twinkle-delay: -0.6s; }
.star-field .star:nth-child(13) { top: 48%; left: 4%;   --float-duration: 12s; --float-delay: -3.7s; --twinkle-duration: 3.5s; --twinkle-delay: -2.8s; }
.star-field .star:nth-child(14) { top: 52%; left: 42%;  --float-duration: 18s; --float-delay: -10.5s;--twinkle-duration: 4.9s; --twinkle-delay: -1.3s; }
.star-field .star:nth-child(15) { top: 55%; left: 82%;  --float-duration: 14.8s; --float-delay: -7.6s; --twinkle-duration: 4.2s; --twinkle-delay: -0.7s; }
.star-field .star:nth-child(16) { top: 58%; left: 30%;  --float-duration: 13.4s; --float-delay: -4.1s; --twinkle-duration: 3.6s; --twinkle-delay: -2s; }
.star-field .star:nth-child(17) { top: 62%; left: 52%;  --float-duration: 17.5s; --float-delay: -9.8s; --twinkle-duration: 4.5s; --twinkle-delay: -3.3s; }
.star-field .star:nth-child(18) { top: 65%; left: 94%;  --float-duration: 12.8s; --float-delay: -1.9s; --twinkle-duration: 3.8s; --twinkle-delay: -1.4s; }
.star-field .star:nth-child(19) { top: 68%; left: 8%;   --float-duration: 16.2s; --float-delay: -6.9s; --twinkle-duration: 4.4s; --twinkle-delay: -2.6s; }
.star-field .star:nth-child(20) { top: 72%; left: 40%;  --float-duration: 13.7s; --float-delay: -2.2s; --twinkle-duration: 3.9s; --twinkle-delay: -0.5s; }
.star-field .star:nth-child(21) { top: 76%; left: 68%;  --float-duration: 15.3s; --float-delay: -8.5s; --twinkle-duration: 4.1s; --twinkle-delay: -2.1s; }
.star-field .star:nth-child(22) { top: 80%; left: 16%;  --float-duration: 12.4s; --float-delay: -5.9s; --twinkle-duration: 3.7s; --twinkle-delay: -0.6s; }
.star-field .star:nth-child(23) { top: 83%; left: 48%;  --float-duration: 17.8s; --float-delay: -7.2s; --twinkle-duration: 4.6s; --twinkle-delay: -3.5s; }
.star-field .star:nth-child(24) { top: 86%; left: 88%;  --float-duration: 13.1s; --float-delay: -2.4s; --twinkle-duration: 3.8s; --twinkle-delay: -1.8s; }
.star-field .star:nth-child(25) { top: 90%; left: 32%;  --float-duration: 16.6s; --float-delay: -9.1s; --twinkle-duration: 4.5s; --twinkle-delay: -0.9s; }
.star-field .star:nth-child(26) { top: 8%;  left: 6%;   --float-duration: 14.4s; --float-delay: -1.7s; --twinkle-duration: 3.9s; --twinkle-delay: -2.9s; }
.star-field .star:nth-child(27) { top: 14%; left: 54%;  --float-duration: 12.6s; --float-delay: -6.3s; --twinkle-duration: 3.5s; --twinkle-delay: -1.1s; }
.star-field .star:nth-child(28) { top: 20%; left: 92%;  --float-duration: 18.2s; --float-delay: -8.9s; --twinkle-duration: 4.7s; --twinkle-delay: -0.4s; }
.star-field .star:nth-child(29) { top: 24%; left: 24%;  --float-duration: 15.2s; --float-delay: -4.8s; --twinkle-duration: 4.3s; --twinkle-delay: -2.2s; }
.star-field .star:nth-child(30) { top: 28%; left: 44%;  --float-duration: 13.9s; --float-delay: -7.8s; --twinkle-duration: 3.6s; --twinkle-delay: -3.4s; }
.star-field .star:nth-child(31) { top: 32%; left: 74%;  --float-duration: 17.1s; --float-delay: -5.1s; --twinkle-duration: 4.5s; --twinkle-delay: -1.7s; }
.star-field .star:nth-child(32) { top: 36%; left: 12%;  --float-duration: 12.2s; --float-delay: -2.6s; --twinkle-duration: 3.7s; --twinkle-delay: -0.3s; }
.star-field .star:nth-child(33) { top: 40%; left: 64%;  --float-duration: 16.4s; --float-delay: -9.6s; --twinkle-duration: 4.2s; --twinkle-delay: -2.5s; }
.star-field .star:nth-child(34) { top: 44%; left: 96%;  --float-duration: 14.1s; --float-delay: -1.3s; --twinkle-duration: 3.8s; --twinkle-delay: -3s; }
.star-field .star:nth-child(35) { top: 50%; left: 50%;  --float-duration: 15.9s; --float-delay: -7.1s; --twinkle-duration: 4.6s; --twinkle-delay: -1.4s; }
.star-field .star:nth-child(36) { top: 60%; left: 26%;  --float-duration: 12.9s; --float-delay: -5.6s; --twinkle-duration: 3.5s; --twinkle-delay: -0.7s; }
.star-field .star:nth-child(37) { top: 64%; left: 76%;  --float-duration: 17.6s; --float-delay: -10.8s;--twinkle-duration: 4.3s; --twinkle-delay: -2.9s; }
.star-field .star:nth-child(38) { top: 70%; left: 18%;  --float-duration: 13.3s; --float-delay: -3.3s; --twinkle-duration: 3.9s; --twinkle-delay: -1.5s; }
.star-field .star:nth-child(39) { top: 74%; left: 58%;  --float-duration: 16.8s; --float-delay: -6.2s; --twinkle-duration: 4.4s; --twinkle-delay: -0.2s; }
.star-field .star:nth-child(40) { top: 88%; left: 72%;  --float-duration: 12.7s; --float-delay: -8.7s; --twinkle-duration: 3.6s; --twinkle-delay: -2.4s; }

@keyframes star-float {
  0% {
    transform: translate3d(0, 12px, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
  100% {
    transform: translate3d(0, 12px, 0);
  }
}

@keyframes star-twinkle {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.85;
  }
}

.page-fade {
  opacity: 0;
  transform: translateY(24px);
  animation: page-fade-in 0.8s ease-out forwards;
  background: transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: opacity, transform;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

a:link {
  color: #9a9a9a;
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:visited {
  color: #ffd700;
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:link:hover {
  color: #b8b8b8;
  text-decoration: underline;
}

a:visited:hover {
  color: #ffed4e;
  text-decoration: underline;
}

a:link:active {
  color: #c8c8c8;
  text-decoration: underline;
}

a:visited:active {
  color: #fff176;
  text-decoration: underline;
}

