/* ============= Projects Styles ============== */

/* --- BEYGLA PROJECT GRID --- */

.project-card {
  position: relative;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2.5rem;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.project-card:hover {
  /* We use TranslateY for lift, but keep the 3D rotation out to prevent glitches */
  transform: translateY(-12px);
  background: rgba(255, 255, 255, 0.03);
  border-color: transparent; /* Hides base border to let gradient border shine */

  /* THE BI-DIRECTIONAL GLOW: From your old styles */
  box-shadow:
    -15px -15px 40px -15px rgba(var(--primary-rgb), 0.3),
    15px 15px 40px -15px rgba(var(--secondary-rgb), 0.3),
    0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

/* 1. THE 50/50 GRADIENT BORDER (Top Layer) */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary) 48%, var(--secondary) 52%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 3;
}

.project-card:hover::after {
  opacity: 1;
}

/* 2. THE SPOTLIGHT (Middle Layer) */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--primary-rgb), 0.1),
    transparent 40%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

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

/* 3. CONTENT WRAPPER */
.card-content {
  position: relative;
  z-index: 2; /* Sits between spotlight and border */
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Featured Project Horizontal Split */
@media (min-width: 1024px) {
  .project-card.featured .card-content {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
  .project-card.featured .media-frame {
    width: 45%;
    margin-bottom: 0;
  }
  .project-card.featured .project-info {
    width: 55%;
  }
}

/* 4. MEDIA FRAME (Logo/Screenshot Nest) */
.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  /* CHANGE: This ensures the whole image is visible */
  object-fit: contain;

  /* Padding: Adds some breathing room so the logo doesn't touch the edges */
  padding: 2rem;

  z-index: 5;
  opacity: 0.8;
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
}

.project-card:hover .project-img {
  opacity: 1;
  /* Subtle scale up, but not enough to clip the edges */
  transform: scale(1.05);
}

/* Optional: If the image has a transparent background, 
   the media-glow will now shine through the 'empty' space */
.media-glow {
  position: absolute;
  inset: 15%; /* Concentrates the glow behind the logo */
  background: var(--primary);
  opacity: 0.1;
  filter: blur(40px);
  transition: all 0.6s ease;
}

.project-card:hover .media-glow {
  opacity: 0.25;
  transform: scale(1.4);
}

/* 5. TYPOGRAPHY */
.project-card h3 {
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}

.project-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* --- STATUS BADGES --- */
.status-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* The Glowing Dot */
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Status Variants */
.status-badge.published::before {
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
}
.status-badge.development::before {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.status-badge.incoming::before {
  background: #ffaa00;
  box-shadow: 0 0 10px #ffaa00;
}

/* --- UPDATED BUTTON WITH FA ICON --- */
.project-btn {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 1rem; /* Space for the FA icon */
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: auto;
}

.btn-icon {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.2em;
}

.project-card:hover .btn-icon {
  transform: translateX(10px) scale(1.1);
}
/* 1. The Container (The Frame) */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 1.5rem;
  display: flex; /* CRITICAL: Centers the image */
  align-items: center; /* CRITICAL: Centers vertically */
  justify-content: center; /* CRITICAL: Centers horizontally */
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* 2. The Image (The Logo) */
.project-img {
  /* Remove 'inset: 0' and 'width/height: 100%' if they are causing stretching */
  max-width: 85%; /* Ensures it never touches the edges */
  max-height: 75%; /* Gives it some vertical breathing room */
  width: auto; /* Keeps original proportions */
  height: auto; /* Keeps original proportions */

  object-fit: contain;
  z-index: 5;
  opacity: 0.8;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;

  /* Remove position: absolute if you want Flexbox to handle the centering */
  position: relative;
}

.project-card:hover .project-img {
  opacity: 1;
  transform: scale(1.1); /* Now it scales from the center perfectly */
}

/* Logic for the Icon (Font Awesome) */
.media-frame i {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .media-frame i {
  transform: scale(1.2) rotate(-5deg); /* Subtle 'pop' for icons */
}
.object-contain {
  object-fit: contain !important;
}
.object-cover {
  object-fit: cover !important;
  padding: 0 !important;
}

/* --- Project Section logo styles --- */

/* Takki Portfolio Glitch Effect */
.portfolio-takki-glitch {
  position: relative;
  color: #ffffff;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive size */
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -2px;
  z-index: 5;
  user-select: none;

  /* Initial Glitch State */
  text-shadow:
    0.05em 0 0 rgba(255, 0, 255, 0.75),
    -0.05em -0.025em 0 rgba(0, 255, 255, 0.75),
    -0.025em 0.05em 0 rgba(255, 255, 0, 0.75);
  animation: portfolio-glitch-anim 500ms infinite;
}

@keyframes portfolio-glitch-anim {
  0%,
  14% {
    text-shadow:
      0.05em 0 0 rgba(255, 0, 255, 0.75),
      -0.05em -0.025em 0 rgba(0, 255, 255, 0.75),
      -0.025em 0.05em 0 rgba(255, 255, 0, 0.75);
  }
  15%,
  49% {
    text-shadow:
      -0.05em -0.025em 0 rgba(255, 0, 255, 0.75),
      0.025em 0.025em 0 rgba(0, 255, 255, 0.75),
      -0.05em -0.05em 0 rgba(255, 255, 0, 0.75);
  }
  50%,
  99% {
    text-shadow:
      0.025em 0.05em 0 rgba(255, 0, 255, 0.75),
      0.05em 0 0 rgba(0, 255, 255, 0.75),
      0 -0.05em 0 rgba(255, 255, 0, 0.75);
  }
  100% {
    text-shadow:
      -0.025em 0 0 rgba(255, 0, 255, 0.75),
      -0.025em -0.025em 0 rgba(0, 255, 255, 0.75),
      -0.025em -0.05em 0 rgba(255, 255, 0, 0.75);
  }
}

/* Text Styling */
.zb-text-engine {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
  transition: all 0.4s ease;
}

/* Base states for SVG paths */
.zb-path-z,
.zb-path-hex,
.zb-path-accents {
  transition: all 0.5s ease;
}

.zb-path-scanner {
  opacity: 0;
}

/* --- Group Hover Effects --- */

/* 1. The Icon behavior */
.group:hover .zb-icon-svg {
  transform: scale(1.1) rotate(-5deg);
  filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.5));
}

.group:hover .zb-path-z {
  stroke: #ffffff; /* Turns white like your original code */
}

.group:hover .zb-path-hex {
  stroke: #f97316;
}

.group:hover .zb-path-scanner {
  animation: zb-scan-move 1.5s infinite linear;
}

/* 2. The Text behavior */
.group:hover .zb-text-engine {
  color: #f97316;
  text-shadow: 0 0 15px rgba(249, 115, 22, 0.8);
  transform: translateX(5px);
}

/* 3. The Scanning Animation */
@keyframes zb-scan-move {
  0% {
    y: 30;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    y: 70;
    opacity: 0;
  }
}

.vf-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  user-select: none;
  /* Fixed sizing for the card */
  transform: scale(0.7);
}

