/* ==========================================================================
   JO-LABS LLC — Shared Design System & Layout Stylesheet
   Palette derived from the JO-LABS neon microscope brand mark:
   Deep Obsidian (#05070b), Cyan (#22d3ee), Mint (#34d399), Amber (#fb923c)
   ========================================================================== */

:root {
  --bg-base: #05070b;
  --bg-elevated: #0b1018;
  --bg-surface: #101723;
  --bg-surface-hover: #162030;
  --bg-glass: rgba(9, 13, 20, 0.78);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #22d3ee;
  --accent-mint: #34d399;
  --accent-amber: #fb923c;
  --accent-gradient: linear-gradient(135deg, #22d3ee 0%, #34d399 52%, #fb923c 100%);

  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(34, 211, 238, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.12), 0 0 80px rgba(251, 146, 60, 0.06);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container-max: 1160px;
  --header-height: 72px;
  --transition: 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.09), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(251, 146, 60, 0.07), transparent 34%),
    radial-gradient(circle at 50% 95%, rgba(52, 211, 153, 0.06), transparent 40%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle engineering dot-grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--accent-cyan);
  color: #03131a;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

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

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #000000;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.18);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.45);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background-color var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.25);
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #041016;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.34);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 10px var(--accent-mint);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-mint);
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.badge-planned {
  background: rgba(251, 146, 60, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.badge-template {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

/* ==========================================================================
   Main & Sections
   ========================================================================== */

main {
  flex: 1;
}

.section {
  padding-block: 4.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.section-title {
  margin: 0.6rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  max-width: 60ch;
  color: var(--text-secondary);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: 4.25rem 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.hero-title {
  margin: 1rem 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 1.85rem;
  max-width: 56ch;
  font-size: 1.08rem;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.meta-item span {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.hero-visual {
  position: relative;
  perspective: 1000px;
}

.logo-showcase {
  position: relative;
  padding: 1.5px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.45), rgba(52, 211, 153, 0.25), rgba(251, 146, 60, 0.4));
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 400ms ease;
  animation: logoFloat 6.5s ease-in-out infinite, logoGlow 5.5s ease-in-out infinite alternate;
  will-change: transform;
}

.logo-showcase::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 220deg,
    rgba(34, 211, 238, 0.9) 265deg,
    rgba(52, 211, 153, 0.85) 310deg,
    rgba(251, 146, 60, 0.9) 345deg,
    transparent 360deg
  );
  animation: borderSpin 8s linear infinite;
}

.logo-showcase:hover {
  animation-play-state: paused, running;
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.6),
    0 0 48px rgba(34, 211, 238, 0.24),
    0 0 90px rgba(251, 146, 60, 0.14);
}

.logo-showcase-inner {
  background: #000000;
  border-radius: calc(var(--radius-lg) - 1.5px);
  overflow: hidden;
  aspect-ratio: 4 / 4.4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.logo-showcase-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 49%;
  animation: logoBreath 5.5s ease-in-out infinite;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1), filter 450ms ease;
}

.logo-showcase:hover .logo-showcase-inner img {
  transform: scale(1.035);
  filter: brightness(1.08) saturate(1.12);
}

.logo-scanline {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 28%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(34, 211, 238, 0.04) 45%,
    rgba(34, 211, 238, 0.22) 85%,
    rgba(52, 211, 153, 0.28) 98%,
    transparent 100%
  );
  mix-blend-mode: screen;
  opacity: 0;
  animation: labScan 5.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.logo-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle 210px at var(--mx, 50%) var(--my, 50%),
    rgba(34, 211, 238, 0.16),
    rgba(251, 146, 60, 0.06) 45%,
    transparent 75%
  );
  mix-blend-mode: screen;
  transition: opacity 250ms ease;
}

.logo-showcase:hover .logo-spotlight {
  opacity: 1;
}

.logo-caption {
  position: absolute;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(5, 7, 11, 0.82);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.logo-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-mint);
}

