CSS
/* ─── 02 Cyberpunk OS — terminal control-panel mega menu ────────────
Imports Orbitron + Rajdhani + Share Tech Mono. Scanline + noise
overlays from the original mock have been moved off of body::*
and onto .mm-cyb::before / ::after so they stay inside the demo's
own paint surface and don't leak into the host page. */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Rajdhani:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');
.mm-cyb {
--mm-cyb-void: #050810;
--mm-cyb-panel: #080d1a;
--mm-cyb-panel2: #0c1220;
--mm-cyb-cyan: #00f5ff;
--mm-cyb-cyan-dim: rgba(0, 245, 255, 0.15);
--mm-cyb-cyan-glow: rgba(0, 245, 255, 0.4);
--mm-cyb-magenta: #ff2d78;
--mm-cyb-yellow: #f5e642;
--mm-cyb-green: #39ff6e;
--mm-cyb-border: rgba(0, 245, 255, 0.2);
--mm-cyb-border-bright: rgba(0, 245, 255, 0.55);
--mm-cyb-text: rgba(200, 230, 255, 0.85);
--mm-cyb-text-dim: rgba(130, 170, 210, 0.5);
--mm-cyb-scan: rgba(0, 245, 255, 0.03);
position: relative;
background: var(--mm-cyb-void);
font-family: 'Rajdhani', system-ui, sans-serif;
width: 100%;
min-height: 560px;
overflow: hidden;
box-sizing: border-box;
}
.mm-cyb *,
.mm-cyb *::before,
.mm-cyb *::after { box-sizing: border-box; }
/* Scanlines and noise — scoped to the wrapper, NOT body */
.mm-cyb::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
to bottom,
transparent 0px,
transparent 3px,
var(--mm-cyb-scan) 3px,
var(--mm-cyb-scan) 4px
);
pointer-events: none;
z-index: 3;
animation: mm-cyb-scan 8s linear infinite;
}
.mm-cyb::after {
content: '';
position: absolute;
inset: 0;
opacity: 0.025;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
pointer-events: none;
z-index: 2;
}
@keyframes mm-cyb-scan {
from { background-position: 0 0; }
to { background-position: 0 100px; }
}
.mm-cyb .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: stretch;
background: var(--mm-cyb-panel);
border-bottom: 1px solid var(--mm-cyb-border);
position: relative;
box-shadow: 0 0 30px rgba(0, 245, 255, 0.05);
z-index: 4;
}
.mm-cyb .nav-item { position: relative; list-style: none; }
.mm-cyb .nav-trigger {
display: flex;
align-items: center;
gap: 8px;
padding: 0 22px;
height: 52px;
font-family: 'Orbitron', monospace;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.12em;
color: var(--mm-cyb-text);
text-transform: uppercase;
background: transparent;
border: 0;
border-right: 1px solid var(--mm-cyb-border);
cursor: pointer;
user-select: none;
position: relative;
transition: color 0.2s, background 0.2s;
}
.mm-cyb .nav-trigger .icon {
font-family: 'Share Tech Mono', monospace;
font-size: 11px;
color: var(--mm-cyb-cyan);
opacity: 0.6;
transition: opacity 0.2s;
}
.mm-cyb .nav-trigger .chevron {
font-size: 9px;
color: var(--mm-cyb-cyan);
opacity: 0.4;
transition: transform 0.3s, opacity 0.2s;
margin-left: 2px;
}
.mm-cyb .nav-item:hover .nav-trigger,
.mm-cyb .nav-item.mm-open .nav-trigger {
color: var(--mm-cyb-cyan);
background: var(--mm-cyb-cyan-dim);
}
.mm-cyb .nav-item:hover .nav-trigger .icon,
.mm-cyb .nav-item.mm-open .nav-trigger .icon { opacity: 1; }
.mm-cyb .nav-item:hover .nav-trigger .chevron,
.mm-cyb .nav-item.mm-open .nav-trigger .chevron { transform: rotate(180deg); opacity: 0.9; }
/* ── Mega Panel ── */
.mm-cyb .mega {
position: absolute;
top: 100%;
left: 0;
min-width: 760px;
max-width: calc(100vw - 24px);
background: var(--mm-cyb-panel2);
border: 1px solid var(--mm-cyb-border);
border-top: none;
opacity: 0;
pointer-events: none;
transform: translateY(-6px) scaleY(0.97);
transform-origin: top center;
transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 245, 255, 0.06);
z-index: 5;
}
/* corner brackets */
.mm-cyb .mega::before,
.mm-cyb .mega::after {
content: '';
position: absolute;
width: 14px;
height: 14px;
border-color: var(--mm-cyb-cyan);
border-style: solid;
z-index: 10;
}
.mm-cyb .mega::before { top: 0; right: 0; border-width: 2px 2px 0 0; }
.mm-cyb .mega::after { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.mm-cyb .mega.grid-tech { grid-template-columns: 220px 1fr 1fr 1fr; }
.mm-cyb .mega.grid-data { grid-template-columns: 200px 1fr 1fr; }
.mm-cyb .mega.grid-ops { grid-template-columns: 240px 1fr 1fr; }
.mm-cyb .nav-item:hover .mega,
.mm-cyb .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateY(0) scaleY(1);
}
/* ── Status sidebar ── */
.mm-cyb .mega-status {
background: rgba(0, 0, 0, 0.4);
border-right: 1px solid var(--mm-cyb-border);
padding: 22px 18px;
}
.mm-cyb .status-header {
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
color: var(--mm-cyb-cyan);
letter-spacing: 0.15em;
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 1px solid var(--mm-cyb-border);
}
.mm-cyb .status-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid rgba(0, 245, 255, 0.06);
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-text-dim);
}
.mm-cyb .status-line .key { color: rgba(130, 170, 210, 0.5); }
.mm-cyb .status-line .val { color: var(--mm-cyb-green); font-size: 8px; }
.mm-cyb .status-line .val.warn { color: var(--mm-cyb-yellow); }
.mm-cyb .status-line .val.alert { color: var(--mm-cyb-magenta); }
.mm-cyb .status-bar-wrap { margin-top: 14px; }
.mm-cyb .status-bar-label {
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
color: var(--mm-cyb-text-dim);
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.mm-cyb .status-bar {
display: block;
height: 3px;
background: rgba(0, 245, 255, 0.1);
overflow: hidden;
margin-bottom: 8px;
}
.mm-cyb .status-bar-fill {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--mm-cyb-cyan), var(--mm-cyb-green));
box-shadow: 0 0 6px var(--mm-cyb-cyan);
}
.mm-cyb .status-bar-fill.warn { background: linear-gradient(90deg, var(--mm-cyb-cyan), var(--mm-cyb-yellow)); }
.mm-cyb .status-bar-fill.alert { background: linear-gradient(90deg, var(--mm-cyb-yellow), var(--mm-cyb-magenta)); }
/* ── Link columns ── */
.mm-cyb .mega-col {
padding: 22px 20px;
border-right: 1px solid var(--mm-cyb-border);
}
.mm-cyb .mega-col:last-of-type { border-right: none; }
.mm-cyb .mega-col-title {
font-family: 'Orbitron', monospace;
font-size: 8px;
font-weight: 700;
letter-spacing: 0.2em;
color: var(--mm-cyb-cyan);
text-transform: uppercase;
margin-bottom: 14px;
padding-bottom: 8px;
border-bottom: 1px solid var(--mm-cyb-border);
display: flex;
align-items: center;
gap: 8px;
}
.mm-cyb .mega-col-title::before {
content: '//';
color: var(--mm-cyb-magenta);
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
opacity: 0.7;
}
.mm-cyb .mega-links {
list-style: none;
margin: 0;
padding: 0;
}
.mm-cyb .mega-links li {
opacity: 0;
transform: translateX(-6px);
list-style: none;
}
.mm-cyb .nav-item:hover .mega-links li,
.mm-cyb .nav-item.mm-open .mega-links li {
animation: mm-cyb-slide 0.3s ease both;
}
.mm-cyb .nav-item:hover .mega-links li:nth-child(1),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(1) { animation-delay: 0.05s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(2),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(2) { animation-delay: 0.09s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(3),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(3) { animation-delay: 0.13s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(4),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(4) { animation-delay: 0.17s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(5),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(5) { animation-delay: 0.21s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(6),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(6) { animation-delay: 0.25s; }
@keyframes mm-cyb-slide {
from { opacity: 0; transform: translateX(-6px); }
to { opacity: 1; transform: translateX(0); }
}
.mm-cyb .mega-links li a {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 0;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.06em;
color: var(--mm-cyb-text);
text-decoration: none;
border-bottom: 1px solid rgba(0, 245, 255, 0.04);
transition: color 0.2s, padding-left 0.2s, background 0.2s;
position: relative;
}
.mm-cyb .mega-links li a .cmd {
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-cyan);
opacity: 0.4;
transition: opacity 0.2s;
min-width: 24px;
}
.mm-cyb .mega-links li a .tag {
margin-left: auto;
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
padding: 2px 5px;
background: rgba(0, 245, 255, 0.1);
color: var(--mm-cyb-cyan);
border: 1px solid rgba(0, 245, 255, 0.3);
letter-spacing: 0.05em;
}
.mm-cyb .mega-links li a .tag.red {
background: rgba(255, 45, 120, 0.1);
color: var(--mm-cyb-magenta);
border-color: rgba(255, 45, 120, 0.3);
}
.mm-cyb .mega-links li a:hover {
color: var(--mm-cyb-cyan);
padding-left: 8px;
background: rgba(0, 245, 255, 0.04);
}
.mm-cyb .mega-links li a:hover .cmd { opacity: 1; }
/* ── Footer ── */
.mm-cyb .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 18px;
background: rgba(0, 0, 0, 0.3);
border-top: 1px solid var(--mm-cyb-border);
flex-wrap: wrap;
gap: 12px;
}
.mm-cyb .mega-footer .log {
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-text-dim);
}
.mm-cyb .mega-footer .log span { color: var(--mm-cyb-green); }
.mm-cyb .mega-footer .actions { display: flex; gap: 10px; }
.mm-cyb .mega-footer .btn {
font-family: 'Orbitron', monospace;
font-size: 8px;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-cyb-void);
background: var(--mm-cyb-cyan);
padding: 6px 14px;
cursor: pointer;
text-decoration: none;
border: none;
transition: background 0.2s, box-shadow 0.2s;
clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
box-shadow: 0 0 10px var(--mm-cyb-cyan-glow);
}
.mm-cyb .mega-footer .btn:hover {
background: #fff;
box-shadow: 0 0 20px var(--mm-cyb-cyan-glow);
}
.mm-cyb .mega-footer .btn.ghost {
background: transparent;
color: var(--mm-cyb-cyan);
border: 1px solid var(--mm-cyb-border-bright);
box-shadow: none;
clip-path: none;
}
.mm-cyb .mega-footer .btn.ghost:hover {
background: var(--mm-cyb-cyan-dim);
color: var(--mm-cyb-cyan);
}
/* ── Simple drop ── */
.mm-cyb .simple-drop {
position: absolute;
top: 100%;
left: 0;
width: 240px;
background: var(--mm-cyb-panel2);
border: 1px solid var(--mm-cyb-border);
border-top: none;
opacity: 0;
pointer-events: none;
transform: translateY(-4px);
transition: opacity 0.25s ease, transform 0.25s ease;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
z-index: 5;
}
.mm-cyb .nav-item:hover .simple-drop,
.mm-cyb .nav-item.mm-open .simple-drop {
opacity: 1;
pointer-events: all;
transform: translateY(0);
}
.mm-cyb .simple-drop a {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 18px;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.06em;
color: var(--mm-cyb-text);
text-decoration: none;
border-bottom: 1px solid rgba(0, 245, 255, 0.04);
transition: color 0.2s, background 0.2s;
}
.mm-cyb .simple-drop a::before {
content: '>';
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
color: var(--mm-cyb-cyan);
opacity: 0.3;
transition: opacity 0.2s;
}
.mm-cyb .simple-drop a:hover {
color: var(--mm-cyb-cyan);
background: rgba(0, 245, 255, 0.04);
}
.mm-cyb .simple-drop a:hover::before { opacity: 1; }
@media (max-width: 760px) {
.mm-cyb .nav-trigger { padding: 0 14px; font-size: 9px; }
.mm-cyb .mega { min-width: calc(100vw - 24px); }
.mm-cyb .mega.grid-tech,
.mm-cyb .mega.grid-data,
.mm-cyb .mega.grid-ops { grid-template-columns: 1fr; }
.mm-cyb .mega-status { border-right: none; border-bottom: 1px solid var(--mm-cyb-border); }
.mm-cyb .mega-col { border-right: none; border-bottom: 1px solid var(--mm-cyb-border); }
}
@media (prefers-reduced-motion: reduce) {
.mm-cyb::before { animation: none; }
.mm-cyb .mega,
.mm-cyb .simple-drop,
.mm-cyb .mega-links li,
.mm-cyb .mega-links li a,
.mm-cyb .mega-footer .btn { transition: none; animation: none; }
} JS
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();