/* 3D Pin Effect Styles */

.pin-container {
  position: relative;
  z-index: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  height: 25rem;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.pin-container:hover {
  z-index: 100;
}

.pin-perspective-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  perspective: 1000px;
}

.pin-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 1rem;
  background-color: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.7s ease, border-color 0.3s ease;
  transform: translate(-50%, -50%) rotateX(0deg) scale(1);
}

.pin-container:hover .pin-card {
  transform: translate(-50%, -50%) rotateX(40deg) scale(0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.pin-card-content {
  position: relative;
  z-index: 50;
}

/* Pin Perspective Hover Effect */
.pin-hover-area {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 24rem;
  height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 60;
  transition: opacity 0.5s ease;
}

.pin-container:hover .pin-hover-area {
  opacity: 1;
}

.pin-hover-inner {
  width: 100%;
  height: 100%;
  flex: none;
  position: relative;
  inset: 0;
}

/* Title Link */
.pin-title-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.pin-title-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  border-radius: 9999px;
  background-color: #09090b;
  padding: 0.125rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.pin-title-text {
  position: relative;
  z-index: 20;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  padding: 0.125rem 0;
}

.pin-title-glow {
  position: absolute;
  bottom: 0;
  left: 1.125rem;
  height: 1px;
  width: calc(100% - 2.25rem);
  background: linear-gradient(to right, transparent 0%, rgba(52, 211, 153, 0.9) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pin-container:hover .pin-title-glow {
  opacity: 0.4;
}

/* Animated Circles */
.pin-circles-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: 0.09375rem;
  margin-top: 1rem;
  transform: translateX(-50%) translateY(-50%);
  perspective: 1000px;
}

.pin-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 11.25rem;
  width: 11.25rem;
  border-radius: 50%;
  background-color: rgba(14, 165, 233, 0.08);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%) translateY(-50%) scale(0);
  opacity: 0;
}

.pin-container:hover .pin-circle {
  animation: pinCirclePulse 6s ease-in-out infinite;
}

.pin-container:hover .pin-circle:nth-child(1) {
  animation-delay: 0s;
}

.pin-container:hover .pin-circle:nth-child(2) {
  animation-delay: 2s;
}

.pin-container:hover .pin-circle:nth-child(3) {
  animation-delay: 4s;
}

@keyframes pinCirclePulse {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0);
  }
  16.67% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
}

/* Pin Line Effect */
.pin-line {
  position: absolute;
  right: 50%;
  bottom: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, #06b6d4 100%);
  transform: translateY(14px);
  transition: height 0.3s ease;
}

.pin-line-blur {
  height: 5rem;
  filter: blur(2px);
}

.pin-line-solid {
  height: 5rem;
}

.pin-container:hover .pin-line {
  height: 10rem;
}

/* Pin Dot */
.pin-dot {
  position: absolute;
  right: 50%;
  bottom: 50%;
  border-radius: 50%;
  transform: translateX(1.5px) translateY(14px);
  z-index: 40;
}

.pin-dot-blur {
  width: 4px;
  height: 4px;
  background-color: #0891b2;
  filter: blur(3px);
}

.pin-dot-solid {
  width: 2px;
  height: 2px;
  background-color: #67e8f9;
  transform: translateX(0.5px) translateY(14px);
}

/* Project Card with 3D Pin */
.project-pin-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  letter-spacing: -0.025em;
  color: rgba(241, 245, 249, 0.5);
  width: 20rem;
  min-height: 20rem;
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.5) 0%, transparent 100%);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
}

.project-pin-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-pin-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.project-pin-status {
  font-size: 0.75rem;
  color: #94a3b8;
}

.project-pin-content {
  flex: 1;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-pin-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.project-pin-description {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.project-pin-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-pin-tech-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background-color: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border-radius: 9999px;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.project-pin-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 1rem;
}

.project-pin-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.project-pin-link {
  color: #38bdf8;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-pin-link:hover {
  color: #7dd3fc;
}

/* Responsive Grid */
.pin-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  padding: 1.5rem 0;
  justify-items: center;
  align-items: start;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .pin-projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1.5rem 0;
  }
}

@media (min-width: 1024px) {
  .pin-projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 2rem 0;
  }
}

@media (min-width: 1200px) {
  .pin-container {
    max-width: 26rem;
  }
  
  .project-pin-card {
    width: 22rem;
  }
}

@media (min-width: 1400px) {
  .pin-container {
    max-width: 28rem;
  }
  
  .project-pin-card {
    width: 24rem;
  }
}

@media (min-width: 1024px) {
  .pin-projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .pin-container {
    height: 20rem;
    max-width: 100%;
    width: 100%;
  }
  
  .pin-hover-area {
    width: 100%;
    height: 14rem;
  }
  
  .project-pin-card {
    width: 100%;
    min-height: 14rem;
  }
  
  .pin-circle {
    height: 7rem;
    width: 7rem;
  }
  
  .pin-projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
    justify-items: stretch;
  }
  
  /* Reduced 3D effect on mobile for better performance */
  .pin-container:hover .pin-card {
    transform: translate(-50%, -50%) rotateX(20deg) scale(0.9);
  }
  
  /* Enhanced mobile touch targets */
  .project-pin-link {
    padding: 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pin-container {
    height: 18rem;
    width: 100%;
  }
  
  .pin-hover-area {
    width: 100%;
    height: 13rem;
  }
  
  .project-pin-card {
    width: 100%;
    min-height: 13rem;
    padding: 1rem;
  }
  
  .pin-circle {
    height: 6rem;
    width: 6rem;
  }
  
  .pin-projects-grid {
    gap: 1rem;
    justify-items: stretch;
  }
  
  .project-pin-title {
    font-size: 1.25rem;
  }
  
  .project-pin-description {
    font-size: 0.8rem;
  }
  
  .project-pin-tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  .project-pin-link {
    font-size: 0.8rem;
  }
}

/* Small mobile devices */
@media (max-width: 400px) {
  .pin-container {
    height: 17rem;
  }
  
  .pin-hover-area {
    height: 12rem;
  }
  
  .project-pin-card {
    min-height: 12rem;
    padding: 0.875rem;
  }
  
  .project-pin-title {
    font-size: 1.15rem;
  }
  
  .project-pin-description {
    font-size: 0.775rem;
  }
  
  .project-pin-tech-tag {
    font-size: 0.675rem;
    padding: 0.175rem 0.45rem;
  }
  
  .project-pin-link {
    font-size: 0.775rem;
  }
}

/* Extra small devices */
@media (max-width: 320px) {
  .pin-container {
    height: 15rem;
  }
  
  .pin-hover-area {
    height: 10rem;
  }
  
  .project-pin-card {
    min-height: 10rem;
    padding: 0.75rem;
  }
  
  .project-pin-title {
    font-size: 1rem;
  }
  
  .project-pin-description {
    font-size: 0.7rem;
  }
  
  .project-pin-tech-tag {
    font-size: 0.6rem;
    padding: 0.125rem 0.35rem;
  }
  
  .project-pin-link {
    font-size: 0.7rem;
  }
}
