/* elmallah.css: E.L.M.A.L.L.A.H. holoterminal (/elmallah/).
   Sibling to jarvis.css but a different machine entirely: angular hex-cut panels
   instead of circles, a projected holocron instead of an arc reactor, and the
   site's own tri-colour: UCI blue, Trabuco gold, Islamic green: instead of cyan. */

:root {
  --b:       #5fa3ec;   /* UCI blue: primary */
  --b-hi:    #cfe6ff;
  --b-mid:   rgba(95, 163, 236, 0.55);
  --b-dim:   rgba(95, 163, 236, 0.26);
  --b-faint: rgba(95, 163, 236, 0.11);
  --y:       #f5c63c;   /* Trabuco gold: accent */
  --y-dim:   rgba(245, 198, 60, 0.5);
  --g:       #ffd76a;   /* light gold: status OK */
  --g-dim:   rgba(255, 215, 106, 0.45);
  --bg:      #03070d;
  --panel:   linear-gradient(158deg, rgba(95,163,236,0.075), rgba(3,7,13,0.92));
  --mono:    'JetBrains Mono', ui-monospace, monospace;
  --tech:    'Chakra Petch', 'Space Grotesk', sans-serif;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --cut:     polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  --glow-b:  0 0 12px rgba(95,163,236,0.5);
  --glow-y:  0 0 12px rgba(245,198,60,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body.el {
  background: var(--bg); color: var(--b);
  font-family: var(--tech); overflow-x: hidden; cursor: crosshair;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--y); color: #17130a; }
a { color: inherit; text-decoration: none; }

/* ═══════════ starfield + atmosphere ═══════════ */

.el-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#elStars { position: absolute; inset: 0; width: 100%; height: 100%; }
.el-hex {
  position: absolute; inset: -2px; opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'><path d='M28 0 56 16v32L28 64 0 48V16z' fill='none' stroke='%235fa3ec' stroke-opacity='0.12' stroke-width='1'/><path d='M28 64 56 80v32L28 128 0 112V80z' fill='none' stroke='%235fa3ec' stroke-opacity='0.12' stroke-width='1'/></svg>");
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 20%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 20%, transparent 95%);
}
.el-aura {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: min(130vh, 130vw); aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(95,163,236,0.13), transparent 55%),
    radial-gradient(circle at 50% 70%, rgba(255,215,106,0.08), transparent 60%);
  animation: aura 8s ease-in-out infinite;
}
@keyframes aura { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.el-vig { position: absolute; inset: 0; background: radial-gradient(ellipse 78% 68% at 50% 50%, transparent 38%, rgba(0,0,0,0.82) 100%); }

/* angular frame */
.el-frame { position: fixed; inset: 10px; z-index: 6; pointer-events: none; }
.el-frame::before, .el-frame::after {
  content: ""; position: absolute; width: 120px; height: 120px;
  border: 1px solid var(--b-dim);
}
.el-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; clip-path: polygon(0 0, 100% 0, 100% 1px, 22px 1px, 1px 22px, 1px 100%, 0 100%); }
.el-frame::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; clip-path: polygon(100% 100%, 0 100%, 0 calc(100% - 1px), calc(100% - 22px) calc(100% - 1px), calc(100% - 1px) calc(100% - 22px), calc(100% - 1px) 0, 100% 0); }

/* ═══════════ boot ═══════════ */

.el-boot {
  position: fixed; inset: 0; z-index: 200; background: #01040a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  transition: opacity .6s ease, visibility .6s;
}
.el-boot.is-done { opacity: 0; visibility: hidden; }
.el-boot-mark {
  font-family: var(--tech); font-weight: 700;
  font-size: clamp(1.1rem, 4.4vw, 2.6rem); letter-spacing: 0.3em; padding-left: 0.3em;
  color: var(--b-hi); text-shadow: var(--glow-b);
}
.el-boot-sub { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.3em; color: var(--y); text-transform: uppercase; }
.el-boot-log {
  font-family: var(--mono); font-size: clamp(0.6rem, 1.3vw, 0.74rem); line-height: 2;
  letter-spacing: 0.06em; color: var(--b-mid); width: min(600px, 84vw); min-height: 10em;
}
.el-boot-log b { color: var(--b-hi); font-weight: 400; }
.el-boot-log i { color: var(--g); font-style: normal; }
.el-boot-bar {
  width: min(600px, 84vw); height: 3px; background: var(--b-faint);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.el-boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--b), var(--g)); box-shadow: var(--glow-b); }
