header.masthead {
  position: relative;
  display: flex;
  align-items: center;

  padding-bottom: 0;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(254, 209, 54, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(126, 141, 255, 0.1), transparent 30%),
    linear-gradient(135deg, #0b1220 0%, #162033 52%, #1b2636 100%);
}

header.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.28), rgba(11, 18, 32, 0));
  pointer-events: none;
}

header.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.7), transparent 82%);
  opacity: 0.35;
  pointer-events: none;
}

.masthead-shell {
  position: relative;
  z-index: 1;
}

.masthead-shell::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 130px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 209, 54, 0.2), rgba(254, 209, 54, 0));
  filter: blur(4px);
  opacity: 0.8;
  animation: mastheadAccentDrift 10s ease-in-out infinite;
  pointer-events: none;
}

header.masthead .intro-text {
  max-width: 640px;
  padding-top: 185px;
  padding-bottom: 130px;
}

.masthead-copy {
  position: relative;
}

header.masthead .intro-text .intro-lead-in {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

header.masthead .intro-text .intro-heading {
  max-width: 640px;
  margin-top: 1.35rem;
  margin-bottom: 0;
  text-transform: none;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.masthead-support {
  max-width: 520px;
  margin-top: 1.15rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.8;
}

.masthead-card-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-top: 180px;
  padding-bottom: 130px;
}

.masthead-card-wrap::before {
  content: "";
  position: absolute;
  top: 118px;
  right: 12px;
  width: 220px;
  height: 220px;
  border-radius: 32px;
  background: rgba(254, 209, 54, 0.12);
  filter: blur(6px);
  transform: rotate(10deg);
}


.masthead-card {
  position: relative;
  width: min(100%, 380px);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  animation: mastheadCardFloat 6s ease-in-out infinite;
}

.masthead-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 32px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.04));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.masthead-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.masthead-card-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

#websites .row {
  justify-content: center;
}

.video-explorer {
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
}

.video-tab-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(222, 228, 237, 0.95);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.96));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.video-tab-list .nav-item {
  display: flex;
}

.video-tab-list .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 185px;
  min-height: 60px;
  padding: 0.9rem 1.35rem;
  border: 1px solid #d9dfe8;
  border-radius: 999px;
  background: #fff;
  color: #212529;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: background-color 0.22s ease, border-color 0.22s ease,
    color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.video-tab-list .nav-link:hover,
.video-tab-list .nav-link:focus {
  color: #212529;
  background: #fed136;
  border-color: #fed136;
  box-shadow: 0 16px 32px rgba(254, 209, 54, 0.28);
  transform: translateY(-2px);
}

