/* ========================================
   FLIGHT RADAR ANIMATION
   ======================================== */

.flight-radar-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flight-path {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 2;
  stroke-dasharray: 4, 8;
  stroke-opacity: 0.3;
  animation: pathPulse 3s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

@keyframes pathPulse {
  0%, 100% {
    stroke-opacity: 0.3;
  }
  50% {
    stroke-opacity: 0.6;
  }
}

.flight-plane {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  offset-rotate: auto;
  offset-anchor: center;
  filter: drop-shadow(0 2px 4px var(--shadow-color));
  animation: followPath linear infinite;
}

.flight-plane img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* Rotate plane 25 degrees left (counter-clockwise) relative to path direction */
  transform: rotate(-25deg);
}

@keyframes followPath {
  0% {
    offset-distance: 0%;
  }
  100% {
    offset-distance: 100%;
  }
}

/* Transition plane for page navigation */
.flight-plane--transition {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.flight-plane--transition img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transform: rotate(-25deg);
}

/* Page fade transitions */
.page-transition--fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-transition--fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   QUARTER CIRCLE NAVIGATION (Non-Homepage)
   ======================================== */

.category-nav--quarter-circle {
  position: fixed;
  z-index: 100;
  padding: 0;
  pointer-events: none;
}

/* Desktop: Top-left corner - Large Quarter Circle Fan */
@media (min-width: 769px) {
  .category-nav--quarter-circle {
    top: 0;
    left: 0;
    width: 350px;
    height: 350px;
  }
}

/* Mobile: Top-right corner - Adjusted Quarter Circle Fan */
@media (max-width: 768px) {
  .category-nav--quarter-circle {
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
  }
}

/* Navigation items */
.category-nav--quarter-circle .category-item {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-size: 1.6rem;
  opacity: 0.8;
  cursor: pointer;
  width: 50px;
  height: 50px;
  background: var(--bg-primary);
  border-radius: 50%;
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-color);
}

/* Desktop positioning - Fanned out from Home in Corner (Radiating Arc) */
/* Radius approx 180px from Home (20,20) */
@media (min-width: 769px) {
  .category-nav--quarter-circle .category-item:nth-child(1) { /* Home - The Corner Anchor */
    top: 20px;
    left: 20px;
    opacity: 1;
    z-index: 20;
    border-width: 3px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(2) { /* Blog - 10° vertical-ish */
    top: 197px;
    left: 51px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(3) { /* Art - 27.5° */
    top: 180px;
    left: 103px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(4) { /* Music - 45° diagonal */
    top: 147px;
    left: 147px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(5) { /* Poetry - 62.5° */
    top: 103px;
    left: 180px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(6) { /* Philosophy - 80° horizontal-ish */
    top: 51px;
    left: 197px;
  }
}

/* Mobile positioning - Fanned out from Top-Right Corner */
/* Radius approx 150px from Home (20,20 from right) */
@media (max-width: 768px) {
  .category-nav--quarter-circle .category-item:nth-child(1) { /* Home */
    top: 20px;
    right: 20px;
    opacity: 1;
    z-index: 20;
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(n+2) {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(2) { /* Blog */
    top: 168px;
    right: 46px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(3) { /* Art */
    top: 153px;
    right: 89px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(4) { /* Music */
    top: 126px;
    right: 126px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(5) { /* Poetry */
    top: 89px;
    right: 153px;
  }
  
  .category-nav--quarter-circle .category-item:nth-child(6) { /* Philosophy */
    top: 46px;
    right: 168px;
  }
}

/* Hover effect */
.category-nav--quarter-circle .category-item:hover {
  opacity: 1;
  transform: scale(1.15);
  text-shadow: 0 0 10px var(--link-color);
  border-color: var(--link-color);
  background: var(--bg-secondary);
  z-index: 30;
}

/* Active state */
.category-nav--quarter-circle .category-item.active {
  opacity: 1;
  transform: scale(1.2);
  border-color: var(--link-color);
  background: var(--active-highlight);
  z-index: 10;
}

/* Active indicator dot */
.category-nav--quarter-circle .category-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--link-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--link-color);
}

/* Category icon styling */
.category-icon {
  display: block;
  pointer-events: none;
  line-height: 1;
}

/* ========================================
   HOMEPAGE CIRCULAR NAVIGATION
   ======================================== */

.homepage-nav-circular {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
}

.homepage-nav-circular .nav-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-primary);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all 0.3s ease;
  z-index: 10;
}

/* Distribute 5 items in a circle (360 / 5 = 72 degrees) */
/* Starting from top (270 deg or -90 deg) */
/* Radius = 120px */

.homepage-nav-circular .nav-item:nth-child(1) { /* Blog */
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.homepage-nav-circular .nav-item:nth-child(2) { /* Art */
  top: 30%;
  left: 90%;
  transform: translate(-50%, -50%);
}

.homepage-nav-circular .nav-item:nth-child(3) { /* Music */
  top: 80%;
  left: 80%;
  transform: translate(-50%, -50%);
}

.homepage-nav-circular .nav-item:nth-child(4) { /* Poetry */
  top: 80%;
  left: 20%;
  transform: translate(-50%, -50%);
}

.homepage-nav-circular .nav-item:nth-child(5) { /* Philosophy */
  top: 30%;
  left: 10%;
  transform: translate(-50%, -50%);
}

.homepage-nav-circular .nav-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.homepage-nav-circular .nav-label {
  font-size: 0.8rem;
  font-weight: bold;
}

.homepage-nav-circular .nav-item:hover {
  transform: translate(-50%, -50%) scale(1.15);
  border-color: var(--link-color);
  box-shadow: 0 0 15px var(--link-color);
  z-index: 20;
}

/* Mobile adjustments for Homepage Circular Nav */
@media (max-width: 480px) {
  .homepage-nav-circular {
    width: 260px;
    height: 260px;
  }

  .homepage-nav-circular .nav-item {
    width: 65px;
    height: 65px;
  }

  .homepage-nav-circular .nav-icon {
    font-size: 1.6rem;
  }

  .homepage-nav-circular .nav-label {
    font-size: 0.7rem;
  }
}