.el-skip {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.24em; color: var(--b-dim);
  background: none; border: 1px solid var(--b-faint); padding: 0.5rem 1rem; cursor: crosshair;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: color .25s, border-color .25s;
}
.el-skip:hover { color: var(--y); border-color: var(--y-dim); }

/* ═══════════ shell ═══════════ */

.el-shell {
  position: relative; z-index: 3; min-height: 100vh;
  padding: 3.4rem clamp(1rem, 3vw, 3rem) 2.4rem clamp(2.6rem, 5vw, 4.6rem);
  display: flex; flex-direction: column; gap: clamp(0.9rem, 1.8vw, 1.6rem);
  opacity: 0; transition: opacity .9s ease;
}
body.el.is-live .el-shell { opacity: 1; }

/* vertical spine wordmark */
.el-spine {
  position: fixed; left: 0; top: 0; bottom: 0; width: clamp(2.2rem, 4vw, 3.4rem); z-index: 7;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem;
  border-right: 1px solid var(--b-faint); pointer-events: none;
}
.el-spine b {
  writing-mode: vertical-rl; font-family: var(--tech); font-weight: 700;
  font-size: clamp(0.62rem, 1.1vw, 0.8rem); letter-spacing: 0.5em;
  color: var(--b-mid); text-transform: uppercase;
}
.el-spine i { flex: 1; width: 1px; background: linear-gradient(to bottom, transparent, var(--b-dim), transparent); }
.el-spine em {
  writing-mode: vertical-rl; font-family: var(--mono); font-style: normal;
  font-size: 0.5rem; letter-spacing: 0.3em; color: var(--y-dim);
}
@media (max-width: 720px) { .el-spine { display: none; } }

/* persistent exit, pinned past the spine */
.el-home {
  position: fixed; z-index: 9; top: 14px; left: calc(clamp(2.2rem, 4vw, 3.4rem) + 12px);
  display: inline-flex; align-items: center; gap: 0.42rem;
  padding: 0.45rem 0.9rem 0.45rem 0.6rem;
  border: 1px solid var(--b-dim); background: rgba(3,7,13,0.8);
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.2em; color: var(--b-mid);
  transition: color .25s, border-color .25s, background .25s;
}
.el-home svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.el-home:hover { color: #17130a; background: var(--y); border-color: var(--y); }
@media (max-width: 720px) {
  .el-home { left: 10px; top: 10px; }
  .el-shell { padding-top: 4rem; }
}

/* top ribbon */
.el-ribbon {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.el-chip {
  padding: 0.34rem 0.8rem; border: 1px solid var(--b-faint); color: var(--b-mid);
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  background: rgba(95,163,236,0.05);
}
.el-chip--ok { color: var(--g); border-color: var(--g-dim); }
.el-chip--y  { color: var(--y); border-color: var(--y-dim); }
.el-chip b { color: var(--b-hi); font-weight: 400; }
.el-ribbon .el-spacer { flex: 1; height: 1px; background: linear-gradient(90deg, var(--b-faint), transparent); min-width: 20px; }

/* ═══════════ panels ═══════════ */

.el-grid {
  flex: 1; display: grid; gap: clamp(0.9rem, 1.6vw, 1.4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
.el-col { display: flex; flex-direction: column; gap: clamp(0.9rem, 1.6vw, 1.4rem); min-width: 0; }

.el-panel {
  background: var(--b-dim); padding: 1px; clip-path: var(--cut);
  opacity: 0; transform: translateY(16px);
  transition: background .4s;
}
body.el.is-live .el-panel { animation: panel-in .7s var(--ease) forwards; }
.el-col:nth-child(1) .el-panel:nth-child(1) { animation-delay: .04s; }
.el-col:nth-child(1) .el-panel:nth-child(2) { animation-delay: .12s; }
.el-col:nth-child(1) .el-panel:nth-child(3) { animation-delay: .2s; }
.el-col:nth-child(3) .el-panel:nth-child(1) { animation-delay: .08s; }
.el-col:nth-child(3) .el-panel:nth-child(2) { animation-delay: .16s; }
.el-col:nth-child(3) .el-panel:nth-child(3) { animation-delay: .24s; }
@keyframes panel-in { to { opacity: 1; transform: none; } }
.el-panel:hover { background: var(--b-mid); }
.el-panel > div { background: var(--panel); clip-path: var(--cut); padding: 0.95rem 1.05rem 1.15rem; height: 100%; }

.el-h {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--b-hi);
}
.el-h::before {
  content: ""; width: 8px; height: 8px; flex: none; background: var(--g);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 8px rgba(255,215,106,0.8); animation: dia 2.6s ease-in-out infinite;
}
.el-h--y::before { background: var(--y); box-shadow: var(--glow-y); }
.el-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--b-dim), transparent); }
@keyframes dia { 0%,100% { opacity: 1; transform: rotate(0); } 50% { opacity: .3; transform: rotate(90deg); } }

