/* ==========================================================================
   Bitronix Lab — extra animations & new section styling
   Loaded on top of Website/styles.css and css/tutorial.css
   ========================================================================== */

/* ---------- Animated gradient text (BLUE / WHITE only) ---------- */
.gradient-text {
  background: linear-gradient(120deg, #ffffff 0%, #43c7ff 25%, #00f5ff 50%, #43c7ff 75%, #ffffff 100%);
  background-size: 280% 280%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 7s ease-in-out infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.28));
}

@keyframes gradientShift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* ---------- Typewriter line in hero ---------- */
.hero-typewriter {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.3rem;
  font-weight: 880;
}

.type-target {
  background: linear-gradient(90deg, #ffffff, #00f5ff, #43c7ff);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.type-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: #00f5ff;
  box-shadow: 0 0 12px #00f5ff;
  animation: caretBlink 1s steps(2) infinite;
  transform: translateY(2px);
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

/* ---------- Reveal on scroll ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- About section ---------- */
.about-section {
  position: relative;
  overflow: hidden;
  padding: 96px 0 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 245, 255, 0.10), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(255, 200, 87, 0.10), transparent 30%),
    var(--paper);
}

.about-layout {
  display: grid;
  width: min(1160px, 90%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr);
  gap: 56px;
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 6px 0 18px;
}

.about-lead {
  font-size: 1.18rem;
  color: var(--ink);
  margin: 0 0 14px;
  font-weight: 700;
}

.about-copy p {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Animated orb on the right */
.about-orb {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(0, 170, 164, 0.4);
  animation: orbSpin 16s linear infinite;
}

.orb-ring:nth-child(2) {
  inset: 14%;
  border-style: solid;
  border-color: rgba(67, 199, 255, 0.35);
  animation-duration: 22s;
  animation-direction: reverse;
}

.orb-ring:nth-child(3) {
  inset: 28%;
  border-color: rgba(255, 200, 87, 0.5);
  animation-duration: 11s;
}

.orb-core {
  position: relative;
  width: 38%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 245, 255, 0.6), transparent 60%),
    linear-gradient(135deg, #063f3f, #04080d);
  color: var(--amber);
  font-weight: 950;
  font-size: 2rem;
  letter-spacing: 1px;
  box-shadow:
    inset 0 0 28px rgba(0, 245, 255, 0.5),
    0 0 50px rgba(0, 245, 255, 0.4),
    0 0 120px rgba(5, 119, 255, 0.25);
  animation: orbPulse 3.5s ease-in-out infinite;
}

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

@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.orb-blip {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 16px #00f5ff;
}

.blip-a { top: 6%;  left: 50%; animation: orbBlip 3s ease-in-out infinite; }
.blip-b { top: 50%; right: 4%; background: var(--amber); box-shadow: 0 0 16px var(--amber); animation: orbBlip 3s ease-in-out infinite 1s; }
.blip-c { bottom: 8%; left: 18%; background: var(--coral); box-shadow: 0 0 16px var(--coral); animation: orbBlip 3s ease-in-out infinite 2s; }

@keyframes orbBlip {
  0%, 100% { transform: scale(0.6); opacity: 0.5; }
  50%      { transform: scale(1.4); opacity: 1; }
}

/* ---------- Marquee strip ---------- */
.marquee-strip {
  margin-top: 64px;
  padding: 18px 0;
  border-top: 1px solid rgba(6, 63, 63, 0.12);
  border-bottom: 1px solid rgba(6, 63, 63, 0.12);
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.05), rgba(255, 200, 87, 0.05));
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  color: var(--teal-dark);
}

.marquee-track span:nth-child(odd) {
  background: linear-gradient(90deg, #00aaa4, #0577ff);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Topics section ---------- */
.topics-section {
  position: relative;
  overflow: hidden;
  padding: 110px 0;
  background: #04080d;
  color: #ffffff;
  isolation: isolate;
}

.topics-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 25%, rgba(0, 245, 255, 0.18), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(255, 102, 85, 0.16), transparent 38%),
    linear-gradient(90deg,  rgba(67, 199, 255, 0.10) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(180deg, rgba(255, 200, 87, 0.08) 1px, transparent 1px) 0 0 / 64px 64px,
    #04080d;
  animation: topicsBgShift 24s ease-in-out infinite alternate;
}

@keyframes topicsBgShift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 60px 60px, -60px -60px, 64px 0, 0 64px; }
}

.topics-section h2 {
  color: #ffffff;
}

.topics-section .section-heading p:last-child {
  color: rgba(255, 255, 255, 0.78);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.topic-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(67, 199, 255, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(4, 12, 18, 0.7);
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 220ms ease,
              box-shadow 280ms ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 140deg,
    transparent,
    rgba(0, 245, 255, 0.55),
    rgba(255, 200, 87, 0.4),
    rgba(255, 102, 85, 0.4),
    transparent 70%);
  opacity: 0;
  z-index: -1;
  filter: blur(14px);
  transition: opacity 320ms ease;
}

.topic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 245, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.topic-card:hover,
.topic-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 245, 255, 0.2),
    0 0 60px rgba(0, 245, 255, 0.18);
}

.topic-card:hover::before,
.topic-card:focus-visible::before { opacity: 1; }
.topic-card:hover::after,
.topic-card:focus-visible::after  { opacity: 1; }

.topic-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(255, 200, 87, 0.12));
  border: 1px solid rgba(0, 245, 255, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 245, 255, 0.18);
}

.topic-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--cyan, #43c7ff);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.5));
  animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.topic-card h3 {
  font-size: 1.28rem;
  font-weight: 920;
  margin: 0;
  color: #ffffff;
  position: relative;
}

/* Glitch hover on the title using data-glitch attribute */
.topic-card[data-glitch] h3::before,
.topic-card[data-glitch] h3::after {
  content: attr(data-glitch-display, "");
}

.topic-card:hover h3,
.topic-card:focus-visible h3 {
  animation: glitchTitle 700ms steps(3, end) 1;
}

@keyframes glitchTitle {
  0%   { text-shadow: 0 0 0 transparent; transform: translate(0,0); }
  20%  { text-shadow: 2px 0 #00f5ff, -2px 0 #ff6655; transform: translate(-1px, 0); }
  40%  { text-shadow: -2px 0 #00f5ff, 2px 0 #ffc857; transform: translate(1px, 0); }
  60%  { text-shadow: 1px 1px #00f5ff, -1px -1px #ff6655; transform: translate(0, 1px); }
  100% { text-shadow: 0 0 0 transparent; transform: translate(0,0); }
}

.topic-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.98rem;
  line-height: 1.55;
}

.topic-cta {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber, #ffc857);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topic-cta em {
  font-style: normal;
  transition: transform 220ms ease;
}

.topic-card:hover .topic-cta em,
.topic-card:focus-visible .topic-cta em {
  transform: translateX(6px);
}

/* ---------- Blog section ---------- */
.blog-section {
  position: relative;
  padding: 96px 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(143, 116, 255, 0.10), transparent 35%),
    var(--paper);
}

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

.blog-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 26px 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  box-shadow: 0 14px 36px rgba(16, 22, 20, 0.06);
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00f5ff, #0577ff, #ffc857, #ff6655);
  background-size: 220% 100%;
  animation: gradientShift 6s linear infinite;
}

