:root {
  --bg: #0b0c15;
  --bg-2: #0e1022;
  --text: #e6e8f0;
  --text-dim: #a9afc3;
  --card: rgba(255, 255, 255, 0.06);
  --glass: rgba(200, 210, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.08);
  --accent: 255, 101, 132;
  --accent-2: 78, 141, 255;
  --accent-3: 90, 255, 180;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 50px rgba(0, 0, 0, 0.45);
  --blur: 10px;
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-2: #eef2f9;
  --text: #0e1320;
  --text-dim: #3f4a63;
  --card: rgba(10, 20, 60, 0.06);
  --glass: rgba(255, 255, 255, 0.65);
  --stroke: rgba(10, 20, 60, 0.1);
  --shadow-1: 0 10px 30px rgba(25, 40, 90, 0.15);
  --shadow-2: 0 12px 50px rgba(25, 40, 90, 0.2);
  --blur: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(
        1200px 600px at 80% -10%,
        rgba(var(--accent-2), 0.12),
        transparent 60%
      ),
    radial-gradient(
        900px 450px at 0% 10%,
        rgba(var(--accent), 0.14),
        transparent 60%
      ),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-2), 0.8),
    rgba(var(--accent), 0.8)
  );
  border-radius: 999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* Utility bar */
.utility-bar {
  position: relative;
  z-index: 50;
  width: 100%;
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(var(--blur));
}
.utility-bar a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}
.utility-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--accent-2), 1);
  box-shadow: 0 0 10px rgba(var(--accent-2), 0.8);
}

/* Header / Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(calc(var(--blur) + 2px));
  background: rgba(12, 16, 34, 0.4);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-left {
  justify-self: start;
}
.logo-right {
  justify-self: end;
}
.logo-img {
  display: block;
  height: 40px;
  width: auto;
}
@media (max-width: 840px) {
  .logo-img {
    height: 34px;
  }
}
.logo-img.light {
  display: none;
}
[data-theme="light"] .logo-img.dark {
  display: none;
}
[data-theme="light"] .logo-img.light {
  display: block;
}

.menu {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}
.menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.86;
  position: relative;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-2), 1),
    rgba(var(--accent), 1)
  );
  transition: transform 260ms ease;
  border-radius: 999px;
}
.menu a:hover::after {
  transform: scaleX(1);
}
.menu a.active::after {
  transform: scaleX(1);
}

/* Buttons (with leak fix) */
.btn {
  --bgbtn: rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--bgbtn);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-2), 0.45);
  box-shadow: 0 18px 40px rgba(78, 141, 255, 0.25);
}
.btn .shine {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.18),
    transparent 60%
  );
  transform: translate(var(--mx, 0), var(--my, 0));
  pointer-events: none;
  transition: transform 80ms linear;
}
.btn-primary {
  --bgbtn: linear-gradient(
    90deg,
    rgba(var(--accent-2), 0.22),
    rgba(var(--accent), 0.22)
  );
}
.btn-ghost {
  --bgbtn: transparent;
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  min-height: 82vh;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--stroke);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: blur(0.2px) saturate(1.1);
  opacity: 0.55;
  pointer-events: none;
}
.hero-gradient {
  position: absolute;
  inset: -20% -10% -30% -10%;
  background:
    radial-gradient(
        800px 500px at 10% 20%,
        rgba(var(--accent-2), 0.18),
        transparent 60%
      ),
    radial-gradient(
        900px 600px at 80% 0%,
        rgba(var(--accent), 0.18),
        transparent 60%
      );
  filter: blur(40px);
  opacity: 0.65;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 80px 20px 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}