/* rows */
.el-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.el-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem;
  font-family: var(--mono); font-size: 0.62rem;
}
.el-row span:first-child { color: var(--b-mid); font-size: 0.54rem; letter-spacing: 0.16em; text-transform: uppercase; }
.el-row span:last-child { color: var(--b-hi); text-align: right; }
.el-row .ok { color: var(--g); }
.el-row .warn { color: var(--y); }

.el-name {
  font-family: var(--tech); font-weight: 700; line-height: 1.05;
  font-size: clamp(1.1rem, 2.1vw, 1.6rem); letter-spacing: 0.05em;
  color: var(--b-hi); text-shadow: var(--glow-b);
}
.el-desig { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; color: var(--y); margin-top: 0.45rem; text-transform: uppercase; }
.el-say {
  margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--b-faint);
  font-family: var(--mono); font-size: 0.64rem; color: var(--g); min-height: 2.6em; line-height: 1.6;
}
.el-caret { display: inline-block; width: 6px; height: 0.95em; background: var(--g); vertical-align: -0.12em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* bars, angled ends */
.el-meters { display: flex; flex-direction: column; gap: 0.6rem; }
.el-meter-top {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--b-mid); margin-bottom: 0.25rem;
}
.el-meter-top i { font-style: normal; color: var(--b-hi); }
.el-bar {
  height: 6px; background: rgba(95,163,236,0.08); border: 1px solid var(--b-faint);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); position: relative; overflow: hidden;
}
.el-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: repeating-linear-gradient(90deg, var(--b) 0 4px, rgba(95,163,236,0.3) 4px 7px);
  box-shadow: 0 0 10px rgba(95,163,236,0.6); transition: width 1.5s var(--ease);
}
.el-bar--g i { background: repeating-linear-gradient(90deg, var(--g) 0 4px, rgba(255,215,106,0.3) 4px 7px); box-shadow: 0 0 10px rgba(255,215,106,0.55); }
.el-bar--y i { background: repeating-linear-gradient(90deg, var(--y) 0 4px, rgba(245,198,60,0.3) 4px 7px); box-shadow: var(--glow-y); }
body.el.is-live .el-bar i { width: var(--v, 0%); }

/* link lists */
.el-links { display: flex; flex-direction: column; }
.el-link {
  position: relative; display: flex; align-items: center; gap: 0.6rem; padding: 0.44rem 0.1rem;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--b-mid); transition: color .25s, transform .25s var(--ease), letter-spacing .25s;
  border-bottom: 1px solid var(--b-faint);
}
.el-link::before {
  content: ""; width: 7px; height: 7px; flex: none; border: 1px solid var(--b-dim);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transition: background .25s, border-color .25s, box-shadow .25s;
}
.el-link:hover { color: var(--y); transform: translateX(5px); letter-spacing: 0.15em; }
.el-link:hover::before { background: var(--y); border-color: var(--y); box-shadow: var(--glow-y); }
.el-link em { margin-left: auto; font-style: normal; font-size: 0.5rem; letter-spacing: 0.14em; color: var(--b-dim); }

