/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-attachment: fixed;
  background-size: cover;
  background-position: center calc(50% + var(--bg-offset, 0px));
  background-repeat: no-repeat;
  font-family: 'Merriweather', Georgia, serif;
  color: #ffffff;
  padding: 6rem 2rem 4rem 2rem;
  min-height: 100vh;
}

/* Navbar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.nav-links a span {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 0.3em 0.6em;
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover span,
.nav-links a.active span {
  background-color: #ffffff;
  color: #000000;
}

/* Dropdowns */
.nav-dropdown {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 200px;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1001;
}

/* Invisible hover bridge to prevent menu closing when moving cursor */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
}

.nav-dropdown-menu li a span {
  background: transparent;
  display: block;
}

.nav-dropdown-menu li a:hover span,
.nav-dropdown-menu li a.active span {
  background-color: #ffffff;
  color: #000000;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-user-name span {
  background-color: rgba(0, 0, 0, 0.4);
}

.nav-logout {
  text-decoration: none;
}

.nav-logout span {
  background-color: rgba(220, 38, 38, 0.6);
  color: #ffffff;
}

.nav-logout:hover span {
  background-color: #ffffff;
  color: #dc2626;
}

/* Right-aligned dropdown (used by user menu) */
.nav-dropdown-menu--right {
  right: 0;
  left: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 3-Column Grid Container */
.grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
}

/* Cards */
.card {
  grid-column: span 2;
  background-attachment: fixed;
  background-size: cover;
  background-position: center calc(50% + var(--bg-offset, 0px));
  background-repeat: no-repeat;
  padding: 2.25rem 1.75rem;
  border-radius: 0px;
  border: 0px solid #e0e0e0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.card-full {
  grid-column: 1 / -1;
  min-height: auto;
}

.card-half {
  grid-column: span 3;
}

.card-2col {
  grid-column: span 4;
}

.header-card {
  padding: 3rem 2.25rem;
  margin-bottom: 1rem;
}

/* Headlines */
h1, h2, h3, h4, .subhead, .meta {
  font-family: 'Syne', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.header-card h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.0rem;
  text-transform: uppercase;
}

.header-card .subhead {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card h2 span, .card h3 span, .card h4 span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-block;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card p span, .card li span {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 2.1;
}

.card ul, .card ol {
  list-style: none;
  margin-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.card li {
  margin-bottom: 0.5rem;
}

.card .meta span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-top: 1.25rem;
}

/* Spans */
span {
  background-color: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 0.2em 0.5em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Buttons */
.btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border: none;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

.btn span {
  background-color: #ffffff;
  color: #000000;
  padding: 0.6em 1.2em;
  border-radius: 2px;
  transition: background-color 0.2s, color 0.2s;
}

.btn:hover span {
  background-color: rgba(0, 0, 0, 0.85);
  color: #ffffff;
}

.btn-secondary span {
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover span {
  background-color: #ffffff;
  color: #000000;
}

.btn-lg span {
  font-size: 0.95rem;
  padding: 0.8em 1.6em;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label span {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.form-control, input[type="text"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Merriweather', serif;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
}

/* Login Page Wrapper */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.login-box {
  width: 100%;
  max-width: 450px;
}

.login-error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(220, 38, 38, 0.4);
  border: 1px solid rgba(220, 38, 38, 0.6);
  color: #ffffff;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  max-width: 1200px;
  margin: 4rem auto 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links a {
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
}

::selection {
  background-color: #ffffff;
  color: #000000;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  body {
    padding: 5rem 1rem 2rem 1rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card, .card-full, .card-2col, .card-half {
    grid-column: 1 / -1;
  }
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-dropdown-menu {
    position: static;
    display: none;
    background: transparent;
    border: none;
    padding-left: 1rem;
    box-shadow: none;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
}

/* Team Card Layout (About Page) */
.team-card-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  width: 100%;
}

.team-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.team-card-photo {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .team-card-inner {
    flex-direction: column;
    text-align: left;
    gap: 1.5rem;
  }
  .team-card-photo {
    width: 150px;
    height: 150px;
    align-self: flex-start;
  }
}
