:root {
  color-scheme: dark;

  --bg: #030914;
  --panel: rgba(8, 22, 39, .82);
  --panel-strong: rgba(10, 29, 50, .94);
  --line: rgba(75, 210, 255, .22);
  --line-hot: rgba(75, 210, 255, .62);
  --text: #f4fbff;
  --muted: #9eb4c5;
  --cyan: #42d7ff;
  --blue: #3787ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(35, 119, 255, .15),
      transparent 34rem
    ),
    radial-gradient(
      circle at 90% 15%,
      rgba(41, 218, 255, .10),
      transparent 30rem
    ),
    #030914;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.connection-network {
  width: min(1500px, 100%);
  margin: 0 auto;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
  padding: 90px 28px 70px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .45;
  background-image:
    linear-gradient(
      rgba(67, 208, 255, .055) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(67, 208, 255, .055) 1px,
      transparent 1px
    );
  background-size: 46px 46px;
  mask-image:
    linear-gradient(to bottom, black, transparent);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
}

.hero-glow-one {
  width: 340px;
  height: 340px;
  background: rgba(42, 121, 255, .25);
  left: 8%;
  top: 5%;
}

.hero-glow-two {
  width: 300px;
  height: 300px;
  background: rgba(37, 221, 255, .16);
  right: 7%;
  bottom: 2%;
}

.hero-content {
  width: min(1050px, 100%);
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .22em;
}

h1 {
  max-width: 950px;
  margin: 0 auto;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.hero-copy {
  max-width: 760px;
  margin: 30px auto 0;
  color: #bfd0dc;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.mission-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.mission-strip span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 19, 34, .72);
  color: #cfeeff;
  font-size: .8rem;
}

.network-section {
  padding: 75px 28px 90px;
}

.section-heading {
  max-width: 790px;
  margin-bottom: 38px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -.035em;
}

.section-heading > p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.category-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  min-height: 260px;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(13, 36, 61, .92),
      rgba(5, 15, 28, .92)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 18px 60px rgba(0,0,0,.20);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -75px;
  bottom: -75px;
  border-radius: 50%;
  background: rgba(48, 199, 255, .10);
  filter: blur(20px);
}

.category-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border: 1px solid var(--line-hot);
  border-radius: 13px;
  color: var(--cyan);
  background: rgba(38, 171, 255, .08);
  font-weight: 800;
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 1.16rem;
  line-height: 1.35;
}

.category-card p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.preview-state {
  display: inline-block;
  color: #7bdfff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.boundary {
  margin: 0 28px 70px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.boundary-title {
  margin-top: 0;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: .1em;
}

.boundary p:last-child {
  max-width: 850px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 28px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer strong {
  color: var(--text);
}

@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .hero {
    min-height: 410px;
    padding-top: 70px;
  }

  .network-section {
    padding-top: 58px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 225px;
  }

  footer {
    flex-direction: column;
  }
}

/* =========================================================
   PHASE 3 PART 2 — GOVERNED CATEGORY NAVIGATION
   ========================================================= */

.category-action {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line-hot);
  border-radius: 999px;
  color: #d9f7ff;
  background: rgba(35, 160, 255, .08);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.category-action:hover,
.category-action:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(35, 160, 255, .16);
}

.category-action:focus-visible,
.back-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.category-page {
  min-height: 100vh;
}

.category-hero {
  position: relative;
  padding: 70px 28px 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(45, 131, 255, .16),
      transparent 34rem
    );
}

.category-hero h1 {
  max-width: 1050px;
  margin: 18px 0 0;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
}

.category-id {
  margin: 22px 0 0;
  color: var(--cyan);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: .75rem;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}

.back-link {
  display: inline-block;
  margin-bottom: 45px;
  color: #bfeeff;
  font-size: .85rem;
  font-weight: 750;
  text-decoration: none;
}

.category-results {
  min-height: 420px;
  padding: 65px 28px 90px;
}

.empty-state {
  max-width: 820px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(13, 36, 61, .82),
      rgba(5, 15, 28, .92)
    );
}

.empty-state strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* =========================================================
   PHASE 3 PART 4 — CONNECTION PROFILE CARD SYSTEM
   ========================================================= */

.connection-profile-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 310px), 380px));
  justify-content: start;
  gap: 22px;
}

.connection-profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(13, 36, 61, .92),
      rgba(5, 15, 28, .98)
    );
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .22);
}

.connection-profile-artwork {
  min-height: 170px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      circle at 25% 30%,
      rgba(55, 214, 255, .24),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      rgba(34, 112, 255, .15),
      rgba(5, 15, 28, .9)
    );
}

.connection-profile-body {
  padding: 24px;
}