.title {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 6.2vw, 68px);
  line-height: 1.02;
  margin: 14px 0 14px;
}
.title .gradient {
  background: linear-gradient(
    100deg,
    rgba(var(--accent-2), 1) 0%,
    rgba(var(--accent), 1) 40%,
    rgba(var(--accent-3), 1) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  color: var(--text-dim);
  font-size: clamp(16px, 1.8vw, 18px);
  max-width: 60ch;
}
.hero-cta {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(var(--blur));
  width: fit-content;
}
.hero-badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent-3), 1),
    rgba(var(--accent-2), 1)
  );
  box-shadow:
    0 0 0 4px rgba(var(--accent-2), 0.2),
    0 0 22px rgba(var(--accent-2), 0.65);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0.9;
}
.scroll-hint .mouse {
  width: 20px;
  height: 30px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  position: relative;
  background: transparent;
}
[data-theme="light"] .scroll-hint .mouse {
  border: 2px solid rgba(0, 0, 0, 0.45);
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
  animation: wheel 1100ms ease-in-out infinite;
}
[data-theme="light"] .scroll-hint .mouse::after {
  background: rgba(0, 0, 0, 0.65);
}
@keyframes wheel {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
}

/* Sections */
section {
  position: relative;
  z-index: 1;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 20px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}
.section-title {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: clamp(22px, 3.2vw, 34px);
  margin: 0;
}
.section-sub {
  color: var(--text-dim);
  max-width: 60ch;
  font-size: 14px;
}

/* About / stat cards */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}
.card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.12),
    transparent 60%
  );
  transform: rotate(12deg);
  pointer-events: none;
}
.card-title {
  margin-top: 0;
}
.card-title-sm {
  margin: 6px 0 4px;
}
.card-text {
  margin-top: 4px;
  color: var(--text-dim);
}
.made-in {
  margin-top: 14px;
}
.about-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.about-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  color: rgba(var(--accent-2), 1);
  background: rgba(var(--accent-2), 0.12);
  border: 1px solid rgba(var(--accent-2), 0.3);
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.stat {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.stat .num {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.stat .label {
  color: var(--text-dim);
  font-size: 12px;
}

/* Live/Upcoming blocks */
.live {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
}
.live .thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(
        60px 60px at 70% 20%,
        rgba(255, 255, 255, 0.12),
        transparent
      ),
    var(--img, url("https://picsum.photos/seed/live/200/200")) center/cover
      no-repeat;
}
.live .live-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live .badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-3), 0.4);
  background: rgba(var(--accent-3), 0.12);
  color: rgba(var(--accent-3), 1);
}
.live[data-status="live"] .badge {
  border-color: rgba(var(--accent), 0.5);
  background: rgba(var(--accent), 0.15);
  color: rgba(var(--accent), 1);
}
.live[data-status="offline"] .badge {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}
.live .live-name {
  font-weight: 800;
}
.live .live-sub {
  color: var(--text-dim);
  font-size: 12px;
}
.countdown {
  font-family: ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}

/* Events carousel - infinite drag (no snap) */
.carousel {
  position: relative;
  overflow: visible;
}
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.track.dragging {
  cursor: grabbing;
}
.track::-webkit-scrollbar {
  display: none;
}
#events .event,
#events .event * {
  user-select: none;
  -webkit-user-select: none;
}
.card.event {
  padding: 0;
  height: 320px;
  display: grid;
  grid-template-rows: 1fr auto;
  perspective: 700px;
}
.event .media {
  position: relative;
  overflow: hidden;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
.event img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 600ms ease;
}
.event:hover img {
  transform: scale(1.08);
}
.event .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 10, 24, 0.9), transparent 50%);
}
.event .meta {
  padding: 14px 16px 16px;
  display: grid;
  gap: 8px;
}
.tag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: rgba(var(--accent-3), 1);
  background: rgba(var(--accent-3), 0.12);
  border: 1px solid rgba(var(--accent-3), 0.4);
  padding: 6px 10px;
  border-radius: 999px;
  width: fit-content;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.carousel .arrows {
  position: absolute;
  top: -56px;
  right: 0;
  display: flex;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Gallery - exactly 3 x 2 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
}
.gallery-grid .tile {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  position: relative;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
}
.gallery-grid .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-grid .tile:hover img {
  transform: scale(1.06);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 10, 24, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--stroke);
}