@keyframes borderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes logoGlow {
  0% {
    box-shadow: var(--shadow-card), 0 0 32px rgba(34, 211, 238, 0.14), 0 0 65px rgba(251, 146, 60, 0.06);
  }
  100% {
    box-shadow: var(--shadow-card), 0 0 48px rgba(52, 211, 153, 0.22), 0 0 85px rgba(251, 146, 60, 0.14);
  }
}

@keyframes logoBreath {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
  }
  50% {
    transform: scale(1.018);
    filter: brightness(1.06) saturate(1.08);
  }
}

@keyframes labScan {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  72% {
    opacity: 0.7;
  }
  88%,
  100% {
    transform: translateY(390%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-showcase,
  .logo-showcase::before,
  .logo-showcase-inner img,
  .logo-scanline {
    animation: none !important;
  }

  .logo-showcase {
    transform: none !important;
  }
}

/* ==========================================================================
   Filter Controls & Search
   ========================================================================== */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.is-active {
  background: rgba(34, 211, 238, 0.14);
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.45);
}

.search-box {
  position: relative;
  min-width: 240px;
  flex: 0 1 320px;
}

.search-input {
  width: 100%;
  padding: 0.58rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

/* ==========================================================================
   Project Cards & Grids
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.projects-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transform: perspective(900px) translateY(0) rotateX(0deg) rotateY(0deg);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover,
.project-card:focus-visible {
  transform: perspective(900px) translateY(3px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  border-color: var(--border-strong);
  animation: cardHoverGlow 4.5s ease-in-out infinite alternate;
}

.project-card:hover .btn-secondary {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.project-card[hidden] {
  display: none;
}

.project-card--dashed {
  border-style: dashed;
  background: rgba(11, 16, 24, 0.6);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent-cyan);
}

.card-icon--amber {
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.28);
  color: var(--accent-amber);
}

.card-icon--mint {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
  color: var(--accent-mint);
}

.card-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.25;
}

.card-desc {
  margin: 0 0 1.15rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  flex: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.card-path {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Pillars / Lab Architecture
   ========================================================================== */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.pillar-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.pillar-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
}

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

/* ==========================================================================
   Callout / Contact Band & Subpage Layout
   ========================================================================== */

.callout-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.09), rgba(16, 23, 35, 0.95) 55%, rgba(251, 146, 60, 0.08));
  border: 1px solid var(--border-strong);
}

.callout-panel h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.callout-panel p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 56ch;
}

.page-hero {
  padding-block: 3.25rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.panel {
  padding: 1.65rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.panel h2,
.panel h3 {
  margin-top: 0;
  font-family: var(--font-display);
}

.spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.spec-list li:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-secondary);
}

.spec-value {
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-align: right;
}

.feature-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 23, 35, 0.75);
  border: 1px solid var(--border-subtle);
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.feature-list strong {
  color: var(--text-primary);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.module-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 23, 35, 0.75);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transform: perspective(900px) translateY(0) rotateX(0deg) rotateY(0deg);
  transition: transform var(--transition), border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.module-item:hover,
.module-item:focus-visible {
  transform: perspective(900px) translateY(3px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  border-color: var(--border-strong);
  background: rgba(22, 32, 48, 0.88);
  animation: cardHoverGlow 4.5s ease-in-out infinite alternate;
}

.module-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.module-item strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--text-primary);
}

.module-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan);
}

.module-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