.connection-profile-name {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.connection-profile-description {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-wrap;
}

.connection-profile-date {
  margin: 18px 0 0;
  color: #b9d8e8;
  font-size: .84rem;
}

.connection-profile-date strong {
  color: #e9f8ff;
}

.connection-profile-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 10px 15px;
  border: 1px solid var(--line-hot);
  border-radius: 999px;
  color: #d9f7ff;
  background: rgba(35, 160, 255, .08);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-decoration: none;
  text-transform: uppercase;
}

.connection-profile-link:hover,
.connection-profile-link:focus-visible {
  background: rgba(35, 160, 255, .16);
  border-color: var(--cyan);
}

.connection-profile-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

/* ==========================================================
   AIOS CONNECTION NETWORK
   PHASE 3 PART 5 — GOVERNED PUBLIC PROFILE PRESENTATION
   No human likeness. Category-derived abstract environment.
   ========================================================== */

.connection-profile-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.connection-profile-card {
  overflow: hidden;
  border: 1px solid rgba(87, 219, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(8, 18, 34, 0.98),
      rgba(3, 9, 19, 0.98)
    );
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24);
}

.connection-profile-art {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(78, 218, 255, 0.28),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      rgba(13, 48, 78, 0.94),
      rgba(4, 12, 25, 0.98)
    );
}

.connection-profile-art::before,
.connection-profile-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(107, 229, 255, 0.25);
  border-radius: 999px;
}

.connection-profile-art::before {
  width: 170px;
  height: 170px;
  top: -85px;
  right: -35px;
}

.connection-profile-art::after {
  width: 90px;
  height: 90px;
  bottom: -45px;
  left: 18%;
}

.connection-profile-art span {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.connection-profile-card[
  data-category-id="FINANCE_FINANCIAL_SERVICES"
] .connection-profile-art {
  background:
    radial-gradient(
      circle at 25% 25%,
      rgba(255, 211, 105, 0.24),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      rgba(70, 52, 15, 0.92),
      rgba(10, 13, 20, 0.98)
    );
}

.connection-profile-body {
  padding: 1.25rem;
}

.connection-profile-name {
  margin: 0 0 0.7rem;
  font-size: 1.28rem;
}

.connection-profile-description {
  margin: 0;
  line-height: 1.65;
  opacity: 0.92;
}

.connection-profile-date {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  opacity: 0.7;
}

.connection-profile-navigation-state {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top:
    1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  opacity: 0.58;
}

@media (max-width: 640px) {
  .connection-profile-grid {
    grid-template-columns: 1fr;
  }

  .connection-profile-art {
    min-height: 125px;
  }
}

/* ==========================================================
   AIOS CONNECTION NETWORK — PHASE 3 PART 6
   Search • Filter • Governed Direct Profile Navigation
   ========================================================== */

.connection-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(91, 222, 255, 0.42);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.connection-profile-link:hover,
.connection-profile-link:focus-visible {
  transform: translateY(-1px);
}

.connection-search-controls,
.connection-directory-controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.connection-search-label {
  flex: 1 1 300px;
}

.connection-search-controls input,
.connection-directory-controls input,
.connection-directory-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.9rem;
  border:
    1px solid rgba(91, 222, 255, 0.24);
  border-radius: 12px;
  background: rgba(3, 10, 20, 0.88);
  color: inherit;
}

.connection-directory-controls input {
  flex: 2 1 300px;
}

.connection-directory-controls select {
  flex: 1 1 230px;
}

.connection-search-status,
.connection-directory-status {
  opacity: 0.72;
  font-size: 0.88rem;
}

.connection-directory {
  width: min(1180px, calc(100% - 2rem));
  margin: 3rem auto;
}

.connection-directory-heading p {
  opacity: 0.78;
}

.connection-directory-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.connection-directory-card {
  padding: 1.2rem;
  border:
    1px solid rgba(91, 222, 255, 0.18);
  border-radius: 18px;
  background: rgba(5, 14, 27, 0.9);
}

.connection-directory-card h3 {
  margin-top: 0;
}

.connection-directory-card p {
  line-height: 1.55;
}

.connection-directory-date {
  opacity: 0.68;
  font-size: 0.85rem;
}

.connection-directory-category {
  display: block;
  margin-top: 1rem;
  font-size: 0.78rem;
  text-decoration: none;
  opacity: 0.76;
}

@media (max-width: 640px) {
  .connection-directory-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   AIOS CONNECTION NETWORK
   VISUAL ASSET BINDING ADDENDUM
   Artwork supplements governed text; it does not replace it.
   ========================================================== */

.connection-category-artwork,
.connection-profile-image,
.connection-network-banner {
  display: block;
  width: 100%;
  height: auto;
}

.connection-category-artwork {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 0 1rem;
}

.connection-profile-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
}