/* craft manifest */
.el-craft { display: flex; flex-direction: column; gap: 0.55rem; }
.el-craft-row {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.5rem;
  background: rgba(95,163,236,0.04); border-left: 2px solid var(--b-dim);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.el-craft-row:hover { background: rgba(95,163,236,0.1); border-left-color: var(--y); transform: translateX(4px); }
.el-craft-row img { width: 26px; height: 26px; border-radius: 6px; flex: none; object-fit: cover; }
.el-craft-b { display: block; min-width: 0; flex: 1; }
.el-craft-t { display: block; font-family: var(--tech); font-weight: 600; font-size: 0.82rem; color: var(--b-hi); line-height: 1.1; }
.el-craft-m { display: block; font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.14em; color: var(--b-mid); text-transform: uppercase; margin-top: 2px; }
.el-craft-s { font-family: var(--mono); font-size: 0.46rem; letter-spacing: 0.12em; color: var(--g); flex: none; }
.el-craft-s.off { color: var(--b-dim); }

/* ═══════════ holotable ═══════════ */

.el-holo-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }

.el-holo {
  position: relative; width: 100%; aspect-ratio: 1 / 0.92;
  display: grid; place-items: center; perspective: 1000px;
  opacity: 0; transform: scale(.9);
}
body.el.is-live .el-holo { animation: holo-in 1.1s var(--ease) .2s forwards; }
@keyframes holo-in { to { opacity: 1; transform: none; } }

/* projector plate */
.el-plate {
  position: absolute; bottom: 6%; left: 50%; width: 62%; aspect-ratio: 1;
  transform: translateX(-50%) rotateX(74deg); transform-style: preserve-3d;
}
.el-plate span {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--b-dim);
}
.el-plate span:nth-child(2) { inset: 14%; border-color: var(--b-faint); border-style: dashed; animation: spin 22s linear infinite; }
.el-plate span:nth-child(3) { inset: 30%; border-color: var(--g-dim); animation: spin 14s linear infinite reverse; }
.el-plate span:nth-child(4) { inset: 44%; border-color: var(--y-dim); }
@keyframes spin { to { transform: rotate(360deg); } }

/* light cone */
.el-beam {
  position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  width: 46%; height: 46%;
  background: linear-gradient(to top, rgba(95,163,236,0.28), rgba(95,163,236,0.02) 75%, transparent);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: blur(1px); animation: beam 3.6s ease-in-out infinite;
}
@keyframes beam { 0%,100% { opacity: .55; } 50% { opacity: .95; } }

/* the holocron */
.el-cube-stage { position: relative; transform: translateY(-14%); transform-style: preserve-3d; }
.el-cube {
  position: relative; width: var(--cube); height: var(--cube);
  transform-style: preserve-3d;
  transform: rotateX(-22deg) rotateY(0deg);
}
:root { --cube: clamp(96px, 15vw, 168px); }
@keyframes cube-spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to   { transform: rotateX(-22deg) rotateY(360deg); }
}
.el-cube span {
  position: absolute; inset: 0;
  border: 1px solid rgba(95,163,236,0.8);
  background: linear-gradient(150deg, rgba(95,163,236,0.20), rgba(255,215,106,0.10) 60%, rgba(245,198,60,0.06));
  box-shadow: inset 0 0 34px rgba(95,163,236,0.35), 0 0 26px rgba(95,163,236,0.28);
}
.el-cube span::after {
  content: ""; position: absolute; inset: 10%;
  border: 1px solid rgba(245,198,60,0.45);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  animation: face-frame 4s ease-in-out infinite;
}
@keyframes face-frame { 0%,100% { opacity: .5; transform: rotate(0); } 50% { opacity: 1; transform: rotate(60deg); } }
/* each face carries one of the six personal apps, rendered as a hologram */
.el-cube span img {
  position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: cover;
  opacity: 0.85; mix-blend-mode: screen;
  filter: grayscale(1) brightness(1.35) contrast(1.15) sepia(1) hue-rotate(160deg) saturate(3.4);
  animation: face-flick 6s steps(1) infinite;
}
@keyframes face-flick { 0%,88%,93%,100% { opacity: .85; } 90% { opacity: .45; } 96% { opacity: 1; } }
.el-cube .f1 { transform: translateZ(calc(var(--cube) / 2)); }
.el-cube .f2 { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); }
.el-cube .f3 { transform: rotateY(90deg)  translateZ(calc(var(--cube) / 2)); }
.el-cube .f4 { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); }
.el-cube .f5 { transform: rotateX(90deg)  translateZ(calc(var(--cube) / 2)); }
.el-cube .f6 { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); }

