/* Basic Styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  scroll-behavior: smooth;
  height: 100%;
}

html {
  background-size: cover;
  background-position: center 0;
  transition: background-image 0.5s ease-in-out;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  padding-bottom: 8rem; /* Added padding to clear footer */
}

.top-bar, .bottom-bar {
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem;
  z-index: 2;
  align-items: center;
  gap: 1rem;
}

.top-bar {
  top: 0;
  flex-direction: row;
}

.bottom-bar {
  bottom: 0;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-links a {
  margin: 0 0.25rem;
}

.top-bar a, .bottom-bar .nav-links a {
  color: white;
  text-decoration: none;
  font-family: 'Red Hat Display', sans-serif;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: background-color 0.3s;
}

.top-bar a:hover,
.bottom-bar .nav-links a:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.footer-tagline {
    font-family: 'Droid Serif', serif;
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
    margin-top: 1rem; /* Add some space above the tagline */
    text-align: center;
}

.container {
  padding: 5rem 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Slide Sections */
.slide {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 2rem;
}

.center-quote { text-align: center; }

.homepage-quote {
  font-family: 'Droid Serif', serif;
  font-size: 3rem;
}

/* Light & Dark Modes */
html.dark-mode {
  background-color: #000;
  background-image: url('../assets/endless-stairs.webp');
}

html.dark-mode .slide,
html.dark-mode p,
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode li,
html.dark-mode label,
html.dark-mode .tag {
  color: #f0f0f0;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

html.light-mode {
  background-color: #f5f5f5;
  background-image: url('../assets/reqs-light.webp');
}

html.light-mode .slide,
html.light-mode p,
html.light-mode h1,
html.light-mode h2,
html.light-mode h3,
html.light-mode h4,
html.light-mode li {
  color: black;
  text-shadow: 1px 1px 3px rgba(255,255,255,0.4);
}

html.light-mode .footer-tagline {
    color: #555;
}

/* Project & About Page Styles */
.grid-layout { display: grid; gap: 2rem; align-items: start; }
.grid-2-col { grid-template-columns: 1fr 1fr; }
.grid-2-col-2-1 { grid-template-columns: 2fr 1fr; }
.grid-2-col-1-2 { grid-template-columns: 1fr 2fr; }
.grid-3-col-1-2-1 { grid-template-columns: 1fr 2fr 1fr; }

.pull-quote {
    font-family: 'Droid Serif', serif;
    font-style: italic;
    font-size: 1.6rem;
    line-height: 1.4;
    border-left: 4px solid;
    padding-left: 1rem;
    margin-top: 1rem;
}

.panel { border-radius: 12px; padding: 1rem 2rem; }
.card { border-radius: 10px; padding: 0.5rem 1.5rem; }

html.dark-mode .panel { background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); }
html.dark-mode .card { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); }
html.dark-mode .pull-quote { border-color: #eee; }


html.light-mode .panel { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.1); }
html.light-mode .card { background: rgba(255,255,255,0.8); border: 1px solid rgba(0, 0, 0, 0.1); }
html.light-mode .pull-quote { border-color: #111; }

.tag { display: inline-block; padding: .25rem .5rem; border-radius: 999px; font-size: .85rem; }
ul { padding-left: 1.25rem; }

html.dark-mode .tag {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.staggered-list li:nth-child(1) { margin-left: 0em; }
.staggered-list li:nth-child(2) { margin-left: 1.5em; }
.staggered-list li:nth-child(3) { margin-left: 3em; }
.staggered-list li:nth-child(4) { margin-left: 4.5em; }
.staggered-list li:nth-child(5) { margin-left: 6em; }

html.light-mode .tag { background: rgba(0, 0, 0, 0.05); }

.btn.express {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 122, 255, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.btn.express:hover {
    background-color: rgba(0, 122, 255, 1);
}

/* --- Form Styles --- */
.field { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; }
input, select, textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid;
    box-sizing: border-box;
}

html.dark-mode input, 
html.dark-mode select, 
html.dark-mode textarea {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f0f0f0;
}

html.light-mode input, 
html.light-mode select, 
html.light-mode textarea {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
}

button[type="submit"] {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

html.dark-mode button[type="submit"] {
    background-color: rgba(255, 255, 255, 0.2);
    color: #f0f0f0;
}

html.dark-mode button[type="submit"]:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

html.light-mode button[type="submit"] {
    background-color: #007aff;
    color: white;
}

/* --- Responsive Gallery Styles --- */
.gallery-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 2rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.gallery-scroll-container {
    overflow: hidden; /* We will use transforms, not native scroll */
    width: 100%;
}

.gallery-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    /* Transition for the sliding effect, handled in JS */
}

.gallery-card {
    flex-shrink: 0;
    width: 100%; /* Default to 1 card visible on mobile */
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.gallery-card img {
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.gallery-arrow {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 1rem 0.5rem;
    z-index: 1;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.gallery-arrow:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- New Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    align-items: center; /* Vertically center */
    justify-content: center; /* Horizontally center */
}

/* Flex container for vertical centering */
.modal {
    display: none; /* Hidden by default */
    flex-direction: column;
}

.modal.show {
    display: flex; /* Show when class is added */
}

.modal-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 80%;
    max-width: 900px;
    margin: auto;
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    color: white;
}

.modal-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.modal-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #f1f1f1;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

html.light-mode .modal-content-wrapper {
    background-color: #fefefe;
}

html.light-mode .modal-content-wrapper h3,
html.light-mode .modal-content-wrapper p {
    color: #000 !important;
    text-shadow: none !important;
}

html.light-mode .close-modal {
    color: #333;
}


/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content-wrapper {
        grid-template-columns: 1fr;
        width: 90%;
        padding: 1.5rem;
    }
}

/* Scroll-to-top Button */
#scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  text-align: center;
  line-height: 50px;
  text-decoration: none;
  display: none; /* Hidden by default, shown by JS */
  z-index: 100;
  transition: background-color 0.3s;
}

#scroll-top:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* --- Responsive Breakpoints --- */

@media (max-width: 900px) { 
  .grid-2-col, .grid-3-col, .grid-2-col-2-1, .grid-2-col-1-2, .grid-3-col-1-2-1 { 
    grid-template-columns: 1fr; 
  }
}

/* For Tablets and larger phones */
@media (min-width: 600px) {
    .gallery-card {
        width: calc((100% / 2) - (1rem / 2)); /* 2 cards visible */
    }
}

/* For smaller Desktops */
@media (min-width: 900px) {
    .gallery-card {
        width: calc((100% / 3) - (2rem / 3)); /* 3 cards visible */
    }
}

/* For large Desktops */
@media (min-width: 1200px) {
    .gallery-card {
        width: calc((100% / 4) - (3rem / 4)); /* 4 cards visible */
    }
}
