@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;600;700;900&family=Roboto:wght@300;400;500;700&family=Source+Code+Pro:wght@400;700&display=swap");

:root {
  /* Fonts */
  --font-heading: "Work Sans", sans-serif;
  --font-body: "Roboto", sans-serif;
  --font-mono: "Source Code Pro", monospace;
  /* Primary Colors */
  --go-blue: #00add8;
  --aqua: #00a29c;
  --light-blue: #5dc9e2;
  --black: #000000;

  /* Secondary Colors */
  --fuchsia: #ce3262;
  --yellow: #fddd00;

  /* Background Colors */
  --background-primary: #1a1a1a; /* Dark background for main areas */
  --background-secondary: #2e2e2e; /* Slightly lighter for contrast */

  /* Text Colors */
  --text-primary: #ffffff; /* White text for dark backgrounds */
  --text-secondary: var(--light-blue);

  /* Button Colors */
  --button-primary-bg: var(--go-blue);
  --button-primary-text: var(--black);
  --button-secondary-bg: var(--aqua);
  --button-secondary-text: var(--black);

  /* Navigation Colors */
  --nav-bg: var(--black); /* Dark navigation background */
  --nav-text: var(--go-blue); /* Go Blue for nav text */
  --nav-hover-color: var(--fuchsia); /* Light Blue hover effect */

  /* Heading Colors */
  --heading-primary: var(--light-blue);
  --heading-secondary: var(--aqua);

  /* Footer Colors */
  --footer-bg: var(--background-secondary);
  --footer-text: var(--text-primary);
  --footer-link: var(--light-blue);
  --footer-link-hover: var(--fuchsia);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 900; /* Black */
}

h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700; /* Bold */
}

code,
pre {
  font-family: var(--font-mono);
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--background-primary);
  color: var(--text-primary);
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}