.blog-card:hover,
.blog-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(0, 245, 255, 0.4);
  box-shadow:
    0 26px 60px rgba(16, 22, 20, 0.12),
    0 0 0 1px rgba(0, 245, 255, 0.18);
}

.blog-tag {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.16), rgba(255, 200, 87, 0.16));
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 920;
  line-height: 1.3;
}

.blog-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.blog-meta {
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ---------- Tutorial topic-page hero variant ---------- */
.topic-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.topic-hero-tags span {
  padding: 6px 12px;
  border: 1px solid rgba(67, 199, 255, 0.32);
  border-radius: 999px;
  background: rgba(0, 245, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .topics-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topics-grid { grid-template-columns: 1fr; }
  .hero-typewriter { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-text,
  .marquee-track,
  .orb-ring,
  .orb-core,
  .orb-blip,
  .topic-icon svg,
  .blog-card::before,
  .topics-bg,
  .journey-aurora,
  .visual-innovate .spark,
  .visual-innovate .bulb,
  .visual-develop .pulse-dot,
  .visual-educate .node,
  .visual-design svg path {
    animation: none !important;
  }
  .reveal-up { opacity: 1; transform: none; }
  .type-caret { display: none; }
  .pcb-bg { display: none; }
}

/* ==========================================================================
   LIVING PCB BACKGROUND (full-page animated circuit canvas)
   ========================================================================== */
.pcb-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(0, 60, 80, 0.55), transparent 55%),
    radial-gradient(ellipse at 82% 78%, rgba(60, 30, 90, 0.45), transparent 55%),
    #03070b;
}

/* keep all real content above the PCB canvas */
body > header,
body > main,
body > footer { position: relative; z-index: 1; }

/* Slightly soften paper sections so the moving PCB shows through */
.about-section,
.blog-section,
.section,
.learning-section,
.founder-section,
.contact-section,
.intro-band,
.mission-section { background-color: transparent; }

.about-section,
.section,
.learning-section,
.founder-section,
.contact-section,
.intro-band,
.mission-section,
.blog-section {
  background-color: rgba(244, 247, 241, 0.86);
  backdrop-filter: blur(4px);
}

/* Keep dark sections opaque so PCB doesn't bleed weirdly */
.topics-section { background-color: #04080d; }

/* ==========================================================================
   BRAND LOGO POLISH (when using real PNG logos)
   ========================================================================== */
.brand-mark-photo {
  background: radial-gradient(circle at 35% 30%, rgba(0, 245, 255, 0.35), rgba(6, 12, 20, 0.9) 70%);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.35),
    0 0 22px rgba(0, 245, 255, 0.25),
    inset 0 0 14px rgba(0, 245, 255, 0.18);
  overflow: hidden;
}
.brand-mark-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.55));
}
.hero-logo-photo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 18px;
  padding: 6px;
  background: radial-gradient(circle at 30% 25%, rgba(0, 245, 255, 0.28), rgba(4, 10, 18, 0.92) 70%);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.4),
    0 14px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 18px rgba(0, 245, 255, 0.22);
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.45));
  animation: logoBreath 5s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.45)); }
  50%      { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.75)); }
}

.mission-logo-photo img {
  width: min(320px, 80%);
  height: auto;
  border-radius: 22px;
  padding: 14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 245, 255, 0.25), rgba(4, 10, 18, 0.92) 70%);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.35),
    0 26px 70px rgba(0, 0, 0, 0.45),
    inset 0 0 26px rgba(0, 245, 255, 0.22);
  animation: logoBreath 6s ease-in-out infinite;
}

/* ==========================================================================
   PORTFOLIO JOURNEY — Innovate → Design → Develop → Educate
   ========================================================================== */
.journey-section {
  position: relative;
  overflow: hidden;
  padding: 120px 0 140px;
  color: #ecf6ff;
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 245, 255, 0.18), transparent 40%),
    radial-gradient(circle at 92% 88%, rgba(255, 102, 85, 0.16), transparent 40%),
    linear-gradient(180deg, #04080d 0%, #07101a 60%, #04080d 100%);
  isolation: isolate;
}

.journey-aurora {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    conic-gradient(from 90deg at 30% 40%,
      rgba(0, 245, 255, 0.25), transparent 30%,
      rgba(143, 116, 255, 0.25) 50%, transparent 70%,
      rgba(255, 200, 87, 0.20) 88%, transparent);
  filter: blur(70px);
  opacity: 0.6;
  animation: auroraSpin 28s linear infinite;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }

.journey-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg,  rgba(67, 199, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(67, 199, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.journey-inner { width: min(1200px, 92%); margin: 0 auto; }

.journey-heading h2 { color: #ffffff; font-size: clamp(2.2rem, 4vw, 3.6rem); }
.journey-heading p { color: rgba(236, 246, 255, 0.72); }
.journey-heading { text-align: center; margin-bottom: 64px; }
.journey-heading h2,
.journey-heading > p { margin-left: auto; margin-right: auto; }
.journey-heading > p { max-width: 720px; }

/* The numbered timeline */
.journey-track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 56px;
}
.journey-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent,
    rgba(0, 245, 255, 0.55) 12%,
    rgba(143, 116, 255, 0.55) 50%,
    rgba(255, 200, 87, 0.55) 88%,
    transparent);
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.5));
  transform: translateX(-1px);
}

.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.journey-step.is-visible { opacity: 1; transform: none; }

.journey-step::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #00f5ff 0%, rgba(0, 245, 255, 0.2) 60%, transparent 100%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.85);
  animation: nodePulse 2.4s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.85; }
  50%      { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
}

.journey-step:nth-child(odd)  .journey-card { grid-column: 1; margin-right: 70px; }
.journey-step:nth-child(even) .journey-card { grid-column: 2; margin-left:  70px; }

.journey-card {
  position: relative;
  padding: 30px 32px 32px;
  border-radius: 22px;
  border: 1px solid rgba(0, 245, 255, 0.25);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    rgba(6, 14, 22, 0.78);
  backdrop-filter: blur(14px);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 245, 255, 0.08),
    inset 0 0 30px rgba(0, 245, 255, 0.06);
  overflow: hidden;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 280ms ease,
              box-shadow 280ms ease;
}
.journey-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--ang, 0deg),
    rgba(0, 245, 255, 0.6),
    rgba(143, 116, 255, 0.5),
    rgba(255, 200, 87, 0.5),
    rgba(255, 102, 85, 0.5),
    rgba(0, 245, 255, 0.6));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  animation: journeyBorderSpin 9s linear infinite;
}
@property --ang {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes journeyBorderSpin { to { --ang: 360deg; } }

.journey-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 245, 255, 0.35),
    0 0 60px rgba(0, 245, 255, 0.18);
}

.journey-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.journey-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(0, 245, 255, 0.85);
}
.journey-tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #04080d;
  background: linear-gradient(135deg, #00f5ff, #ffc857);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.45);
}
.journey-card h3 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  font-weight: 920;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.journey-card p {
  margin: 0 0 16px;
  color: rgba(236, 246, 255, 0.78);
  font-size: 1rem;
  line-height: 1.6;
}
.journey-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
}
.journey-meta li {
  font-size: 0.74rem;
  font-weight: 880;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.3);
  background: rgba(0, 245, 255, 0.06);
  color: rgba(236, 246, 255, 0.85);
}