/* Yearbook & Updates - compact media cards */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 840px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}
.media-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
}
@media (max-width: 700px) {
  .media-card {
    grid-template-columns: 1fr;
  }
}
.media-img {
  height: 180px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 50px rgba(78, 141, 255, 0.18);
  position: relative;
}
.yearbook-img {
  background:
    linear-gradient(
        135deg,
        rgba(var(--accent-2), 0.22),
        rgba(var(--accent), 0.2)
      ),
    url("https://picsum.photos/seed/yearbook/1200/800") center/cover no-repeat;
}
.updates-img {
  background:
    linear-gradient(
        135deg,
        rgba(var(--accent-3), 0.22),
        rgba(var(--accent-2), 0.2)
      ),
    url("https://picsum.photos/seed/volume037/1200/800") center/cover no-repeat;
}
.media-body .hero-cta {
  margin-top: 10px;
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 720px) {
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .team {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.member {
  padding: 18px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--img, url("https://picsum.photos/seed/avatar/300/300")) center/cover
      no-repeat;
}
.member h4 {
  margin: 0;
  font-weight: 800;
}
.role {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: -2px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  font-size: 11px;
  color: rgba(var(--accent-2), 1);
  background: rgba(var(--accent-2), 0.12);
  border: 1px solid rgba(var(--accent-2), 0.3);
  padding: 6px 10px;
  border-radius: 999px;
  width: fit-content;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.map {
  height: 360px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(
        120deg,
        rgba(var(--accent-2), 0.24),
        rgba(var(--accent), 0.22)
      ),
    url("https://picsum.photos/seed/campusmap/1200/800") center/cover no-repeat;
  position: relative;
}
.form {
  display: grid;
  gap: 12px;
}
.input {
  position: relative;
  padding-top: 10px;
}
.input input,
.input textarea {
  width: 100%;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  font: inherit;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.input textarea {
  min-height: 120px;
  resize: vertical;
}
.input label {
  position: absolute;
  left: 12px;
  top: -8px;
  font-size: 11px;
  color: var(--text-dim);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  pointer-events: none;
}
.input input:focus,
.input textarea:focus {
  border-color: rgba(var(--accent-2), 0.5);
  box-shadow: 0 12px 36px rgba(78, 141, 255, 0.22);
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
footer {
  border-top: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--text-dim);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.footer-links {
  display: flex;
  gap: 12px;
}
.credit {
  font-size: 12px;
}

/* Bottom color switcher */
.switcher {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(calc(var(--blur) - 2px));
  box-shadow: var(--shadow-1);
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  cursor: pointer;
}
.swatch.theme {
  font-size: 16px;
  display: grid;
  place-items: center;
  background: transparent;
}
.swatch.ocean {
  background: linear-gradient(
    135deg,
    rgba(78, 141, 255, 1),
    rgba(255, 101, 132, 1),
    rgba(90, 255, 180, 1)
  );
}
.swatch.violet {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 1),
    rgba(99, 102, 241, 1),
    rgba(244, 114, 182, 1)
  );
}
.swatch.sunset {
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 1),
    rgba(239, 68, 68, 1),
    rgba(250, 204, 21, 1)
  );
}
.swatch.emerald {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 1),
    rgba(59, 130, 246, 1),
    rgba(34, 197, 94, 1)
  );
}
.swatch.amber {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 1),
    rgba(99, 102, 241, 1),
    rgba(244, 63, 94, 1)
  );
}

