/* Hero gallery tabs — bold when matching the active slide */
.banner-tabs[data-hero-gallery-tabs] .tab-title {
  font-weight: 400;
  transition: color 0.25s ease, font-weight 0.25s ease;
}
.banner-tabs[data-hero-gallery-tabs] .tab-title.active {
  font-weight: 700;
}

/* Menu button — slightly narrower on desktop than theme sm:w-92 */
@media (min-width: 576px) {
  .site-header .menu-btn {
    width: 78px;
  }
}

/* Sidenav contact icons — larger; white in dark, ink color in light */
.sidenav-contact-icon {
  font-size: 1.5rem;
  line-height: 1;
  width: 1.5em;
  text-align: center;
  color: var(--color-secondary, #191b1d);
}
html.dark .sidenav-contact-icon {
  color: #fff;
}

/* Site logo — always the uploaded logo in its original colors (no filters) */
.site-header .logo .site-logo {
  display: block;
  height: 42px !important;
  width: auto !important;
  max-width: min(100%, 160px) !important;
  max-height: none !important;
  object-fit: contain;
  transition: height 0.3s ease;
}

@media (min-width: 576px) {
  .site-header .logo .site-logo {
    height: 58px !important;
  }
}

@media (min-width: 992px) {
  .site-header .logo .site-logo {
    height: 84px !important;
  }
}

/* Smaller logo when header is sticky/fixed */
.site-header.is-fixed .logo .site-logo {
  height: 32px !important;
}

@media (min-width: 576px) {
  .site-header.is-fixed .logo .site-logo {
    height: 40px !important;
  }
}

@media (min-width: 992px) {
  .site-header.is-fixed .logo .site-logo {
    height: 48px !important;
  }
}

.title-accent-img {
  width: 134px;
  height: 100px;
  object-fit: cover;
  border-radius: 16px;
  vertical-align: middle;
}

/* Header sidenav social icons */
.header-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-social__link:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

/* Sidebar / sidenav scrollbar */
.full-sidenav,
.site-header .header-nav .custom-scroll,
.full-sidenav .custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}

html.dark .full-sidenav,
html.dark .site-header .header-nav .custom-scroll,
html.dark .full-sidenav .custom-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.full-sidenav::-webkit-scrollbar,
.site-header .header-nav .custom-scroll::-webkit-scrollbar,
.full-sidenav .custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.full-sidenav::-webkit-scrollbar-track,
.site-header .header-nav .custom-scroll::-webkit-scrollbar-track,
.full-sidenav .custom-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 12px;
}

.full-sidenav::-webkit-scrollbar-thumb,
.site-header .header-nav .custom-scroll::-webkit-scrollbar-thumb,
.full-sidenav .custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.full-sidenav::-webkit-scrollbar-thumb:hover,
.site-header .header-nav .custom-scroll::-webkit-scrollbar-thumb:hover,
.full-sidenav .custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.45);
  background-clip: padding-box;
}

html.dark .full-sidenav::-webkit-scrollbar-thumb,
html.dark .site-header .header-nav .custom-scroll::-webkit-scrollbar-thumb,
html.dark .full-sidenav .custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  background-clip: padding-box;
}

html.dark .full-sidenav::-webkit-scrollbar-thumb:hover,
html.dark .site-header .header-nav .custom-scroll::-webkit-scrollbar-thumb:hover,
html.dark .full-sidenav .custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.55);
  background-clip: padding-box;
}

/* Footer contact links */
.footer-contact-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.35;
}

