:root {
  --al-h03-brand: #39ff14;
  --al-h03-border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #000000;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
}

/* Header shell */

.header {
  position: relative;
  border-bottom: 1px solid var(--al-h03-border);
  background: #ffffff;
}

.header__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

/* Left group: hamburger + desktop nav */

.header__left {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-self: start;
}

.header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: #000000;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.header__menu-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header__menu-btn:focus-visible {
  outline: 2px solid var(--al-h03-brand);
  outline-offset: 2px;
}

.icon-menu,
.icon-close {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-close {
  display: none;
}

.header__menu-btn.is-open .icon-menu {
  display: none;
}

.header__menu-btn.is-open .icon-close {
  display: block;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.header__link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 150ms ease;
}

.header__link:hover {
  color: #525252;
}

.header__link:focus-visible {
  outline: 2px solid var(--al-h03-brand);
  outline-offset: 2px;
}

/* Mobile dropdown panel */

.header__panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 20;
  border-bottom: 1px solid var(--al-h03-border);
  background: #ffffff;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.18);
}

.header__panel-nav {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}

.header__panel-link {
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  transition: background-color 150ms ease;
}

.header__panel-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header__panel-link:focus-visible {
  outline: 2px solid var(--al-h03-brand);
  outline-offset: 2px;
}

/* Center brand */

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  justify-self: center;
  user-select: none;
}

.header__mark {
  height: 1.625rem;
  width: auto;
  display: block;
}

.header__wordmark {
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #000000;
}

/* Right group */

.header__right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  justify-self: end;
}

.header__theme-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: #000000;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.header__theme-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header__theme-btn:focus-visible {
  outline: 2px solid var(--al-h03-brand);
  outline-offset: 2px;
}

.header__theme-icons {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
}

.header__icon {
  position: absolute;
  width: 1.125rem;
  height: 1.125rem;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.header__icon--moon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}

.header__theme-btn[aria-pressed="true"] .header__icon--sun {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}

.header__theme-btn[aria-pressed="true"] .header__icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.header__cta {
  display: none;
  align-items: center;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  transition: color 150ms ease;
}

.header__cta:hover {
  color: #525252;
}

.header__cta:focus-visible {
  outline: 2px solid var(--al-h03-brand);
  outline-offset: 2px;
}

/* Breakpoints */

@media (min-width: 1024px) {
  .header__menu-btn {
    display: none;
  }

  .header__nav {
    display: flex;
  }

  .header__panel {
    display: none !important;
  }

  .header__cta {
    display: inline-flex;
  }
}

@media (min-width: 640px) {
  .header__inner,
  .header__panel-nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .header__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/*
 * Header 03 — "symmetric slide-in" animation identity. Same canonical
 * keyframes as `Header03.tailwind.css`. Scoped with a unique
 * `al-header03-*` prefix so this never collides with another Resource's
 * own animation layer. Entirely disabled under reduced motion: outside the
 * media query below, every element already renders in its final, fully
 * visible/usable state.
 */
@keyframes al-header03-slide-left {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes al-header03-slide-right {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes al-header03-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes al-header03-panel {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .al-header03-reveal-left {
    animation: al-header03-slide-left 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .al-header03-reveal-right {
    animation: al-header03-slide-right 350ms cubic-bezier(0.16, 1, 0.3, 1) 20ms both;
  }

  .al-header03-reveal-center {
    animation: al-header03-scale-in 350ms cubic-bezier(0.16, 1, 0.3, 1) 10ms both;
  }

  .header__panel {
    animation: al-header03-panel 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .al-header03-icon-swap {
    transition:
      opacity 250ms ease,
      transform 250ms ease;
  }
}
