/* Fourier Banner */
.fourier-banner-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 2rem;
  padding: 0;
}

.fourier-banner {
  width: 100vw;
  height: 500px;
  background: #000;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.banner-content {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.canvas-container {
  width: 100%;
  height: 500px;
  flex-shrink: 0;
  position: relative;
}

#fourierCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.overlay-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 1);
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

.overlay-text::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Home Content */
.home-content {
  padding: 0 1rem;
  max-width: 980px;
  margin: 0 auto;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--container);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(125,211,252,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  border-color: rgba(125,211,252,0.3);
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  color: var(--accent);
  margin-top: 0;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card:hover h2 {
  transform: translateX(8px);
}

.card h2::after {
  content: 'â†’';
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.card:hover h2::after {
  opacity: 1;
  transform: translateX(0);
}

.card p {
  margin: 0.75rem 0 0 0;
  line-height: 1.6;
  color: #e6eef6;
}

/* Skills Carousel */
.skills-card {
  background: var(--container);
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  overflow: hidden;
}

.skills-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  border-color: rgba(125,211,252,0.3);
}

.skills-card h2 {
  text-align: center;
  margin: 0;
  padding: 1.5rem 1rem 1rem 1rem;
  font-size: 1.6rem;
  color: var(--accent);
  position: relative;
  z-index: 10;
  background: var(--container);
}

/* Category Bookmarks */
.category-bookmarks {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0 1.5rem 1.5rem 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
  background: var(--container);
}

.category-bookmark {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: var(--container);
  color: var(--muted);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-bookmark:hover {
  background: rgba(125,211,252,0.15);
  color: var(--accent);
}

.category-bookmark.active {
  background: rgba(125,211,252,0.2);
  color: var(--accent);
  border-color: var(--accent);
}

/* Carousel Container */
.carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  z-index: 1;
}

.carousel-track {
  display: flex;
  height: 100%;
  width: fit-content;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skill Slide - Responsive widths */
.skill-slide {
  /* Mobile: 1 per view (100%) */
  width: 100vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Tablet: 2 per view (50% each) */
@media (min-width: 768px) {
  .skill-slide {
    width: 50vw;
  }
}

/* Desktop: 3 per view (33.33% each) */
@media (min-width: 1200px) {
  .skill-slide {
    width: 33.333vw;
  }
}

.skill-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.skill-slide:hover .skill-image {
  opacity: 0.65;
  transform: scale(1.05);
}

.skill-icon-large {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  background: rgba(125,211,252,0.05);
  z-index: 0;
  opacity: 0.2;
  transition: all 0.3s ease;
}

.skill-slide:hover .skill-icon-large {
  opacity: 0.3;
  transform: scale(1.1);
}

.skill-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  margin-top: auto;
}

.skill-description {
  text-align: center;
  color: #e6eef6;
  max-width: 600px;
  line-height: 1.6;
  font-size: 1.1rem;
  z-index: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.4);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  margin-bottom: auto;
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  pointer-events: none;
  z-index: 20;
}

.carousel-btn {
  background: rgba(20, 20, 20, 0.8);
  border: 2px solid rgba(125,211,252,0.4);
  color: var(--accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  pointer-events: all;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.carousel-btn:hover {
  background: rgba(20, 20, 20, 0.95);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.4);
}

/* Carousel wrapper for positioning */
.carousel-wrapper {
  position: relative;
  min-height: 500px;
}
/* ─── Testimonials Section ─────────────────────────────────── */
.testimonials-section {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-top: 0;
  background: var(--container);
  border-top: 1px solid rgba(125,211,252,0.08);
  border-bottom: 1px solid rgba(125,211,252,0.08);
  padding: 2rem 0 1.5rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.testimonials-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.testimonials-header h2 {
  font-size: 1.6rem;
  color: var(--accent);
  margin: 0;
  text-align: center;
}

/* Track wrapper — clips the scrolling cards */
.testimonials-track-wrapper {
  position: relative;
  overflow: hidden;
  /* Fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

/* The scrolling strip of cards */
.testimonials-track {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 2rem;
  /* width is set in JS once cards are built */
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.testimonials-track.grabbing {
  cursor: grabbing;
}

/* Individual card */
.testimonial-card {
  flex-shrink: 0;
  width: clamp(260px, 32vw, 360px);
  background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(125,211,252,0.12);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  pointer-events: none; /* cards themselves don't steal grab events */
}

.testimonials-track:not(.grabbing) .testimonial-card:hover {
  border-color: rgba(125,211,252,0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 16px rgba(125,211,252,0.1);
  transform: translateY(-3px);
}

.testimonial-quote {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #ccd8e4;
  position: relative;
  padding-left: 1.1rem;
}

.testimonial-quote::before {
  content: '\201C'; /* " */
  position: absolute;
  left: -0.1rem;
  top: -0.2rem;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  font-family: Georgia, serif;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 0.85rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(125,211,252,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #0f1724;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e6eef6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-title {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-org {
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Static (no-scroll) layout */
.testimonials-section.static .testimonials-track-wrapper {
  mask-image: none;
  -webkit-mask-image: none;
  overflow: visible;
}

.testimonials-section.static .testimonials-track {
  flex-wrap: wrap;
  justify-content: center;
  cursor: default;
  transform: none !important;
}

.testimonials-section.static .testimonial-card {
  pointer-events: auto;
}

.testimonials-section.static .testimonials-controls {
  display: none;
}

/* Controls bar */
.testimonials-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 2rem 0.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.testimonials-pause-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(125,211,252,0.35);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.8rem;
  line-height: 1;
}

.testimonials-pause-btn:hover {
  background: rgba(125,211,252,0.1);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(125,211,252,0.25);
}

/* Scrubber */
.testimonials-scrubber {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  outline: none;
  cursor: pointer;
  position: relative;
}

.testimonials-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(125,211,252,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonials-scrubber::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 14px rgba(125,211,252,0.7);
}

.testimonials-scrubber::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(125,211,252,0.5);
}

/* fill left of thumb */
.testimonials-scrubber {
  --scrub: 0%;
  background: linear-gradient(
    to right,
    rgba(125,211,252,0.6) 0%,
    rgba(125,211,252,0.6) var(--scrub),
    rgba(255,255,255,0.1) var(--scrub),
    rgba(255,255,255,0.1) 100%
  );
}

@media (max-width: 600px) {
  .testimonial-card {
    width: clamp(220px, 78vw, 300px);
  }
}