/* Per-card visuals */
.journey-visual {
  position: relative;
  height: 110px;
  border-radius: 14px;
  border: 1px solid rgba(0, 245, 255, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(0, 245, 255, 0.04) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg,  rgba(0, 245, 255, 0.04) 0 1px, transparent 1px 24px),
    rgba(4, 10, 18, 0.6);
  overflow: hidden;
}

/* 01 Innovate – idea sparks + bulb */
.visual-innovate .bulb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe88a, #ffc857 60%, transparent 75%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px #ffc857, 0 0 80px rgba(255, 200, 87, 0.4);
  animation: bulbPulse 2.4s ease-in-out infinite;
}
@keyframes bulbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);   filter: brightness(1); }
  50%      { transform: translate(-50%, -50%) scale(1.15); filter: brightness(1.4); }
}
.visual-innovate .spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 12px #00f5ff;
  opacity: 0.85;
  animation: sparkRise 3s linear infinite;
}
.visual-innovate .s1 { left: 18%; bottom: 0; animation-delay: 0s;   }
.visual-innovate .s2 { left: 70%; bottom: 0; animation-delay: 1s; background: #ffc857; box-shadow: 0 0 12px #ffc857; }
.visual-innovate .s3 { left: 88%; bottom: 0; animation-delay: 2s; background: #ff6655; box-shadow: 0 0 12px #ff6655; }
@keyframes sparkRise {
  0%   { transform: translateY(0)    scale(0.6); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(-110px) scale(0.2); opacity: 0; }
}

/* 02 Design – schematic trace draw */
.visual-design { display: grid; place-items: center; }
.visual-design svg {
  width: 92%;
  height: 92%;
  fill: none;
  stroke: #00f5ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.6));
}
.visual-design svg path {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: schemDraw 4s ease-in-out infinite;
}
.visual-design svg rect {
  stroke: #ffc857;
  fill: rgba(255, 200, 87, 0.08);
  animation: chipBlink 3s ease-in-out infinite;
}
.visual-design svg circle { fill: #00f5ff; }
@keyframes schemDraw {
  0%   { stroke-dashoffset: 360; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes chipBlink {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 200, 87, 0.4)); }
  50%      { filter: drop-shadow(0 0 14px rgba(255, 200, 87, 0.95)); }
}

/* 03 Develop – streaming code bars + heartbeat dot */
.visual-develop {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}
.code-strip { display: grid; gap: 6px; }
.code-strip span {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.55), rgba(0, 245, 255, 0));
  animation: codeFlow 2.4s ease-in-out infinite;
}
.code-strip span:nth-child(1) { width: 72%;  animation-delay: 0.0s; }
.code-strip span:nth-child(2) { width: 48%;  animation-delay: 0.15s; }
.code-strip span:nth-child(3) { width: 86%;  animation-delay: 0.30s; }
.code-strip span:nth-child(4) { width: 60%;  animation-delay: 0.45s; }
.code-strip span:nth-child(5) { width: 38%;  animation-delay: 0.60s; }
@keyframes codeFlow {
  0%, 100% { opacity: 0.4; transform: translateX(0); }
  50%      { opacity: 1;   transform: translateX(8px); }
}
.pulse-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff6655;
  box-shadow: 0 0 18px #ff6655;
  animation: heartBeat 1.4s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(0.85); }
  30%      { transform: scale(1.25); }
  50%      { transform: scale(0.95); }
  70%      { transform: scale(1.15); }
}

/* 04 Educate – knowledge graph */
.visual-educate { position: relative; }
.visual-educate .node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, #00f5ff 60%, transparent 80%);
  box-shadow: 0 0 14px #00f5ff;
  animation: nodeGlow 2.6s ease-in-out infinite;
}
.visual-educate .n1 { top: 50%; left: 10%;  transform: translateY(-50%); }
.visual-educate .n2 { top: 22%; left: 38%; animation-delay: 0.4s; }
.visual-educate .n3 { top: 75%; left: 58%; animation-delay: 0.8s; background: radial-gradient(circle, #fff, #ffc857 60%, transparent 80%); box-shadow: 0 0 14px #ffc857; }
.visual-educate .n4 { top: 40%; left: 86%; animation-delay: 1.2s; background: radial-gradient(circle, #fff, #ff6655 60%, transparent 80%); box-shadow: 0 0 14px #ff6655; }
@keyframes nodeGlow {
  0%, 100% { transform: scale(0.85); }
  50%      { transform: scale(1.2); }
}
.visual-educate .n1 { transform: translateY(-50%) scale(1); }
.visual-educate .link {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.05), rgba(0, 245, 255, 0.7), rgba(0, 245, 255, 0.05));
  filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.6));
  transform-origin: left center;
}
.visual-educate .l1 { top: 50%; left: 12%; width: 28%; transform: rotate(-22deg); }
.visual-educate .l2 { top: 27%; left: 41%; width: 22%; transform: rotate( 36deg); }
.visual-educate .l3 { top: 76%; left: 60%; width: 28%; transform: rotate(-30deg); }

/* Responsive — stack on small screens */
@media (max-width: 900px) {
  .journey-track::before { left: 22px; }
  .journey-step { grid-template-columns: 1fr; }
  .journey-step::after { left: 22px; }
  .journey-step:nth-child(odd)  .journey-card,
  .journey-step:nth-child(even) .journey-card {
    grid-column: 1;
    margin: 0 0 0 52px;
  }
}


/* ==========================================================================
   3D LOGO HERO (replaces the old brand-lockup animation)
   ========================================================================== */
.hero-lockup-shell { display: none !important; } /* retire old animation */

.hero-logo3d {
  position: relative;
  display: grid;
  place-items: center;
  width: min(380px, 100%);
  margin: 0 auto;
  perspective: 1200px;
  perspective-origin: 50% 40%;
  --rx: 0deg;
  --ry: 0deg;
}

.logo3d-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo3d-cube {
  position: absolute;
  inset: 18%;
  transform-style: preserve-3d;
  animation: logoCubeSpin 14s linear infinite;
  filter: drop-shadow(0 30px 60px rgba(0, 245, 255, 0.45));
}

@keyframes logoCubeSpin {
  0%   { transform: rotateX(-12deg) rotateY(0deg); }
  100% { transform: rotateX(-12deg) rotateY(360deg); }
}

.logo3d-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 245, 255, 0.35), rgba(4, 10, 18, 0.95) 70%);
  border: 1px solid rgba(0, 245, 255, 0.5);
  box-shadow:
    inset 0 0 30px rgba(0, 245, 255, 0.35),
    0 0 40px rgba(0, 245, 255, 0.25);
  backface-visibility: hidden;
}

.logo3d-face img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.7));
}

/* Cube depth — half of cube width (we use viewport-relative via CSS var) */
.logo3d-cube { --d: 110px; }
.logo3d-face-front  { transform: translateZ(var(--d)); }
.logo3d-face-back   { transform: rotateY(180deg) translateZ(var(--d)); }
.logo3d-face-right  { transform: rotateY( 90deg) translateZ(var(--d)); background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(255, 200, 87, 0.10)); }
.logo3d-face-left   { transform: rotateY(-90deg) translateZ(var(--d)); background: linear-gradient(135deg, rgba(143, 116, 255, 0.15), rgba(0, 245, 255, 0.10)); }
.logo3d-face-top    { transform: rotateX( 90deg) translateZ(var(--d)); background: linear-gradient(135deg, rgba(255, 102, 85, 0.15), rgba(0, 245, 255, 0.10)); }
.logo3d-face-bottom { transform: rotateX(-90deg) translateZ(var(--d)); background: linear-gradient(135deg, rgba(0, 245, 255, 0.10), rgba(143, 116, 255, 0.15)); }

