/* Shared site components (header + footer).
   Plain CSS — no Tailwind dependency, so injected markup is always styled. */

.hidden { display: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transform-style: preserve-3d;
}
.dark .site-header {
  background: rgba(15, 23, 42, 0.7);
  border-bottom-color: rgba(30, 41, 59, 0.8);
}
.site-header-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5rem;
  perspective: 1000px;
  transform-style: preserve-3d;
}
@media (min-width: 640px) { .site-header-inner { padding: 0 1rem; } }
@media (min-width: 1024px) { .site-header-inner { padding: 0 1.5rem; } }

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.site-header-brand:hover {
  transform: translateZ(16px);
}
.site-header-brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}
.site-header-brand-text { display: block; min-width: 0; }
.site-header-brand-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  white-space: nowrap;
}
.dark .site-header-brand-name { color: var(--light); }
.site-header-brand-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
}
.dark .site-header-brand-sub { color: var(--muted-dark); }

.site-header-nav {
  display: none;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
  padding: 0 1rem;
}
@media (min-width: 1024px) { .site-header-nav { display: flex; } }
.site-header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.site-header-nav a:hover {
  color: var(--accent);
  transform: translateZ(12px);
}
.dark .site-header-nav a { color: var(--light); }
.site-header-nav a.site-header-nav-active { color: var(--accent); font-weight: 700; }
.site-header-nav svg, .site-header-nav img.i8 { width: 1.5rem; height: 1.5rem; }

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.site-header-socials { display: none; }
@media (min-width: 640px) {
  .site-header-socials { display: flex; align-items: center; gap: 0.5rem; }
}

.site-header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(226, 232, 240, 0.3);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.dark .site-header-icon-btn {
  border-color: rgba(30, 41, 59, 0.3);
  color: var(--light);
}
.site-header-icon-btn:hover {
  background: rgba(241, 245, 249, 0.5);
  transform: translateZ(14px);
}
.dark .site-header-icon-btn:hover { background: rgba(30, 41, 59); }
.site-header-icon-btn svg, .site-header-icon-btn img.i8 { width: 1.5rem; height: 1.5rem; }
#theme-toggle svg, #theme-toggle img.i8 { width: 1.5rem; height: 1.5rem; }
.dark #theme-toggle svg { color: var(--light); }
#theme-toggle .hidden,
.hidden { display: none; }

.site-header-icon-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
  transition: opacity 0.2s ease;
}
.dark .site-header-icon-label { background: rgba(15, 23, 42, 0.95); color: var(--light); }
.site-header-icon-btn:hover .site-header-icon-label,
.site-header-icon-btn:focus-visible .site-header-icon-label { opacity: 1; }

.site-header-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
}
.dark .site-header-menu-btn { color: #e2e8f0; }
.site-header-menu-btn:hover { background: rgb(241 245 249); }
.dark .site-header-menu-btn:hover { background: rgb(30 41 59); }
.site-header-menu-btn svg, .site-header-menu-btn img.i8 { width: 1.75rem; height: 1.75rem; }
@media (min-width: 1024px) { .site-header-menu-btn { display: none; } }

.site-header-mobile-menu {
  display: block;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 0.5rem 1rem 0.75rem;
}
.site-header-mobile-menu.hidden { display: none; }
.dark .site-header-mobile-menu { border-top-color: rgba(30, 41, 59, 0.8); }
.site-header-mobile-menu a.site-header-mobile-link {
  display: block;
  padding: 0.375rem 0;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  color: #334155;
  text-decoration: none;
}
.dark .site-header-mobile-menu a.site-header-mobile-link { color: #e2e8f0; }
.site-header-mobile-menu a.site-header-mobile-link:hover { color: #7c3aed; }
.site-header-mobile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
}
.site-header-mobile-socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(226 232 240);
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
}
.dark .site-header-mobile-socials a {
  border-color: rgb(30 41 59);
  color: #e2e8f0;
}
.site-header-mobile-socials a svg, .site-header-mobile-socials a img.i8 { width: 1.5rem; height: 1.5rem; }

/* ===== Footer ===== */
.site-footer {
  padding: 1.5rem 0;
  background: var(--light);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  perspective: 1200px;
}
.dark .site-footer {
  background: var(--text);
  border-top-color: rgba(30, 41, 59, 0.3);
}
.site-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}
.site-footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .site-footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }
}
.site-footer-info { min-width: 0; }
.site-footer-brand {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  background: linear-gradient(to right, #a855f7, #3b82f6, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark .site-footer-brand {
  -webkit-text-fill-color: transparent;
}
.site-footer-tagline {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.dark .site-footer-tagline { color: #94a3b8; }
.site-footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .site-footer-socials { justify-content: flex-start; }
}
.site-footer-socials a {
  color: var(--muted);
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.site-footer-socials a:hover {
  color: var(--accent);
  transform: translateZ(18px) translateY(-4px);
}
.dark .site-footer-socials a { color: var(--muted-dark); }
.dark .site-footer-socials a:hover { color: var(--accent); }
.site-footer-socials svg, .site-footer-socials img.i8 { width: 2rem; height: 2rem; }
.site-footer-links-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.dark .site-footer-links-title { color: var(--light); }
.site-footer-links-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 0.375rem 2rem;
}
.site-footer-links-list a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.site-footer-links-list a:hover { color: var(--accent); }
.dark .site-footer-links-list a { color: var(--light); }
.dark .site-footer-links-list a:hover { color: #a78bfa; }
.site-footer-copy {
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 0.75rem;
}
.dark .site-footer-copy { color: var(--muted-dark); border-top-color: rgba(30, 41, 59, 0.3); }
