

@import url('https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@400;700&family=Space+Grotesk:wght@400;700&display=swap');

/* Theme variables for light and dark modes */
body.light {
  --bg-overlay: rgba(255, 255, 255, 0.90);
  --section-bg: rgba(255, 255, 255, 0.90);
  --text-color: #111;
  --link-color: #0066cc;
  --link-color: #0056b3; /* default link */
  --link-hover: #003f82; /* hover/active */
  --link-visited: #6a1b9a; /* visited (accessible purple) */
  --link-focus: #ff9800; /* focus outline */
  /* Hamburger button colours for light theme */
  --hamburger-bg: rgba(0, 0, 0, 0.05);
  --hamburger-border: rgba(0, 0, 0, 0.1);
  --hamburger-color: #000;
}
body.dark {
  --bg-overlay: rgba(0, 0, 0, 0.9);
  --section-bg: rgba(0, 0, 0, 0.9);
  --text-color: #f2f2f2;
  --link-color: #66d0ff;
  --link-color: #7dd3ff; /* default link */
  --link-hover: #c8f0ff; /* hover/active */
  --link-visited: #c792ff; /* visited */
  --link-focus: #ffb74d; /* focus outline */

  /* Hamburger button colours for dark theme */
  --hamburger-bg: rgba(255, 255, 255, 0.15);
  --hamburger-border: rgba(255, 255, 255, 0.25);
  --hamburger-color: #fff;
}

/* Accessible link styles for main content (not nav) */
.section a,
.content a,
.project-card a,
.award-item a,
.contact-card a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.section a:visited,
.content a:visited,
.project-card a:visited,
.award-item a:visited,
.contact-card a:visited {
  color: var(--link-visited);
}

.section a:hover,
.content a:hover,
.project-card a:hover,
.award-item a:hover,
.contact-card a:hover {
  color: var(--link-hover);
}

.section a:focus-visible,
.content a:focus-visible,
.project-card a:focus-visible,
.award-item a:focus-visible,
.contact-card a:focus-visible {
  outline: 2px solid var(--link-focus);
  outline-offset: 2px;
}


/* Global resets */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-color);
  /* Background GIF remains fixed and covers the viewport */
  background: url('../images/background.gif') center center fixed no-repeat;
  background-size: cover;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

body.dark .nav-brand img#logo {
  filter: invert(1);
}
body.light .nav-brand img#logo {
  filter: none;
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 999;
}

.nav-brand {
  display: flex;
  align-items: center;
}
.nav-brand .hamburger {
  font-size: 1.5rem; 
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
  background: var(--hamburger-bg);
  border: 1px solid var(--hamburger-border);
  color: var(--hamburger-color);
}
.nav-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 0.5rem;
}
 
.nav-brand .site-name {
  font-family: 'Smooch Sans', sans-serif;
  font-size: 1.5rem;
  margin-right: 1rem;
}

/* Theme switch (replaces sun/moon icon) */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-left: 0.5rem;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #2196F3;
}
.switch input:checked + .slider:before {
  transform: translateX(26px);
}

/* Navigation links – side drawer on small screens */
.nav-links {
  position: fixed;
  top: 0;
  left: -260px;
  height: 100%;
  width: 260px; 
  background: var(--bg-overlay); 
  backdrop-filter: blur(8px);
  padding-top: 60px;
  list-style: none;
  margin: 0;
  padding-left: 0;
  transition: left 0.3s ease;
  z-index: 998;
}
.nav-links.open {
  left: 0;
}
.nav-links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-links a {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Current-page & hover states for nav links */

nav a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  text-decoration: none;
}

/* Current page link (add class="active" to that nav <a>) */
nav a.active {
  border: 2px solid #3b82f6;      /* blue box */
  color: #3b82f6;
}

/* Light mode: hover invert (black box, white text) */
body.light nav a:not(.active):hover,
body.light nav a:not(.active):focus-visible {
  background-color: #000;
  color: #fff;
  border: 2px solid #000;
}

/* Dark mode: hover invert (white box, black text) */
body.dark nav a:not(.active):hover,
body.dark nav a:not(.active):focus-visible {
  background-color: #fff;
  color: #000;
  border: 2px solid #fff;
}

/* Optional: keep active link from inverting on hover */
nav a.active:hover,
nav a.active:focus-visible {
  background-color: transparent;
  color: #3b82f6;
}


/* Mobile navigation drawer styles - Sampled from Dr. Sanchez*/
@media (max-width: 767px) {
  .nav-links { 
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background: #333;
    color: #fff;
    backdrop-filter: none;
    overflow-y: auto;
  }
  /* When the drawer has the "open" class, slide it into view */
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    /* Inherit text colour from the drawer on small screens */
    color: inherit;
  }
}