@media (max-width: 680px) {
  .module-grid,
  .component-grid {
    grid-template-columns: 1fr;
  }
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.component-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transform: perspective(900px) translateY(0) rotateX(0deg) rotateY(0deg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.component-card:hover,
.component-card:focus-visible {
  transform: perspective(900px) translateY(3px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  border-color: var(--border-strong);
  animation: cardHoverGlow 4.5s ease-in-out infinite alternate;
}

.component-card:hover .component-link {
  text-decoration: underline;
}

.component-card[hidden] {
  display: none;
}

.component-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.component-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--text-primary);
  word-break: break-word;
}

.component-size {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.component-path {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  word-break: break-all;
}

.component-desc {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.component-funcs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.component-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.component-date {
  color: var(--text-muted);
}

.component-link {
  color: var(--accent-cyan);
  font-weight: 600;
}

.component-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Contact Cards & Partner Collaboration
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.contact-card--primary {
  border-color: rgba(34, 211, 238, 0.3);
}

.contact-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.contact-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.15rem;
}

.contact-logo-box--dark {
  background: #000000;
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.contact-logo-box--dark img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  object-position: center 49%;
}

.contact-logo-box--light {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-logo-box--light img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.contact-logo-box--nuview {
  background: #08111e;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.contact-logo-box--nuview img {
  max-height: 82%;
  max-width: 90%;
  width: auto;
  object-fit: contain;
}

.contact-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  flex: 1;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.94rem;
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list a {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  word-break: break-word;
}

.contact-list a:hover {
  text-decoration: underline;
}

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

.empty-state {
  padding: 2.5rem;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 7, 11, 0.9);
  padding-block: 2.25rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

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

  .projects-grid,
  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1.25rem 1.25rem;
    background: rgba(7, 10, 16, 0.97);
    border-bottom: 1px solid var(--border-subtle);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .projects-grid,
  .pillars-grid,
  .hero-meta {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: 3.25rem;
  }
}

/* ==========================================================================
   Hover-Only Card Logo Animation (Idle at rest; presses lower on hover)
   ========================================================================== */

@property --card-border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.project-card > *,
.module-item > *,
.component-card > * {
  position: relative;
  z-index: 1;
}

.project-card::before,
.module-item::before,
.component-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background: conic-gradient(
    from var(--card-border-angle),
    transparent 0deg 215deg,
    rgba(34, 211, 238, 0.92) 265deg,
    rgba(52, 211, 153, 0.88) 310deg,
    rgba(251, 146, 60, 0.92) 345deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 220ms ease;
}

.project-card::after,
.module-item::after,
.component-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(
      circle 220px at var(--mx, 50%) var(--my, 50%),
      rgba(34, 211, 238, 0.14),
      rgba(251, 146, 60, 0.06) 45%,
      transparent 75%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(34, 211, 238, 0.04) 45%,
      rgba(34, 211, 238, 0.16) 85%,
      rgba(52, 211, 153, 0.2) 98%,
      transparent 100%
    );
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 34%;
  background-position: 0 0, 0 -55%;
  mix-blend-mode: screen;
  transition: opacity 220ms ease;
}

.project-card:hover::before,
.project-card:focus-visible::before,
.module-item:hover::before,
.module-item:focus-visible::before,
.component-card:hover::before,
.component-card:focus-visible::before {
  opacity: 1;
  animation: cardBorderSpin 5.5s linear infinite;
}

.project-card:hover::after,
.project-card:focus-visible::after,
.module-item:hover::after,
.module-item:focus-visible::after,
.component-card:hover::after,
.component-card:focus-visible::after {
  opacity: 1;
  animation: cardScan 4.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cardBorderSpin {
  to {
    --card-border-angle: 360deg;
  }
}

@keyframes cardHoverGlow {
  0% {
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.55),
      0 0 26px rgba(34, 211, 238, 0.16),
      0 0 54px rgba(251, 146, 60, 0.07);
  }
  100% {
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.55),
      0 0 38px rgba(52, 211, 153, 0.22),
      0 0 68px rgba(251, 146, 60, 0.14);
  }
}

@keyframes cardScan {
  0% {
    background-position: 0 0, 0 -55%;
  }
  100% {
    background-position: 0 0, 0 155%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card:hover,
  .project-card:focus-visible,
  .module-item:hover,
  .module-item:focus-visible,
  .component-card:hover,
  .component-card:focus-visible,
  .project-card:hover::before,
  .project-card:focus-visible::before,
  .module-item:hover::before,
  .module-item:focus-visible::before,
  .component-card:hover::before,
  .component-card:focus-visible::before,
  .project-card:hover::after,
  .project-card:focus-visible::after,
  .module-item:hover::after,
  .module-item:focus-visible::after,
  .component-card:hover::after,
  .component-card:focus-visible::after {
    animation: none !important;
  }

  .project-card:hover,
  .module-item:hover,
  .component-card:hover {
    transform: translateY(3px) !important;
  }
}