/* glowing heart inside the cube */
.el-heart {
  position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #ffffff, #d8ecff 18%, var(--b) 45%, rgba(255,215,106,0.5) 72%, transparent 78%);
  box-shadow: 0 0 40px rgba(95,163,236,0.8), 0 0 90px rgba(255,215,106,0.35);
  animation: heart 3.2s ease-in-out infinite;
}
@keyframes heart { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .92; } 50% { transform: translate(-50%,-50%) scale(1.14); opacity: 1; } }

/* orbiting nodes */
.el-orbit { position: absolute; inset: -26%; transform-style: preserve-3d; animation: spin 26s linear infinite; }
.el-orbit i {
  position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px;
  background: var(--y); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: var(--glow-y);
}
.el-orbit i:nth-child(1) { transform: rotate(0deg)   translateX(46%); }
.el-orbit i:nth-child(2) { transform: rotate(120deg) translateX(46%); background: var(--g); box-shadow: 0 0 10px rgba(255,215,106,.8); }
.el-orbit i:nth-child(3) { transform: rotate(240deg) translateX(46%); background: var(--b); box-shadow: var(--glow-b); }

.el-holo-cap { text-align: center; }
.el-holo-cap b {
  display: block; font-family: var(--tech); font-weight: 700;
  font-size: clamp(0.9rem, 2.2vw, 1.5rem); letter-spacing: 0.42em; padding-left: 0.42em;
  color: var(--b-hi); text-shadow: var(--glow-b);
}
.el-holo-cap span {
  display: block; margin-top: 0.5rem;
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--y);
}
.el-holo-cap em { display: block; margin-top: 0.35rem; font-family: var(--mono); font-style: normal; font-size: 0.5rem; letter-spacing: 0.14em; color: var(--b-mid); }

/* schematic strip */
.el-strip { width: 100%; }
.el-strip-head {
  display: flex; justify-content: space-between; margin-bottom: 0.35rem;
  font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--b-mid);
}
#elScope { display: block; width: 100%; height: 74px; }