/* Reveal animations, tilt, micro interactions, progress, cursor */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 600ms ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
}
.stagger.visible > * {
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stagger.visible > *:nth-child(1) {
  animation-delay: 30ms;
}
.stagger.visible > *:nth-child(2) {
  animation-delay: 120ms;
}
.stagger.visible > *:nth-child(3) {
  animation-delay: 210ms;
}
.stagger.visible > *:nth-child(4) {
  animation-delay: 300ms;
}
.stagger.visible > *:nth-child(5) {
  animation-delay: 390ms;
}
.stagger.visible > *:nth-child(6) {
  animation-delay: 480ms;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.tilt {
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  transition: transform 120ms ease;
}
.tilt .shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px 200px at var(--px, 50%) var(--py, 50%),
    rgba(255, 255, 255, 0.1),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0.6;
}
.magnetic {
  position: relative;
  transition: transform 140ms ease;
}
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-2), 1),
    rgba(var(--accent), 1),
    rgba(var(--accent-3), 1)
  );
  z-index: 120;
  box-shadow: 0 4px 14px rgba(78, 141, 255, 0.5);
}
.cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent-3), 0.9),
    rgba(var(--accent-2), 0.9)
  );
  pointer-events: none;
  z-index: 150;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* Responsive tweaks */
@media (max-width: 840px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .menu {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .gallery-grid .tile img,
  [data-reveal],
  .stagger > * {
    transition: none !important;
    animation: none !important;
  }
  .hero-canvas,
  .cursor {
    display: none !important;
  }
}

/* ============================= */
/* About page extras and fixes   */
/* ============================= */

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px) {
  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.value {
  padding: 20px;
}
.value-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 10px;
}
.value-title {
  margin: 6px 0 6px;
}

/* Timeline */
.timeline {
  position: relative;
  margin-left: 12px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.06)
  );
}
.titem {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.tnode {
  position: relative;
  top: 12px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent-3), 1),
    rgba(var(--accent-2), 1)
  );
  box-shadow: 0 0 0 4px rgba(78, 141, 255, 0.18);
}
.tcard {
  padding: 18px;
}
.tmeta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.tbadge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-2), 0.4);
  background: rgba(var(--accent-2), 0.12);
  color: rgba(var(--accent-2), 1);
}
.tTitle {
  margin: 6px 0 6px;
}

/* Chapters */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px) {
  .chapters-grid {
    grid-template-columns: 1fr;
  }
}
.chapter-img {
  height: 160px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.02)
      ),
    var(--img, url("https://picsum.photos/seed/chapter/800/600")) center/cover
      no-repeat;
  margin-bottom: 12px;
}
.chapter-title {
  margin: 8px 0 6px;
}

/* Quick Facts smoothing + correct icon placement */
#facts .stat.card {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.015)
    ),
    var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#facts .stat.card::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 80%;
  border-radius: inherit;
  background: radial-gradient(
    900px 460px at 12% 0%,
    rgba(255, 255, 255, 0.08),
    transparent 60%
  );
  filter: blur(14px);
  pointer-events: none;
  opacity: 0.9;
}
#facts .stats .stat {
  position: relative;
  padding-right: 84px;
  overflow: hidden;
}
#facts .stats .stat > * {
  position: relative;
  z-index: 2;
}
#facts .stats .stat::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-2), 0.35),
    rgba(var(--accent), 0.35)
  );
  -webkit-mask: var(--ico) center/60% no-repeat;
  mask: var(--ico) center/60% no-repeat;
  z-index: 1;
  opacity: 0.95;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}