@media (min-width: 1100px) {
  .logo3d-cube { --d: 130px; }
}

/* Orbit rings + particles */
.logo3d-orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.logo3d-ring {
  position: absolute;
  inset: 4%;
  border: 1px dashed rgba(0, 245, 255, 0.4);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.logo3d-ring.r1 { transform: rotateX(70deg) rotateZ(0deg);   animation: ringSpin 16s linear infinite; }
.logo3d-ring.r2 { inset: 12%; border-color: rgba(255, 200, 87, 0.45); transform: rotateX(60deg) rotateY(30deg); animation: ringSpin 22s linear infinite reverse; }
.logo3d-ring.r3 { inset: 22%; border-style: solid; border-color: rgba(143, 116, 255, 0.45); transform: rotateX(75deg) rotateY(-20deg); animation: ringSpin 12s linear infinite; }

@keyframes ringSpin {
  to { transform: rotateX(70deg) rotateZ(360deg); }
}

.logo3d-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 14px #00f5ff;
  top: 50%; left: 50%;
  transform-origin: 0 0;
  animation: particleOrbit 6s linear infinite;
}
.logo3d-particle.p1 { animation-delay: 0s;   }
.logo3d-particle.p2 { animation-delay: 1.5s; background: #ffc857; box-shadow: 0 0 14px #ffc857; }
.logo3d-particle.p3 { animation-delay: 3s;   background: #ff6655; box-shadow: 0 0 14px #ff6655; }
.logo3d-particle.p4 { animation-delay: 4.5s; background: #8f74ff; box-shadow: 0 0 14px #8f74ff; }

@keyframes particleOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg)   translateX(155px) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(155px) rotate(-360deg); }
}

/* Holographic floor reflection */
.logo3d-floor {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 70%;
  height: 18%;
  transform: translateX(-50%) rotateX(75deg);
  background: radial-gradient(ellipse, rgba(0, 245, 255, 0.45), transparent 70%);
  filter: blur(10px);
  opacity: 0.7;
  animation: floorPulse 3.6s ease-in-out infinite;
}
@keyframes floorPulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) rotateX(75deg) scale(1); }
  50%      { opacity: 0.95; transform: translateX(-50%) rotateX(75deg) scale(1.08); }
}

/* New core-chip logo (replaces BX) */
.core-chip-logo { padding: 6px; }
.core-chip-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.7));
  animation: coreChipSpin 8s ease-in-out infinite;
}
@keyframes coreChipSpin {
  0%, 100% { transform: rotateY(0deg)   scale(1); }
  50%      { transform: rotateY(180deg) scale(1.05); }
}

/* ==========================================================================
   GENERIC 3D MOUSE-TILT (data-tilt-3d)
   ========================================================================== */
[data-tilt-3d] {
  transform-style: preserve-3d;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   YOUTUBE / STM32 SECTION
   ========================================================================== */
.yt-section {
  position: relative;
  overflow: hidden;
  padding: 110px 0 120px;
  color: #ecf6ff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 0, 0, 0.16), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(0, 245, 255, 0.15), transparent 40%),
    linear-gradient(180deg, #04080d, #07101a 60%, #04080d);
  isolation: isolate;
}

.yt-grid-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(90deg,  rgba(67, 199, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(67, 199, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
}

.yt-inner { width: min(1200px, 92%); margin: 0 auto; }
.yt-heading { text-align: center; margin-bottom: 56px; }
.yt-heading h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); margin: 6px 0 14px; }
.yt-heading > p { color: rgba(236, 246, 255, 0.78); max-width: 720px; margin: 0 auto; }
.yt-handle {
  color: #ff6655; font-weight: 920; text-decoration: none;
  border-bottom: 1px dashed rgba(255, 102, 85, 0.6);
  padding-bottom: 1px;
}
.yt-handle:hover { color: #ffc857; border-color: #ffc857; }

.yt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 36px;
  align-items: stretch;
}

.yt-player-wrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0, 245, 255, 0.3);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 245, 255, 0.15),
    inset 0 0 30px rgba(0, 245, 255, 0.08);
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.yt-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #000;
}
.yt-player-glow {
  position: absolute; inset: -2px; border-radius: inherit;
  pointer-events: none; z-index: -1;
  background: conic-gradient(from 0deg, #00f5ff, #ff0033, #ffc857, #00f5ff);
  filter: blur(22px);
  opacity: 0.45;
  animation: ytGlowSpin 9s linear infinite;
}
@keyframes ytGlowSpin { to { transform: rotate(360deg); } }

.yt-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.yt-channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 0, 51, 0.4);
  background:
    linear-gradient(135deg, rgba(255, 0, 51, 0.18), rgba(0, 245, 255, 0.08));
  color: #fff;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}
.yt-channel-card:hover {
  transform: translateY(-4px);
  border-color: #ff0033;
  box-shadow: 0 26px 60px rgba(255, 0, 51, 0.35);
}
.yt-channel-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: #ff0033;
  color: #fff;
  box-shadow: 0 0 30px rgba(255, 0, 51, 0.55);
}
.yt-channel-icon svg { width: 30px; height: 30px; }
.yt-channel-card span {
  display: block;
  font-size: 0.74rem; font-weight: 880;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.yt-channel-card strong { font-size: 1.05rem; font-weight: 920; letter-spacing: 0.02em; }

.yt-topics {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 10px;
}
.yt-topics li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  background: rgba(6, 14, 22, 0.6);
  backdrop-filter: blur(6px);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}
.yt-topics li:hover {
  transform: translateX(4px);
  border-color: rgba(0, 245, 255, 0.55);
  background: rgba(0, 245, 255, 0.06);
}
.yt-topics li span {
  font-family: ui-monospace, monospace;
  font-weight: 800; color: rgba(0, 245, 255, 0.85);
  letter-spacing: 0.1em;
}
.yt-topics li strong { color: #fff; font-weight: 900; font-size: 0.98rem; }
.yt-topics li em { font-style: normal; color: rgba(236, 246, 255, 0.6); font-size: 0.78rem; letter-spacing: 0.04em; }

.yt-cta { justify-self: start; }

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

/* ==========================================================================
   FOOTER ENHANCEMENTS (social links)
   ========================================================================== */
.footer-grid-rich {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px 36px;
  row-gap: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  padding: 4px;
  background: radial-gradient(circle at 30% 25%, rgba(0, 245, 255, 0.3), rgba(4, 10, 18, 0.92) 70%);
  box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.35), 0 0 18px rgba(0, 245, 255, 0.3);
  object-fit: contain;
}
.footer-name { margin: 0; font-weight: 950; font-size: 1.05rem; }
.footer-tag  { margin: 0; opacity: 0.7; font-size: 0.86rem; }