/* Navbar Styles */
.navbar {
  background-color: var(--nav-bg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

.container {
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logo {
  height: 48px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-link {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links nav-link:hover {
  color: var(--nav-hover-color);
}

/* Current page highlight in navbar */
.nav-links nav-link.current-page {
  color: var(--fuchsia);
  position: relative;
}

.nav-links nav-link.current-page::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--fuchsia);
}

/* Footer Styles */
.footer {
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
  background-color: rgba(34, 34, 34, 1); /* Slightly darker than --background-secondary */
  padding: 2rem 0;
  position: relative;
  bottom: 0;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer p {
  margin: 0.5rem 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--footer-link-hover);
}

/* Enhanced Footer Social Media Icons */
.social-media {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.social-media a img {
  width: 30px;
  height: 30px;
  filter: brightness(0) saturate(100%) invert(67%) sepia(72%) saturate(1352%) hue-rotate(165deg) brightness(91%) contrast(101%);
  transition: filter 0.3s ease, transform 0.2s ease;
}

.social-media a:hover {
  transform: scale(1.15);
}

.social-media a:hover img {
  filter: brightness(0) saturate(100%) invert(36%) sepia(75%) saturate(7482%) hue-rotate(330deg) brightness(91%) contrast(98%);
}

/* Sticky footer */
main {
  flex: 1;
  margin-top: 60px; /* Height of navbar */
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Enhanced page transitions */
.page-transition {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  position: relative;
  will-change: transform, opacity;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Exit animations */
.page-transition.slide-left {
  opacity: 0;
  transform: translateX(-30px);
}

.page-transition.slide-right {
  opacity: 0;
  transform: translateX(30px);
}

/* Entry animations */
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-transition.enter-from-right {
  animation: slideFromRight 0.3s ease-out;
}

.page-transition.enter-from-left {
  animation: slideFromLeft 0.3s ease-out;
}

/* Add a subtle shadow when scrolling */
.navbar.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: rgba(0, 0, 0, 0.95);
}

.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.2s ease-out;
}

.page-transition-overlay.active {
  opacity: 0.5;
  pointer-events: all;
}

.hamburger {
  display: none;
  background: none;
  border: none;
}

.nav-elements-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* For mobile responsiveness */
@media (max-width: 768px) {
  /* Logo adjustments */
  .logo span {
    display: none; /* Hide text on small screens */
  }

  .navbar-logo {
    height: 28px;
  }

  /* Navigation adjustments */
  .nav-links {
    display: none; /* Hide standard nav on mobile */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--nav-bg);
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
    text-align: center;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.5rem 0;
  }

  /* Hamburger menu */
  .hamburger {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--nav-text);
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Container adjustments */
  .container {
    width: 95%;
  }

  /* Main content adjustments */
  main {
    margin-top: 50px; /* Reduced margin for navbar */
  }

  /* Footer adjustments */
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Hero section adjustments */
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Button adjustments */
  .btn-primary,
  .btn-secondary {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 90%;
    max-height: 85vh;
    margin: 5vh auto;
    padding: 1.25rem;
    overflow-y: auto;
  }

  .modal .talk-form {
    gap: 0.75rem;
  }

  .modal .talk-form input,
  .modal .talk-form textarea {
    padding: 0.6rem;
    font-size: 0.95rem;
  }

  .modal .talk-form label {
    margin-bottom: -0.25rem;
  }

  .modal h2 {
    font-size: 1.5rem;
    margin-top: 0.5rem;
  }

  .modal p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .modal-close {
    top: 5px;
    right: 10px;
  }

  /* Prevent horizontal scrolling */
  .modal-content {
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Make form elements properly fit within container */
  .modal .talk-form input,
  .modal .talk-form textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Adjust button size for better touch targets */
  .modal .btn-primary {
    padding: 0.7rem 1.2rem;
    width: auto;
    min-width: 120px;
  }

  .navbar .cta-button {
    display: none;
  }

  .mobile-nav-links .cta-button.mobile {
    display: block;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .navbar {
    padding: 0;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .spinning-gopher-image,
  .skipping-gopher-image {
    width: 150px;
    height: 150px;
  }

  .project-card,
  .team-member,
  .hof-card {
    width: 100%;
    margin: 0.5rem 0;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-btn {
    width: 80%;
    justify-content: center;
    margin: 0.25rem 0;
  }

  .modal-content {
    width: 95%;
    margin: 3vh auto;
    padding: 1rem;
  }

  .modal h2 {
    font-size: 1.3rem;
  }

  .modal p {
    font-size: 0.85rem;
  }

  .modal .talk-form {
    gap: 0.5rem;
  }

  /* Ensure the modal appears higher on small screens */
  .modal.active {
    align-items: flex-start;
    padding-top: 10px;
  }
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%; /* Hidden by default */
  height: 100vh;
  width: 70%;
  background-color: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right 0.3s ease;
  z-index: 1000;
}

.mobile-nav.active {
  right: 0; /* Slide in */
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.mobile-nav-links li {
  margin: 1rem 0;
}

.mobile-nav-link {
  color: var(--nav-text);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav-links mobile-nav-link:hover {
  color: var(--nav-hover-color);
}

/* Overlay effect to dim background when menu active */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.mobile-nav-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* CTA Button in Navbar */
.cta-button {
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-left: 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-wrap: nowrap;
  text-decoration: none;
  transition: color 0.3s ease;
}

.cta-button:hover {
  background: var(--fuchsia);
  color: var(--text-primary);
  transform: scale(1.05);
}

.cta-button.mobile {
  width: 80%;
  margin: 1rem auto;
  padding: 0.75rem;
  font-size: 1rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: var(--background-secondary);
  margin: 10% auto;
  padding: 2rem;
  border: 2px solid var(--go-blue);
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  color: var(--text-secondary);
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--fuchsia);
}

/* Modal Form Styles */
.modal .talk-form {
  max-width: 100%;
  margin: 1.5rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal .talk-form label {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.modal .talk-form input,
.modal .talk-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--go-blue);
  border-radius: 5px;
  background: var(--background-primary);
  color: var(--text-primary);
  font-size: 1rem;
}

.modal .talk-form input:focus,
.modal .talk-form textarea:focus {
  outline: none;
  border-color: var(--fuchsia);
  box-shadow: 0 0 0 2px rgba(206, 50, 98, 0.25);
}

.modal .talk-form button {
  align-self: center;
  margin-top: 0.5rem;
  min-width: 120px;
}
