/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styling for overall layout and responsiveness */
body {
  font-family: "Century Gothic", Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for light/dark mode changes */
}

/* General background styling */
.background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  max-height: 70%;
  z-index: -1; /* Ensures background stays behind content */
  opacity: 0;
  transition: opacity 0.5s ease; /* Smooth opacity transition */
}

/* Visible background styling */
.background.visible {
  opacity: 0.9;
}

/* Container for centralizing content */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1; /* Makes sure container is above the background */
  margin-top: 50px;
}

/* Disable text selection */
.disable-select {
  user-select: none;
}

/* Link styling */
.link {
  font-size: 3rem;
  margin: 2rem 0;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: text-decoration-thickness 0.2s ease, text-underline-offset 0.2s ease; /* Smooth underline transition */
}

/* Link hover and active states */
.link:hover,
.link.active {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

/* Styling for specific elements (email, about, etc.) */
.email, 
.about, 
.privacy, 
.copyright,
.homeButton,
.social-links a {
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease; /* Smooth color transition */
}

/* Styling for email link specifically */
.emaillink {
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Hover effect for specific elements */
.email:hover,
.emaillink:hover,
.about:hover,
.privacy:hover,
.homeButton:hover,
.social-links a:hover {
  color: #808000;
}

/* Social links positioning */
.social-links {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 2;
}

/* Social link styling */
.social-links a {
  font-size: 1.2rem;
  margin-left: 1rem;
}

/* Light mode styles */
@media (prefers-color-scheme: light) {
  body {
    background-color: #f0f0f0;
    color: black;
  }

  .link,
  .email,
  .emaillink,
  .about,
  .privacy,
  .copyright,
  .homeButton,
  .social-links a {
    color: black;
  }

  .logo a {
    text-decoration: none;
    color: black;
  }
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1c1c1c;
    color: white;
  }

  .link,
  .email,
  .emaillink,
  .about,
  .privacy,
  .copyright,
  .homeButton,
  .social-links a {
    color: white;
  }

  .logo a {
    text-decoration: none;
    color: white;
  }
}

/* Desktop-specific styles (min-width: 769px) */
@media (min-width: 769px) {
  /* Logo positioning and size */
  .logo {
    font-size: 2rem;
    font-weight: bold;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
  }

  /* Footer and links position and size */
  .email {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1rem;
  }

  .about {
    position: absolute;
    bottom: 20px;
    left: 200px;
    font-size: 1rem;
  }

  .privacy {
    position: absolute;
    bottom: 20px;
    left: 270px;
    font-size: 1rem;
  }

  .copyright {
    position: absolute;
    bottom: 20px;
    left: 346px;
    font-size: 1rem;
  }

  /* Larger links for desktop */
  .link {
    font-size: 4rem;
    margin: 3rem 0;
  }
}

/* Mobile-specific styles (max-width: 768px) */
@media (max-width: 768px) {
  /* Adjust body height and padding for smaller screens */
  body {
    height: auto;
    padding-bottom: 150px;
  }

  .container {
    margin-top: 90px;
    text-align: center; /* Center text for mobile */
  }

  .logo {
    font-size: 1.5rem;
    margin: 40px 0;
  }

  footer {
    position: static;
    text-align: center;
    padding: 20px;
  }

  /* Social links adjusted for mobile */
  .social-links {
    position: static;
    margin-top: 20px;
  }

  /* Stack footer elements on mobile */
  .email, 
  .about, 
  .privacy, 
  .copyright {
    display: block;
    font-size: 1rem;
    margin: 10px 0;
  }
}

/* Extra small screens (max-width: 480px) */
@media (max-width: 480px) {
  /* Smaller font for links */
  .link {
    font-size: 2rem;
    margin: 1rem 0;
  }

  /* Adjust logo size for very small screens */
  .logo {
    font-size: 1.2rem;
  }
}
