.hero-video {
  min-height: 100%;
  min-width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  object-fit: cover;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(ellipse at center, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.03) 2px,
        rgba(255,255,255,0.03) 4px
    ),
    repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.03) 2px,
        rgba(255,255,255,0.03) 4px
    );
  pointer-events: none;
}

.carousel-wrapper {
  width: 100%;
  max-width: 1100px;
  height: 540px;
  position: relative;
  perspective: 2000px;
  margin: 0 auto;
}

.cylinder-carousel {
  width: 100%;
  height: 540px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-5deg) rotateY(0deg);
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
  margin: 0 auto;
}


.carousel-face {
  position: absolute;
  width: 440px;
  height: 480px;
  left: 50%;
  top: 50%;
  margin-left: -220px;
  margin-top: -240px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 15px 15px 10px 15px;
  backface-visibility: hidden;
  box-shadow:
      0 10px 40px rgba(0,0,0,0.3),
      inset 0 1px 0 rgba(255,255,255,0.6),
      inset 0 -1px 0 rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
}

/* Technology card images — cap at ~1/3 of panel content width */
.panel-img {
  max-width: 90px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Compact cards inside technology panel */
.carousel-face .card {
  font-size: 0.85rem;
}

/* Font styling for descriptions in workhistory panel */
.workhistory-description {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.875rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.workhistory-date {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.75rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.carousel-face .card .card-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.carousel-face .card .card-body {
  padding: 0.5rem;
}

.carousel-face .card .card-body p {
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.carousel-face .card .card-footer {
  padding: 0.3rem 0.5rem;
}

.carousel-face .card .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
}

.carousel-face .card .btn-sm {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

/* Platforms panel: compact item spacing */
.carousel-face .d-flex.flex-wrap[data-type="item"] {
  padding: 0.3rem 0;
  font-size: 0.82rem;
}

.carousel-face .d-flex.flex-wrap[data-type="item"] p {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

/* Search inputs inside panels */
.carousel-face input[type="text"] {
  width: 100%;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.carousel-face::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}

.carousel-face::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
      repeating-linear-gradient(
          90deg,
          transparent,
          transparent 1px,
          rgba(0,0,0,0.03) 1px,
          rgba(0,0,0,0.03) 2px
      );
  pointer-events: none;
}

.face-content {
  position: relative;
  z-index: 1;
}

.face-icon {
  font-size: 60px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.face-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #2a5298;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.face-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.face-button {
  padding: 10px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.face-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Improved cylinder geometry — faces form a contiguous hexagon */
/* translateZ = (faceWidth / 2) / tan(π / numFaces) ≈ 220 / tan(30°) ≈ 381px */
.carousel-face:nth-child(1) {
  transform: rotateY(0deg) translateZ(400px);
}

.carousel-face:nth-child(2) {
  transform: rotateY(60deg) translateZ(400px);
}

.carousel-face:nth-child(3) {
  transform: rotateY(120deg) translateZ(400px);
}

.carousel-face:nth-child(4) {
  transform: rotateY(180deg) translateZ(400px);
}

.carousel-face:nth-child(5) {
  transform: rotateY(240deg) translateZ(400px);
}

.carousel-face:nth-child(6) {
  transform: rotateY(300deg) translateZ(400px);
}

/* Controls */
.carousel-controls {
  position: absolute;
  width: 100%;
  height: 0%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.control-btn {
  width: 70px;
  height: 70px;
  background: rgba(255,255,255,0.9);
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  font-size: 28px;
  color: #2a5298;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
      0 10px 30px rgba(0,0,0,0.3),
      inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.control-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.control-btn:active {
  transform: scale(0.95);
}

/* Lighting effect */
.lighting-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(ellipse at center top, rgba(255,255,255,0.2) 0%, transparent 60%);
  z-index: 10;
}

/* Shadow beneath carousel */
.carousel-shadow {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 100px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
  filter: blur(20px);
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* Screen-reader-only utility (Bootstrap 4 uses .sr-only; we provide .visually-hidden too) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* aria-live announcer */
.carousel-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .carousel-wrapper {
    max-width: 100%;
    height: 480px;
    perspective: 1600px;
  }

  .cylinder-carousel {
    height: 480px;
  }

  .carousel-face {
      width: 85vw;
      max-width: 380px;
      height: 420px;
      margin-left: calc(-42.5vw);
      margin-top: -210px;
      padding: 10px;
      justify-content: flex-start;
      overflow: hidden;
  }

  /* Mobile: stack technology cards in single column */
  .carousel-face .d-flex.align-content-start.flex-wrap {
    flex-direction: column;
    align-items: center;
  }

  .carousel-face .p-2[data-type="item"] {
    width: 100%;
  }

  /* Mobile: smaller images */
  .technology-img {
    max-width: 100px;
    max-height: 70px;
  }

  /* Mobile: even more compact cards */
  .carousel-face .card .card-title {
    font-size: 0.85rem;
  }

  .carousel-face .card .card-body p {
    font-size: 0.7rem;
  }

  .carousel-face .card .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .carousel-face:nth-child(1) {
      transform: rotateY(0deg) translateZ(300px);
  }

  .carousel-face:nth-child(2) {
      transform: rotateY(60deg) translateZ(300px);
  }

  .carousel-face:nth-child(3) {
      transform: rotateY(120deg) translateZ(300px);
  }

  .carousel-face:nth-child(4) {
      transform: rotateY(180deg) translateZ(300px);
  }

  .carousel-face:nth-child(5) {
      transform: rotateY(240deg) translateZ(300px);
  }

  .carousel-face:nth-child(6) {
      transform: rotateY(300deg) translateZ(300px);
  }

  .control-btn {
      width: 44px;
      height: 44px;
      font-size: 16px;
  }
}