.footer-social {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  background: rgba(6, 14, 22, 0.55);
  color: inherit;
  text-decoration: none;
  font-weight: 880;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background 200ms ease;
}
.social-chip svg { width: 16px; height: 16px; }
.social-chip:hover { transform: translateY(-2px); }
.social-yt:hover   { border-color: #ff0033; color: #ff0033; box-shadow: 0 8px 24px rgba(255, 0, 51, 0.3); }
.social-li:hover   { border-color: #0a66c2; color: #0a66c2; box-shadow: 0 8px 24px rgba(10, 102, 194, 0.3); }
.social-mail:hover { border-color: #00f5ff; color: #00f5ff; box-shadow: 0 8px 24px rgba(0, 245, 255, 0.3); }

.footer-fine { grid-column: 1 / -1; margin: 0; opacity: 0.65; font-size: 0.82rem; }
.footer-fine a { color: inherit; border-bottom: 1px dashed currentColor; text-decoration: none; }

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

@media (prefers-reduced-motion: reduce) {
  .logo3d-cube,
  .logo3d-ring,
  .logo3d-particle,
  .logo3d-floor,
  .core-chip-logo img,
  .yt-player-glow { animation: none !important; }
}


/* ==========================================================================
   HERO CHIP SCENE — Bitronix logo as MCU: SENSE → PROCESS (Edge AI) → ACT
   Replaces the rotating-cube animation with a single, narrative scene.
   ========================================================================== */

/* Retire the old 3D cube so only one hero animation remains */
.hero-logo3d { display: none !important; }
/* Also hide the duplicate logo inside the right-side telemetry device */
.core-chip-logo { display: none !important; }

.hero-chip-stage {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
  perspective: 1400px;
  transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 30px 60px rgba(0, 245, 255, 0.35));
}

.chip-scene {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* ---- Aura behind the chip pulses with the processing rhythm ---- */
.chip-aura {
  transform-origin: 300px 300px;
  animation: chipAura 2.6s ease-in-out infinite;
}
@keyframes chipAura {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* ---- Sensor nodes blink as if reading data ---- */
.sensor-node circle:last-child {
  transform-origin: center;
  transform-box: fill-box;
  animation: sensorBlink 1.6s ease-in-out infinite;
}
.sensor-node:nth-of-type(2) circle:last-child { animation-delay: 0.3s; }
.sensor-node:nth-of-type(3) circle:last-child { animation-delay: 0.6s; }
@keyframes sensorBlink {
  0%, 100% { fill: #043a4a;    transform: scale(1); }
  50%      { fill: #00f5ff;    transform: scale(1.4); }
}

/* ---- Static input traces given a subtle dashed-flow ---- */
.in-traces use {
  stroke-dasharray: 6 4;
  stroke-dashoffset: 0;
  animation: traceFlow 3s linear infinite;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.55));
}
.in-traces use:nth-child(2) { animation-duration: 2.4s; }
.in-traces use:nth-child(3) { animation-duration: 3.6s; }
@keyframes traceFlow {
  to { stroke-dashoffset: -200; }
}

/* ---- Output rays glow + grow as light pours out ---- */
.out-rays use {
  stroke: rgba(255, 200, 87, 0.55);
  stroke-dasharray: 3 6;
  filter: drop-shadow(0 0 6px rgba(255, 200, 87, 0.6));
  animation: rayPulse 2.4s ease-in-out infinite;
}
.out-rays use:nth-child(2) { animation-delay: 0.4s; }
.out-rays use:nth-child(3) { animation-delay: 0.8s; }
@keyframes rayPulse {
  0%, 100% { stroke-opacity: 0.35; stroke-width: 1.5; }
  50%      { stroke-opacity: 0.95; stroke-width: 2.5; }
}

/* ---- Chip body breathes; processing rectangle pulses ---- */
.chip-body {
  filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.6));
  animation: chipBreath 3.2s ease-in-out infinite;
  transform-origin: 300px 300px;
}
@keyframes chipBreath {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.45)); }
  50%      { filter: drop-shadow(0 0 22px rgba(0, 245, 255, 0.95)); }
}
.chip-process {
  transform-origin: 300px 300px;
  animation: chipProcess 2.4s ease-in-out infinite;
  stroke-dasharray: 8 6;
}
@keyframes chipProcess {
  0%, 100% { transform: scale(1);    stroke-opacity: 0.4; stroke-dashoffset: 0; }
  50%      { transform: scale(1.06); stroke-opacity: 1;   stroke-dashoffset: -40; }
}

/* The brand-logo silicon die — sharp, glowing, with subtle scan tilt */
.chip-die {
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.85));
  transform-origin: 300px 300px;
  animation: dieScan 4s ease-in-out infinite;
}
@keyframes dieScan {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.6)); }
  50%      { filter: drop-shadow(0 0 16px rgba(0, 245, 255, 1)); }
}

/* Chip pins flash as data arrives */
.chip-pins rect {
  opacity: 0.55;
  animation: pinFlash 1.8s ease-in-out infinite;
}
.chip-pins rect:nth-child(odd)  { animation-delay: 0.2s; }
.chip-pins rect:nth-child(3n)   { animation-delay: 0.6s; }
.chip-pins rect:nth-child(4n)   { animation-delay: 0.9s; }
@keyframes pinFlash {
  0%, 100% { opacity: 0.4;  filter: drop-shadow(0 0 0   rgba(0, 245, 255, 0)); }
  50%      { opacity: 1;    filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.9)); }
}

/* ---- Edge-AI neural overlay — appears in waves while chip "thinks" ---- */
.ai-net {
  opacity: 0;
  transform-origin: 300px 300px;
  animation: aiThink 4.8s ease-in-out infinite;
}
@keyframes aiThink {
  0%, 18%   { opacity: 0; transform: scale(0.92); }
  35%, 65%  { opacity: 1; transform: scale(1); }
  82%, 100% { opacity: 0; transform: scale(1.05); }
}
.ai-net circle {
  animation: aiNeuron 1.4s ease-in-out infinite;
}
.ai-net circle:nth-child(2) { animation-delay: 0.1s; }
.ai-net circle:nth-child(3) { animation-delay: 0.2s; }
.ai-net circle:nth-child(4) { animation-delay: 0.3s; }
.ai-net circle:nth-child(5) { animation-delay: 0.4s; }
.ai-net circle:nth-child(6) { animation-delay: 0.5s; }
.ai-net circle:nth-child(7) { animation-delay: 0.6s; }
.ai-net circle:nth-child(8) { animation-delay: 0.7s; }
.ai-net circle:nth-child(9) { animation-delay: 0.8s; }
@keyframes aiNeuron {
  0%, 100% { transform: scale(1);   filter: drop-shadow(0 0 2px rgba(255, 200, 87, 0.5)); }
  50%      { transform: scale(1.6); filter: drop-shadow(0 0 8px rgba(255, 200, 87, 1)); }
}
.ai-net circle { transform-box: fill-box; transform-origin: center; }

/* ---- The world being changed: globe pulses, bulb flares ---- */
.world-halo {
  transform-origin: 540px 300px;
  animation: worldGlow 2.6s ease-in-out infinite;
}
@keyframes worldGlow {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.1); }
}
.world-bulb {
  transform-origin: 540px 220px;
  animation: bulbFlare 2.6s ease-in-out infinite;
}
@keyframes bulbFlare {
  0%, 40%, 100% { opacity: 0.3; transform: scale(0.85); }
  60%           { opacity: 1;   transform: scale(1.2); }
}