.vf-vibe {
  font-family: "Orbitron", sans-serif; /* Or your preferred font */
  font-size: 5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.vf-flow {
  font-family: "Inter", sans-serif;
  font-size: 5rem;
  font-weight: 200;
  font-style: italic;
  text-transform: lowercase;
  margin-left: 0.3rem;
  padding-right: 0.3rem;
  line-height: 1;

  /* The "Invisible Flow" Fix */
  background: linear-gradient(
    90deg,
    #00ffff,
    #ff00ff
  ); /* Fallback to your cyan/magenta */
  background: var(--primary-gradient, linear-gradient(90deg, #00ffff, #ff00ff));

  background-size: 100%;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
  color: transparent;

  display: inline-block; /* Crucial for background-clip */
}

.vf-flare {
  font-size: 3.8rem;
  font-weight: 900;
  font-style: italic;
  color: #22d3ee;
  margin-left: 0.2rem;
  line-height: 1;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover triggered by the project card .group */
.group:hover .vf-flare {
  transform: translateX(12px) rotate(5deg);
}

/* Past Project Logo Engine */
.past-beygla-wrapper {
  transform: scale(1.8); /* Boost the size for the project card */
}

.old-logo-wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  display: flex;
  position: relative;
  padding: 10px 0;
  gap: 0px;
  transition: gap 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.old-logo-letter {
  display: inline-block;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  font-size: 2.5rem;
}

/* Hover States - Triggered by the card's .group class */
.group:hover .old-logo-wordmark {
  gap: 4px;
}

.group:hover .old-logo-letter {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Specific Letter Colors */
.logo-letter-b {
  color: #00f2ff; /* Your primary electric blue */
}

.group:hover .old-logo-letter:last-child {
  color: #ff00ff; /* Your secondary magenta */
}

/* The Prism Shine Effect */
.old-logo-letter::after {
  content: attr(data-letter);
  position: absolute;
  top: 0;
  left: 0;
  color: #00f2ff;
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}

.group:hover .old-logo-letter::after {
  animation: prismShine 1.5s infinite;
}

/* Delay Logic for the wave effect */
.old-logo-letter:nth-child(2)::after {
  animation-delay: 0.1s;
}
.old-logo-letter:nth-child(3)::after {
  animation-delay: 0.2s;
}
.old-logo-letter:nth-child(4)::after {
  animation-delay: 0.3s;
}
.old-logo-letter:nth-child(5)::after {
  animation-delay: 0.4s;
}
.old-logo-letter:nth-child(6)::after {
  animation-delay: 0.5s;
}

@keyframes prismShine {
  0% {
    opacity: 0;
    transform: translateX(-3px);
  }
  50% {
    opacity: 0.5;
    transform: translateX(0px);
  }
  100% {
    opacity: 0;
    transform: translateX(3px);
  }
}

/* The Animated Underline */
.old-logo-wordmark::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #00f2ff;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
  opacity: 0;
}

.group:hover .old-logo-wordmark::after {
  width: 100%;
  opacity: 1;
}

.media-frame * {
  will-change: transform, opacity, filter;
}

.aq-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.8);
  user-select: none;
}

.aq-logo-container {
  position: relative;
  display: inline-block;
}

/* THE HAT LOGIC */
.aq-hat-wrapper {
  position: absolute;
  /* Adjust top/left until it sits perfectly on the 'a' and 'Q' */
  top: -28px;
  left: 4px;
  width: 75px;
  z-index: 10;
  transform: rotate(-12deg);
  transform-origin: bottom center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 2px #00d2ff);
}

/* Tip of the hat animation on hover */
.group:hover .aq-hat-wrapper {
  transform: rotate(0deg) translateY(-8px) scale(1.1);
  filter: drop-shadow(0 0 12px #ff007f);
}

/* THE TEXT STYLING */
.aq-text-row {
  display: flex;
  align-items: baseline;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
}

.aq-word-main {
  color: #00d2ff;
  letter-spacing: -3px;
  transition: all 0.3s ease;
}
.aq-dot {
  color: #fff;
  margin: 0 2px;
}
.aq-word-sub {
  color: #ff007f;
  letter-spacing: -3px;
  transition: all 0.3s ease;
}

/* THE "FUN" NEON PULSE EFFECT */
.group:hover .aq-word-main {
  animation: aqNeonPulseBlue 1.5s infinite;
}

.group:hover .aq-word-sub {
  animation: aqNeonPulsePink 1.5s infinite;
  animation-delay: 0.2s;
}

@keyframes aqNeonPulseBlue {
  0%,
  100% {
    text-shadow: 0 0 0px rgba(0, 210, 255, 0);
  }
  50% {
    text-shadow:
      0 0 20px rgba(0, 210, 255, 0.8),
      0 0 40px rgba(0, 210, 255, 0.4);
  }
}

@keyframes aqNeonPulsePink {
  0%,
  100% {
    text-shadow: 0 0 0px rgba(255, 0, 127, 0);
  }
  50% {
    text-shadow:
      0 0 20px rgba(255, 0, 127, 0.8),
      0 0 40px rgba(255, 0, 127, 0.4);
  }
}

/* Subtle continuous drift for the hat when idle */
@media (prefers-reduced-motion: no-preference) {
  .aq-hat-wrapper {
    animation: aqHatFloat 3s ease-in-out infinite;
  }
}

@keyframes aqHatFloat {
  0%,
  100% {
    transform: rotate(-12deg) translateY(0);
  }
  50% {
    transform: rotate(-10deg) translateY(-3px);
  }
}

.aquiz-link {
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  /* Smoother, slower transition for the glow */
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Base Colors */
.aquiz-link .aq-part {
  color: #00d2ff;
  transition: inherit;
}
.aquiz-link .aq-dot {
  color: #ffffff;
  transition: inherit;
}
.aquiz-link .aq-app {
  color: #ff007f;
  transition: inherit;
}

/* The Smooth Pulse Hover */
.aquiz-link:hover {
  /* No movement, just presence */
  animation: aqLinkPulse 2s infinite ease-in-out;
}

.aquiz-link:hover .aq-part {
  /* Multi-layered glow for "a tad bit more" intensity */
  text-shadow:
    0 0 10px rgba(0, 210, 255, 0.7),
    0 0 20px rgba(0, 210, 255, 0.3);
}

.aquiz-link:hover .aq-dot {
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 20px rgba(255, 255, 255, 0.3);
}

.aquiz-link:hover .aq-app {
  text-shadow:
    0 0 10px rgba(255, 0, 127, 0.7),
    0 0 20px rgba(255, 0, 127, 0.3);
}

/* The Pulse Animation */
@keyframes aqLinkPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
    filter: brightness(1.2);
  }
}
