/* ==========================================================================
   Index — page-shell styles (header, nav, mobile menu, bottom nav)
   Loaded after css/style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header visibility toggle (toggled by .is-hidden-on-scroll from JS)
   -------------------------------------------------------------------------- */
#site-header {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

#site-header.is-hidden-on-scroll {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Theme toggle preview states (used on hover / mobile tap)
   -------------------------------------------------------------------------- */
#theme-toggle.preview-light {
  background-color: #fef3c7;
  box-shadow: 0 0 0 4px rgba(254, 243, 199, 0.45);
}

#theme-toggle.preview-dark {
  background-color: #1f2937;
  box-shadow: 0 0 0 4px rgba(31, 41, 55, 0.45);
}

/* --------------------------------------------------------------------------
   Theme color fade (fallback for browsers without View Transitions API)
   -------------------------------------------------------------------------- */
html.theme-color-fade,
html.theme-color-fade body,
html.theme-color-fade body * {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    fill 0.5s ease,
    stroke 0.5s ease !important;
}

/* --------------------------------------------------------------------------
   Theme reveal (native View Transitions API)
   -------------------------------------------------------------------------- */
html.theme-reveal::view-transition-old(root),
html.theme-reveal::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.theme-reveal::view-transition-old(root) {
  z-index: 1;
}

html.theme-reveal::view-transition-new(root) {
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Mobile menu slide animations
   -------------------------------------------------------------------------- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

#mobile-menu.animate-slideDown {
  animation: slideDown 0.3s ease forwards;
}

#mobile-menu.animate-slideUp {
  animation: slideUp 0.22s ease forwards;
}

/* --------------------------------------------------------------------------
   Header meta (copy email / Facebook icon)
   -------------------------------------------------------------------------- */
#copy-email-btn,
#name-text {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* --------------------------------------------------------------------------
   Hero-connector lines between sections
   -------------------------------------------------------------------------- */
.section-connector-line {
  width: 4px;
  background: currentColor;
  transition: transform 0.3s ease;
}

.section-connector-line:hover {
  transform: scaleY(1.1);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dark footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------------------------------
   Bottom mobile nav — glass, app-style
   -------------------------------------------------------------------------- */
#bottom-mobile-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 30rem;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.dark #bottom-mobile-nav {
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
}

#bottom-mobile-nav a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.25rem;
  border-radius: 0.75rem;
  color: #4b5563;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}

.dark #bottom-mobile-nav a {
  color: #9ca3af;
}

#bottom-mobile-nav a i {
  font-size: 1rem;
}

#bottom-mobile-nav a:hover {
  transform: translateY(-1px);
}

#bottom-mobile-nav a.active {
  color: #000;
  background-color: rgba(0, 0, 0, 0.06);
}

.dark #bottom-mobile-nav a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

/* Add extra bottom padding on mobile so footer isn't hidden behind bottom nav */
@media (max-width: 767px) {
  body {
    padding-bottom: 5rem;
  }
}

/* --------------------------------------------------------------------------
   Google Translate cleanup — hide the default Google widget chrome
   -------------------------------------------------------------------------- */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget,
.goog-logo-link,
.goog-te-balloon-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

/* Remove the Google Translate top-bar that occasionally appears */
.skiptranslate > iframe {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* --------------------------------------------------------------------------
   Reduced-motion safety net
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #site-header,
  #bottom-mobile-nav a,
  #copy-email-btn,
  #name-text,
  .section-connector-line {
    transition: none !important;
  }
}