/* ---- Floor reflection ---- */
.floor-grid line {
  animation: floorShimmer 4s ease-in-out infinite;
}
.floor-grid line:nth-child(2) { animation-delay: 0.3s; }
.floor-grid line:nth-child(3) { animation-delay: 0.6s; }
@keyframes floorShimmer {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 0.7; }
}

/* ---- Stage label under the SVG ---- */
.chip-label {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.3);
  background: rgba(4, 10, 18, 0.7);
  backdrop-filter: blur(8px);
  color: rgba(236, 246, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 245, 255, 0.2);
}
.chip-label em {
  font-style: normal;
  background: linear-gradient(90deg, #00f5ff, #ffc857);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.chip-label i {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 8px #00f5ff;
  animation: chipLabelDot 1.4s ease-in-out infinite;
}
@keyframes chipLabelDot {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

@media (max-width: 720px) {
  .hero-chip-stage { width: min(420px, 100%); }
  .chip-label { font-size: 0.62rem; gap: 6px; padding: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .chip-aura, .sensor-node circle, .in-traces use, .out-rays use,
  .chip-body, .chip-process, .chip-die, .chip-pins rect,
  .ai-net, .ai-net circle, .world-halo, .world-bulb,
  .floor-grid line, .chip-label i,
  .signals circle { animation: none !important; }
}


/* ==========================================================================
   HERO LAYOUT FILL — make the chip dominant, close the gap
   ========================================================================== */
/* Override the old hero-visual reservation so chip can grow */
.hero-visual {
  width: min(820px, 100%) !important;
  min-height: auto !important;
  align-self: center;
}

.hero-chip-stage-xl {
  width: min(820px, 100%);
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  filter: drop-shadow(0 40px 80px rgba(0, 245, 255, 0.45));
}

/* Hide leftover lab-device pieces the user no longer wants */
.lab-device,
.floating-readout,
.signal-panel { display: none !important; }

/* ==========================================================================
   NEW CHIP-SCENE INTERNALS — zoom window, NVIC/CPU/AI, energy rings
   ========================================================================== */

/* External sensors — gentle blink */
.ext-sensors .sensor circle:last-of-type,
.ext-sensors .sensor circle:nth-of-type(2) {
  transform-box: fill-box;
  transform-origin: center;
  animation: extSensorBlink 1.6s ease-in-out infinite;
}
.ext-sensors .sensor-vision { animation-delay: 0.3s; }
.ext-sensors .sensor-imu    { animation-delay: 0.6s; }
@keyframes extSensorBlink {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}

/* Zoom-panel slow drift to feel "alive" */
.zoom-panel {
  transform-origin: 600px 340px;
  animation: zoomBreath 5s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.3));
}
@keyframes zoomBreath {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(0, 245, 255, 0.2)); }
  50%      { filter: drop-shadow(0 0 24px rgba(0, 245, 255, 0.55)); }
}

/* Magnifier link lines flicker */
.zoom-link {
  stroke-dashoffset: 0;
  animation: linkFlow 2.4s linear infinite;
}
@keyframes linkFlow {
  to { stroke-dashoffset: -40; }
}

/* zblocks light up in sequence (sense -> NVIC -> CPU -> AI -> OUT) */
.zblock rect {
  transition: stroke 200ms ease;
  animation: zblockPulse 4.8s ease-in-out infinite;
}
.zblock-io   rect { animation-delay: 0s;    }
.zblock-nvic rect { animation-delay: 0.6s;  }
.zblock-cpu  rect { animation-delay: 1.2s;  }
.zblock-ai   rect { animation-delay: 1.8s;  }
.zblock-out  rect { animation-delay: 2.4s;  }
@keyframes zblockPulse {
  0%, 90%, 100% { stroke: rgba(67,199,255,0.55); filter: drop-shadow(0 0 0 transparent); }
  10%, 25%      { stroke: #00f5ff; filter: drop-shadow(0 0 8px rgba(0,245,255,0.95)); }
}

/* CPU register bars run like a tiny terminal */
.cpu-regs rect {
  animation: regRun 1s steps(6) infinite;
  transform-box: fill-box;
  transform-origin: left center;
}
.cpu-regs rect:nth-child(2) { animation-delay: 0.1s; }
.cpu-regs rect:nth-child(3) { animation-delay: 0.2s; }
.cpu-regs rect:nth-child(4) { animation-delay: 0.3s; }
.cpu-regs rect:nth-child(5) { animation-delay: 0.4s; }
@keyframes regRun {
  0%, 100% { transform: scaleX(0.3); opacity: 0.5; }
  50%      { transform: scaleX(1);   opacity: 1; }
}

/* AI mini-net neurons fire */
.ai-mini circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: aiMiniFire 1.6s ease-in-out infinite;
}
.ai-mini circle:nth-child(2) { animation-delay: 0.15s; }
.ai-mini circle:nth-child(3) { animation-delay: 0.30s; }
.ai-mini circle:nth-child(4) { animation-delay: 0.45s; }
.ai-mini circle:nth-child(5) { animation-delay: 0.60s; }
.ai-mini circle:nth-child(6) { animation-delay: 0.75s; }
@keyframes aiMiniFire {
  0%, 100% { transform: scale(1);   filter: drop-shadow(0 0 0 transparent); }
  50%      { transform: scale(1.8); filter: drop-shadow(0 0 4px #ffffff); }
}

/* Big energy output — expanding rings repeat */
.energy-ring {
  transform-origin: 400px 300px;
  transform-box: view-box;
  opacity: 0;
  animation: energyExpand 2.8s ease-out infinite;
}
.energy-ring.r1 { animation-delay: 0s;   }
.energy-ring.r2 { animation-delay: 0.9s; }
.energy-ring.r3 { animation-delay: 1.8s; }
@keyframes energyExpand {
  0%   { transform: scale(0.4); opacity: 0; stroke-width: 4; }
  10%  { opacity: 0.95; }
  100% { transform: scale(3.5); opacity: 0; stroke-width: 0.5; }
}

/* World pulses softly */
.world-halo {
  transform-origin: 700px 120px;
  transform-box: view-box;
  animation: worldGlowBlue 2.6s ease-in-out infinite;
}
@keyframes worldGlowBlue {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.12); }
}

@media (max-width: 980px) {
  .hero-chip-stage-xl { width: min(680px, 100%); aspect-ratio: 4 / 3.2; }
}
@media (max-width: 720px) {
  .hero-chip-stage-xl { width: 100%; aspect-ratio: 4 / 3.4; }
}

/* ==========================================================================
   YOUTUBE FACADE — never shows "preview not available"
   ========================================================================== */
.yt-facade {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: #04080d;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.yt-facade-poster {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(0, 245, 255, 0.28), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(67, 199, 255, 0.22), transparent 55%),
    linear-gradient(140deg, #061421 0%, #03060c 65%);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 320ms ease;
}

.yt-facade-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg,  rgba(67, 199, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(67, 199, 255, 0.18) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  opacity: 0.7;
  pointer-events: none;
  animation: ytFacadeGrid 12s linear infinite;
}
@keyframes ytFacadeGrid {
  to { background-position: 48px 48px; }
}

.yt-facade-content {
  position: relative;
  z-index: 2;
  padding: 32px 28px 16px;
  display: grid;
  gap: 8px;
  max-width: 78%;
}
.yt-facade-eyebrow {
  font-size: 0.74rem;
  font-weight: 880;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 245, 255, 0.85);
}
.yt-facade-title {
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  font-weight: 950;
  line-height: 1.12;
  color: #ffffff;
  text-shadow: 0 0 28px rgba(0, 245, 255, 0.45);
  letter-spacing: -0.01em;
}
.yt-facade-meta {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(236, 246, 255, 0.7);
}