#facts .stats .stat:nth-child(1) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M16 11a3 3 0 1 0-3-3a3 3 0 0 0 3 3Zm-8 0a3 3 0 1 0-3-3a3 3 0 0 0 3 3Zm0 2c-2.67 0-8 1.34-8 4v3h10v-3c0-1.04.37-1.9.99-2.63A13.5 13.5 0 0 0 8 13Zm8 0c-.91 0-1.76.1-2.53.28A4.52 4.52 0 0 1 15 17v3h9v-3c0-2.66-5.33-4-8-4Z'/></svg>");
}
#facts .stats .stat:nth-child(2) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 14H5V9h14v9Z'/></svg>");
}
#facts .stats .stat:nth-child(3) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 21h6v-1H9v1Zm3-19a7 7 0 0 0-4 12.9V17h8v-2.1A7 7 0 0 0 12 2Z'/></svg>");
}
#facts .stats .stat:nth-child(4) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M3 3h8v8H3V3Zm10 0h8v8h-8V3ZM3 13h8v8H3v-8Zm10 0h8v8h-8v-8Z'/></svg>");
}
#facts .stats .stat:nth-child(5) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M4 6h16v2H4V6Zm0 4h16v2H4v-2Zm0 4h10v2H4v-2Z'/></svg>");
}
#facts .stats .stat:nth-child(6) {
  --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M12 17.27L18.18 21 16.54 13.97 22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>");
}

/* FAQ smoothing and interaction */
#faqs .faq {
  display: grid;
  gap: 16px;
}
#faqs .faq-item.card {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.015)
    ),
    var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden; 
}
#faqs .faq-item.card::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 70%;
  border-radius: inherit;
  background: radial-gradient(
    900px 460px at 12% 0%,
    rgba(255, 255, 255, 0.08),
    transparent 60%
  );
  filter: blur(12px);
  pointer-events: none;
  opacity: 0.9;
}
#faqs .faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
#faqs .faq-a {
  padding: 0 18px 18px;
  color: var(--text-dim);
  display: none;
}
#faqs .faq-item.open .faq-a {
  display: block;
}
#faqs .faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

/* Light theme nav bar */
[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.85);
}

/* Preloader */
html.is-loading {
  overflow: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
        900px 600px at 80% -10%,
        rgba(var(--accent-2), 0.14),
        transparent 60%
      ),
    radial-gradient(
        800px 500px at 10% 110%,
        rgba(var(--accent), 0.14),
        transparent 60%
      ),
    var(--bg);
}

[data-theme="light"] .loader {
  background:
    radial-gradient(
        900px 600px at 80% -10%,
        rgba(var(--accent-2), 0.12),
        transparent 60%
      ),
    radial-gradient(
        800px 500px at 10% 110%,
        rgba(var(--accent), 0.12),
        transparent 60%
      ),
    var(--bg);
}

.loader-glow {
  position: absolute;
  inset: -20% -10% -30% -10%;
  background:
    radial-gradient(
        700px 460px at 18% 24%,
        rgba(var(--accent-2), 0.18),
        transparent 60%
      ),
    radial-gradient(
        900px 520px at 78% 70%,
        rgba(var(--accent-3), 0.18),
        transparent 60%
      );
  filter: blur(40px);
  opacity: 0.65;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  width: min(520px, 86vw);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 26px 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    ),
    var(--glass);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(calc(var(--blur) + 2px));
  overflow: hidden;
  isolation: isolate;
}

.loader-inner::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.12),
    transparent 60%
  );
  transform: rotate(12deg);
  pointer-events: none;
}

/* Orbital motif */
.ring {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  animation: spin 12s linear infinite;
  filter: saturate(1.1);
}

.orb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent-3), 0.95),
    rgba(var(--accent-2), 0.95)
  );
  box-shadow:
    0 0 0 4px rgba(var(--accent-2), 0.18),
    0 0 22px rgba(var(--accent-2), 0.6);
  transform-origin: 56px 56px;
  opacity: 0.95;
}

.o1 {
  transform: translate(-50%, -50%) rotate(0deg) translate(56px);
  animation: orbit1 2.8s ease-in-out infinite alternate;
}
.o2 {
  transform: translate(-50%, -50%) rotate(90deg) translate(56px);
  animation: orbit2 3s ease-in-out infinite alternate;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent-2), 0.95),
    rgba(var(--accent), 0.95)
  );
}
.o3 {
  transform: translate(-50%, -50%) rotate(180deg) translate(56px);
  animation: orbit3 2.6s ease-in-out infinite alternate;
}
.o4 {
  transform: translate(-50%, -50%) rotate(270deg) translate(56px);
  animation: orbit4 3.2s ease-in-out infinite alternate;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--accent), 0.95),
    rgba(var(--accent-3), 0.95)
  );
}