/* Close button inside the side navigation menu */
.nav-links .close-nav {
  display: block;
  text-align: right;
  padding: 0.5rem 1rem;
}
.nav-links .close-nav button {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-color);
  cursor: pointer;
}
/* Hide the close button on large screens where the menu is inline */
@media (min-width: 768px) {
  .nav-links .close-nav {
    display: none;
  }
}

/* Inline navigation for larger screens */
@media (min-width: 768px) {
  .nav-brand .hamburger {
    display: none;
  }
  .nav-links {
    position: static;
    display: flex;
    height: auto;
    width: auto;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    padding-top: 0;
    margin-left: auto;
  }
  .nav-links li {
    border: none;
  }
  .nav-links a {
    padding: 0 12px;
    color: var(--text-color);
  }
  .nav-links a:hover {
    text-decoration: underline;
    background: none;
  }
}


/* New hamburger button containing three lines. Hidden on larger screens. */
.hamburger-button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  padding: 0;
  z-index: 1001; /* Ensure the button sits above the sliding menu */
}
 
.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}
 
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 250px;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(8px);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}
.nav-menu li {
  width: 100%;
  text-align: center;
}
.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.25rem;
}

/* When the menu has the 'active' class, slide it into view. */
.nav-menu.active {
  transform: translateX(0);
}

/* Animate the hamburger button into an "X"  UGHHH */
.hamburger-button.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-button.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-button.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
 
@media (min-width: 768px) {
  .hamburger-button {
    display: none;
  }
  .nav-menu {
    position: static;
    transform: none;
    height: auto;
    width: auto;
    flex-direction: row;
    gap: 0;
    background: transparent;
    backdrop-filter: none;
  }
  .nav-menu li {
    width: auto;
  }
  .nav-menu a {
    padding: 0 12px;
    color: var(--text-color);
    font-size: 1rem;
  }
}

/* Sections */
.section {
  padding: 5rem 1.5rem 3rem;
  background: var(--section-bg);
  margin-top: 60px;
}
.section h1,
.section h2,
.section h3 {
  font-family: 'Smooch Sans', sans-serif;
  margin-top: 0;
  text-align: center;
}

/* Hero/banner styles */
.hero {
  text-align: center;
  padding: 4rem 0 2rem;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.hero p.tagline {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}
.hero img.hero-image {
  display: block;
  width: 100%;
  /* Occupy a generous portion of the viewport height on larger screens */
  height: 60vh;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* Reduce hero image height on smaller viewports for better visibility */
@media (max-width: 767px) {
  .hero img.hero-image {
    height: 40vh;
  }
}

/* Content container for text-heavy pages */
.content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
}

/* Portfolio grid */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem;
  border-radius: 8px;
  flex: 1 1 280px;
  max-width: 350px;
  transition: transform 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
}
.project-card h3 {
  margin-top: 0;
}
.project-card button.code-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}
.project-card button.code-btn:hover {
  background: #555;
}

/* Simple list styling for volunteer and awards pages */
ul.listing {
  list-style: disc inside;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 1rem;
  font-size: 1rem;
}

/* Images included in award listings */
.award-img {
  width: 100%;
  max-width: 100%;
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

/* Container for individual award entries with images */
.award-item {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1rem;
  text-align: left;
  font-size: 1rem;
  background: var(--bg-overlay);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.award-item p {
  margin-top: 0.5rem;
}

/* Theme specific border and shadow for award cards */
body.dark .award-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}
body.light .award-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Awards Grid  */
.awards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.awards-grid .award-item {
  /* Each card takes up roughly half the container minus the gap */
  flex: 1 1 calc(50% - 2rem);
  max-width: calc(50% - 2rem);
  margin: 0;
}
@media (max-width: 600px) {
  .awards-grid .award-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Resume embed */
.resume-container {
  max-width: 900px;
  margin: 0 auto;
}
.resume-container iframe {
  width: 100%;
  height: 600px;
  border: none;
}

/* Contact form */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
} 

/*   Contact Cards */
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.contact-card {
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
  border-radius: 8px;
  flex: 1;
  text-align: center;
}
.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: 'Smooch Sans', sans-serif;
}
.contact-card a {
  white-space: nowrap;
}
@media (min-width: 600px) {
  .contact-cards {
    flex-direction: row;
    justify-content: center;
  }
}

/* Code preview panel */
.code-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.code-panel .content {
  background: var(--bg-overlay);
  color: var(--text-color);
  max-width: 80%;
  max-height: 80%;
  padding: 1rem 2rem;
  overflow: auto;
  border-radius: 8px;
  position: relative;
}
.code-panel .content h3 {
  margin-top: 0;
}
.code-panel .close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.5rem;
  cursor: pointer;
}
 