.yt-facade-play {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  width: 92px;
  height: 64px;
  display: grid;
  place-items: center;
  transition: transform 220ms ease;
}
.yt-facade-play svg { width: 100%; height: 100%; display: block; }
.yt-play-bg    { fill: #ff0033; transition: fill 200ms ease; opacity: 0.92; filter: drop-shadow(0 0 18px rgba(255,0,51,0.6)); }
.yt-play-arrow { fill: #ffffff; }

.yt-facade:hover .yt-facade-poster,
.yt-facade:focus-visible .yt-facade-poster {
  filter: brightness(1.08);
}
.yt-facade:hover .yt-facade-play { transform: scale(1.08); }
.yt-facade:hover .yt-play-bg     { fill: #ff1f4a; }

/* The iframe that JS injects after click */
.yt-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #000;
}

@media (max-width: 720px) {
  .yt-facade-content { padding: 22px 18px 8px; max-width: 90%; }
  .yt-facade-play { width: 70px; height: 50px; margin-top: 8px; }
}

/* ==========================================================================
   FLYING OBJECT — CubeSat satellite drifts across the page periodically
   (also triggers on long idle).
   ========================================================================== */
.flying-object {
  position: fixed;
  top: 22vh;
  left: -180px;
  z-index: 65;
  width: 96px;
  height: 60px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 245, 255, 0.6));
}
.flying-object.is-flying {
  animation: flyAcross 8s cubic-bezier(0.4, 0.05, 0.6, 0.95) forwards;
}
@keyframes flyAcross {
  0%   { transform: translateX(0)              translateY(0)    rotate(-4deg); opacity: 0; }
  6%   { opacity: 1; }
  35%  { transform: translateX(45vw)           translateY(-30px) rotate(2deg); }
  70%  { transform: translateX(80vw)           translateY(20px)  rotate(-3deg); }
  94%  { opacity: 1; }
  100% { transform: translateX(calc(100vw + 240px)) translateY(0) rotate(0deg); opacity: 0; }
}
.flying-object .trail {
  position: absolute;
  top: 50%;
  right: 92%;
  width: 200px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.7), rgba(0, 245, 255, 0));
  filter: blur(1px);
}

@media (prefers-reduced-motion: reduce) {
  .energy-ring,
  .ext-sensors .sensor circle,
  .zoom-panel,
  .zoom-link,
  .zblock rect,
  .cpu-regs rect,
  .ai-mini circle,
  .world-halo,
  .yt-facade-grid,
  .flying-object { animation: none !important; }
}


/* ==========================================================================
   BRAND TYPOGRAPHY — Orbitron-based wordmark to match the logo vibe
   ========================================================================== */
.brand-wordmark,
.brand-xl > span:last-child {
  font-family: "Orbitron", "Audiowide", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
  background: linear-gradient(180deg, #ffffff 0%, #d6f3ff 35%, #43c7ff 60%, #0a7da6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.4px rgba(0, 245, 255, 0.45);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 8px rgba(0,245,255,0.4));
}

/* Bigger header brand logo */
.brand-mark-xl {
  width: 68px !important;
  height: 68px !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.5),
    0 0 28px rgba(0, 245, 255, 0.45),
    inset 0 0 18px rgba(0, 245, 255, 0.28) !important;
}
.brand-mark-xl img {
  padding: 6px !important;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.7)) !important;
  animation: brandPulse 4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { transform: scale(1)   rotate(0deg); }
  50%      { transform: scale(1.06) rotate(1.5deg); }
}

/* Massive hero brand logo */
.hero-logo-xl {
  width: 168px !important;
  height: 168px !important;
  border-radius: 26px !important;
  padding: 10px !important;
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.55),
    0 26px 70px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 245, 255, 0.45),
    inset 0 0 28px rgba(0, 245, 255, 0.3) !important;
  filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.7)) !important;
}
.hero-brand-card-xl { gap: 22px; }

/* ==========================================================================
   METALLIC HERO TITLE — Orbitron font, brushed-chrome gradient + sweep
   ========================================================================== */
.hero-title-metal {
  font-family: "Orbitron", "Audiowide", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 1.02;
  margin: 0.1em 0 0.35em;
  perspective: 900px;
}
.metal-text {
  position: relative;
  display: inline-block;
  background:
    linear-gradient(180deg,
      #ffffff 0%,
      #e9f7ff 18%,
      #9ad9ff 38%,
      #2da3d1 52%,
      #0e5e7e 62%,
      #43c7ff 78%,
      #ffffff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 245, 255, 0.35);
  filter:
    drop-shadow(0 2px 0 rgba(0,0,0,0.55))
    drop-shadow(0 0 18px rgba(0, 245, 255, 0.55))
    drop-shadow(0 0 38px rgba(67, 199, 255, 0.35));
  transform-style: preserve-3d;
  animation: metalTilt 8s ease-in-out infinite;
}
.metal-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255,255,255,0.85) 48%,
    transparent 66%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 250% 100%;
  background-position: -150% 0;
  animation: metalSheen 4.5s linear infinite;
}
.metal-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(0, 245, 255, 0.22);
  filter: blur(0.5px);
  pointer-events: none;
  z-index: -1;
  transform: translate(2px, 3px);
}
@keyframes metalSheen {
  0%   { background-position: -150% 0; }
  60%  { background-position:  150% 0; }
  100% { background-position:  150% 0; }
}
@keyframes metalTilt {
  0%, 100% { transform: rotateX(0deg)  rotateY(0deg); }
  25%      { transform: rotateX(2deg)  rotateY(-3deg); }
  50%      { transform: rotateX(0deg)  rotateY(0deg); }
  75%      { transform: rotateX(-2deg) rotateY(3deg); }
}

/* ==========================================================================
   3D ANIMATED SECTION TITLES
   ========================================================================== */
.title-3d {
  font-family: "Orbitron", "Audiowide", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.05),
    0 2px 0 rgba(0,0,0,0.35),
    0 4px 14px rgba(0, 245, 255, 0.28),
    0 0 28px rgba(67, 199, 255, 0.25);
  transform-style: preserve-3d;
  perspective: 800px;
  animation: title3dFloat 7s ease-in-out infinite;
}
@keyframes title3dFloat {
  0%, 100% { transform: translateZ(0)   rotateX(0deg); }
  50%      { transform: translateZ(6px) rotateX(2deg); }
}

/* ==========================================================================
   DEV BOARDS SHOWCASE (3D tilt cards)
   ========================================================================== */
