@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Quicksand:wght@400;600&display=swap');

/* --------- GLOBAL --------- */
:root {
  --sidebar-width: 240px; /* change once, affects layout consistently */
  --accent-1: #9fa8ff;
  --accent-2: #636bff;
  --glass: rgba(20, 20, 35, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Quicksand', sans-serif;
  background: #0b0f19;
  color: #e4e4e4;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------- BACKGROUND & PARTICLES --------- */
.background {
  background: url('images/background-stars.jpg') center/cover fixed no-repeat;
  filter: brightness(0.32);
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Moving star grid shimmer layer */
.particles::before,
.particles::after {
  content: '';
  position: fixed;
  width: 250%;
  height: 250%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: moveParticles 80s linear infinite;
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
}

/* Add a second subtle grid moving in the opposite direction */
.particles::after {
  animation: moveParticlesReverse 90s linear infinite;
  opacity: 0.08;
}

/* Canvas for floating starfield particles */
canvas.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Background grid animations */
@keyframes moveParticles {
  from { transform: translate(0, 0); }
  to { transform: translate(50px, 50px); }
}
@keyframes moveParticlesReverse {
  from { transform: translate(0, 0); }
  to { transform: translate(-50px, -50px); }
}

/* --------- SIDEBAR --------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 26px 18px;
  background: linear-gradient(180deg, rgba(12,12,20,0.92), rgba(10,10,18,0.88));
  border-right: 1px solid rgba(160, 160, 255, 0.06);
  backdrop-filter: blur(8px);
  z-index: 10; /* put sidebar above background but below content if needed */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.02);
}

.sidebar h2 {
  font-family: 'Cinzel Decorative', cursive;
  text-align: center;
  color: var(--accent-1);
  text-shadow: 0 0 10px rgba(159,168,255,0.16);
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  letter-spacing: 0.6px;
}

.sidebar nav {
  margin-top: 4px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar ul li {
  margin: 0;
}

.sidebar ul li a {
  text-decoration: none;
  color: #dcdcff;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 220ms ease, transform 150ms ease, color 220ms ease;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* stable full-width links to stop jitter/bug */
.sidebar ul li a:hover,
.sidebar ul li a:focus {
  background: rgba(150,150,255,0.08);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(99,107,255,0.06);
}

.sidebar ul li a.active {
  background: linear-gradient(90deg, rgba(100,110,255,0.12), rgba(120,130,255,0.06));
  color: #fff;
  box-shadow: 0 6px 24px rgba(99,107,255,0.12);
}

/* ensure nav isn't wider than sidebar */
.sidebar ul li a { width: 100%; box-sizing: border-box; }

/* --------- MAIN CONTENT --------- */
.content {
  margin-left: calc(var(--sidebar-width) + 20px);
  padding: 44px 40px;
  z-index: 11;
  position: relative;
  min-height: 100vh;
}

/* Header */
.glow-title {
  text-align: center;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 2.9rem;
  color: #b4b9ff;
  margin: 6px 0 20px 0;
  text-shadow: 0 0 14px rgba(167,175,255,0.4), 0 0 34px rgba(99,107,255,0.18);
  animation: glowPulse 3s infinite alternate;
  line-height: 1.05;
}

@keyframes glowPulse {
  from {
    text-shadow: 0 0 15px rgba(167,175,255,0.36), 0 0 28px rgba(99,107,255,0.16);
  }
  to {
    text-shadow: 0 0 28px rgba(198,204,255,0.48), 0 0 56px rgba(95,104,255,0.22);
  }
}

/* --------- COLUMNS: centered wrapper --------- */
.columns-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.columns {
  width: 100%;
  max-width: 1120px; /* central container width */
  display: flex;
  gap: 36px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 6px;
  box-sizing: border-box;
}

/* column box */
.column {
  background: var(--glass);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 10px 40px rgba(20,20,40,0.45), 0 0 25px rgba(120,130,255,0.06);
  flex: 1 1 48%; /* grows but won't exceed ~48% per column */
  min-width: 300px;
  max-width: 520px;
  transition: transform 0.38s cubic-bezier(.2,.9,.2,1), box-shadow 0.38s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.column:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 18px 60px rgba(30,30,60,0.5), 0 0 50px rgba(140,150,255,0.12);
}

/* responsive: single column on small screens */
@media (max-width: 860px) {
  .content { padding: 28px 20px; margin-left: calc(var(--sidebar-width) + 12px); }
  .columns { gap: 22px; }
  .column { flex: 1 1 100%; max-width: 100%; }
}

/* --------- COLUMN CONTENT --------- */
.column h2 {
  color: var(--accent-1);
  margin: 12px 0;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.35rem;
  letter-spacing: 0.6px;
  text-shadow: 0 0 10px rgba(159,168,255,0.08);
}

.column p {
  color: #d9daff;
  line-height: 1.7;
  font-size: 1.04rem;
  margin: 10px 0;
}

/* images */
.column-image {
  width: 100%;
  border-radius: 10px;
  margin: 14px 0;
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), 0 0 14px rgba(200,200,255,0.04);
  transition: transform 300ms ease, box-shadow 300ms ease;
  display: block;
  object-fit: cover;
}

.column-image:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 20px 54px rgba(80,80,140,0.22);
}

/* small cosmetic: focused*

/* --- FIX: ensure background never blocks clicks --- */
.background,
.particles {
  pointer-events: none; /* allows clicks to pass through */
  z-index: 0; /* always below sidebar/content */
}

/* --- FIX: make sure sidebar & content are clickable above all --- */
.sidebar {
  z-index: 10; /* was 9 */
}

.content {
  position: relative;
  z-index: 11; /* make sure text & links are on top of stars */
}

