/* ==========================================================================
   THE NEURAL SQUARE — UI Components (Formal White Academic Theme)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Top Organization Announcement Bar
   -------------------------------------------------------------------------- */
.top-announcement-bar {
  background: #091e42;
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  font-weight: 500;
  border-bottom: 1px solid #1e293b;
  position: relative;
  z-index: 1050;
}

.top-announcement-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-motto-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #38bdf8;
  text-transform: uppercase;
}

.top-announcement-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.top-announcement-links a:hover {
  color: #38bdf8;
}

@media (max-width: 768px) {
  .top-announcement-links {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Sticky Navigation Bar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  overflow: hidden;
}

.brand-link:hover .brand-logo-badge {
  transform: scale(1.04);
  border-color: var(--accent-primary);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #091e42;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-tagline-visible {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.mobile-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-toggle.active .bar-1 {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active .bar-2 {
  opacity: 0;
}
.mobile-toggle.active .bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: calc(var(--nav-height) + 32px);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height) - 32px);
  background: #ffffff;
  padding: 2rem 1.5rem;
  flex-direction: column;
  justify-content: space-between;
  z-index: 999;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.mobile-nav-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-catalog-link {
  color: #ffffff;
  background: var(--accent-primary);
  border: 1px solid #1e40af;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.18);
}

.nav-catalog-link:hover,
.nav-catalog-link.active {
  color: #ffffff;
  background: #1e40af;
}

.nav-catalog-link::after {
  display: none;
}

@media (max-width: 1180px) {
  .nav-links,
  .nav-actions .btn-nav-hide {
    display: none;
  }
  .mobile-toggle, .mobile-drawer {
    display: flex;
  }
}

/* Current workshop facts: a clear four-cell summary on the homepage. */
.side-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.side-specs-grid .side-spec-item {
  display: flex;
  min-height: 78px;
  padding: 1rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}

.side-specs-grid .side-spec-item:nth-child(2n) {
  border-right: 0;
}

.side-specs-grid .side-spec-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.side-specs-grid .side-spec-item:nth-child(1) {
  background: #e0f2fe;
}

.side-specs-grid .side-spec-item:nth-child(2) {
  background: #ede9fe;
}

.side-specs-grid .side-spec-item:nth-child(3) {
  background: #dffaf2;
}

.side-specs-grid .side-spec-item:nth-child(4) {
  background: #fff4d6;
}

