:root {
    font-size: 16px; /* Base size for rem calculations */
    --space-sm: 0.75rem;  /* 12px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 1.875rem; /* 30px */
    --space-xxl: 2.5rem;  /* 40px */
    --border-radius-sm: 0.5rem;  /* 8px */
    --border-radius-md: 0.9375rem; /* 15px */
    --border-radius-lg: 1.25rem;   /* 20px */
}
.proj-info {
  background: rgba(255, 255, 255, 0.12);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);  
}
/* Hover Effect (Desktop) */
/* @media (hover: hover) {
  .proj-info:hover {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.059);
    border-color: rgba(255,255,255,0.22);
  }
} */

/* Tap Effect (Mobile) */
.proj-info:active {
 /* transform: scale(0.97);*/
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.cosmic-line {
  height: 5px;
  margin: 0.3rem 0 0.5rem; /* Space above/below */
  background: linear-gradient(90deg, 
    rgba(0,0,0,0) 0%, 
    rgba(101,84,192,0.8) 30%, 
    rgba(72,202,228,0.8) 50%, 
    rgba(101,84,192,0.8) 70%, 
    rgba(0,0,0,0) 100%);
  background-size: 200% auto;
  animation: cosmicGlow 3s linear infinite;
  border: none;
}
.cosmic-line-sm {
  height: 2px;
  width: 60%;
  background: linear-gradient(90deg, rgba(82,209,255,.8), transparent);
  border-radius: 999px;
  margin: 0.25rem 0 1rem;
}


@keyframes cosmicGlow {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}

.proj-info p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto; /* Helps with long scientific terms */
  line-height: 1.6; /* Improves readability */
}

/* References Dropdown */
.references-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s ease;
  opacity: 0;
  margin-top: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(8px);
}

.proj-info.active .references-dropdown {
  max-height: 500px; /* Adjust based on content */
  opacity: 1;
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.references-content {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #48cae4 rgba(255, 255, 255, 0.05); /* Firefox */
}

/* Chrome, Edge, Safari scrollbar styling */
.references-content::-webkit-scrollbar {
  width: 10px;
}

.references-content::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.1));
  border-radius: var(--border-radius-sm);
}

.references-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #48cae4, #6554c0);
  border-radius: var(--border-radius-sm);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.references-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #72e3f0, #8574f0);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.4);
}


.references-content p {
  margin-bottom: var(--space-sm);
  position: relative;
  padding-left: var(--space-md);
}

.references-content p::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #48cae4;
  font-weight: bold;
}

.proj-info-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proj-info-header::after {
  content: "🌌";
  display: inline-block;
  transition: transform 0.3s ease;
  margin-left: var(--space-sm);
  color: rgba(72, 202, 228, 0.8);
}

.proj-info.active .proj-info-header::after {
  transform: rotate(-180deg);
}