/* ========================= */
/* Reset + Global            */
/* ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: #2f2f2f;
  color: #ffff99;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* avoid scroll from fixed animation */
}

/* Shared page container */
.page-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 1; /* content above animation */
}

/* Shared text outline */
h1, h2, p, span, a {
  text-shadow: 2px 2px 2px #000;
}

/* ========================= */
/* Persistent Background     */
/* ========================= */
#portal-animation-container {
  position: fixed; /* fills entire screen behind content */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0;                 /* default invisible */
  transition: opacity 0.6s ease;/* smooth fade when shown */
}

/* Immediate hard-hide class (used on non-home) */
.portal-hidden {
  display: none !important;   /* prevents any flash mid-transition */
}

/* Show animation only on Home */
body.home-active #portal-animation-container {
  opacity: 1;                 /* fade in when home-active is added */
}

/* ========================= */
/* Social links + icons      */
/* ========================= */
.socials-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.social-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffff99;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.25rem;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-link:hover {
  color: #ffffff;
  transform: scale(1.05);
}

/* External SVG icons */
.icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%)
          invert(88%) sepia(37%) saturate(528%)
          hue-rotate(7deg) brightness(108%) contrast(104%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-link:hover .icon {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%) invert(100%); /* white on hover */
}

/* ========================= */
/* Fade-in / Fade-out effect */
/* ========================= */
#page-content {
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  position: relative;
}
#page-content.loaded {
  opacity: 1;
}
#page-content.fade-out {
  opacity: 0;
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
  .page-container {
    max-width: 100%;
  }

  .socials-container {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
