/* Common header style */
@keyframes projectTitleShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header,
#header-placeholder {
  min-height: 110px;
  display: block;
  contain: layout style;
}

header {
  padding: 30px 0;
  position: relative;
  z-index: 10;
}

#header-placeholder .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: none;
  box-shadow: none;
  will-change: auto;
}

.logo-icon i {
  font-size: 24px;
  color: white;
}

.logo-text {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  background: linear-gradient(90deg, #81d4fa, #4fc3f7, #1e88e5, #90caf9);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: projectTitleShift 2.2s ease-in-out infinite;
  will-change: background-position;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
  will-change: color, width;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  will-change: width;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
  will-change: transform, box-shadow;
}

.nav-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

/* Mobile navigation */
.mobile-nav-container {
  display: none;
  position: relative;
  z-index: 100;
  contain: layout style;
  min-height: 0;
}

.mobile-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 6px;
}

.mobile-project-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 0;
}

.mobile-nav-container .container > a {
  display: flex;
  justify-content: center;
}

.mobile-logo {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: none;
  box-shadow: none;
  will-change: auto;
}

.mobile-logo i {
  font-size: 20px;
  color: var(--primary);
}

.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  will-change: border-color, transform;
}

.mobile-menu-toggle:hover {
  background: transparent;
}

.mobile-menu-toggle i {
  font-size: 22px;
  color: var(--primary);
}

.mobile-project-name {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  text-align: center;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  border-radius: 999px;
  padding: 8px 20px;
  background: linear-gradient(90deg, #81d4fa, #4fc3f7, #1e88e5, #90caf9);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: projectTitleShift 2.2s ease-in-out infinite;
  letter-spacing: -0.5px;
  line-height: 1.05;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  contain: layout style;
  min-height: 2.5rem;
  will-change: background-position;
}

.mobile-nav-links {
  display: none;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 15px;
  padding: 15px;
  margin: 8px 0 15px 0;
  position: relative;
  z-index: 999;
  border: 1px solid rgba(79, 195, 247, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  contain: layout style;
  will-change: transform, opacity;
}

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

.mobile-nav-links a {
  padding: 12px 16px;
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  border-radius: 10px;
  margin-bottom: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  will-change: background, color;
}

.mobile-nav-links a i {
  width: 20px;
  text-align: center;
}

.mobile-nav-links a:last-child {
  margin-bottom: 0;
}

.mobile-nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

@media (max-width: 780px) {
  header {
    display: none;
  }

  #header-placeholder {
    min-height: 0;
  }

  .mobile-nav-container {
    min-height: 0;
  }
}

@media (min-width: 781px) {
  .navbar {
    border: 2px solid var(--primary);
    border-radius: 999px;
    padding: 12px 22px;
    background: #000;
  }

  .logo-icon {
    display: none;
  }

  .logo {
    gap: 0;
  }
}

@media (max-width: 768px) {
  .navbar,
  .logo-text {
    display: none;
  }

  .mobile-nav-container {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  .mobile-project-name {
    font-size: clamp(1.2rem, 4.4vw, 1.5rem);
  }
}

@media (max-width: 480px) {
  .mobile-project-name {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-text,
  .mobile-project-name {
    animation: none;
    background-position: 50% 50%;
  }
}

/* Common footer style */
footer {
  background: rgba(0, 0, 0, 0.9);
  padding: 60px 0 30px;
  position: relative;
  border-radius: 40px 40px 0 0;
  margin-top: 50px;
  border: 2px solid #4285f4;
  border-bottom: none;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: -1;
  border-radius: 40px 40px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  transition: all 0.3s ease;
  will-change: background, transform;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.copyright a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright a:hover {
  color: var(--primary);
}

@media (min-width: 769px) {
  footer {
    margin: 12px 12px 0;
    border-radius: 24px 24px 0 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.9);
    padding: 38px 0 24px;
  }

  footer::before {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 768px) {
  footer {
    margin: 14px 12px 0;
    border-radius: 24px 24px 0 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 0 24px;
  }

  footer::before {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 24px 24px 0 0;
  }
}
