/* =========================
   CONTAINERS
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4xl);
}

@media (max-width: 1200px) {
  .container {
    padding: 0 var(--spacing-xl);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* =========================
   HEADER / NAVBAR
========================= */
header#navbar {
  background: var(--card-bg-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s;
}

.dark header#navbar {
  background: var(--card-bg-dark);
  box-shadow: 0 2px 10px rgba(255,255,255,0.05);
}

header#navbar .container {
  position: relative;
  display: flex;
  align-items: center; 
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 2rem; 
  flex-wrap: nowrap; /* Keeps everything on one line */
  background-color: var(--navbar-bg-color);
  border-radius: 1rem;
  margin: 0 0.5rem;
  overflow: hidden;
  z-index: 1;
  transition: box-shadow 0.3s ease;
}

/* Balances the left side so the nav perfectly centers */
.logo {
  flex: 1;
  display: block;
}

@media (max-width: 768px) {
  header#navbar .container {
    padding: 1rem;
    margin: 0;
    border-radius: 0.75rem;
  }
}

/* =========================
   NAVBAR ANIMATIONS (NEON)
========================= */
header#navbar .container::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 5px; 
  border-radius: inherit;
  pointer-events: none;
  filter: blur(2.5px) brightness(1.2); 
  background: repeating-linear-gradient(90deg, var(--navbar-border-color), var(--navbar-border-color-glow) 20%, var(--navbar-border-color) 40%);
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-travel 10s linear infinite;
}

header#navbar .container::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: inherit;
  pointer-events: none;
  filter: blur(2px) brightness(1.3);
  background: repeating-linear-gradient(90deg, var(--navbar-border-color), var(--navbar-border-color-glow) 20%, var(--navbar-border-color) 40%);
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: flicker 1.5s infinite alternate;
  opacity: 0.8;
}

@keyframes border-travel { 0% {background-position: 0% 0%; } 100% { background-position: 400% 0%; } }
@keyframes flicker { 0% { opacity: 0.25; } 25% { opacity: 0.6; } 50% { opacity: 0.3; } 75% { opacity: 0.7; } 100% { opacity: 0.4; } }

/* =========================
   NAV LINKS & BUTTONS
========================= */
header#navbar nav { 
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  margin: 0;
  padding: 0; 
}

header#navbar nav ul {
  display: flex;
  gap: 2.5rem; /* INCREASED: Gives links lots of breathing room on large screens */
  align-items: center;
  justify-content: center;
  margin: 0; 
  padding: 0;
  list-style: none;
  flex-wrap: nowrap; 
}

header#navbar nav ul li {
  display: flex;
  align-items: center;
}

header#navbar nav a.top-link {
  display: flex; 
  align-items: center; 
  justify-content: center;
  padding: 0.5rem; /* SYMMETRIC: Helps with vertical alignment */
  font-size: 1rem; /* Slightly larger text for desktop */
  font-weight: 500; 
  line-height: normal; /* FIXED: 'normal' centers the font properly instead of '1' */
  color: var(--text-light); 
  text-decoration: none; 
  border-radius: 6px; 
  transition: color 0.2s, box-shadow 0.3s;
}

header#navbar nav a.top-link:hover {
  color: var(--primary-color);
}

/* FIXED: Using box-shadow instead of border-bottom prevents the text from shifting upward when active */
header#navbar nav a.top-link.active {
  box-shadow: 0 2px 0 0 var(--primary-color);
}

.dark header#navbar nav a.top-link {
  color: var(--text-dark);
}

.dark header#navbar nav a.top-link:hover {
  color: var(--primary-color-dark);
}

.dark header#navbar nav a.top-link.active {
  box-shadow: 0 2px 0 0 var(--primary-color-dark);
}

.theme-button {
  background: none;
  border: none;
  padding: 0.3rem;
  margin: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.2s ease;
}

.theme-button:hover {
  transform: rotate(20deg) scale(1.1);
  color: var(--primary-color);
}

.dark .theme-button {
  color: var(--text-dark);
}

.dark .theme-button:hover {
  color: var(--primary-color-dark);
}

.theme-toggle-wrapper {
  flex: 1; 
  display: flex;
  align-items: center;
  justify-content: flex-end; 
}

/* Responsive scaling for laptop screens (11" - 14") */
@media (min-width: 769px) and (max-width: 1200px) {
  header#navbar .container {
    padding: 0.75rem 1.5rem; 
  }
  header#navbar nav ul {
    gap: 1.25rem; /* Better breathing room for 13" MacBooks */
  }
  header#navbar nav a.top-link {
    font-size: 0.9rem; /* Slightly smaller text to prevent overlapping */
    padding: 0.4rem;
  }
}

/* =========================
   MAIN CONTENT & FOOTER
========================= */
.main-content { padding-top: 5rem; }

#fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg-light);
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  z-index: 100;
  transition: background 0.4s;
}
.dark #fixed-footer {
  background: var(--card-bg-dark);
  border-top-color: rgba(255,255,255,0.05);
  color: #9ca3af;
}

body {
  padding-bottom: 4rem; 
}

/* =========================
   BOTTOM INFO SECTION (Layout)
========================= */
.bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

@media (max-width: 900px) {
  .bottom-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .bottom-row .card, 
  .bottom-row .quote-card {
    width: 100% !important;
    max-width: 600px !important;
  }
}

/* =========================
   PROFILES CARD STYLES
========================= */
.profile-card-single {
  flex: 1; 
  text-align: center;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important; 
  
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-links-row {
  display: flex;
  flex-wrap: nowrap; 
  justify-content: center;
  gap: 0.8rem;
  padding-bottom: 0.5rem; 
  margin: 0 auto;
}

.profile-links-row .profile-link {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.profile-links-row .profile-link:hover {
  transform: scale(1.2);
}

@media (max-width: 480px) {
  .profile-links-row {
    gap: 0.5rem; 
  }
}

/* =========================
   QUOTE CARD
========================= */
.quote-card {
  flex: 1; 
  margin: 0 !important; 
  max-width: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 1rem 0 !important; 
}

.bottom-row .quote-text {
  font-size: 1.1rem; 
}
.bottom-row .quote-translation {
  font-size: 0.9rem; 
}

/* =========================
   ANIMATIONS
========================= */
.animate-pop { opacity: 0; transform: scale(0.95); transform-origin: center top; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s ease; }
.animate-pop.visible { opacity: 1; transform: scale(1); }