/* sector scan */
.el-scan { position: relative; width: 100%; aspect-ratio: 1; }
.el-scan svg { width: 100%; height: 100%; }
.el-scan .s-line { fill: none; stroke: var(--b-dim); stroke-width: 1; }
.el-scan .s-hex  { fill: none; stroke: var(--b-faint); stroke-width: 1; }
.el-scan .s-blip { fill: var(--y); }
.el-scan .s-blip--g { fill: var(--g); }
.el-scan-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,215,106,0.30), rgba(255,215,106,0.02) 30%, transparent 45%);
  mask-image: radial-gradient(circle, #000 0 49%, transparent 50%);
  -webkit-mask-image: radial-gradient(circle, #000 0 49%, transparent 50%);
  animation: spin 5s linear infinite;
}

/* ═══════════ bottom ═══════════ */

.el-bottom {
  display: flex; align-items: center; gap: 1rem;
  border-top: 1px solid var(--b-faint); padding-top: 0.7rem;
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.18em;
  color: var(--b-mid); text-transform: uppercase;
}
.el-marquee { flex: 1; overflow: hidden; white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.el-marquee div { display: inline-block; animation: marq 46s linear infinite; }
.el-marquee span { padding: 0 1.6rem; }
.el-marquee b { color: var(--y); font-weight: 400; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.el-exit {
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.2em; white-space: nowrap;
  border: 1px solid var(--b-faint); padding: 0.55rem 0.95rem;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  transition: color .25s, border-color .25s, background .25s;
}
.el-exit:hover { color: #17130a; background: var(--y); border-color: var(--y); }
.el-exit--alt:hover { color: #02101a; background: var(--b); border-color: var(--b); }

/* pointer diamond */
.el-cursor {
  position: fixed; z-index: 90; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.el-cursor::before, .el-cursor::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--b-mid); }
.el-cursor::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: spin 6s linear infinite; }
.el-cursor::after { inset: 42%; background: var(--y); border: 0; box-shadow: var(--glow-y); }
body.el.has-pointer .el-cursor { opacity: .9; }

/* ═══════════ responsive ═══════════ */

@media (max-width: 1080px) {
  .el-grid { grid-template-columns: 1fr 1fr; }
  .el-holo-wrap { grid-column: 1 / -1; order: -1; }
  .el-holo { aspect-ratio: 1 / 0.8; }
}
@media (max-width: 720px) {
  .el-shell { padding: 3rem 1rem 2rem; }
  .el-grid { grid-template-columns: 1fr; }
  body.el { cursor: auto; }
  .el-cursor, .el-frame { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .el-cube, .el-heart, .el-orbit, .el-plate span, .el-beam, .el-aura,
  .el-scan-sweep, .el-marquee div, .el-h::before { animation: none !important; }
  .el-panel, .el-holo { opacity: 1 !important; transform: none !important; animation: none !important; }
}


/* ═══════════ additional holo effects ═══════════ */

/* pointer tilt lives on the stage so the spin animation stays untouched */
.el-cube-stage {
  transform: translateY(-14%) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .5s var(--ease);
}
.el-holo:hover .el-cube span { border-color: rgba(245,198,60,0.9); box-shadow: inset 0 0 40px rgba(245,198,60,0.3), 0 0 34px rgba(245,198,60,0.35); }
.el-holo:hover .el-heart { animation-duration: 1.4s; }

/* materialise flicker on arrival */
body.el.is-live .el-holo { animation: holo-in 1.1s var(--ease) .2s forwards, holo-flick 2.6s steps(1) .2s 1; }
@keyframes holo-flick {
  0%, 6%, 14%, 30% { opacity: .25; }
  3%, 10%, 22%, 100% { opacity: 1; }
}

/* projection scanline sweeping up the hologram */
.el-holo-scan {
  position: absolute; left: 12%; right: 12%; height: 18%; bottom: 0;
  background: linear-gradient(to top, transparent, rgba(207,230,255,0.16) 45%, rgba(255,215,106,0.12) 60%, transparent);
  mix-blend-mode: screen; pointer-events: none;
  animation: holo-scan 4.2s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes holo-scan { 0% { bottom: -18%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { bottom: 100%; opacity: 0; } }

/* interference bands across the projection */
.el-holo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(95,163,236,0.07) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen; animation: bands 7s linear infinite;
}
@keyframes bands { to { background-position: 0 -60px; } }

/* corner ticks that breathe around the holotable */
.el-holo-ticks { position: absolute; inset: 0; pointer-events: none; }
.el-holo-ticks i { position: absolute; width: 26px; height: 26px; border: 1px solid var(--y-dim); animation: tick-breathe 3.4s ease-in-out infinite; }
.el-holo-ticks i:nth-child(1) { top: 4%;  left: 4%;  border-right: 0; border-bottom: 0; }
.el-holo-ticks i:nth-child(2) { top: 4%;  right: 4%; border-left: 0;  border-bottom: 0; animation-delay: .3s; }
.el-holo-ticks i:nth-child(3) { bottom: 4%; left: 4%; border-right: 0; border-top: 0; animation-delay: .6s; }
.el-holo-ticks i:nth-child(4) { bottom: 4%; right: 4%; border-left: 0; border-top: 0; animation-delay: .9s; }
@keyframes tick-breathe { 0%,100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.18); } }

/* light motes rising off the projector plate */
.el-motes { position: absolute; inset: 0; pointer-events: none; }
.el-motes i {
  position: absolute; bottom: 12%; width: 3px; height: 3px; border-radius: 50%;
  background: var(--b-hi); box-shadow: 0 0 6px rgba(207,230,255,0.9);
  opacity: 0; animation: mote linear infinite;
}
@keyframes mote {
  0%   { opacity: 0; transform: translateY(0) scale(.6); }
  15%  { opacity: .9; }
  85%  { opacity: .5; }
  100% { opacity: 0; transform: translateY(-190px) translateX(var(--dx, 0px)) scale(1.3); }
}

/* wordmark glitch: RGB split, rare and quick */
.el-holo-cap b { position: relative; display: inline-block; }
.el-holo-cap b::before, .el-holo-cap b::after {
  content: attr(data-glitch); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.el-holo-cap b::before { color: var(--y); animation: glitch-a 8s steps(1) infinite; }
.el-holo-cap b::after  { color: var(--g); animation: glitch-b 8s steps(1) infinite; }
@keyframes glitch-a {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: none; }
  91% { opacity: .9; transform: translate(-3px, 1px); clip-path: inset(12% 0 58% 0); }
  93% { opacity: .8; transform: translate(2px, -2px); clip-path: inset(62% 0 12% 0); }
  95% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: none; }
  92% { opacity: .8; transform: translate(3px, -1px); clip-path: inset(40% 0 34% 0); }
  94% { opacity: .7; transform: translate(-2px, 2px); clip-path: inset(8% 0 70% 0); }
  96% { opacity: 0; }
}

/* panels get a slow scan wash */
.el-panel > div { position: relative; overflow: hidden; }
.el-panel > div::after {
  content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -45%;
  background: linear-gradient(to bottom, transparent, rgba(95,163,236,0.07), transparent);
  pointer-events: none; animation: panel-wash 9s ease-in-out infinite;
}
.el-col:nth-child(1) .el-panel:nth-child(2) > div::after { animation-delay: 1.6s; }
.el-col:nth-child(1) .el-panel:nth-child(3) > div::after { animation-delay: 3.2s; }
.el-col:nth-child(1) .el-panel:nth-child(4) > div::after { animation-delay: 4.8s; }
.el-col:nth-child(3) .el-panel:nth-child(2) > div::after { animation-delay: 2.4s; }
.el-col:nth-child(3) .el-panel:nth-child(3) > div::after { animation-delay: 6.1s; }
@keyframes panel-wash { 0% { top: -45%; } 55%, 100% { top: 115%; } }
.el-col:nth-child(1) .el-panel:nth-child(4) { animation-delay: .28s; }

/* craft rows: targeting brackets + scan shimmer on hover */
.el-craft-row { position: relative; overflow: hidden; }
.el-craft-row::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(245,198,60,0.16) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.el-craft-row:hover::after { transform: translateX(120%); }
.el-craft-row img { transition: transform .35s var(--ease), filter .35s; }
.el-craft-row:hover img { transform: scale(1.12) rotate(-3deg); filter: drop-shadow(0 0 8px rgba(245,198,60,0.6)); }
.el-craft-row.is-off img { filter: grayscale(1) brightness(.75); }
.el-craft-s { animation: blip 2.6s ease-in-out infinite; }
.el-craft-s.off { animation: none; }
@keyframes blip { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* lock-on reticle that snaps to whatever you point at */
.el-lock {
  position: fixed; z-index: 60; will-change: transform, width, height; left: 0; top: 0; pointer-events: none;
  opacity: 0; transition: transform .22s var(--ease), width .22s var(--ease), height .22s var(--ease), opacity .2s;
}
.el-lock.on { opacity: 1; }
.el-lock i { position: absolute; width: 11px; height: 11px; border: 1px solid var(--y); box-shadow: var(--glow-y); }
.el-lock i:nth-child(1) { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.el-lock i:nth-child(2) { top: -3px; right: -3px; border-left: 0; border-bottom: 0; }
.el-lock i:nth-child(3) { bottom: -3px; left: -3px; border-right: 0; border-top: 0; }
.el-lock i:nth-child(4) { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
.el-lock.on i { animation: lock-in .3s var(--ease); }
@keyframes lock-in { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: none; } }

/* comm chatter log */
.el-log { display: flex; flex-direction: column; gap: 0.3rem; font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.05em; }
.el-log div { display: flex; gap: 0.5rem; color: var(--b-mid); animation: log-in .45s var(--ease); }
.el-log b { color: var(--y-dim); font-weight: 400; flex: none; }
.el-log span { min-width: 0; }
.el-log div.ok span { color: var(--g); }
.el-log div:first-child span { color: var(--b-hi); }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ribbon chip pulse */
.el-chip--ok { animation: chip-pulse 3.2s ease-in-out infinite; }
@keyframes chip-pulse {
  0%,100% { box-shadow: 0 0 0 rgba(255,215,106,0); }
  50%     { box-shadow: 0 0 14px rgba(255,215,106,0.35); }
}

/* the spine gets a travelling pulse */
.el-spine i { position: relative; overflow: hidden; }
.el-spine i::after {
  content: ""; position: absolute; left: 0; width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--y), transparent);
  animation: spine-run 4.5s linear infinite;
}
@keyframes spine-run { from { top: -60px; } to { top: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .el-holo-scan, .el-holo::after, .el-holo-ticks i, .el-motes i, .el-craft-s,
  .el-holo-cap b::before, .el-holo-cap b::after, .el-panel > div::after,
  .el-chip--ok, .el-spine i::after, .el-cube span img, .el-cube span::after { animation: none !important; }
}

/* hyperspace exit flash */
.el-flash {
  position: fixed; inset: 0; z-index: 150; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.9), rgba(207,230,255,0.35) 35%, transparent 70%);
  animation: el-flash .9s ease-out forwards;
}
@keyframes el-flash { 0% { opacity: 0; transform: scale(.4); } 12% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .el-flash { display: none; } }


/* ═══════════ holotable furniture ═══════════ */

/* receding projector floor */
.el-floor {
  position: absolute; left: 50%; bottom: 4%; width: 200%; height: 58%;
  transform: translateX(-50%) rotateX(75deg); transform-origin: 50% 100%;
  background-image:
    linear-gradient(to right, rgba(95,163,236,0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(95,163,236,0.22) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 46% 62% at 50% 100%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 46% 62% at 50% 100%, #000 10%, transparent 78%);
  animation: floor-run 3.6s linear infinite;
  pointer-events: none;
}
@keyframes floor-run { to { background-position: 0 46px; } }

/* hex ring assembly behind the holocron */
.el-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.el-rings .r-hex   { fill: none; stroke: var(--b-dim); stroke-width: 1; }
.el-rings .r-dash  { stroke-dasharray: 14 9; stroke: var(--b-faint); }
.el-rings .r-thin  { stroke: rgba(245,198,60,0.3); stroke-dasharray: 3 7; }
.el-rings .r-tick  { fill: none; stroke: var(--b-dim); stroke-width: 7; stroke-dasharray: 1 9; }
.el-rings .r-arc   { fill: none; stroke: var(--y); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(245,198,60,0.7)); }
.el-rings .r-spoke path { fill: none; stroke: var(--b-mid); stroke-width: 1.4; }
.el-rings .r-label text {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  fill: rgba(95,163,236,0.5);
}
.r-spin-a, .r-spin-b, .r-spin-c, .r-spin-d { transform-box: view-box; transform-origin: 50% 50%; }
.r-spin-a { animation: spin 90s linear infinite; }
.r-spin-b { animation: spin 46s linear infinite reverse; }
.r-spin-c { animation: spin 11s linear infinite; }
.r-spin-d { animation: spin 30s linear infinite; }
.el-holo:hover .r-spin-c { stroke: var(--y); }

/* keep the projection above the furniture */
.el-cube-stage { z-index: 3; }
.el-plate, .el-beam { z-index: 2; }
.el-rings, .el-floor { z-index: 0; }

@media (prefers-reduced-motion: reduce) {
  .el-floor, .r-spin-a, .r-spin-b, .r-spin-c, .r-spin-d { animation: none !important; }
}
