/* ==========================================================================
   Scene two — the creative universe.
   This is the supplied film played AS the section, not a recreation of it:
   the cards, the red light-painting, the embers and every corner label are
   part of the footage. The page's job is to present it cinematically — arrive
   from black, hold the frame, and breathe over the loop seam — and to stay
   out of its way.
   ========================================================================== */

.flow {
  position: relative;
  z-index: 2;
}

/* The hero is position:fixed, so its scroll height has to be reserved here or
   the universe would start at the top of the document and sit on top of it. */
.hero-spacer {
  height: 100svh;
  pointer-events: none;
}

.universe {
  position: relative;
  min-height: 100svh;
  background: #040608;
  overflow: hidden;
  box-shadow: 0 -1px 0 0 #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vh, 120px) clamp(20px, 4vw, 60px) clamp(40px, 6vh, 60px);
}

.universe__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.universe__title {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  margin-bottom: clamp(30px, 5vh, 50px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.universe.is-on .universe__title {
  opacity: 1;
  transform: translateY(0);
}

.universe__over {
  margin: 0 0 0.9em;
  font-family: var(--mono);
  font-size: clamp(8px, 0.65vw, 10px);
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}
.universe__name {
  margin: 0;
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 44px);
  line-height: 1.18;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 0, 85, 0.8), 0 0 35px rgba(0, 240, 255, 0.6);
}
.universe__sub {
  margin: 1.1em 0 0;
  font-family: var(--mono);
  font-size: clamp(8px, 0.65vw, 11px);
  font-weight: 500;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Interactive Cyberpunk Neural Grid Matrix Cards
   -------------------------------------------------------------------------- */

.universe__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 480px));
  gap: clamp(16px, 2.2vw, 28px);
  max-width: 1040px;
  width: 100%;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.3s var(--ease-out) 0.3s, transform 1.3s var(--ease-out) 0.3s;
}
.universe.is-on .universe__grid {
  opacity: 1;
  transform: translateY(0);
}

.uni-card {
  position: relative;
  background: rgba(10, 15, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 8px;
  padding: clamp(18px, 2.2vw, 24px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.04);
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.uni-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}
.uni-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 18px 45px rgba(0, 240, 255, 0.16), 0 0 20px rgba(0, 240, 255, 0.2);
}

.uni-card__tag {
  font-family: var(--mono);
  font-size: clamp(7.5px, 0.6vw, 9.5px);
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--cyan);
  margin-bottom: 0.6em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

.uni-card__title {
  margin: 0 0 0.5em;
  font-family: var(--disp);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

.uni-card__desc {
  margin: 0 0 1.2em;
  font-family: var(--ui);
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.5;
  color: rgba(220, 235, 255, 0.75);
}

.uni-card__stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed rgba(0, 240, 255, 0.2);
  padding-top: 0.8em;
  font-family: var(--mono);
  font-size: clamp(7.5px, 0.6vw, 9.5px);
  letter-spacing: 0.15em;
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(246, 224, 94, 0.4);
}

/* --------------------------------------------------------------------------
   Interactive Cybernetic Tech Stack Matrix
   -------------------------------------------------------------------------- */

.tech-matrix {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1040px;
  margin-top: clamp(48px, 7vh, 72px);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.3s var(--ease-out) 0.45s, transform 1.3s var(--ease-out) 0.45s;
}
.universe.is-on .tech-matrix {
  opacity: 1;
  transform: translateY(0);
}

.tech-matrix__hdr {
  text-align: center;
  margin-bottom: clamp(20px, 3vh, 32px);
}

.tech-matrix__badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.75em;
}

.tech-matrix__pill {
  font-family: var(--mono);
  font-size: clamp(7.5px, 0.58vw, 9px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.tech-matrix__pill--status {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tech-matrix__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: cyberPulse 2s infinite ease-in-out;
}

.tech-matrix__title {
  margin: 0;
  font-family: var(--disp);
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.4);
}

.tech-matrix__sub {
  margin: 0.5em 0 0;
  font-family: var(--mono);
  font-size: clamp(8px, 0.62vw, 10.5px);
  letter-spacing: 0.22em;
  color: rgba(200, 225, 255, 0.65);
  text-transform: uppercase;
}

/* Filter Controls */
.tech-matrix__filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 2.8vh, 28px);
}

.tech-filter {
  appearance: none;
  background: rgba(6, 12, 20, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: clamp(7.5px, 0.6vw, 9.5px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.tech-filter__bracket {
  color: var(--cyan);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.tech-filter:hover {
  border-color: rgba(0, 240, 255, 0.6);
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.tech-filter:hover .tech-filter__bracket {
  opacity: 1;
}

.tech-filter.is-active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.15);
  text-shadow: 0 0 8px var(--cyan);
}

.tech-filter.is-active .tech-filter__bracket {
  color: #fff;
  opacity: 1;
}

/* Skills Grid */
.tech-matrix__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
  width: 100%;
}

.tech-chip {
  position: relative;
  background: rgba(8, 14, 22, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  transition: transform 0.28s var(--ease-out), border-color 0.28s ease, box-shadow 0.28s ease, opacity 0.3s ease;
  overflow: hidden;
  cursor: default;
}

.tech-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
  opacity: 0.5;
}

.tech-chip:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 10px 24px rgba(0, 240, 255, 0.18), inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.tech-chip.is-hidden {
  display: none !important;
}

.tech-chip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tech-chip__cat {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
}

.tech-chip__cat--lang {
  background: rgba(255, 170, 0, 0.12);
  color: #ffb833;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.tech-chip__cat--ai {
  background: rgba(255, 0, 128, 0.14);
  color: #ff3399;
  border: 1px solid rgba(255, 0, 128, 0.35);
}

.tech-chip__cat--data {
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.tech-chip__cat--qa {
  background: rgba(0, 255, 150, 0.12);
  color: #00ff96;
  border: 1px solid rgba(0, 255, 150, 0.35);
}

.tech-chip__cat--ops {
  background: rgba(160, 100, 255, 0.14);
  color: #c499ff;
  border: 1px solid rgba(160, 100, 255, 0.35);
}

.tech-chip__lvl {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
}

.tech-chip__name {
  font-family: var(--disp);
  font-size: clamp(12.5px, 1.05vw, 15px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.2;
}

.tech-chip__meta {
  font-family: var(--mono);
  font-size: clamp(7px, 0.54vw, 8.5px);
  letter-spacing: 0.1em;
  color: rgba(185, 215, 245, 0.6);
  line-height: 1.35;
}

@keyframes cyberFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .universe { min-height: auto; padding: 75px 16px 50px; }
  .universe__grid { grid-template-columns: 1fr; gap: 14px; }
  .tech-matrix { margin-top: 36px; }
  .tech-matrix__grid { grid-template-columns: 1fr; gap: 10px; }
  .tech-matrix__filters { gap: 6px; }
  .tech-filter { font-size: 8px; padding: 5px 9px; }
  .tech-chip { padding: 11px 13px; }
  .uni-card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .universe__title, .universe__grid, .tech-matrix { transition: none; transform: none; opacity: 1; }
}