.side-specs-grid .side-spec-item:nth-child(1) .side-spec-label { color: #075985; }
.side-specs-grid .side-spec-item:nth-child(2) .side-spec-label { color: #5b21b6; }
.side-specs-grid .side-spec-item:nth-child(3) .side-spec-label { color: #0f766e; }
.side-specs-grid .side-spec-item:nth-child(4) .side-spec-label { color: #a16207; }

.side-specs-grid .side-spec-label {
  color: #1e4f82;
  font-size: 0.82rem;
  font-weight: 800;
}

.side-specs-grid .side-spec-val {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .side-specs-grid {
    grid-template-columns: 1fr;
  }

  .side-specs-grid .side-spec-item,
  .side-specs-grid .side-spec-item:nth-child(2n),
  .side-specs-grid .side-spec-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
  }

  .side-specs-grid .side-spec-item:last-child {
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2);
}

.btn-primary:hover {
  background: #1e40af;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: #94a3b8;
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.95rem;
  font-size: 0.86rem;
}

.btn-lg {
  padding: 0.9rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-status.active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-status.active .indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
}

/* --------------------------------------------------------------------------
   Hero Split Layout with Adjacent Workshop Box
   -------------------------------------------------------------------------- */
.hero-split-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.75rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero-main-column {
  display: flex;
  flex-direction: column;
  position: relative;
}

.hero-title-group {
  margin-bottom: 1.5rem;
}

.hero-manifesto-quote { display: none; }

.hero-build-mission {
  margin-top: 0.65rem;
  color: var(--accent-primary);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero-main-title {
  margin-bottom: 0.65rem;
}

.hero-manifesto-quote {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.hero-lead-text {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.instructor-credentials {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
}

.instructor-credentials > span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.instructor-credentials strong {
  color: #172554;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.instructor-credentials small {
  font-size: 0.78rem;
  color: #64748b;
}

.lecture-instructor-credentials {
  gap: 1.25rem;
}

/* Adjacent Current Workshop Box (Aesthetic & Sleek) */
main {
  display: flex;
  flex-direction: column;
}

main > section {
  order: 2;
}

#workshops {
  order: 2;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

#home {
  order: 1;
}

.workshop-side-box {
  background:
    radial-gradient(circle at 92% 7%, rgba(56, 189, 248, 0.22), transparent 28%),
    linear-gradient(145deg, #eff6ff 0%, #eef2ff 52%, #ecfeff 100%);
  border: 1px solid #93c5fd;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 18px 40px -20px rgba(29, 78, 216, 0.38);
  position: relative;
  overflow: hidden;
  top: auto;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.side-box-orbit {
  position: absolute;
  width: 210px;
  height: 210px;
  right: -82px;
  top: -92px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 50%;
  pointer-events: none;
}

.side-box-orbit::before,
.side-box-orbit::after {
  content: '';
  position: absolute;
  inset: 25px;
  border: 1px dashed rgba(79, 70, 229, 0.26);
  border-radius: 50%;
}

.side-box-orbit::after {
  inset: 57px;
  border-style: solid;
  background: rgba(56, 189, 248, 0.13);
}

.side-box-orbit span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.14);
}

.side-box-orbit span:nth-child(1) { left: 21px; top: 72px; }
.side-box-orbit span:nth-child(2) { right: 31px; top: 102px; background: #818cf8; }
.side-box-orbit span:nth-child(3) { left: 88px; bottom: 25px; background: #34d399; }

.workshop-side-box:hover {
  box-shadow: 0 16px 36px -6px rgba(29, 78, 216, 0.16);
}

.side-box-header {
  position: relative;
  z-index: 1;
  margin: -1.75rem -1.75rem 1rem;
  padding: 1.45rem 1.75rem 1.3rem;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 0;
  background: linear-gradient(120deg, #1d4ed8 0%, #4338ca 52%, #0891b2 100%);
  box-shadow: 0 12px 28px -18px rgba(37, 99, 235, 0.9);
}

.side-box-header::after {
  content: '';
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -4.5rem;
  top: -7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: -4.5rem 6rem 0 -3rem rgba(45, 212, 191, 0.18);
}

.side-box-tag {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  color: #dbeafe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  display: block;
}

.side-box-tag i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #5eead4;
  border-radius: 50%;
  margin-right: 0.35rem;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.side-box-title {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.side-box-fee-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.side-box-price {
  font-size: 1.9rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #1d4ed8;
}

.side-box-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.side-specs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.side-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.side-teaser-hook {
  position: relative;
  z-index: 1;
  font-size: 0.94rem;
  color: #e0f2fe;
  line-height: 1.65;
  margin-bottom: 0;
}

.side-specs-list,
.side-box-checklist {
  display: none;
}

/* Show the current workshop's four requested facts on the homepage. */
.side-specs-list.side-specs-grid {
  display: grid;
  margin: 0 0 1.15rem;
}

.side-box-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.side-runtime-line {
  margin: 1rem 0 1.15rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(129, 140, 248, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(238, 242, 255, 0.78);
  color: #4338ca;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.runtime-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.side-enroll-btn {
  background: linear-gradient(100deg, #1d4ed8 0%, #4f46e5 55%, #0891b2 100%);
  border: 0;
  box-shadow: 0 10px 20px -10px rgba(67, 56, 202, 0.72);
  justify-content: space-between;
}

.side-enroll-btn:hover {
  background: linear-gradient(100deg, #1e40af 0%, #4338ca 55%, #0e7490 100%);
}

/* --------------------------------------------------------------------------
   Aesthetic Workshop Teaser Cards (Priority #1 Section)
   Premium look: gradient top accent, icon glow, depth, rich hover
   -------------------------------------------------------------------------- */
.workshop-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .workshop-teaser-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .workshop-teaser-grid {
    grid-template-columns: 1fr;
  }
}

.workshop-teaser-card {
  background: #ffffff;
  border: 1px solid #e8eef6;
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease;
  overflow: hidden;
}

/* Colorful top gradient bar per card using nth-child */
.workshop-teaser-card::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #1d4ed8 0%, #4338ca 100%);
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.workshop-teaser-card:nth-child(2)::before {
  background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 100%);
}
.workshop-teaser-card:nth-child(3)::before {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}
.workshop-teaser-card:nth-child(4)::before {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}
.workshop-teaser-card:nth-child(5)::before {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}
.workshop-teaser-card:nth-child(6)::before {
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.teaser-card-body {
  padding: 1.35rem 1.45rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.workshop-teaser-card:hover {
  transform: translateY(-6px);
  border-color: #c7d9f8;
  box-shadow: 0 20px 40px -8px rgba(29, 78, 216, 0.14),
              0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.workshop-teaser-card.active-cohort {
  border: 1.5px solid #93c5fd;
  background: linear-gradient(145deg, #dbeafe 0%, #f8fbff 58%, #ffffff 100%);
}

.workshop-teaser-card.active-cohort::before {
  height: 5px;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 50%, #4338ca 100%);
}

/* Give every workshop its own recognizable color family. */
.workshop-teaser-card:nth-child(2) {
  background: linear-gradient(145deg, #e0f2fe 0%, #f7fcff 58%, #ffffff 100%);
  border-color: #bae6fd;
}

.workshop-teaser-card:nth-child(3) {
  background: linear-gradient(145deg, #f3e8ff 0%, #fcf9ff 58%, #ffffff 100%);
  border-color: #ddd6fe;
}

.workshop-teaser-card:nth-child(4) {
  background: linear-gradient(145deg, #dffaf2 0%, #f7fffc 58%, #ffffff 100%);
  border-color: #a7f3d0;
}

.workshop-teaser-card:nth-child(5) {
  background: linear-gradient(145deg, #fff1cc 0%, #fffaf0 58%, #ffffff 100%);
  border-color: #fde68a;
}

.workshop-teaser-card:nth-child(6) {
  background: linear-gradient(145deg, #dff7f5 0%, #f5fffe 58%, #ffffff 100%);
  border-color: #99f6e4;
}

.workshop-teaser-card:nth-child(2) .teaser-action-link { color: #0369a1; }
.workshop-teaser-card:nth-child(3) .teaser-action-link { color: #6d28d9; }
.workshop-teaser-card:nth-child(4) .teaser-action-link { color: #047857; }
.workshop-teaser-card:nth-child(5) .teaser-action-link { color: #b45309; }
.workshop-teaser-card:nth-child(6) .teaser-action-link { color: #0f766e; }

.teaser-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.teaser-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.12);
  transition: transform 0.18s ease;
}

.workshop-teaser-card:hover .teaser-icon {
  transform: scale(1.08) rotate(-3deg);
}

.teaser-domain-tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.teaser-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #091e42;
  margin-bottom: 0.6rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.teaser-hook {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.teaser-spec-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.teaser-action-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-primary);
  transition: gap 0.18s ease;
}

.workshop-teaser-card:hover .teaser-action-link {
  gap: 0.7rem;
}

/* A small, repeatable binary puzzle tucked into the homepage corner */
.signal-puzzle { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1200; font-family: var(--font-sans); }
.signal-puzzle-toggle, .signal-puzzle-panel { box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2); }
.signal-puzzle-toggle { border: 1px solid rgba(125, 211, 252, 0.42); border-radius: var(--radius-pill); background: linear-gradient(110deg, #172554, #3730a3); color: #fff; padding: 0.7rem 1rem; font: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; }
.signal-puzzle-icon { color: #67e8f9; margin-right: 0.35rem; }
.signal-puzzle-panel { width: min(290px, calc(100vw - 2.5rem)); margin-bottom: 0.7rem; border: 1px solid #334155; border-radius: 16px; padding: 1rem; color: #e2e8f0; background: radial-gradient(circle at top right, #312e81, #0f172a 62%); }
.signal-puzzle-head, .signal-puzzle-foot, .signal-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; }
.signal-puzzle-kicker { display: block; margin-bottom: 0.1rem; color: #67e8f9; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; }
.signal-puzzle-panel p { margin: 0.7rem 0; color: #cbd5e1; font-size: 0.78rem; line-height: 1.45; }
.signal-puzzle-close { border: 0; background: transparent; color: #cbd5e1; font-size: 1.25rem; cursor: pointer; }
.signal-display { min-height: 42px; display: grid; place-items: center; margin-bottom: 0.7rem; border: 1px solid rgba(103, 232, 249, 0.22); border-radius: 9px; background: rgba(2, 6, 23, 0.55); color: #67e8f9; font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.28em; }
.signal-controls { justify-content: center; margin-bottom: 0.7rem; }
.signal-controls button, .signal-puzzle-foot button { border: 1px solid rgba(103, 232, 249, 0.35); border-radius: 8px; background: #1d4ed8; color: #fff; padding: 0.42rem 0.75rem; font: inherit; font-size: 0.76rem; font-weight: 800; cursor: pointer; }
.signal-controls button { min-width: 68px; background: #1e293b; font-family: var(--font-mono); font-size: 1rem; }
.signal-controls button:hover { background: #0e7490; }
.signal-puzzle-foot { color: #94a3b8; font-size: 0.72rem; }
@media (max-width: 600px) { .signal-puzzle { right: 0.75rem; bottom: 0.75rem; } }

.hero-puzzle-slot { margin-top: 1.5rem; }
.hero-puzzle-slot .signal-puzzle { position: static; z-index: auto; }
.hero-puzzle-slot .signal-puzzle-toggle,
.hero-puzzle-slot .signal-puzzle-close { display: none; }
.hero-puzzle-slot .signal-puzzle-panel { width: 100%; margin: 0; box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.46); }



/* --------------------------------------------------------------------------
   Yesterday's Lecture Showcase & Real Event Photo Gallery
   -------------------------------------------------------------------------- */
.lecture-section-wrapper {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: clamp(4rem, 6vw, 6rem) 0;
}

.lecture-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.75rem;
}

@media (max-width: 900px) {
  .lecture-lead-grid {
    grid-template-columns: 1fr;
  }
}

.lecture-poster-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.lecture-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

.lecture-details-content h3 {
  font-size: 1.75rem;
  color: #091e42;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.lecture-venue-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.lecture-details-content p {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* Real Lecture Event Photos Grid */
.lecture-photos-grid,
.lecture-extended-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.lecture-gallery-more {
  margin-top: 1.25rem;
}

.lecture-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .lecture-photos-grid,
  .lecture-extended-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .lecture-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .lecture-photos-grid,
  .lecture-extended-grid,
  .lecture-featured-grid {
    grid-template-columns: 1fr;
  }
}

.lecture-photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  height: 220px;
  background: #f1f5f9;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lecture-photo-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lecture-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-caption-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.88) 100%);
  color: #ffffff;
  padding: 1.25rem 0.85rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Nerdy Lab: Interactive Code Terminal & Math Playground
   -------------------------------------------------------------------------- */
.nerdy-section {
  background: #091e42;
  color: #ffffff;
  padding: clamp(4rem, 6vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.nerdy-section .section-badge {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.nerdy-section .section-title {
  color: #ffffff;
}

.nerdy-section .section-subtitle {
  color: #cbd5e1;
}

.nerd-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 960px) {
  .nerd-grid {
    grid-template-columns: 1fr;
  }
}

/* Code Editor Window */
.terminal-window {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: #161b22;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}

.t-tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  background: transparent;
  color: #8b949e;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.t-tab:hover {
  color: #c9d1d9;
}

.t-tab.active {
  background: #21262d;
  color: #58a6ff;
  font-weight: 600;
}

.terminal-code-body {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e6edf3;
  overflow-x: auto;
  max-height: 320px;
  min-height: 240px;
}

.python-code-editor {
  display: block;
  width: 100%;
  min-height: 320px;
  height: 320px;
  padding: 1.25rem;
  resize: vertical;
  border: 0;
  outline: 0;
  background: #0d1117;
  color: #e6edf3;
  font: inherit;
  line-height: inherit;
  tab-size: 4;
}

.python-code-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(88, 166, 255, 0.55);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.terminal-footer {
  background: #161b22;
  border-top: 1px solid #30363d;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-runtime-status {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #8b949e;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.t-run-btn {
  background: #238636;
  color: #ffffff;
  border: 1px solid rgba(240, 246, 252, 0.1);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background var(--transition-fast);
}

.t-run-btn:hover {
  background: #2ea043;
}

.t-run-btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.t-reset-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid #30363d;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #c9d1d9;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.t-reset-btn:hover {
  border-color: #58a6ff;
  color: #ffffff;
}

.terminal-output-box {
  background: #030712;
  border-top: 1px solid #30363d;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  min-height: 70px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Nerdy Math Visualizer */
.math-playground-card {
  background: #0d1a33;
  border: 1px solid #1e3a8a;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.math-header h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.math-header p {
  color: #94a3b8;
  font-size: 0.88rem;
}

.activation-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.act-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.act-btn:hover {
  color: #ffffff;
}

.act-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

.math-canvas-wrap {
  background: #040814;
  border: 1px solid #1e3a8a;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  height: 200px;
  position: relative;
}

.math-canvas {
  width: 100%;
  height: 100%;
}

.math-formula-box {
  background: #111e3b;
  border: 1px solid #1e3a8a;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  color: #cbd5e1;
}

.formula-row:last-child {
  margin-bottom: 0;
  color: #38bdf8;
}

/* --------------------------------------------------------------------------
   Organization Profile & Pedigree
   -------------------------------------------------------------------------- */
.org-profile-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-md);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (max-width: 900px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .pillar-grid {
    grid-template-columns: 1fr;
  }
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: all var(--transition-fast);
}

.pillar-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.pillar-step {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.pillar-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: #091e42;
}

.pillar-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Modal Dialog
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.96) translateY(10px);
  transition: transform var(--transition-base);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: 1px solid var(--border-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: #ffffff;
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.modal-body {
  padding: 1.75rem 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-textarea, .form-select {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.modal-success-state {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

/* --------------------------------------------------------------------------
   Formal Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #091e42;
  color: #f8fafc;
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #38bdf8;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}
/* my fix */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap; /* the row of links stays on one line */
}

.nav-link {
  white-space: normal;   /* allow the label itself to wrap */
  text-align: center;
  line-height: 1.2;
  max-width: 90px;        /* forces longer labels to break onto 2 lines */
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;   /* vertically centers brand, links, and button together */
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: 0.75rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.brand-link,
.nav-actions {
  flex-shrink: 0;
  align-self: center;   /* stays vertically centered even as nav-links grows taller */
}


.nav-catalog-link {
  color: #ffffff;
  background: var(--accent-primary);
  border: 1px solid #1e40af;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}