.video-tab-list .nav-link.active,
.video-tab-list .show>.nav-link {
  color: #fff;
  background: linear-gradient(135deg, #111827, #243247);
  border-color: #212529;
  box-shadow: 0 18px 36px rgba(33, 37, 41, 0.22);
}

.video-reset-wrap {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.35s ease, margin-top 0.35s ease, opacity 0.3s ease,
    transform 0.3s ease;
}

.video-reset-wrap.is-visible {
  max-height: 80px;
  margin-top: 18px;
  opacity: 1;
  transform: translateY(0);
}

.video-reset-btn {
  border-color: rgba(33, 37, 41, 0.12);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.video-overview-panel,
.video-tab-content-shell {
  transition: opacity 0.55s ease, transform 0.55s ease, max-height 0.6s ease,
    margin-top 0.6s ease;
  will-change: opacity, transform;
}

.video-overview-panel {
  max-width: 960px;
  margin: 28px auto 0;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(228, 234, 242, 0.95);
  border-radius: 28px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(254, 209, 54, 0.16), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7f9fc);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
}

.video-overview-panel.is-hidden {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.video-placeholder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  color: #212529;
  font-size: 2.35rem;
  background: radial-gradient(circle at 30% 30%, #ffe27a, #fed136 68%, #f0b400 100%);
  box-shadow: 0 22px 48px rgba(254, 209, 54, 0.34);
  position: relative;
}

.video-placeholder-badge i {
  position: relative;
  z-index: 1;
  transform: translateX(3px);
  animation: videoPlayPop 1.8s ease-in-out infinite;
}

.video-placeholder-badge::before,
.video-placeholder-badge::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

.video-placeholder-badge::before {
  border: 2px solid rgba(254, 209, 54, 0.45);
  animation: videoPlaceholderPulse 2.2s ease-out infinite;
}

.video-placeholder-badge::after {
  inset: -24px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  animation: videoPlaceholderOrbit 5s ease-in-out infinite;
}

.video-placeholder-title {
  margin-bottom: 0.75rem;
  font-size: 2rem;
  color: #111827;
}

.video-placeholder-copy {
  max-width: 620px;
  margin: 0 auto;
  color: #5f6b7a;
  line-height: 1.8;
}

.video-overview-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem;
}

.video-overview-tags span {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: #212529;
  border: 1px solid rgba(230, 235, 242, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  font-weight: 700;
}

.video-tab-content-shell {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.video-explorer.has-selection .video-tab-content-shell {
  max-height: 6000px;
  margin-top: 28px;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.video-category-pane {
  padding: 2rem;
  border: 1px solid rgba(228, 234, 242, 0.95);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
}

.video-category-pane.fade {
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.video-category-pane.fade:not(.show) {
  opacity: 0;
  transform: translateY(20px);
}

.video-category-pane.fade.show {
  opacity: 1;
  transform: translateY(0);
}

.video-category-pane.video-pane-leaving {
  opacity: 0 !important;
  transform: translateY(14px) !important;
}

.video-empty-state {
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(33, 37, 41, 0.16);
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(254, 209, 54, 0.14), rgba(255, 255, 255, 0));
}

.video-empty-state i {
  margin-bottom: 1rem;
  color: #fed136;
  font-size: 2rem;
}

.video-project+.video-project {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid #eceff4;
}

.video-project iframe {
  min-height: 345px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.video-project-copy {
  padding-left: 0.5rem;
}

.video-project-copy h3 {
  margin-bottom: 0.85rem;
  color: #111827;
}

.video-project-copy p {
  color: #5f6b7a;
  line-height: 1.75;
}

.photo-carousel-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.photo-carousel-frame {
  display: flex;
  align-items: center;
  gap: 18px;
}

.photo-carousel-viewport {
  flex: 1;
  overflow: hidden;
  padding: 28px 0;
}

.photo-carousel-track {
  display: flex;
  align-items: center;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.photo-carousel-slide {
  display: flex;
  flex: 0 0 360px;
  margin: 0 14px;
  opacity: 0.45;
  transition: opacity 0.35s ease;
}

.photo-carousel-slide.is-prev,
.photo-carousel-slide.is-next {
  opacity: 0.72;
}

.photo-carousel-slide.is-active {
  opacity: 1;
}

.photo-carousel-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 26px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
  transform: scale(0.9);
  transform-origin: center center;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.photo-carousel-card:hover {
  color: inherit;
  text-decoration: none;
}

.photo-carousel-slide.is-prev .photo-carousel-card,
.photo-carousel-slide.is-next .photo-carousel-card {
  transform: scale(0.96);
}

.photo-carousel-slide.is-active .photo-carousel-card {
  transform: scale(1.08);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.18);
}

.photo-carousel-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  background: #eef2f7;
}

.photo-carousel-caption {
  display: flex;
  flex: 1 0 100px;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.1rem 1.1rem;
  text-align: center;
}

.photo-carousel-caption h4 {
  margin-bottom: 0.2rem;
  text-transform: none;
}

.photo-carousel-caption p {
  margin: 0;
  color: #6c757d;
}

.photo-carousel-track.is-resetting,
.photo-carousel-track.is-resetting .photo-carousel-card,
.photo-carousel-track.is-resetting .photo-carousel-slide {
  transition: none !important;
}

.photo-carousel-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid #dce3ec;
  border-radius: 50%;
  background: #fff;
  color: #212529;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease, background-color 0.22s ease;
}

.photo-carousel-control:hover,
.photo-carousel-control:focus {
  border-color: #fed136;
  background: #fed136;
  box-shadow: 0 18px 36px rgba(254, 209, 54, 0.24);
  transform: translateY(-2px);
}

.photo-carousel-meta {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.photo-carousel-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #212529;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
}

@keyframes videoPlaceholderPulse {
  0% {
    opacity: 0.8;
    transform: scale(0.95);
  }

  70% {
    opacity: 0;
    transform: scale(1.28);
  }

  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes mastheadCardFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes mastheadAccentDrift {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes videoPlaceholderFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

@keyframes videoPlaceholderOrbit {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translateY(10px) scale(1.03);
    opacity: 1;
  }
}

@keyframes videoPlayPop {

  0%,
  100% {
    transform: translateX(3px) scale(1);
  }

  50% {
    transform: translateX(3px) scale(1.14);
  }
}

@media (min-width: 768px) {
  header.masthead .intro-text {
    padding-top: 240px;
    padding-bottom: 170px;
  }

  header.masthead .intro-text .intro-heading {
    font-size: 4.35rem;
  }
}

@media (max-width: 991.98px) {
  .masthead-shell::before {
    left: 50%;
    top: 88px;
    transform: translateX(-50%);
  }

  .masthead-card-wrap {
    justify-content: center;
    padding-top: 0;
    padding-bottom: 110px;
  }

  .masthead-card-wrap::before {
    top: 30px;
    right: 50%;
    transform: translateX(50%) rotate(10deg);
  }

  .masthead-card-wrap::after {
    right: 50%;
    bottom: 84px;
    transform: translateX(150px) rotate(-12deg);
  }

  .video-tab-list .nav-link {
    min-width: 0;
  }

  .video-project-copy {
    padding-left: 0;
  }

  .photo-carousel-frame {
    gap: 12px;
  }

  .photo-carousel-slide {
    flex-basis: 320px;
  }
}

@media (max-width: 767.98px) {
  #websites .section-heading {
    max-width: 10ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 2.2rem;
    line-height: 1.08;
  }

  #websites .section-subheading {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.65;
  }

  #websites .card {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  #websites .card-img-top {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 245 / 140;
    object-fit: cover;
  }

  #websites .card-body {
    padding: 1.25rem;
  }

  header.masthead {
    min-height: auto;
  }

  header.masthead .intro-text {
    max-width: none;
    padding-top: 155px;
    padding-bottom: 48px;
    text-align: center;
  }

  header.masthead .intro-text .intro-heading {
    font-size: 2.75rem;
  }

  .masthead-shell::before {
    width: 130px;
    height: 130px;
    top: 98px;
  }

  .masthead-support {
    margin-left: auto;
    margin-right: auto;
  }

  .masthead-card-wrap {
    padding-bottom: 90px;
  }

  .masthead-card-wrap::before {
    width: 180px;
    height: 180px;
    top: 26px;
  }

  .masthead-card-wrap::after {
    width: 102px;
    height: 102px;
    bottom: 72px;
    transform: translateX(122px) rotate(-12deg);
  }

  .masthead-card {
    width: min(100%, 320px);
    padding: 12px;
    border-radius: 26px;
  }

  .masthead-card-image {
    max-height: 430px;
  }

  .masthead-card::after,
  .masthead-card-image {
    border-radius: 20px;
  }

  .video-overview-panel,
  .video-category-pane {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .video-tab-list {
    padding: 12px;
    border-radius: 24px;
  }

  .video-tab-list .nav-item {
    width: 100%;
  }

  .video-tab-list .nav-link {
    width: 100%;
    min-height: 56px;
  }

  .video-placeholder-badge {
    width: 108px;
    height: 108px;
    font-size: 2.1rem;
  }

  .video-project iframe {
    min-height: 220px;
    margin-bottom: 1rem;
  }

  .photo-carousel-frame {
    flex-wrap: wrap;
    justify-content: center;
  }

  .photo-carousel-viewport {
    order: 1;
    width: 100%;
    flex: 0 0 100%;
  }

  .photo-carousel-control {
    order: 2;
  }

  .photo-carousel-slide {
    flex-basis: 270px;
    margin: 0 10px;
  }

  .photo-carousel-slide.is-active .photo-carousel-card {
    transform: scale(1.04);
  }
}

@media (max-width: 575.98px) {
  #websites .card {
    max-width: 300px;
  }

  #websites .section-heading {
    font-size: 1.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .video-overview-panel,
  .video-tab-content-shell,
  .video-category-pane,
  .video-reset-wrap,
  .video-tab-list .nav-link,
  .masthead-card,
  .masthead-shell::before,
  .masthead-card-wrap::after,
  .video-placeholder-badge i,
  .photo-carousel-slide,
  .photo-carousel-control,
  .photo-carousel-track,
  .video-placeholder-badge::before,
  .video-placeholder-badge::after {
    transition: none !important;
    animation: none !important;
  }
}