.footer-contact-icon {
  margin-top: 0.2em;
  font-size: 0.85em;
  width: 1em;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Footer marquee */
.footer-ticker-text {
  font-size: 36px;
  line-height: 1.05;
}

@media (min-width: 768px) {
  .footer-ticker-text {
    font-size: 60px;
  }
}

@media (min-width: 1200px) {
  .footer-ticker-text {
    font-size: 80px;
  }
}

/* Tech stack ticker — seamless infinite loop */
.tech-ticker-wrap {
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tech-ticker-track {
  display: flex;
  width: max-content;
  animation: tech-ticker-scroll 35s linear infinite;
  will-change: transform;
}

.tech-ticker-track:hover {
  animation-play-state: paused;
}

.tech-ticker-group {
  display: flex;
  align-items: center;
  gap: 70px;
  padding-inline-end: 70px;
  flex-shrink: 0;
}

.tech-ticker__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-ticker__logo {
  width: 72px;
  height: 72px;
  min-width: 72px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.tech-ticker__item:hover .tech-ticker__logo {
  filter: grayscale(0);
  opacity: 1;
}

.tech-ticker__logo--django,
.tech-ticker__logo--cpanel {
  width: 120px;
  min-width: 120px;
  height: 48px;
}

@keyframes tech-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

html.dark .tech-ticker__logo--github {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.85;
}

html.dark .tech-ticker__item:hover .tech-ticker__logo--github {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Floating chat FAB (bottom-left) */
.chat-fab {
  --chat-fab-size: 58px;
  --chat-fab-green: #25d366;
  --chat-fab-green-dark: #1ebe57;
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.chat-fab__toggle {
  position: relative;
  width: var(--chat-fab-size);
  height: var(--chat-fab-size);
  border: 0;
  border-radius: 50%;
  background: var(--chat-fab-green);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-fab__toggle:hover {
  background: var(--chat-fab-green-dark);
  transform: translateY(-1px);
}

.chat-fab__toggle-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-fab__toggle-icon--close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}

.chat-fab.is-open .chat-fab__toggle-icon--open {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}

.chat-fab.is-open .chat-fab__toggle-icon--close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.chat-fab.is-open .chat-fab__pulse {
  animation: none;
  opacity: 0;
}

.chat-fab__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--chat-fab-green);
  z-index: -1;
  animation: chat-fab-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

.chat-fab__pulse--delay {
  animation-delay: 1.1s;
}

@keyframes chat-fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.75);
    opacity: 0;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.chat-fab__menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.chat-fab.is-open .chat-fab__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-fab__menu[hidden] {
  display: none;
}

.chat-fab.is-open .chat-fab__menu[hidden] {
  display: flex;
}

.chat-fab__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-fab__item:hover {
  transform: translateX(3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  color: #111;
}

.chat-fab__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: #fff;
}

.chat-fab__icon--wa {
  background: var(--chat-fab-green);
}

.chat-fab__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.chat-fab__copy strong {
  font-size: 0.875rem;
  font-weight: 700;
}

.chat-fab__copy small {
  font-size: 0.75rem;
  opacity: 0.65;
}

html.dark .chat-fab__item {
  background: #1a1f24;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

html.dark .chat-fab__item:hover {
  color: #fff;
}

@media (max-width: 575px) {
  .chat-fab {
    left: 14px;
    bottom: 14px;
    --chat-fab-size: 54px;
  }

  .chat-fab__menu {
    min-width: 200px;
  }
}

/* Cloudflare Turnstile — match site light/dark surfaces */
.turnstile-wrap {
  display: inline-block;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 0.5rem;
  background: #ffffff;
  border: 1px solid rgba(25, 27, 29, 0.08);
  line-height: 0;
}
html.dark .turnstile-wrap {
  background: var(--card, #2C2E30);
  border-color: rgba(255, 255, 255, 0.08);
}
.turnstile-wrap .cf-turnstile {
  background: transparent;
}

/* Hero CTA soft pulse */
.btn-pulse {
  position: relative;
  animation: btnPulse 2.4s ease-in-out infinite;
}
.btn-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  animation: btnPulseRing 2.4s ease-out infinite;
}
.btn-pulse:hover,
.btn-pulse:focus-visible {
  animation-play-state: paused;
}
.btn-pulse:hover::after,
.btn-pulse:focus-visible::after {
  animation-play-state: paused;
  opacity: 0;
}
@keyframes btnPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}
@keyframes btnPulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
    opacity: 0;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-pulse,
  .btn-pulse::after {
    animation: none;
  }
}

/* Portfolio — project location badge (country flag + location name) */
.project-location {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 500;
  text-transform: none;
  color: var(--color-bodytext);
}
html.dark .project-location {
  color: var(--color-textlight);
}
.project-location__flag {
  width: 24px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(25, 27, 29, 0.12);
}
html.dark .project-location__flag {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.project-location__emoji {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}
.project-location__name {
  white-space: nowrap;
}

/* Homepage hero image stack (autoplay fan) */
.hero-gallery {
  position: relative;
  width: min(40vw, 320px);
  height: min(50vw, 400px);
  margin: 0 auto;
  perspective: 1200px;
}
.hero-gallery__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-gallery__card {
  width: 100%;
  height: 100%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
}
@media (min-width: 992px) {
  .hero-gallery {
    width: min(20vw, 360px);
    height: min(25vw, 450px);
  }
}

/* Homepage hero title — two lines: title + rotating pill */
.main-banner__title,
.main-banner__title.headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
  opacity: 1; /* theme .headline starts at 0 for SplitText */
}
.main-banner__line {
  display: block;
  width: 100%;
}
.main-banner__typewrite {
  position: relative;
  display: grid;
  place-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  /* Reserve space for the longest pill so the layout never jumps */
  min-height: 2.4em;
}
.main-banner__pill {
  grid-area: 1 / 1;
  font-size: 22px;
  line-height: 1.25;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.main-banner__pill.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
}
@media (min-width: 576px) {
  .main-banner__title {
    font-size: 40px;
    line-height: 1.15;
  }
  .main-banner__pill {
    font-size: 30px;
    padding: 0.6rem 1rem;
  }
  .main-banner__typewrite {
    min-height: 2.5em;
  }
}
@media (min-width: 992px) {
  .main-banner__title {
    font-size: 52px;
    line-height: 1.12;
  }
  .main-banner__pill {
    font-size: 44px;
    padding: 0.75rem 1.25rem;
  }
  .main-banner__typewrite {
    min-height: 2.6em;
  }
}
@media (min-width: 1200px) {
  .main-banner__title {
    font-size: 58px;
    line-height: 1.1;
  }
  .main-banner__pill {
    font-size: 50px;
    padding: 0.85rem 1.35rem;
  }
}