.connection-profile-card {
  overflow: hidden;
}

.connection-profile-artwork.has-aios-visual {
  padding: 0;
  min-height: 0;
  background: none;
}

.connection-profile-artwork.has-aios-visual::before,
.connection-profile-artwork.has-aios-visual::after {
  display: none;
}

.connection-network-banner-wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2rem;
}

.connection-network-banner {
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

@media (max-width: 720px) {
  .connection-category-artwork,
  .connection-profile-image {
    aspect-ratio: auto;
  }

  .connection-network-banner-wrap {
    width: min(100% - 1rem, 1180px);
  }

  .connection-network-banner {
    border-radius: 16px;
  }
}

/* AIOS CONNECTION NETWORK — HOMEPAGE HERO MICRO POLISH */
.connection-network:not(.category-page) .hero-content {
  transform: translateY(18px);
}

/* =========================================================
   AIOS CONNECTION NETWORK
   CATEGORY ARTWORK — PRESERVE COMPLETE SOURCE IMAGE

   Source artwork: 1536 x 1024 (3:2)
   Do not crop AIOS identity or top artwork content.
   ========================================================= */

.connection-category-artwork {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center center;
  display: block;
}


/* AIOS CONNECTION CARD ONE-SHOT V1 */

.connection-profile-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 28px;
}

.connection-profile-card {
  overflow: hidden;
  border-radius: 22px;
}

.connection-profile-art {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.connection-profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connection-profile-body {
  padding: 22px;
}

.connection-profile-name {
  margin-top: 0;
}

.connection-profile-description {
  line-height: 1.55;
}

.connection-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  min-height: 44px;
  padding: 10px 18px;
  text-decoration: none;
}


/* AIOS CONNECTION PROFILE RESPONSIVE V1
   Shared profile-card presentation only.
   No person/category/page-specific behavior. */

@media (max-width: 720px) {
  .connection-profile-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .connection-profile-card {
    width: 100%;
    max-width: 100%;
  }

  .connection-profile-art {
    width: 100%;
  }

  .connection-profile-image {
    width: 100%;
    height: auto;
  }

  .connection-profile-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .connection-profile-link {
    min-height: 44px;
  }
}

/* AIOS CONNECTION PROFILE ARTWORK AUTHORITY V1
   Canonical source artwork: 1536x1024 / 3:2.
   Preserve complete artwork. No crop. No distortion.
   Shared profile-card presentation only. */

.connection-profile-art.has-aios-visual {
  width: 100%;
  aspect-ratio: 3 / 2;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: none;
}

.connection-profile-art.has-aios-visual
.connection-profile-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 0;
}

/* AIOS University ecosystem card */
.aios-university-ecosystem {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.aios-university-ecosystem-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
}

.aios-university-ecosystem-banner {
  display: block;
  width: 100%;
  height: auto;
}

.aios-university-ecosystem-copy {
  padding: 22px;
}

.aios-university-ecosystem-copy h2 {
  margin: 6px 0 18px;
}


/* Connection Network — Workforce footer composition */
.connection-footer {
  display: block;
  padding: 42px 28px 48px;
}

.connection-footer-heading {
  width: min(1180px, 100%);
  margin: 0 auto 24px;
}

.connection-footer-heading strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.connection-footer-heading span {
  display: block;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.035em;
}

.connection-footer .workforce-ecosystem-card {
  display: block;
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  text-decoration: none;
}

.connection-footer .workforce-ecosystem-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

@media (max-width: 650px) {
  .connection-footer {
    padding: 32px 16px 38px;
  }

  .connection-footer-heading {
    margin-bottom: 18px;
  }
}

/* CONNECTION_NETWORK_MATRIXALIGNER_DOORWAY_V1 */

.connection-matrix-doorway {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.connection-matrix-auth-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-matrix-auth-state[hidden] {
  display: none;
}

.connection-matrix-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
}

.connection-matrix-button {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(7,16,28,.78);
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 700px) {
  .connection-matrix-doorway {
    justify-content: flex-start;
  }

  .connection-matrix-auth-state {
    flex-wrap: wrap;
  }
}

/* =========================================================
   AIOS CONNECTION NETWORK
   TRUE TOP HEADER BANNER V1
   ========================================================= */

.connection-network-top-banner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}

.connection-network-top-banner .connection-network-banner {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

/* True header means no artificial space above the artwork. */
body {
  margin-top: 0;
}

@media (max-width: 720px) {
  .connection-network-top-banner {
    width: 100%;
    margin: 0;
  }

  .connection-network-top-banner .connection-network-banner {
    width: 100%;
    height: auto;
    border-radius: 0;
  }
}