.boards-section {
  position: relative;
  padding: 110px 0 130px;
  color: #ecf6ff;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 245, 255, 0.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(198, 107, 255, 0.18), transparent 45%),
    linear-gradient(180deg, #04080d 0%, #07101a 60%, #04080d 100%);
  overflow: hidden;
  isolation: isolate;
}
.boards-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(90deg,  rgba(67, 199, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(67, 199, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 50%, transparent 90%);
}
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 56px;
  perspective: 1400px;
}
.board-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(0, 245, 255, 0.06), rgba(255,255,255,0.02)),
    rgba(4, 12, 18, 0.72);
  border: 1px solid rgba(67, 199, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(0, 245, 255, 0.08);
  transform-style: preserve-3d;
  transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  transition: transform 320ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 320ms ease, border-color 320ms ease;
  animation: boardLevitate 6s ease-in-out infinite;
  will-change: transform;
}
.board-card:nth-child(2) { animation-delay: 0.6s; }
.board-card:nth-child(3) { animation-delay: 1.2s; }
.board-card:nth-child(4) { animation-delay: 1.8s; }
@keyframes boardLevitate {
  0%, 100% { transform: translateY(0)    rotateX(0deg) rotateY(0deg); }
  50%      { transform: translateY(-8px) rotateX(3deg) rotateY(-3deg); }
}
.board-card:hover {
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 70px rgba(0, 245, 255, 0.35);
  animation-play-state: paused;
}
.board-stage {
  position: relative;
  border-radius: 12px;
  padding: 10px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0, 245, 255, 0.18), transparent 60%),
    rgba(2, 8, 14, 0.7);
  border: 1px solid rgba(67, 199, 255, 0.18);
  overflow: hidden;
  transform: translateZ(30px);
}
.board-stage::after {
  /* glossy floor reflection */
  content: "";
  position: absolute; left: 8%; right: 8%; bottom: -4px; height: 18px;
  background: radial-gradient(ellipse at center, rgba(0, 245, 255, 0.45), transparent 70%);
  filter: blur(4px);
  opacity: 0.6;
  pointer-events: none;
}
.board-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
  animation: boardSpin 9s ease-in-out infinite;
  transform-origin: center;
}
@keyframes boardSpin {
  0%, 100% { transform: rotateY(0deg)  rotateX(0deg); }
  50%      { transform: rotateY(8deg)  rotateX(-4deg); }
}
.board-card-ai .board-svg { animation-duration: 7s; }
/* Real photo variant of the board "svg" slot */
.board-photo {
  aspect-ratio: 220 / 140;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  background: #04101a;
}
/* ESP32 photo is taller than the 220:140 stage — show the entire board
   instead of cropping the top/bottom off. */
.board-photo-esp32 {
  object-fit: contain;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(91, 108, 255, 0.18), transparent 70%),
    #04101a;
  padding: 4px;
}
.board-meta { transform: translateZ(20px); }
.board-meta h3 {
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 4px 0 6px;
  background: linear-gradient(180deg, #ffffff 0%, #43c7ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.board-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: "Orbitron", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00f5ff;
  border: 1px solid rgba(0, 245, 255, 0.45);
  border-radius: 999px;
  background: rgba(0, 245, 255, 0.08);
}
.board-meta p {
  margin: 4px 0 0;
  color: rgba(236, 246, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}
.board-card .chip-mcu {
  animation: chipMcuGlow 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes chipMcuGlow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.9)); }
}

/* ==========================================================================
   CRAWLING ROBOTS — drift across the page on different bands
   ========================================================================== */
.crawl-bots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}
.crawl-bot {
  position: absolute;
  width: 64px;
  height: 48px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
  opacity: 0.85;
}
.crawl-bot svg { width: 100%; height: 100%; display: block; }
.crawl-bot-1 {
  top: 18vh;
  animation: crawlAcrossLR 28s linear infinite;
  animation-delay: -4s;
}
.crawl-bot-2 {
  width: 78px; height: 52px;
  top: 52vh;
  animation: crawlAcrossRL 36s linear infinite;
  animation-delay: -10s;
}
.crawl-bot-3 {
  width: 56px; height: 48px;
  top: 78vh;
  animation: crawlAcrossLR 24s linear infinite;
  animation-delay: -16s;
}
@keyframes crawlAcrossLR {
  0%   { transform: translateX(-12vw) translateY(0)   rotate(-2deg); }
  20%  { transform: translateX( 18vw) translateY(-10px) rotate(2deg); }
  40%  { transform: translateX( 38vw) translateY(0)   rotate(-2deg); }
  60%  { transform: translateX( 60vw) translateY(-12px) rotate(3deg); }
  80%  { transform: translateX( 82vw) translateY(0)   rotate(-2deg); }
  100% { transform: translateX(112vw) translateY(-6px) rotate(2deg); }
}
@keyframes crawlAcrossRL {
  0%   { transform: translateX(112vw) translateY(0)   rotate(2deg)  scaleX(-1); }
  50%  { transform: translateX( 50vw) translateY(-10px) rotate(-2deg) scaleX(-1); }
  100% { transform: translateX(-12vw) translateY(0)   rotate(2deg)  scaleX(-1); }
}
/* spider-bot leg shimmy */
.crawl-bot-1 .leg {
  transform-box: fill-box;
  transform-origin: 30px 38px;
  animation: legWiggle 0.4s ease-in-out infinite;
}
.crawl-bot-1 .leg-l2, .crawl-bot-1 .leg-r2 { animation-delay: 0.1s; }
.crawl-bot-1 .leg-l3, .crawl-bot-1 .leg-r3 { animation-delay: 0.2s; }
@keyframes legWiggle {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(8deg); }
}
/* rover treads roll */
.crawl-bot-2 .treads circle {
  animation: treadRoll 0.6s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes treadRoll {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-10px); opacity: 0.4; }
}
/* drone props spin */
.crawl-bot-3 .props line {
  transform-box: fill-box;
  transform-origin: center;
  animation: propSpin 0.15s linear infinite;
}
@keyframes propSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .crawl-bot-1 { top: 12vh; }
  .crawl-bot-2 { top: 48vh; width: 64px; height: 44px; }
  .crawl-bot-3 { top: 82vh; width: 48px; }
  .hero-logo-xl { width: 120px !important; height: 120px !important; }
  .brand-mark-xl { width: 56px !important; height: 56px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .crawl-bot,
  .board-card,
  .board-svg,
  .metal-text,
  .metal-text::before,
  .title-3d,
  .brand-mark-xl img { animation: none !important; }
}


/* ==========================================================================
   FOUNDER PHOTO — replaces SJ avatar with real portrait, neon framed
   ========================================================================== */
.founder-card-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.founder-photo-frame {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  padding: 6px;
  background:
    conic-gradient(from 0deg, #00f5ff, #43c7ff, #c66bff, #00f5ff);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.4),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 245, 255, 0.45);
  isolation: isolate;
}
.founder-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #04101a;
  /* Crisp rendering: no transforms or borders that force GPU rasterization blur. */
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.35);
  image-rendering: auto;
}
.founder-photo-ring,
.founder-photo-ring-2 {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 245, 255, 0.45);
  pointer-events: none;
}
.founder-photo-ring-2 {
  inset: -28px;
  border-style: dotted;
  border-color: rgba(198, 107, 255, 0.45);
}
@keyframes founderRingSpin {
  to { transform: rotate(360deg); }
}
@keyframes founderCounterSpin {
  to { transform: rotate(-360deg); }
}
@keyframes founderBreath {
  0%, 100% { filter: drop-shadow(0 0 8px  rgba(0, 245, 255, 0.35)); }
  50%      { filter: drop-shadow(0 0 22px rgba(0, 245, 255, 0.7)); }
}

@media (max-width: 720px) {
  .founder-photo-frame { width: 180px; height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .founder-photo-frame,
  .founder-photo,
  .founder-photo-ring,
  .founder-photo-ring-2 { animation: none !important; }
}