/* IEEE diamond */
.mark {
  position: relative;
  margin-top: -8px;
}
.diamond {
  width: 26px;
  height: 26px;
  display: block;
  transform: rotate(45deg);
  border-radius: 6px;
  background:
    linear-gradient(
      135deg,
      rgba(var(--accent-2), 0.25),
      rgba(var(--accent), 0.25)
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.22),
      transparent 60%
    );
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 0 6px rgba(78, 141, 255, 0.08),
    0 14px 40px rgba(78, 141, 255, 0.28);
  animation: pulse 1400ms ease-in-out infinite;
}

 /* Fast logo preloader with progress */
html.is-loading {
  overflow: hidden;
}

.loader-min {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
        900px 600px at 80% -10%,
        rgba(var(--accent-2), 0.08),
        transparent 60%
      ),
    radial-gradient(
        800px 500px at 10% 110%,
        rgba(var(--accent), 0.08),
        transparent 60%
      ),
    var(--bg);
}

.loader-card.logo-only {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.015)
    ),
    var(--glass);
  box-shadow: var(--shadow-1);
  isolation: isolate;
}

/* Theme-aware swap */
.loader-logo {
  height: 40px;
  width: auto;
  display: block;
  animation: logoPulse 1.1s ease-in-out infinite;
}
.loader-logo.light {
  display: none;
}
[data-theme="light"] .loader-logo.dark {
  display: none;
}
[data-theme="light"] .loader-logo.light {
  display: block;
}

/* Glow */
.logo-glow {
  position: absolute;
  inset: -30% -20%;
  z-index: -1;
  background:
    radial-gradient(
      460px 260px at 50% 50%,
      rgba(var(--accent-2), 0.18),
      transparent 60%
    ),
    radial-gradient(
      360px 220px at 60% 40%,
      rgba(var(--accent-3), 0.16),
      transparent 60%
    ),
    radial-gradient(
      360px 220px at 40% 60%,
      rgba(var(--accent), 0.14),
      transparent 60%
    );
  filter: blur(26px) saturate(1.05);
  animation: glowShift 2.2s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Progress bar */
.min-bar {
  position: relative;
  width: 180px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.min-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-2), 1),
    rgba(var(--accent), 1),
    rgba(var(--accent-3), 1)
  );
  box-shadow: 0 4px 14px rgba(78, 141, 255, 0.5);
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.min-legend {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 11px;
  color: var(--text-dim);
}

.loader-min.hide {
  animation: fadeOutMin 200ms ease forwards;
  pointer-events: none;
}

/* Animations */
@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(var(--accent-2), 0.35))
      drop-shadow(0 0 14px rgba(var(--accent), 0.25));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 14px rgba(var(--accent-2), 0.45))
      drop-shadow(0 0 18px rgba(var(--accent-3), 0.35));
  }
}
@keyframes glowShift {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.05);
  }
}
@keyframes fadeOutMin {
  to {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loader-logo,
  .logo-glow {
    animation: none !important;
  }
}

/* Bigger loader card + elements */
.loader-card.logo-only.lg {
  padding: 24px 28px;      /* was 14px 16px */
  min-width: 320px;        /* was ~auto */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.loader-card.logo-only.lg .loader-logo {
  height: 56px;            /* was 40px */
}

.loader-card.logo-only.lg .min-bar {
  width: 260px;            /* was 180px */
  height: 6px;             /* was 5px */
}

.loader-card.logo-only.lg .min-legend {
  font-size: 12px;         /* was 11px */
}

/* Slightly wider glow for larger card (optional) */
.loader-card.logo-only.lg .logo-glow {
  inset: -36% -24%;
  filter: blur(30px);
}