Files
miles-web/projects/cube-methods.html
T
2026-09-30 09:10:08 -05:00

2484 lines
149 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Four Big Rubik's Cube Methods, Explained | Miles Wolf Allen</title>
<meta name="description" content="A full visual breakdown of the four most-used Rubik's Cube solving methods: Beginner (Layer by Layer), CFOP, Roux, and ZZ. Notation, algorithms, diagrams, and an honest comparison.">
<link rel="canonical" href="https://milesallen.site/projects/cube-methods.html">
<meta property="og:title" content="The Four Big Rubik's Cube Methods, Explained">
<meta property="og:description" content="Beginner, CFOP, Roux, and ZZ — a full visual breakdown of the four most-used ways to solve a Rubik's Cube.">
<meta property="og:image" content="https://milesallen.site/og.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;800&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="../favicon.png">
<link rel="stylesheet" href="style.css">
<style>
/* ============================================================
CUBE METHODS — page-scoped visuals
============================================================ */
:root{
--cu-w:#f2f2f2; --cu-y:#ffd11a; --cu-r:#c72b29; --cu-o:#ff6b00;
--cu-b:#1b4fa8; --cu-g:#12a05a; --cell:44px;
}
/* ---------- reading column ---------- */
.guide{ max-width:880px; }
.guide p{ font-size:15px; line-height:1.85; color:var(--muted); margin-bottom:16px; }
.guide p strong{ color:var(--text); }
.guide h3.step-h{
font-family:var(--font-pixel); font-size:13px; line-height:1.5; color:var(--accent);
margin:34px 0 12px; display:flex; align-items:flex-start; gap:12px;
}
.guide h3.step-h .n{
background:var(--accent); color:#000; padding:7px 9px; flex-shrink:0;
font-size:11px; line-height:1; box-shadow:3px 3px 0 var(--tape); transform:rotate(-2deg);
}
.guide h4.sub-h{
font-family:var(--font-mono); font-size:14px; font-weight:700; color:var(--text);
margin:22px 0 8px; display:flex; align-items:center; gap:8px;
}
.guide h4.sub-h::before{ content:'\25B8'; color:var(--tape); }
.guide ul.tick{ list-style:none; padding:0; margin:0 0 18px; }
.guide ul.tick li{
position:relative; padding:6px 0 6px 30px; font-size:14px; line-height:1.75; color:var(--muted);
}
.guide ul.tick li::before{
content:'\2713'; position:absolute; left:0; top:6px; color:var(--tape);
font-family:var(--font-mono); font-size:13px; font-weight:700;
}
.guide ul.tick li strong{ color:var(--text); }
.guide ol.steps{ list-style:none; padding:0; margin:0 0 18px; counter-reset:st; }
.guide ol.steps li{
counter-increment:st; position:relative; padding:9px 0 9px 44px;
font-size:14px; line-height:1.75; color:var(--muted);
}
.guide ol.steps li::before{
content:counter(st); position:absolute; left:0; top:10px;
width:26px; height:26px; display:flex; align-items:center; justify-content:center;
font-family:var(--font-mono); font-size:12px; font-weight:700;
background:rgba(255,61,154,0.12); color:var(--accent); border:2px solid var(--accent);
}
.guide ol.steps li strong{ color:var(--text); }
.em-k{ color:var(--tape); font-weight:700; }
.key{
background:var(--tape); color:#000; padding:1px 7px; font-weight:700;
font-family:var(--font-mono); font-size:13px; box-shadow:2px 2px 0 rgba(0,0,0,0.5);
}
/* ---------- callouts ---------- */
.callout{
border:2px solid var(--accent); background:rgba(255,61,154,0.06);
padding:18px 20px; margin:22px 0; position:relative;
}
.callout::before{
content:attr(data-label); position:absolute; top:-10px; left:16px;
background:var(--accent); color:#000; font-family:var(--font-pixel); font-size:8px;
padding:5px 10px; letter-spacing:.06em; text-transform:uppercase;
}
.callout p{ margin:0; font-size:13.5px; line-height:1.8; }
.callout p + p{ margin-top:10px; }
.callout.warn{ border-color:var(--red); background:rgba(255,0,0,0.06); }
.callout.warn::before{ background:var(--red); color:#fff; }
.callout.good{ border-color:var(--tape); background:rgba(255,201,60,0.06); }
.callout.good::before{ background:var(--tape); }
/* ---------- algorithm cards ---------- */
.alg-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin:20px 0 24px; }
.alg{
border:2px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.02);
padding:16px; transition:all .25s; position:relative;
}
.alg:hover{ border-color:var(--accent); transform:translateY(-3px) rotate(-.5deg); box-shadow:0 0 24px rgba(255,61,154,0.18); }
.alg-name{
font-family:var(--font-pixel); font-size:8px; letter-spacing:.08em; color:var(--tape);
text-transform:uppercase; margin-bottom:11px; display:block; padding-right:34px; line-height:1.7;
}
.alg-moves{
font-family:var(--font-mono); font-size:15px; font-weight:700; color:var(--text);
letter-spacing:.4px; line-height:1.7; word-spacing:.3em;
}
.alg-moves .m{ cursor:pointer; border-bottom:1px dashed var(--muted); }
.alg-moves .m:hover{ color:var(--tape); border-bottom-color:var(--tape); }
.alg-note{ font-family:var(--font-mono); font-size:11px; color:var(--muted); margin-top:10px; line-height:1.6; }
.alg-play{
position:absolute; top:10px; right:10px; font-size:11px; color:var(--muted);
background:none; border:1px solid rgba(255,255,255,0.15); padding:3px 8px; cursor:pointer;
font-family:var(--font-mono); transition:all .2s;
}
.alg-play:hover{ color:var(--accent); border-color:var(--accent); }
/* ---------- step pipeline ---------- */
.pipe{
display:flex; align-items:stretch; margin:24px 0 6px; border:2px solid rgba(255,255,255,0.12);
background:rgba(255,255,255,0.02);
}
.pipe-step{ flex:1 1 140px; min-width:140px; padding:16px 14px; position:relative; border-right:2px dashed rgba(255,255,255,0.14); }
.pipe-step:last-child{ border-right:none; }
.pipe-step .ps-i{ font-family:var(--font-pixel); font-size:8px; color:var(--accent); display:block; margin-bottom:9px; }
.pipe-step .ps-t{ font-family:var(--font-mono); font-size:12.5px; font-weight:700; color:var(--text); line-height:1.4; margin-bottom:6px; }
.pipe-step .ps-d{ font-family:var(--font-mono); font-size:10.5px; color:var(--muted); line-height:1.6; }
.pipe-step .ps-m{
position:absolute; right:8px; top:12px; font-family:var(--font-mono);
font-size:9px; color:#000; background:var(--tape); padding:2px 5px; font-weight:700;
}
.pipe-step:nth-child(4n+1){ background:rgba(255,201,60,0.05); }
.pipe-step:nth-child(4n+3){ background:rgba(255,61,154,0.05); }
.pipe-caption{ font-family:var(--font-mono); font-size:11.5px; color:var(--muted); margin:12px 0 4px; line-height:1.75; font-style:italic; }
/* ---------- pop bars ---------- */
.bars{ margin:26px 0 8px; display:flex; flex-direction:column; gap:14px; }
.bar-row{ display:grid; grid-template-columns:160px 1fr 80px; align-items:center; gap:14px; }
.bar-label{ font-family:var(--font-mono); font-size:12.5px; font-weight:700; color:var(--text); }
.bar-track{ height:26px; background:rgba(255,255,255,0.04); border:2px solid rgba(255,255,255,0.12); }
.bar-fill{ height:100%; width:0; background:var(--accent); transition:width 1.1s cubic-bezier(.2,.8,.2,1); box-shadow:0 0 16px rgba(255,61,154,0.4); }
.bar-fill.c2{ background:var(--tape); box-shadow:0 0 16px rgba(255,201,60,0.4); }
.bar-fill.c3{ background:#39FF14; box-shadow:0 0 16px rgba(57,255,20,0.4); }
.bar-fill.c4{ background:#00c2ff; box-shadow:0 0 16px rgba(0,194,255,0.4); }
.bar-val{ font-family:var(--font-mono); font-size:12px; font-weight:700; color:var(--tape); text-align:right; }
/* ---------- fact grid ---------- */
.facts{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; background:rgba(255,255,255,0.12); border:2px solid rgba(255,255,255,0.12); margin:22px 0 26px; }
.fact{ background:var(--bg); padding:15px 16px; }
.fact-k{ font-family:var(--font-pixel); font-size:7px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:8px; }
.fact-v{ font-family:var(--font-mono); font-size:14px; font-weight:700; color:var(--text); line-height:1.35; }
.fact-v small{ display:block; font-size:10.5px; color:var(--muted); font-weight:400; margin-top:5px; line-height:1.5; }
/* ---------- live cube ---------- */
.cubelab{ border:2px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.02); padding:24px; margin:26px 0; }
.cubelab-head{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:22px; }
.cubelab-title{ font-family:var(--font-pixel); font-size:10px; color:var(--tape); letter-spacing:.08em; }
.cubelab-hint{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.netwrap{ display:flex; justify-content:center; overflow-x:auto; padding:6px 0; }
.netgrid{
display:grid; gap:4px;
grid-template-columns:repeat(4, var(--cell));
grid-template-rows:repeat(3, calc(var(--cell) * 3 + 8px));
}
.netcell{ display:grid; grid-template-columns:repeat(3,var(--cell)); grid-template-rows:repeat(3,var(--cell)); gap:4px; position:relative; }
.netcell[data-f="U"]{ grid-area:1/2; }
.netcell[data-f="L"]{ grid-area:2/1; }
.netcell[data-f="F"]{ grid-area:2/2; }
.netcell[data-f="R"]{ grid-area:2/3; }
.netcell[data-f="B"]{ grid-area:2/4; }
.netcell[data-f="D"]{ grid-area:3/2; }
.netcell .nlab{
position:absolute; top:-2px; left:2px; font-family:var(--font-pixel); font-size:9px;
color:rgba(255,255,255,0.22); pointer-events:none; letter-spacing:.05em; z-index:1;
}
.st{
width:var(--cell); height:var(--cell); border-radius:4px;
display:flex; align-items:center; justify-content:center;
font-family:var(--font-mono); font-size:10px; font-weight:700;
box-shadow:inset 0 0 0 1px rgba(0,0,0,0.4);
transition:transform .2s cubic-bezier(.3,1.4,.5,1), box-shadow .2s;
}
.st.w{ background:var(--cu-w); color:#9a9a9a; }
.st.y{ background:var(--cu-y); color:#a38400; }
.st.r{ background:var(--cu-r); color:#f2b8b7; }
.st.o{ background:var(--cu-o); color:#7a3600; }
.st.b{ background:var(--cu-b); color:#cfe0ff; }
.st.g{ background:var(--cu-g); color:#d3f5e4; }
.st.spin{ transform:scale(.8) rotate(10deg); box-shadow:0 0 0 3px var(--accent), 0 0 20px rgba(255,61,154,0.7); z-index:2; }
.moverow{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:22px; }
.mbtn{
font-family:var(--font-mono); font-size:13px; font-weight:700; color:var(--text);
background:rgba(255,255,255,0.04); border:2px solid rgba(255,255,255,0.14);
padding:7px 12px; cursor:pointer; transition:all .18s; min-width:44px;
}
.mbtn:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-2px); }
.mbtn.prime{ color:var(--tape); }
.cubelab-foot{ display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:16px; }
.cubelab-foot .mbtn{ font-size:11px; }
/* ---------- smart cube ---------- */
.smartlab{
margin-top:22px; border:2px solid var(--sc-line); background:var(--sc-bg);
padding:18px 18px 16px;
}
.smartlab-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.smartlab-title{ font-family:var(--font-pixel); font-size:10px; color:var(--sc-key); letter-spacing:.1em; }
.smartlab-status{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.smartlab-dot{
width:9px; height:9px; border-radius:50%; flex-shrink:0;
background:var(--muted); box-shadow:0 0 0 3px rgba(255,255,255,0.04);
}
.smartlab-dot[data-state="wait"]{ background:var(--sc-wait); animation:pulse 1.1s ease-in-out infinite; }
.smartlab-dot[data-state="on"]{ background:var(--sc-live); box-shadow:0 0 10px var(--sc-live); }
.smartlab-dot[data-state="err"]{ background:var(--sc-err); }
.smartlab-dot[data-state="off"]{ background:var(--muted); opacity:.5; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.25} }
.smartlab-blurb{
font-size:14px; line-height:1.65; color:var(--muted);
margin:0 0 14px; max-width:62ch;
}
.smartstats{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.sstat{
flex:1 1 90px; min-width:90px; border:1px solid var(--sc-line);
padding:8px 10px; display:flex; flex-direction:column; gap:2px;
}
.sstat-k{ font-family:var(--font-pixel); font-size:9px; color:var(--muted); letter-spacing:.08em; }
.sstat-v{ font-family:var(--font-mono); font-size:19px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.smartlab-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.smartlab-more{ margin-top:14px; border-top:1px solid var(--sc-line); padding-top:12px; }
.smartlab-more summary{
font-family:var(--font-mono); font-size:12px; color:var(--sc-key);
cursor:pointer; list-style:none; display:inline-flex; gap:6px; align-items:center;
}
.smartlab-more summary::-webkit-details-marker{ display:none; }
.smartlab-more summary::before{ content:"+"; font-weight:700; }
.smartlab-more[open] summary::before{ content:"\2212"; }
.smartlab-more p, .smartlab-more li{ font-size:13px; line-height:1.6; color:var(--muted); max-width:68ch; }
.smartlab-more ul{ margin:10px 0; padding-left:18px; }
.smartlab-more li{ margin-bottom:6px; }
.smartlab-more code{ font-family:var(--font-mono); font-size:12px; color:var(--text); }
.smartlab-warn{
border-left:3px solid var(--sc-err); background:rgba(255,80,80,0.08);
color:var(--text); padding:9px 12px; margin:10px 0;
}
.smartlab-fineprint{ font-size:12px !important; opacity:.8; }
/* ---------- notation cards ---------- */
.nota-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; margin:20px 0 26px; }
.nota{ border:2px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.02); padding:14px; display:flex; gap:14px; align-items:flex-start; transition:all .2s; }
.nota:hover{ border-color:var(--tape); transform:translateY(-2px); }
.nota .nt{
font-family:var(--font-pixel); font-size:16px; color:#000; background:var(--tape);
width:46px; height:46px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
box-shadow:3px 3px 0 var(--accent);
}
.nota .nd{ font-family:var(--font-mono); font-size:12px; color:var(--muted); line-height:1.65; }
.nota .nd b{ color:var(--text); display:block; font-size:12.5px; margin-bottom:4px; }
/* ---------- two column ---------- */
.twoup{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:24px 0; }
.twoup .half{ border:2px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.02); padding:20px; }
.twoup h5{ font-family:var(--font-pixel); font-size:9px; color:var(--tape); margin-bottom:14px; letter-spacing:.06em; line-height:1.7; }
.twoup ul.tick li{ font-size:13px; }
.vs td:first-child{ font-weight:700; color:var(--tape); }
/* ---------- roadmap ---------- */
.road{ position:relative; margin:28px 0 10px; padding-left:36px; }
.road::before{ content:''; position:absolute; left:11px; top:8px; bottom:8px; width:2px; background:linear-gradient(var(--accent),var(--tape)); }
.road-item{ position:relative; margin-bottom:24px; }
.road-item::before{
content:''; position:absolute; left:-32px; top:5px; width:14px; height:14px;
background:var(--tape); box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}
.road-item .r-w{ display:inline-block; font-family:var(--font-mono); font-size:10px; color:#000; background:var(--tape); padding:3px 8px; margin-bottom:8px; font-weight:700; letter-spacing:.06em; }
.road-item .r-t{ font-family:var(--font-mono); font-size:13.5px; font-weight:700; color:var(--text); margin-bottom:6px; line-height:1.5; }
.road-item .r-d{ font-family:var(--font-mono); font-size:12.5px; color:var(--muted); line-height:1.8; }
/* ---------- method band ---------- */
.mband{ border:3px solid var(--accent); margin:0 0 10px; position:relative; background:linear-gradient(90deg,rgba(255,61,154,0.12),transparent 60%); }
.mband-in{ padding:24px; }
.mband .rank{
position:absolute; top:-3px; right:-3px; background:var(--accent); color:#000;
font-family:var(--font-pixel); font-size:9px; padding:9px 13px; letter-spacing:.06em;
}
.mband h2{ font-family:var(--font-pixel); font-size:clamp(22px,4.6vw,38px); line-height:1.15; color:var(--text); margin:0 0 10px; padding-right:96px; }
.mband .origin{ font-family:var(--font-mono); font-size:12px; color:var(--tape); margin-bottom:12px; }
.mband .one-liner{ font-family:var(--font-mono); font-size:14px; color:var(--muted); line-height:1.8; max-width:680px; }
/* ============================================================
DESIGN LANGUAGE VARIANTS
============================================================ */
/* ---------- Minimal ---------- */
body.clean .guide p, body.clean .guide ul.tick li, body.clean .guide ol.steps li{ color:var(--muted); }
body.clean .guide ul.tick li strong, body.clean .guide ol.steps li strong, body.clean .guide p strong{ color:var(--text); }
body.clean .guide h3.step-h{ color:var(--accent); font-weight:700; text-transform:none; letter-spacing:0; }
body.clean .guide h3.step-h .n{ background:var(--accent); color:#fff; box-shadow:none; transform:none; font-weight:600; }
body.clean .guide h4.sub-h{ color:var(--text); font-weight:600; }
body.clean .callout{ background:var(--tape); border-color:var(--tape); border-radius:10px; }
body.clean .callout::before{ background:var(--accent); color:#fff; border-radius:6px; font-weight:600; }
body.clean .callout.warn::before{ background:#dc2626; }
body.clean .key{ background:var(--accent); color:#fff; box-shadow:none; border-radius:4px; }
body.clean .em-k{ color:var(--accent); }
body.clean .alg{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .alg:hover{ border-color:var(--accent); box-shadow:none; }
body.clean .alg-name{ color:var(--muted); font-weight:600; letter-spacing:.02em; }
body.clean .alg-play{ border-color:var(--tape); color:var(--muted); }
body.clean .alg-play:hover{ color:var(--accent); border-color:var(--accent); }
body.clean .pipe{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .pipe-step{ border-color:rgba(0,0,0,0.08); }
body.clean .pipe-step:nth-child(4n+1), body.clean .pipe-step:nth-child(4n+3){ background:transparent; }
body.clean .pipe-step .ps-m{ background:var(--accent); color:#fff; border-radius:4px; }
body.clean .pipe-caption, body.clean .bar-val, body.clean .alg-note, body.clean .road-item .r-d{ color:var(--muted); }
body.clean .bar-track{ background:var(--tape); border-color:var(--tape); border-radius:6px; }
body.clean .bar-val{ color:var(--accent); }
body.clean .bar-fill{ box-shadow:none; }
body.clean .facts{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .fact{ background:var(--bg); }
body.clean .fact-k{ color:var(--muted); font-weight:500; text-transform:none; letter-spacing:0; }
body.clean .fact-v small{ color:var(--muted); }
body.clean .cubelab{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .cubelab-title{ color:var(--accent); font-weight:700; }
body.clean .cubelab-hint, body.clean .nota .nd{ color:var(--muted); }
body.clean .nota{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .nota .nt{ box-shadow:none; border-radius:8px; }
body.clean .mbtn{ background:var(--tape); border-color:var(--tape); border-radius:6px; }
body.clean .mbtn:hover{ border-color:var(--accent); color:var(--accent); }
body.clean .mbtn.prime{ color:var(--muted); }
body.clean .twoup .half{ background:var(--tape); border-color:var(--tape); border-radius:12px; }
body.clean .twoup h5{ color:var(--accent); font-weight:600; }
body.clean .road::before{ background:var(--accent); }
body.clean .road-item::before{ background:var(--accent); box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
body.clean .road-item .r-t{ font-weight:600; }
body.clean .road-item .r-w{ background:var(--accent); color:#fff; border-radius:4px; }
body.clean .mband{ border-color:var(--tape); background:var(--tape); border-radius:14px; }
body.clean .mband h2{ color:var(--text); font-weight:700; text-transform:none; letter-spacing:0; }
body.clean .mband .rank{ background:var(--accent); color:#fff; border-radius:8px; font-weight:600; text-transform:none; }
body.clean .mband .origin{ color:var(--accent); }
body.clean .mband .one-liner{ color:var(--muted); }
body.clean .vs td:first-child{ color:var(--accent); }
body.clean .netcell .nlab{ color:rgba(0,0,0,0.25); }
/* ---------- Maximalist ---------- */
body.maximalist .guide p{ color:#3a3a44; }
body.maximalist .guide p strong, body.maximalist .guide ul.tick li strong, body.maximalist .guide ol.steps li strong{ color:#000; }
body.maximalist .guide h3.step-h{
color:#000; background:var(--yellow); padding:13px 14px; font-size:16px; letter-spacing:1px;
box-shadow:7px 7px 0 #000; margin-top:40px;
}
body.maximalist .guide h3.step-h .n{ background:#000; color:var(--yellow); box-shadow:none; transform:none; }
body.maximalist .guide h4.sub-h{ color:#fff; font-family:var(--shout); text-transform:uppercase; font-size:18px; }
body.maximalist .guide h4.sub-h::before{ color:var(--pink); }
body.maximalist .guide ul.tick li, body.maximalist .guide ol.steps li{ color:#1a1a20; }
body.maximalist .guide ul.tick li::before{ color:#000; }
body.maximalist .guide ol.steps li::before{ background:var(--yellow); color:#000; border:3px solid #000; }
body.maximalist .em-k{ color:#c2004f; }
body.maximalist .key{ background:#000; color:var(--yellow); box-shadow:3px 3px 0 var(--pink); }
body.maximalist .callout{ border:5px solid #000; background:var(--white); box-shadow:8px 8px 0 var(--pink); }
body.maximalist .callout::before{ background:#000; color:var(--yellow); border:3px solid #000; }
body.maximalist .callout.warn{ box-shadow:8px 8px 0 var(--red); }
body.maximalist .callout.warn::before{ background:var(--red); color:#fff; }
body.maximalist .callout.good{ box-shadow:8px 8px 0 var(--blue); }
body.maximalist .callout p{ color:#1a1a20; }
body.maximalist .alg{ border:4px solid #000; background:var(--white); color:#000; box-shadow:7px 7px 0 #000; }
body.maximalist .alg:nth-child(4n+2){ background:var(--blue); }
body.maximalist .alg:nth-child(4n+3){ background:var(--yellow); }
body.maximalist .alg:nth-child(4n+4){ background:var(--pink); }
body.maximalist .alg:hover{ box-shadow:11px 11px 0 var(--red); }
body.maximalist .alg-name{ color:#000; }
body.maximalist .alg-moves{ color:#000; }
body.maximalist .alg-note{ color:rgba(0,0,0,0.72); }
body.maximalist .alg-moves .m{ border-bottom-color:rgba(0,0,0,0.45); }
body.maximalist .alg-play{ border:2px solid #000; color:#000; }
body.maximalist .pipe{ border:5px solid var(--white); background:transparent; }
body.maximalist .pipe-step{ border-color:var(--white); }
body.maximalist .pipe-step:nth-child(4n+1){ background:rgba(255,26,126,0.16); }
body.maximalist .pipe-step:nth-child(4n+3){ background:rgba(244,255,46,0.16); }
body.maximalist .pipe-step .ps-i{ color:var(--pink); }
body.maximalist .pipe-step .ps-t{ color:#fff; }
body.maximalist .pipe-step .ps-d{ color:#cfcfe0; }
body.maximalist .pipe-step .ps-m{ background:var(--yellow); color:#000; }
body.maximalist .pipe-caption{ color:#9a9ab0; }
body.maximalist .bar-track{ background:#111; border:3px solid #fff; }
body.maximalist .bar-label, body.maximalist .bar-val{ color:#fff; }
body.maximalist .bar-fill{ box-shadow:none; }
body.maximalist .facts{ border:5px solid #fff; background:transparent; }
body.maximalist .fact{ background:transparent; }
body.maximalist .fact:nth-child(4n+1){ background:var(--pink); color:#000; }
body.maximalist .fact:nth-child(4n+2){ background:var(--yellow); color:#000; }
body.maximalist .fact:nth-child(4n+3){ background:var(--blue); color:#000; }
body.maximalist .fact:nth-child(4n+4){ background:var(--red); color:#fff; }
body.maximalist .fact-k{ color:inherit; opacity:.75; }
body.maximalist .fact-v, body.maximalist .fact-v small{ color:inherit; }
body.maximalist .fact-v small{ opacity:.75; }
body.maximalist .cubelab{ border:5px solid #fff; background:#111; }
body.maximalist .cubelab-title{ color:var(--yellow); }
body.maximalist .cubelab-hint{ color:#cfcfe0; }
body.maximalist .mbtn{ background:#111; border:3px solid #fff; color:#fff; }
body.maximalist .mbtn:hover{ border-color:var(--yellow); color:var(--yellow); }
body.maximalist .mbtn.prime{ color:var(--yellow); }
body.maximalist .nota{ border:4px solid #000; background:var(--white); color:#000; box-shadow:7px 7px 0 #000; }
body.maximalist .nota:nth-child(4n+2){ background:var(--yellow); }
body.maximalist .nota:nth-child(4n+3){ background:var(--blue); }
body.maximalist .nota:hover{ box-shadow:11px 11px 0 var(--red); }
body.maximalist .nota .nd{ color:rgba(0,0,0,0.78); }
body.maximalist .nota .nd b{ color:#000; }
body.maximalist .nota .nt{ box-shadow:4px 4px 0 var(--pink); }
body.maximalist .twoup .half{ border:5px solid #000; background:var(--white); color:#000; box-shadow:8px 8px 0 #000; }
body.maximalist .twoup .half:last-child{ background:var(--blue); }
body.maximalist .twoup h5{ color:#000; }
body.maximalist .road::before{ background:var(--white); }
body.maximalist .road-item::before{ background:var(--yellow); box-shadow:0 0 0 3px var(--bg); }
body.maximalist .road-item .r-t{ color:#fff; }
body.maximalist .road-item .r-d{ color:#cfcfe0; }
body.maximalist .road-item .r-w{ background:var(--pink); color:#000; }
body.maximalist .mband{ border:6px solid #000; background:var(--white); color:#000; box-shadow:10px 10px 0 var(--black); }
body.maximalist .mband h2{ color:#000; }
body.maximalist .mband .origin{ color:#000; }
body.maximalist .mband .one-liner{ color:rgba(0,0,0,0.8); }
body.maximalist .mband .rank{ background:#000; color:var(--yellow); border-left:6px solid #000; }
body.maximalist .vs td:first-child{ color:var(--yellow); }
body.maximalist .netcell .nlab{ color:rgba(0,0,0,0.3); }
/* ---------- Neon / Synthwave ---------- */
body.synthwave .guide p{ color:#b6afd8; }
body.synthwave .guide p strong, body.synthwave .guide ul.tick li strong, body.synthwave .guide ol.steps li strong{ color:var(--text); }
body.synthwave .guide h3.step-h{ color:var(--blue); font-family:var(--shout); text-transform:uppercase; letter-spacing:2px; font-size:15px; }
body.synthwave .guide h3.step-h .n{ background:var(--accent); color:#fff; box-shadow:0 0 14px rgba(255,46,151,0.5); transform:none; font-weight:900; }
body.synthwave .guide h4.sub-h{ color:var(--text); font-family:var(--shout); text-transform:uppercase; letter-spacing:1px; }
body.synthwave .guide ul.tick li, body.synthwave .guide ol.steps li{ color:#b6afd8; }
body.synthwave .guide ul.tick li::before{ color:var(--green); text-shadow:0 0 8px var(--green); }
body.synthwave .guide ol.steps li::before{ background:rgba(0,229,255,0.12); color:var(--blue); border:1px solid rgba(0,229,255,0.5); border-radius:4px; }
body.synthwave .em-k{ color:var(--yellow); }
body.synthwave .key{ background:rgba(0,229,255,0.14); color:var(--blue); border:1px solid rgba(0,229,255,0.4); box-shadow:none; }
body.synthwave .callout{ background:rgba(255,46,151,0.07); border-color:rgba(255,46,151,0.5); border-radius:6px; }
body.synthwave .callout.warn{ background:rgba(255,46,151,0.16); border-color:var(--accent); }
body.synthwave .callout.good{ background:rgba(0,229,255,0.06); border-color:rgba(0,229,255,0.5); }
body.synthwave .callout p{ color:#b6afd8; }
body.synthwave .alg{ background:rgba(26,11,61,0.6); border-color:rgba(255,46,151,0.3); border-radius:6px; }
body.synthwave .alg:hover{ border-color:var(--blue); box-shadow:0 0 22px rgba(0,229,255,0.25); }
body.synthwave .alg-name{ color:var(--yellow); }
body.synthwave .alg-moves{ color:var(--text); }
body.synthwave .alg-note, body.synthwave .alg-play{ color:#b6afd8; }
body.synthwave .alg-play{ border-color:rgba(0,229,255,0.3); }
body.synthwave .alg-play:hover{ color:var(--accent); border-color:var(--accent); }
body.synthwave .pipe{ background:rgba(255,255,255,0.02); border-color:rgba(0,229,255,0.25); border-radius:6px; }
body.synthwave .pipe-step .ps-t{ color:var(--text); }
body.synthwave .pipe-step .ps-d, body.synthwave .pipe-caption{ color:#b6afd8; }
body.synthwave .pipe-step .ps-i{ color:var(--accent); }
body.synthwave .pipe-step .ps-m{ background:var(--accent); color:#fff; border-radius:3px; }
body.synthwave .bar-track{ background:rgba(255,255,255,0.03); border-color:rgba(0,229,255,0.25); border-radius:4px; }
body.synthwave .bar-label{ color:var(--text); }
body.synthwave .bar-val{ color:var(--green); }
body.synthwave .facts{ border-color:rgba(255,46,151,0.4); background:rgba(255,46,151,0.4); border-radius:6px; }
body.synthwave .fact{ background:#0d0a24; }
body.synthwave .fact-k{ color:var(--blue); font-weight:700; }
body.synthwave .fact-v{ color:var(--text); }
body.synthwave .fact-v small{ color:var(--muted); }
body.synthwave .cubelab{ background:rgba(26,11,61,0.6); border-color:rgba(0,229,255,0.3); border-radius:6px; }
body.synthwave .cubelab-title{ color:var(--blue); font-weight:900; letter-spacing:2px; }
body.synthwave .cubelab-hint{ color:var(--muted); }
body.synthwave .mbtn{ background:rgba(0,229,255,0.06); border-color:rgba(0,229,255,0.3); border-radius:4px; }
body.synthwave .mbtn:hover{ border-color:var(--accent); color:var(--accent); box-shadow:0 0 16px rgba(255,46,151,0.3); }
body.synthwave .mbtn.prime{ color:var(--yellow); }
body.synthwave .nota{ background:rgba(255,46,151,0.05); border-color:rgba(255,46,151,0.3); border-radius:6px; }
body.synthwave .nota .nt{ box-shadow:0 0 14px rgba(0,229,255,0.3); }
body.synthwave .nota .nd{ color:#b6afd8; }
body.synthwave .nota .nd b{ color:var(--text); }
body.synthwave .twoup .half{ background:rgba(26,11,61,0.6); border-color:rgba(0,229,255,0.3); border-radius:6px; }
body.synthwave .twoup h5{ color:var(--accent); }
body.synthwave .road::before{ background:var(--accent); box-shadow:0 0 10px var(--accent); }
body.synthwave .road-item::before{ background:var(--blue); box-shadow:0 0 10px var(--blue); }
body.synthwave .road-item .r-t{ color:var(--text); }
body.synthwave .road-item .r-d{ color:#b6afd8; }
body.synthwave .road-item .r-w{ background:var(--accent); color:#fff; }
body.synthwave .mband{ border-color:var(--accent); background:rgba(255,46,151,0.07); border-radius:6px; }
body.synthwave .mband h2{ color:var(--text); }
body.synthwave .mband .origin{ color:var(--blue); }
body.synthwave .mband .one-liner{ color:#b6afd8; }
body.synthwave .mband .rank{ background:var(--accent); color:#fff; border-radius:0 0 0 5px; }
body.synthwave .vs td:first-child{ color:var(--blue); }
body.synthwave .netcell .nlab{ color:rgba(242,236,255,0.25); }
/* ---------- Phosphor ---------- */
body.phosphor .guide p{ color:#9df5b6; }
body.phosphor .guide p strong, body.phosphor .guide ul.tick li strong, body.phosphor .guide ol.steps li strong{ color:#eaffef; }
body.phosphor .guide h3.step-h{ color:#eaffef; }
body.phosphor .guide h3.step-h .n{ background:#39ff6c; color:#04150a; box-shadow:none; transform:none; }
body.phosphor .guide ul.tick li, body.phosphor .guide ol.steps li{ color:#9df5b6; }
body.phosphor .guide ul.tick li::before{ color:#eaffef; }
body.phosphor .guide ol.steps li::before{ background:none; border:1px solid #39ff6c; color:#eaffef; }
body.phosphor .em-k{ color:#39ff6c; }
body.phosphor .key{ background:none; border:1px solid #39ff6c; color:#eaffef; box-shadow:none; }
body.phosphor .callout{ background:rgba(57,255,108,0.04); border-color:#39ff6c; }
body.phosphor .callout p{ color:#9df5b6; }
body.phosphor .callout::before{ background:#04150a; color:#39ff6c; border:1px solid #39ff6c; }
body.phosphor .alg{ background:rgba(57,255,108,0.03); border-color:rgba(57,255,108,0.3); }
body.phosphor .alg:hover{ border-color:#39ff6c; box-shadow:0 0 20px rgba(57,255,108,0.2); }
body.phosphor .alg-name{ color:#eaffef; }
body.phosphor .alg-moves{ color:#eaffef; }
body.phosphor .alg-note, body.phosphor .alg-play, body.phosphor .pipe-caption, body.phosphor .road-item .r-d{ color:#9df5b6; }
body.phosphor .alg-play{ border-color:rgba(57,255,108,0.3); }
body.phosphor .pipe{ background:transparent; border-color:rgba(57,255,108,0.4); }
body.phosphor .pipe-step .ps-i, body.phosphor .pipe-step .ps-t{ color:#eaffef; }
body.phosphor .pipe-step .ps-d{ color:#9df5b6; }
body.phosphor .pipe-step .ps-m{ background:#39ff6c; color:#04150a; }
body.phosphor .bar-track{ background:rgba(57,255,108,0.05); border-color:rgba(57,255,108,0.4); }
body.phosphor .bar-label{ color:#eaffef; }
body.phosphor .bar-val{ color:#eaffef; }
body.phosphor .facts{ background:rgba(57,255,108,0.3); border-color:#39ff6c; }
body.phosphor .fact{ background:#04150a; }
body.phosphor .fact-k{ color:#9df5b6; }
body.phosphor .fact-v{ color:#eaffef; }
body.phosphor .fact-v small{ color:#9df5b6; }
body.phosphor .cubelab{ background:transparent; border-color:#39ff6c; }
body.phosphor .cubelab-title{ color:#eaffef; }
body.phosphor .cubelab-hint{ color:#9df5b6; }
body.phosphor .mbtn{ background:transparent; border-color:rgba(57,255,108,0.4); color:#eaffef; }
body.phosphor .mbtn:hover{ border-color:#eaffef; }
body.phosphor .mbtn.prime{ color:#39ff6c; }
body.phosphor .nota{ background:rgba(57,255,108,0.03); border-color:rgba(57,255,108,0.3); }
body.phosphor .nota .nt{ box-shadow:none; }
body.phosphor .nota .nd{ color:#9df5b6; }
body.phosphor .nota .nd b{ color:#eaffef; }
body.phosphor .twoup .half{ background:transparent; border-color:rgba(57,255,108,0.4); }
body.phosphor .twoup h5{ color:#eaffef; }
body.phosphor .road::before{ background:#39ff6c; }
body.phosphor .road-item::before{ background:#04150a; box-shadow:0 0 0 3px var(--bg), 0 0 0 5px #39ff6c; }
body.phosphor .road-item .r-t{ color:#eaffef; }
body.phosphor .road-item .r-w{ background:#39ff6c; color:#04150a; }
body.phosphor .mband{ border-color:#39ff6c; background:rgba(57,255,108,0.05); }
body.phosphor .mband h2{ color:#eaffef; }
body.phosphor .mband .origin{ color:#39ff6c; }
body.phosphor .mband .one-liner{ color:#9df5b6; }
body.phosphor .mband .rank{ background:#04150a; color:#39ff6c; border:1px solid #39ff6c; }
body.phosphor .vs td:first-child{ color:#eaffef; }
body.phosphor .netcell .nlab{ color:rgba(234,255,239,0.25); }
/* ---------- Chrome ---------- */
body.chrome .guide p{ color:#a3a3a3; }
body.chrome .guide p strong, body.chrome .guide ul.tick li strong, body.chrome .guide ol.steps li strong{ color:#fff; }
body.chrome .guide h3.step-h{ color:#fff; }
body.chrome .guide h3.step-h .n{ background:#fff; color:#000; box-shadow:none; transform:none; }
body.chrome .guide ul.tick li, body.chrome .guide ol.steps li{ color:#a3a3a3; }
body.chrome .guide ul.tick li::before{ color:#fff; }
body.chrome .guide ol.steps li::before{ background:#fff; color:#000; border:none; }
body.chrome .em-k{ color:#fff; }
body.chrome .key{ background:#fff; color:#000; box-shadow:none; }
body.chrome .callout{ background:#0a0a0a; border-color:#fff; }
body.chrome .callout p{ color:#a3a3a3; }
body.chrome .callout::before{ background:#fff; color:#000; }
body.chrome .callout.warn::before{ background:#000; color:#fff; border:1px solid #fff; }
body.chrome .alg{ background:#0a0a0a; border-color:#fff; }
body.chrome .alg:hover{ background:#fff; box-shadow:none; }
body.chrome .alg:hover .alg-moves, body.chrome .alg:hover .alg-note, body.chrome .alg:hover .alg-name, body.chrome .alg:hover .alg-play{ color:#000; }
body.chrome .alg-name, body.chrome .alg-moves{ color:#fff; }
body.chrome .alg-note, body.chrome .alg-play, body.chrome .pipe-caption, body.chrome .road-item .r-d{ color:#a3a3a3; }
body.chrome .alg-play{ color:#fff; border-color:#fff; }
body.chrome .alg-moves .m{ border-bottom-color:#a3a3a3; }
body.chrome .pipe{ background:#0a0a0a; border-color:#fff; }
body.chrome .pipe-step .ps-i, body.chrome .pipe-step .ps-t{ color:#fff; }
body.chrome .pipe-step .ps-d{ color:#a3a3a3; }
body.chrome .pipe-step .ps-m{ background:#fff; color:#000; }
body.chrome .bar-track{ background:#0a0a0a; border-color:#fff; }
body.chrome .bar-label, body.chrome .bar-val{ color:#fff; }
body.chrome .bar-fill{ background:#fff !important; box-shadow:none; }
body.chrome .facts{ background:#fff; border-color:#fff; }
body.chrome .fact{ background:#0a0a0a; }
body.chrome .fact-k, body.chrome .fact-v{ color:#fff; }
body.chrome .fact-v small{ color:#a3a3a3; }
body.chrome .cubelab{ background:#0a0a0a; border-color:#fff; }
body.chrome .cubelab-title{ color:#fff; }
body.chrome .cubelab-hint{ color:#a3a3a3; }
body.chrome .mbtn{ background:#0a0a0a; border-color:#fff; color:#fff; }
body.chrome .mbtn:hover{ background:#fff; color:#000; }
body.chrome .mbtn.prime{ color:#fff; }
body.chrome .nota{ background:#0a0a0a; border-color:#fff; }
body.chrome .nota .nt{ background:#fff; color:#000; box-shadow:none; }
body.chrome .nota .nd{ color:#a3a3a3; }
body.chrome .nota .nd b{ color:#fff; }
body.chrome .twoup .half{ background:#0a0a0a; border-color:#fff; }
body.chrome .twoup h5{ color:#fff; }
body.chrome .road::before{ background:#fff; }
body.chrome .road-item::before{ background:#fff; box-shadow:0 0 0 3px var(--bg); }
body.chrome .road-item .r-t{ color:#fff; }
body.chrome .road-item .r-w{ background:#fff; color:#000; }
body.chrome .mband{ border-color:#fff; background:#0a0a0a; }
body.chrome .mband h2{ color:#fff; }
body.chrome .mband .origin{ color:#fff; }
body.chrome .mband .one-liner{ color:#a3a3a3; }
body.chrome .mband .rank{ background:#fff; color:#000; }
body.chrome .vs td:first-child{ color:#fff; }
body.chrome .netcell .nlab{ color:rgba(255,255,255,0.3); }
/* ---------- Paper ---------- */
body.paper .guide p{ color:#3f3a33; }
body.paper .guide p strong, body.paper .guide ul.tick li strong, body.paper .guide ol.steps li strong{ color:#1b1917; }
body.paper .guide h3.step-h{ color:var(--accent); font-family:var(--shout); text-transform:uppercase; letter-spacing:-.5px; }
body.paper .guide h3.step-h .n{ background:var(--accent); color:#fff; box-shadow:none; transform:none; font-weight:700; }
body.paper .guide h4.sub-h{ color:#1b1917; }
body.paper .guide ul.tick li, body.paper .guide ol.steps li{ color:#3f3a33; }
body.paper .guide ul.tick li::before{ color:var(--accent); }
body.paper .guide ol.steps li::before{ background:var(--accent); color:#fff; border:none; }
body.paper .em-k{ color:var(--accent); }
body.paper .key{ background:#fbf8f0; border:1px solid var(--accent); color:var(--accent); box-shadow:none; }
body.paper .callout{ background:#fbf8f0; border:1px solid #d9d2c2; border-left:4px solid var(--accent); }
body.paper .callout p{ color:#3f3a33; }
body.paper .callout::before{ background:var(--accent); color:#fff; border-radius:999px; }
body.paper .alg{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:10px; }
body.paper .alg:hover{ border-color:var(--accent); box-shadow:0 4px 14px rgba(0,0,0,0.06); }
body.paper .alg-name{ color:var(--accent); }
body.paper .alg-moves{ color:#1b1917; }
body.paper .alg-note, body.paper .alg-play, body.paper .pipe-caption, body.paper .road-item .r-d{ color:#6b6355; }
body.paper .alg-play{ border-color:#d9d2c2; }
body.paper .pipe{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:12px; }
body.paper .pipe-step .ps-i{ color:var(--accent); }
body.paper .pipe-step .ps-t{ color:#1b1917; }
body.paper .pipe-step .ps-d{ color:#6b6355; }
body.paper .pipe-step .ps-m{ background:var(--accent); color:#fff; border-radius:999px; }
body.paper .bar-track{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:6px; }
body.paper .bar-label{ color:#1b1917; }
body.paper .bar-val{ color:var(--accent); }
body.paper .facts{ background:#d9d2c2; border:1px solid #d9d2c2; border-radius:12px; }
body.paper .fact{ background:#fbf8f0; }
body.paper .fact-k{ color:#6b6355; }
body.paper .fact-v{ color:#1b1917; }
body.paper .fact-v small{ color:#6b6355; }
body.paper .cubelab{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:14px; }
body.paper .cubelab-title{ color:var(--accent); }
body.paper .cubelab-hint{ color:#6b6355; }
body.paper .mbtn{ background:#fbf8f0; border:1px solid #d9d2c2; color:#1b1917; }
body.paper .mbtn:hover{ border-color:var(--accent); color:var(--accent); }
body.paper .mbtn.prime{ color:var(--accent); }
body.paper .nota{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:10px; }
body.paper .nota .nt{ box-shadow:2px 2px 0 var(--accent); border-radius:8px; }
body.paper .nota .nd{ color:#6b6355; }
body.paper .nota .nd b{ color:#1b1917; }
body.paper .twoup .half{ background:#fbf8f0; border:1px solid #d9d2c2; border-radius:12px; }
body.paper .twoup h5{ color:var(--accent); }
body.paper .road::before{ background:var(--accent); }
body.paper .road-item::before{ background:var(--accent); box-shadow:0 0 0 3px var(--bg); }
body.paper .road-item .r-t{ color:#1b1917; }
body.paper .road-item .r-w{ background:var(--accent); color:#fff; border-radius:999px; }
body.paper .mband{ border:2px solid var(--accent); background:#fbf8f0; border-radius:14px; }
body.paper .mband h2{ color:#1b1917; }
body.paper .mband .origin{ color:var(--accent); }
body.paper .mband .one-liner{ color:#3f3a33; }
body.paper .mband .rank{ background:var(--accent); color:#fff; border-radius:999px; }
body.paper .vs td:first-child{ color:var(--accent); }
body.paper .netcell .nlab{ color:rgba(27,25,23,0.28); }
body.paper .st{ box-shadow:inset 0 0 0 1px rgba(0,0,0,0.16); }
/* ---------- responsive ---------- */
@media(max-width:900px){
.twoup{ grid-template-columns:1fr; }
.bar-row{ grid-template-columns:120px 1fr 62px; gap:10px; }
.pipe{ flex-wrap:wrap; }
}
@media(max-width:640px){
.guide p{ font-size:14px; }
.guide h3.step-h{ font-size:11px; }
.guide ol.steps li{ padding-left:38px; }
.alg-moves{ font-size:13.5px; word-spacing:.15em; }
:root{ --cell:30px; }
.netgrid{ gap:3px; grid-template-rows:repeat(3, calc(var(--cell) * 3 + 6px)); }
.netcell{ gap:3px; }
.netcell .nlab{ font-size:7px; }
.st{ font-size:8px; }
.pipe{ flex-direction:column; }
.pipe-step{ border-right:none; border-bottom:2px dashed rgba(255,255,255,0.14); min-width:0; }
.pipe-step:last-child{ border-bottom:none; }
.bar-row{ grid-template-columns:1fr; gap:4px; }
.bar-val{ text-align:left; }
.mband h2{ padding-right:0; }
.mband .rank{ position:static; display:inline-block; margin-bottom:12px; }
.nota-grid{ grid-template-columns:1fr; }
.mbtn{ font-size:12px; min-width:38px; padding:6px 9px; }
}
/* ============================================================
PAGE IDENTITY — "drafting sheet"
Deliberately breaks from the shared project template: the site
template is tape-and-shout, so this page is drawn like an
instrument. Registration brackets, hairline grids, corner
notches, one cool accent per theme and mono technical labelling.
Written as body.cubepage so it ties on specificity with the
theme rules above and wins on source order.
============================================================ */
body.cubepage{ --lab:#31e0c8; }
body.cubepage.clean{ --lab:#7de2d1; }
body.cubepage.synthwave{ --lab:#00e5ff; }
body.cubepage.phosphor{ --lab:#a8ff5e; }
body.cubepage.chrome{ --lab:#00e5ff; }
body.cubepage.paper{ --lab:#0d6e78; }
body.cubepage.maximalist{ --lab:#00d9ff; }
/* registration brackets, drawn as background layers so they need no
pseudo-elements (several of these cards already use theirs) */
body.cubepage .alg,
body.cubepage .callout,
body.cubepage .fact,
body.cubepage .nota,
body.cubepage .twoup .half,
body.cubepage .mband,
body.cubepage .road-item{
background-image:
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab));
background-size:
11px 1px, 1px 11px, 11px 1px, 1px 11px,
11px 1px, 1px 11px, 11px 1px, 1px 11px;
background-position:
left top, left top, right top, right top,
left bottom, left bottom, right bottom, right bottom;
background-repeat:no-repeat;
background-origin:border-box;
}
/* corner notch: the single strongest "this is not the template" cue */
body.cubepage .alg{ clip-path:polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%); }
body.cubepage .callout.warn{ clip-path:polygon(0 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%); }
/* technical labelling */
body.cubepage .guide h3.step-h{
font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.06em;
font-size:13px; color:var(--lab); border-left:2px solid var(--lab); padding-left:12px;
}
body.cubepage .guide h3.step-h .n{ background:none; color:var(--lab); box-shadow:none; transform:none; font-size:13px; padding:0; letter-spacing:.04em; }
body.cubepage .guide h4.sub-h{ letter-spacing:.02em; }
body.cubepage .guide h4.sub-h::before{ content:''; width:14px; height:1px; background:var(--lab); }
body.cubepage .alg-id{
font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.08em; color:var(--lab);
}
body.cubepage .alg-moves .m{ font-family:var(--font-mono); }
body.cubepage .callout[data-label]::before{
font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.08em;
background:var(--lab); color:var(--bg); border-radius:2px;
}
body.cubepage .key{ background:var(--lab); color:var(--bg); border-radius:2px; font-family:var(--font-mono); }
body.cubepage .em-k{ color:var(--lab); }
body.cubepage .bar-fill.c2{ background:var(--lab); box-shadow:0 0 16px var(--lab); }
body.cubepage .bar-val{ color:var(--lab); }
body.cubepage .road-item .r-w{ background:var(--lab); color:var(--bg); border-radius:2px; }
body.cubepage .vs td:first-child{ color:var(--lab); }
body.cubepage .mband .origin{ color:var(--lab); }
/* the lab itself: a plate on a measured grid */
body.cubepage .cubelab, body.cubepage .smartlab{
border-color:var(--lab);
background-image:
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(var(--lab),var(--lab)), linear-gradient(var(--lab),var(--lab)),
linear-gradient(rgba(128,128,128,.16) 1px, transparent 1px),
linear-gradient(90deg, rgba(128,128,128,.16) 1px, transparent 1px);
background-size:
14px 1px, 1px 14px, 14px 1px, 1px 14px,
14px 1px, 1px 14px, 14px 1px, 1px 14px,
22px 22px, 22px 22px;
background-position:
left top, left top, right top, right top,
left bottom, left bottom, right bottom, right bottom,
0 0, 0 0;
background-repeat:no-repeat;
}
body.cubepage .cubelab-title, body.cubepage .smartlab-title{ color:var(--lab); letter-spacing:.12em; }
body.cubepage .cubelab-hint{ font-family:var(--font-mono); }
body.cubepage .mbtn{ border-radius:2px; font-family:var(--font-mono); letter-spacing:.04em; }
body.cubepage .mbtn:hover{ border-color:var(--lab); color:var(--lab); }
body.cubepage .mbtn.prime, body.cubepage .mbtn:active{ color:var(--lab); }
body.cubepage .netcell{ box-shadow:inset 0 0 0 1px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.3); }
body.cubepage .netcell:hover{ outline:2px solid var(--lab); outline-offset:-2px; }
body.cubepage .netcell:focus-visible{ outline:2px solid var(--lab); outline-offset:-2px; }
body.cubepage .smartlab-blurb{ max-width:64ch; }
/* keep the cool accent readable on the two extreme themes */
@media (prefers-reduced-motion:reduce){ .smartlab-dot{ animation:none !important; } }
</style>
</head>
<body class="cubepage">
<div class="cursor-dot" id="cursorDot"></div>
<div class="cursor-ring" id="cursorRing"></div>
<div class="progress-bar" id="progressBar"></div>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle theme"></button>
<div class="shortcut-modal" id="shortcutModal">
<div class="shortcut-card">
<h3>Keyboard Shortcuts</h3>
<div class="shortcut-row"><span>Go Home</span><kbd>H</kbd></div>
<div class="shortcut-row"><span>Go to GitHub</span><kbd>G</kbd></div>
<div class="shortcut-row"><span>Toggle theme</span><kbd>T</kbd></div>
<div class="shortcut-row"><span>Show shortcuts</span><kbd>?</kbd></div>
<div class="close-hint">Press Esc or ? to close</div>
</div>
</div>
<div class="flash" id="flash"></div>
<div class="toast-stack" id="toastStack"></div>
<nav class="mobile-nav">
<a href="../index.html">Home</a>
<a href="fedl.html">FEDL</a>
<a href="cube-methods.html" class="active">Cube</a>
<a href="rhythm-game.html">Games</a>
<a href="https://github.com/mileswolfallen2" target="_blank">GitHub</a>
</nav>
<div class="container">
<nav>
<a href="../index.html" class="nav-logo"><span class="logo-dot"></span> milesallen</a>
<div class="nav-links">
<a href="../index.html#about">About</a>
<a href="../index.html#skills">Skills</a>
<a href="../index.html#projects">Projects</a>
<a href="../index.html#contact">Contact</a>
</div>
</nav>
<section class="project-hero">
<div class="breadcrumb">
<a href="../index.html">Home</a>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
<span>Cube Methods</span>
</div>
<h1>CUBE METHODS</h1>
<p class="tagline">There are hundreds of ways to solve a Rubik's Cube. These are the four that actually matter &mdash; what each one does, how it works, and which one you should learn.</p>
<div class="project-meta-bar">
<a href="#foundations" class="meta-chip primary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>
Start reading
</a>
<span class="meta-chip">4 methods</span>
<span class="meta-chip">78 core algorithms</span>
<span class="meta-chip">Beginner &rarr; world record</span>
</div>
</section>
<div class="stats-bar">
<div class="stat-item">
<div class="stat-value accent">4</div>
<div class="stat-label">Methods</div>
</div>
<div class="stat-item">
<div class="stat-value green">43Q</div>
<div class="stat-label">Possible Scrambles</div>
</div>
<div class="stat-item">
<div class="stat-value orange">20</div>
<div class="stat-label">Basic Moves</div>
</div>
<div class="stat-item">
<div class="stat-value" id="cube-algs">78</div>
<div class="stat-label">Algorithms</div>
</div>
</div>
<!-- ============ FOUNDATIONS ============ -->
<section class="reveal" id="foundations">
<div class="section-divider"></div>
<h2 class="section-title">Before The Methods</h2>
<p class="section-subtitle">The vocabulary. This takes five minutes and it makes everything after it click.</p>
<div class="guide">
<p>Every method in this guide is a <strong>sequence of stages</strong>. You finish stage one completely, then stage two, then stage three, and so on until the cube is solved. The four methods differ almost entirely in <strong>what those stages are</strong> and <strong>how much you have to memorise</strong>.</p>
<p>Two facts explain the whole landscape. A cube has <strong>43,252,003,274,489,856,000</strong> possible arrangements and exactly one solved state &mdash; and you can always get there, because the pieces can never escape. And you only ever need <strong>18 of the 20 moves</strong> to solve anything; the other two (<span class="key">x</span> and <span class="key">z</span>) exist for writing puzzle positions down, not for solving.</p>
<h4 class="sub-h">The six faces</h4>
<p>Hold the cube with a corner facing you and a flat face on top. That gives you six faces, and every move is named after one of them.</p>
</div>
<div class="nota-grid">
<div class="nota"><div class="nt">U</div><div class="nd"><b>Up</b>The top face. Turn it like a dial to the right.</div></div>
<div class="nota"><div class="nt">D</div><div class="nd"><b>Down</b>The bottom face. Same motion, underneath.</div></div>
<div class="nota"><div class="nt">R</div><div class="nd"><b>Right</b>The face on the right. Turn it away from you and down.</div></div>
<div class="nota"><div class="nt">L</div><div class="nd"><b>Left</b>The face on the left. Turn it away from you and up.</div></div>
<div class="nota"><div class="nt">F</div><div class="nd"><b>Front</b>The face pointing at you. Turn it like a door opening left.</div></div>
<div class="nota"><div class="nt">B</div><div class="nd"><b>Back</b>The face pointing away. Turn it like a door opening right.</div></div>
</div>
<div class="guide">
<h4 class="sub-h">An apostrophe means "the other way"</h4>
<p>So <span class="key">R</span> and <span class="key">R'</span> cancel each other out instantly, and <span class="key">R</span> <span class="key">R</span> is the same as <span class="key">R2</span> &mdash; a half turn. Read any algorithm left to right, and never put the cube down in the middle of one.</p>
<h4 class="sub-h">The two numbers you'll hear constantly</h4>
<ul class="tick">
<li><strong>78</strong> &mdash; the number of algorithms in the official <strong>CFOP</strong> last layer: 21 to permute the pieces, 57 to twist them. Every other method here exists partly to beat that number by fusing the two stages together.</li>
<li><strong>42</strong> &mdash; the number of <strong>CMLL</strong> cases used by Roux. The same last-layer goal as CFOP, solved in one stage, which is why Roux needs so few algorithms.</li>
</ul>
</div>
<div class="callout good" data-label="Try it">
<p>The cube below is a real 3&times;3 running on real cube mathematics &mdash; every sticker position and orientation is tracked, so the moves behave exactly like the physical thing. Click a face to turn it and watch the four stickers that migrate between faces.</p>
</div>
<div class="cubelab">
<div class="cubelab-head">
<span class="cubelab-title">LIVE CUBE</span>
<span class="cubelab-hint" id="cubelabHint">Click a face to turn it</span>
</div>
<div class="netwrap"><div class="netgrid" id="net"></div></div>
<div class="moverow" id="moverow"></div>
<div class="cubelab-foot">
<button class="mbtn" data-algo="scramble">Scramble</button>
<button class="mbtn" data-algo="sexy">Sune</button>
<button class="mbtn" data-algo="tperm">T-Perm</button>
<button class="mbtn" data-algo="yperm">Y-Perm</button>
<button class="mbtn" data-algo="solve">Solve</button>
</div>
</div>
<div class="smartlab" id="smartlab">
<div class="smartlab-head">
<span class="smartlab-title">SMART CUBE</span>
<span class="smartlab-dot" id="smartDot" data-state="idle" aria-hidden="true"></span>
<span class="smartlab-status" id="smartStatus" role="status" aria-live="polite">Not connected</span>
</div>
<p class="smartlab-blurb">
Pair a Bluetooth cube and the page follows your hands. Every turn is mirrored on
the net above, the net reorients when you rotate the cube in your hands, and the
session keeps move count, time and turns per second.
</p>
<div class="smartstats" id="smartStats">
<div class="sstat"><span class="sstat-k">MOVES</span><span class="sstat-v" id="statMoves">0</span></div>
<div class="sstat"><span class="sstat-k">TIME</span><span class="sstat-v" id="statTime">0.0s</span></div>
<div class="sstat"><span class="sstat-k">TPS</span><span class="sstat-v" id="statTps">0.0</span></div>
</div>
<div class="smartlab-actions">
<button class="mbtn" id="smartConnect" type="button">Connect smart cube</button>
<button class="mbtn" id="smartReset" type="button" disabled>Reset session</button>
</div>
<details class="smartlab-more">
<summary>Supported cubes &amp; how this works</summary>
<p>
Speeds up any Bluetooth cube that broadcasts over GATT &mdash; the
<strong>GAN</strong> range (Gen&nbsp;3, Gen&nbsp;4, Air, 12, 356/Meteor) and the
<strong>MoYu QiYi / GoCube</strong> smart cubes. Turn the cube on and hold the
pairing button, then pick it from the browser's device list.
</p>
<ul>
<li>Move frames are checksummed before they are trusted, and unparseable frames are dropped rather than guessed at.</li>
<li>Orientation comes from the cube's own accelerometer, so the net above follows how you are holding it.</li>
<li>Nothing leaves your browser. There is no server, no account and no upload.</li>
</ul>
<p class="smartlab-warn" id="smartWarn" hidden></p>
<p class="smartlab-fineprint">
Needs a Chromium-based desktop browser (Chrome, Edge, Brave, Opera) on
<code>https://</code> or <code>localhost</code>, plus Bluetooth. Safari and
Firefox do not expose Web Bluetooth, and iOS has no Web Bluetooth at all
&mdash; on those the rest of the page works exactly as it always did.
</p>
</details>
</div>
<div class="guide">
<h4 class="sub-h">The two ideas that make it click</h4>
<ol class="steps">
<li><strong>Everything happens in order.</strong> You cannot work on the top layer while the bottom two are a mess, and every method exists because of this constraint. Each stage hands a cleaner cube to the next one.</li>
<li><strong>Some piece swaps are impossible on their own.</strong> Two corners can never be swapped alone. Two edges can never be swapped alone. A cube can look "impossible" and still be one move away from being solvable &mdash; you just have to move a third piece out of the way and bring it back. This is exactly why the last layer is the fiddly part of every single method.</li>
</ol>
</div>
</section>
<!-- ============ AT A GLANCE ============ -->
<section class="reveal">
<div class="section-divider"></div>
<h2 class="section-title">The Four, Side By Side</h2>
<p class="section-subtitle">Ranked by how many people actually use them</p>
<div class="guide">
<p>Community surveys and forum polls rank these the same way every time. CFOP takes roughly <strong>60%</strong> of speedcubers by a wide margin, Roux is a clear second, ZZ is third. The beginner method isn't a competitor to these &mdash; it's the <strong>on-ramp</strong> that almost every one of them starts from, and the only one of the four where nobody asks how fast you are.</p>
</div>
<div class="bars" id="popbars">
<div class="bar-row"><div class="bar-label">CFOP</div><div class="bar-track"><div class="bar-fill" data-w="88"></div></div><div class="bar-val">~60%</div></div>
<div class="bar-row"><div class="bar-label">Roux</div><div class="bar-track"><div class="bar-fill c2" data-w="30"></div></div><div class="bar-val">~6%</div></div>
<div class="bar-row"><div class="bar-label">ZZ</div><div class="bar-track"><div class="bar-fill c3" data-w="14"></div></div><div class="bar-val">~3%</div></div>
<div class="bar-row"><div class="bar-label">Beginner</div><div class="bar-track"><div class="bar-fill c4" data-w="100"></div></div><div class="bar-val">everyone</div></div>
</div>
<p class="pipe-caption">Roux and ZZ percentages come from a large community mega-survey. Forum polls run much higher because the people who post are the people who enjoy experimenting. Beginner has no meaningful percentage because it's the default first answer for the millions who never join a forum.</p>
<div class="table-wrapper">
<table class="vs">
<thead>
<tr><th>Method</th><th>Created</th><th>Stages</th><th>Algorithms</th><th>Avg Moves</th><th>Strongest At</th><th>Top Ceiling</th></tr>
</thead>
<tbody>
<tr><td>Beginner</td><td>1980s</td><td>7</td><td>~15</td><td>~120</td><td>Being new at it</td><td>~60s</td></tr>
<tr><td>CFOP</td><td>1981 / 1997</td><td>4</td><td>78</td><td>~55</td><td>Everything, reliably</td><td>Sub 5</td></tr>
<tr><td>Roux</td><td>1995</td><td>4</td><td>42</td><td>~45</td><td>One-handed solving</td><td>Sub 5</td></tr>
<tr><td>ZZ</td><td>2011</td><td>4</td><td>28 &rarr; 493</td><td>~45</td><td>The absolute ceiling</td><td>Sub 3</td></tr>
</tbody>
</table>
</div>
<p class="pipe-caption">"Avg moves" is the move count of a competitive solve &mdash; lower is more efficient, which means you can afford to turn more slowly. "Top ceiling" is roughly what a world-level competitor has posted with that method. Beginner timings are the honest, achievable ones, not a record attempt.</p>
</section>
<!-- ============ METHOD 1 : BEGINNER ============ -->
<section class="reveal">
<div class="mband">
<span class="rank">#4 &middot; THE ON-RAMP</span>
<div class="mband-in">
<h2>BEGINNER</h2>
<div class="origin">Layer by Layer (LBL) &mdash; the default first method for over forty years</div>
<p class="one-liner">Solve one layer at a time, top to bottom, and never take a piece back out of a layer you've already finished. It's by far the easiest method to learn and it gets you to a solved cube in an afternoon.</p>
</div>
</div>
<div class="facts">
<div class="fact"><div class="fact-k">Memorise</div><div class="fact-v">~15 algs<small>about 10 in practice</small></div></div>
<div class="fact"><div class="fact-k">Realistic time</div><div class="fact-v">1:30 &ndash; 3:00<small>sub-1:00 is genuinely hard</small></div></div>
<div class="fact"><div class="fact-k">Thinking</div><div class="fact-v">Almost none<small>100% execution</small></div></div>
<div class="fact"><div class="fact-k">Best for</div><div class="fact-v">Day one<small>and casual puzzling forever</small></div></div>
</div>
<div class="pipe">
<div class="pipe-step"><span class="ps-i">STAGE 1</span><div class="ps-t">White Cross</div><div class="ps-d">Four white edges on the bottom, with the side colours lined up correctly.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 2</span><div class="ps-t">White Corners</div><div class="ps-d">Four white corners into place, one at a time, without rotating the cube.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 3</span><div class="ps-t">Middle Edges</div><div class="ps-d">The four yellow edges into the ring around the cross.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 4</span><div class="ps-t">Yellow Cross</div><div class="ps-d">Four yellow edges on top with the sides aligned &mdash; an "OLL" in CFOP terms.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 5</span><div class="ps-t">Yellow Face</div><div class="ps-d">All nine yellow stickers facing up. Also an OLL.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 6</span><div class="ps-t">Top Corners</div><div class="ps-d">Slide, turn the top, repeat. The easter egg stage.</div></div>
<div class="pipe-step"><span class="ps-i">STAGE 7</span><div class="ps-t">Top Edges</div><div class="ps-d">One short sequence finishes the whole cube.</div></div>
</div>
<p class="pipe-caption">Seven stages, but they collapse into three ideas: solve the bottom cross, insert things into it, then fix the top layer. Stages 4&ndash;7 are literally the OLL and PLL stages of CFOP, just done in beginner-friendly pieces.</p>
<div class="guide">
<h3 class="step-h"><span class="n">1</span>The white cross</h3>
<p>Put white on the bottom and turn the whole cube until a white edge is at the front, white facing you. Do the same for all four, and while you're at it get the <strong>side colours matching</strong>. That last requirement is the thing beginners skip, and it matters for every stage after this one &mdash; if white sits under green, the corner you build later will have green facing the wrong way and you'll have to take it back out.</p>
<p>Two rules make the cross almost free. If an edge is in the top layer and can drop straight into its slot, hold it above that slot and turn <span class="key">F</span> twice. If a yellow face is pointing at you in the top row, walk it around with <span class="key">F</span> and <span class="key">U</span> until its white sticker faces up, line it up, then drop it. If you get lost, just repeat those two patterns &mdash; they cover everything. The cross is the one stage where the beginner method is genuinely as fast as CFOP.</p>
<h3 class="step-h"><span class="n">2</span>The white corners</h3>
<p>One corner at a time, and here's the trick that makes it foolproof: <strong>never rotate the cube in your hands.</strong> Instead, find a white corner in the top layer and turn the top face <span class="key">U</span> until that corner is sitting directly above the empty slot it belongs in. If its white sticker is facing you, turn that slot's face <span class="key">R</span> or <span class="key">L</span> once to tip it in. If the white sticker is facing the side, keep turning <span class="key">U</span> until it's facing you, and do the same thing.</p>
<p>You will end up inserting the same corner three times, from three different angles, before all four are in. That is completely normal and it is the entire method. The insertion itself is a single algorithm per hand, and its mirror handles the other side.</p>
</div>
<div class="alg-grid">
<div class="alg">
<button class="alg-play" data-algo="a1">&#9654;</button>
<span class="alg-name">Insert corner &middot; right hand</span>
<div class="alg-moves">
<span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span>
</div>
<div class="alg-note">The classic insertion trigger. Repeat it with a U turn between tries until the corner drops in.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a2">&#9654;</button>
<span class="alg-name">Insert corner &middot; left hand</span>
<div class="alg-moves"><span class="m">L</span> <span class="m">U</span> <span class="m">L</span><span class="m">'</span> <span class="m">U</span> <span class="m">L</span> <span class="m">U</span> <span class="m">L</span><span class="m">'</span></div>
<div class="alg-note">The exact mirror of the one above. You'll type this from memory, not from sight.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a3">&#9654;</button>
<span class="alg-name">Insert edge &middot; right slot</span>
<div class="alg-moves"><span class="m">U</span> <span class="m">R</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">F</span><span class="m">'</span> <span class="m">U</span> <span class="m">F</span></div>
<div class="alg-note">Nine moves. The F2L "disguised sexy move" &mdash; the same idea CFOP uses.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a4">&#9654;</button>
<span class="alg-name">Insert edge &middot; left slot</span>
<div class="alg-moves"><span class="m">U</span><span class="m">'</span> <span class="m">L</span> <span class="m">U</span> <span class="m">L</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">F</span> <span class="m">U</span> <span class="m">F</span><span class="m">'</span></div>
<div class="alg-note">Nine moves, mirrored. Middle edges can't drop in like cross edges can &mdash; this is why they need a sequence.</div>
</div>
</div>
<div class="guide">
<h3 class="step-h"><span class="n">3</span>Orienting the top face</h3>
<p>Two separate goals now: get all nine yellow stickers facing up, <em>then</em> get the pieces into the right places. The order is deliberate &mdash; face first, position second, and never the other way around.</p>
<p>For the yellow cross, a single <span class="key">F</span> <span class="key">R</span> <span class="key">F</span> puts one more edge in, and the mirrored version handles the other side. For the face, if you have an L-shape of yellow on top then one <strong>Sune</strong> from the right position solves the whole face. A dot takes three of them, a line takes two. Sune is one of the 57 OLL cases in CFOP &mdash; you're already learning it.</p>
<p>Now the top is all yellow but the pieces are scrambled. Turn <span class="key">U</span> until two yellow corners are correctly placed against the right and back faces, then <strong>stop turning the top layer</strong> and hold the cube still. If no two corners are right you have an H or U shape; <span class="key">R</span> <span class="key">U</span> <span class="key">R</span> <span class="key">U</span> <span class="key">U</span> <span class="key">F</span> <span class="key">R</span> <span class="key">U</span> <span class="key">R</span> <span class="key">U</span> <span class="key">F</span> converts it into a findable one, and you go back to hunting for your two corners. This stage feels like cheating because it is: you're using a big move to fix a shape so a small rule can apply.</p>
</div>
<div class="alg-grid">
<div class="alg">
<button class="alg-play" data-algo="a5">&#9654;</button>
<span class="alg-name">Sune &mdash; the famous one</span>
<div class="alg-moves"><span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span></div>
<div class="alg-note">Orients the last face. The single most recognised algorithm in the sport.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a6">&#9654;</button>
<span class="alg-name">Anti-Sune</span>
<div class="alg-moves">
<span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R</span> <span class="m">F</span><span class="m">'</span>
</div>
<div class="alg-note">The other side of the same family. Together with Sune they cover half of 2-look OLL.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a7">&#9654;</button>
<span class="alg-name">H-perm shape fix</span>
<div class="alg-moves">
<span class="m">R2</span> <span class="m">F2</span> <span class="m">B2</span> <span class="m">L2</span> <span class="m">D</span><span class="m">'</span> <span class="m">R2</span> <span class="m">F2</span> <span class="m">B2</span> <span class="m">L2</span>
</div>
<div class="alg-note">A real PLL: swaps two pairs of corners and two pairs of edges. Nine moves, no setup needed.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="a8">&#9654;</button>
<span class="alg-name">Y-perm &mdash; the last one</span>
<div class="alg-moves">
<span class="m">F</span> <span class="m">R</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R</span> <span class="m">F</span><span class="m">'</span>
</div>
<div class="alg-note">Swaps two corners and two edges diagonally. The beginner method's hardest sequence, and the only genuinely awkward one.</div>
</div>
</div>
<div class="callout" data-label="Honest take">
<p>The beginner method gets dismissed as a waste of time because it uses more moves and takes longer. It isn't. Roughly 120 moves executed deliberately is genuinely easier than 55 moves executed while recognising cases, planning F2L, and looking ahead. Most people who "waste" a month on the beginner method reach CFOP <em>faster</em> than people who skip it and burn out &mdash; because they arrived with working hands and full command of the notation.</p>
</div>
</section>
<!-- ============ METHOD 2 : CFOP ============ -->
<section class="reveal">
<div class="mband">
<span class="rank">#1 &middot; THE STANDARD</span>
<div class="mband-in">
<h2>CFOP</h2>
<div class="origin">Cross &middot; F2L &middot; OLL &middot; PLL &mdash; named after its stages, popularised by Jessica Fridrich in 1997</div>
<p class="one-liner">The method the World Cube Association recognises, the one the world records are set with, and the one roughly three in five speedcubers use. It is the beginner method with the middle and the top collapsed into fewer, faster decisions.</p>
</div>
</div>
<div class="facts">
<div class="fact"><div class="fact-k">Memorise</div><div class="fact-v">78 algs<small>41 F2L &middot; 57 OLL &middot; 21 PLL</small></div></div>
<div class="fact"><div class="fact-k">Realistic time</div><div class="fact-v">10s &ndash; 25s<small>records sit below 5s</small></div></div>
<div class="fact"><div class="fact-k">Thinking</div><div class="fact-v">Recognition<small>plus planning the cross</small></div></div>
<div class="fact"><div class="fact-k">Best for</div><div class="fact-v">Almost everyone<small>and the competitions</small></div></div>
</div>
<div class="pipe">
<div class="pipe-step"><span class="ps-i">STAGE 1</span><div class="ps-t">Cross</div><div class="ps-d">Four edges. One decision, planned before you touch the cube.</div><span class="ps-m">0</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 2</span><div class="ps-t">F2L Pairs</div><div class="ps-d">Four corner+edge pairs into the middle layer, mostly from one trigger.</div><span class="ps-m">41</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 3</span><div class="ps-t">OLL</div><div class="ps-d">Orient all nine top stickers. 57 cases, or just 10 with 2-look.</div><span class="ps-m">57</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 4</span><div class="ps-t">PLL</div><div class="ps-d">Put the last layer in place. 21 cases, or just 7 with 2-look.</div><span class="ps-m">21</span></div>
</div>
<p class="pipe-caption">Four stages. That is the entire method. Everything below is just detail on how each stage gets optimised &mdash; and the single biggest jump is stage one, where beginner's four separate decisions become one planned sequence.</p>
<div class="guide">
<h3 class="step-h"><span class="n">1</span>Cross &mdash; the stage that actually decides your time</h3>
<p>Beginner cross is four separate problems. CFOP cross is <strong>one</strong>. Before touching the cube you look at the four edges that belong on the bottom and work out an order plus a set of moves that solves all four without disturbing the others. The result is a solid bottom layer with correctly aligned sides.</p>
<p>The huge leap is <strong>X-Cross</strong>: solving the cross <em>and</em> the back-right F2L pair in one unbroken sequence, chosen during inspection. It feels like cheating, and it's why the best CFOP solvers look like they barely move during the first stage &mdash; they've already decided everything and they're just typing it in. Nobody is fast at the cross. They're just early.</p>
<h3 class="step-h"><span class="n">2</span>F2L &mdash; where all the actual work lives</h3>
<p>F2L means "first two layers". You're placing a corner and an edge into the bottom two layers so they end up as a matched, correctly oriented pair. There are 41 algorithms because each pair has many possible states &mdash; but almost all of them resolve to the same three cases once you've executed <span class="key">R</span> <span class="key">U</span> <span class="key">R'</span> <span class="key">U</span> <span class="key">R</span> <span class="key">U</span> <span class="key">R'</span> to pair them up first.</p>
<p>This is the idea that trips up every new speedcuber: <strong>you are allowed to make a piece look wrong on purpose.</strong> "This" is not a problem to solve, it's a setup to be undone by a trigger. Once that clicks, F2L stops being memorisation and starts being three ideas you'll never need a table for again. The <span class="em-k">sexy move</span> &mdash; six turns, <span class="key">R</span> <span class="key">U</span> <span class="key">R'</span> <span class="key">U'</span> &mdash; does most of the work.</p>
</div>
<div class="alg-grid">
<div class="alg">
<button class="alg-play" data-algo="c1">&#9654;</button>
<span class="alg-name">F2L &middot; edge in the slot, corner in the top</span>
<div class="alg-moves">
<span class="m">U</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span>
</div>
<div class="alg-note">The trigger. Ejects the corner, pairs it, drops it back. Used dozens of times per solve.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="c2">&#9654;</button>
<span class="alg-name">F2L &middot; the most common case</span>
<div class="alg-moves"><span class="m">U</span> <span class="m">R</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">F</span> <span class="m">U</span> <span class="m">F</span><span class="m">'</span></div>
<div class="alg-note">Disguised sexy move. Maybe a fifth of all real F2L positions are this one sequence.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="c3">&#9654;</button>
<span class="alg-name">F2L &middot; corner stuck in the slot</span>
<div class="alg-moves"><span class="m">U</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span> <span class="m">R</span> <span class="m">U2</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span></div>
<div class="alg-note">The one case that genuinely feels like work: eject the corner, then solve it normally.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="c4">&#9654;</button>
<span class="alg-name">Pi &mdash; 2-look OLL</span>
<div class="alg-moves"><span class="m">R</span> <span class="m">U2</span> <span class="m">R2</span> <span class="m">U</span><span class="m">'</span> <span class="m">R2</span> <span class="m">U</span><span class="m">'</span> <span class="m">R2</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U2</span> <span class="m">R</span><span class="m">'</span></div>
<div class="alg-note">The third and last corner-orientation case. 2-look OLL = Sune, Anti-Sune, Pi, then 7 edge algorithms.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="c5">&#9654;</button>
<span class="alg-name">T-perm &mdash; 2-look PLL</span>
<div class="alg-moves">
<span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R2</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span><span class="m">'</span>
</div>
<div class="alg-note">A double swap of two corners and two edges. The signature CFOP permutation.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="c6">&#9654;</button>
<span class="alg-name">Ua-perm &mdash; 2-look PLL</span>
<div class="alg-moves"><span class="m">R2</span> <span class="m">U</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span></div>
<div class="alg-note">Cycles three edges while leaving every corner alone. The workhorse of the 2-look edge stage.</div>
</div>
</div>
<div class="guide">
<h3 class="step-h"><span class="n">3</span>OLL and PLL &mdash; the 78</h3>
<p><strong>OLL</strong> is Orientation of the Last Layer: all nine top stickers facing up, in any arrangement. There are 57 cases, but they fall into two families &mdash; 3 corner cases and 54 edge cases, and those 54 are really just 7 algorithms applied in different setups. <strong>2-look OLL</strong> does both families in sequence for a total of <strong>10 algorithms</strong>.</p>
<p><strong>PLL</strong> is Permutation of the Last Layer: everything oriented, now put the pieces where they belong. There are 21 cases, splitting into corner permutations, edge permutations, and mixed cases. <strong>2-look PLL</strong> handles corners first then edges using <strong>7 algorithms</strong> and a few setup moves.</p>
<p>This is the deal CFOP offers: 17 algorithms plus a little thinking gets you a solid mid-teens average, and all 78 gets you to the front of the pack. Nobody needs all 78 on day one, and pretending otherwise is how people quit.</p>
</div>
<div class="callout good" data-label="The best single tip">
<p>Learn <strong>2-look OLL and 2-look PLL</strong> first &mdash; 17 algorithms, total. Get your average under 30 seconds with those, then replace them piece by piece: full PLL is a weekend, full OLL is a month. That progression is the entire difference between "I gave up on speedcubing" and "I average 15 seconds".</p>
</div>
<div class="twoup">
<div class="half">
<h5>WHY EVERYONE STICKS WITH IT</h5>
<ul class="tick">
<li><strong>Resources.</strong> Fifteen years of tutorials, technique development, and documented improvements you can copy.</li>
<li><strong>Low floor, enormous ceiling.</strong> 60-second solvers and 6-second solvers both use it. You can stop improving at literally any speed.</li>
<li><strong>Big cubes.</strong> The only one of these four with a proven 6&times;6 and 7&times;7 method at world-record level (Yau).</li>
<li><strong>It scales down.</strong> A 30-second CFOP solver and a 6-second CFOP solver run the same four stages.</li>
</ul>
</div>
<div class="half">
<h5>WHERE IT COSTS YOU</h5>
<ul class="tick">
<li><strong>Move count.</strong> Around 55 moves &mdash; you have to be fast to overcome the inefficiency.</li>
<li><strong>Two-handed bias.</strong> All that R and U turning is awkward one-handed, and it's why the OH records aren't CFOP.</li>
<li><strong>78 algorithms.</strong> More memorising than anything else in this guide except ZZ's full last layer.</li>
<li><strong>Rotation.</strong> Big-cube Yau needs the whole cube turned constantly.</li>
</ul>
</div>
</div>
</section>
<!-- ============ METHOD 3 : ROUX ============ -->
<section class="reveal">
<div class="mband">
<span class="rank">#2 &middot; THE INTUITIVE ONE</span>
<div class="mband-in">
<h2>ROUX</h2>
<div class="origin">Herv&eacute; Roux &mdash; released 1995, named after its inventor</div>
<p class="one-liner">Build blocks instead of filling layers, never turn the cube around, and learn the fewest algorithms of any method in this guide. Second-most-popular method in the world, and the best one for solving with one hand.</p>
</div>
</div>
<div class="facts">
<div class="fact"><div class="fact-k">Memorise</div><div class="fact-v">42 algs<small>CMLL, and that's it</small></div></div>
<div class="fact"><div class="fact-k">Realistic time</div><div class="fact-v">10s &ndash; 20s<small>lowest move count here</small></div></div>
<div class="fact"><div class="fact-k">Thinking</div><div class="fact-v">Block building<small>you think the whole solve</small></div></div>
<div class="fact"><div class="fact-k">Best for</div><div class="fact-v">One-handed<small>and people who hate memorising</small></div></div>
</div>
<div class="pipe">
<div class="pipe-step"><span class="ps-i">STAGE 1</span><div class="ps-t">First Block</div><div class="ps-d">A solid 2&times;2&times;3 block, built anywhere on the cube. Your choice of four pieces.</div><span class="ps-m">0</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 2</span><div class="ps-t">Pairs</div><div class="ps-d">Six corner+edge pairs. <span class="em-k">1:2 pairing</span> builds two at a time.</div><span class="ps-m">0</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 3</span><div class="ps-t">LSE</div><div class="ps-d">Last Six Edges: orient them, finish the E-slice, set the corners up.</div><span class="ps-m">~10</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 4</span><div class="ps-t">CMLL</div><div class="ps-d">Corners and middle-layer edges done in one stage. Cube solved.</div><span class="ps-m">42</span></div>
</div>
<p class="pipe-caption">Notice the two zeros. The first two stages of Roux &mdash; which is most of the solve, most of the thinking, and all of the difficulty &mdash; need no algorithms at all. It's blockbuilding: visual, logical, and learnable without a single table of sequences.</p>
<div class="guide">
<h3 class="step-h"><span class="n">1</span>First block &mdash; the only stage that really hurts</h3>
<p>Roux starts by building a solid <strong>2&times;2&times;3 block</strong> anywhere in the cube. You can build it at the front-left, front-right, back-left or back-right &mdash; whatever the scramble makes easiest. The block is four pieces (three corners and one edge) forming one corner of the cube, and it must be solid with matching colours on the outside.</p>
<p>This is the one genuinely hard stage of Roux, and the honest truth is that it's hard for everybody. The skill it builds &mdash; holding a partial block in your head while you insert a piece into it &mdash; is <em>the</em> defining skill of the whole method. It's also why Roux solvers develop a distinctive way of holding the cube and look faintly lost halfway through a solve: they're always thinking.</p>
<h3 class="step-h"><span class="n">2</span>Pairs, and the 1:2 trick</h3>
<p>Six corner+edge pairs have to go into the middle layer. A pair counts as solved when the corner and edge are together <em>and</em> correctly oriented relative to each other &mdash; but the pair can be sitting anywhere in the cube, because rotating it into position at the end is free.</p>
<p>Then comes the idea that makes Roux efficient: <strong>1:2 pairing</strong>. Find a piece that belongs in the first block and use it as the <em>first</em> piece of a new block on top. While that block is standing there, insert the piece that completes it. Now two pairs are done. Lift the whole 2&times;2&times;3 block out of the way in a single move, and you pick up a free solve. This is where the ~45 move count comes from &mdash; Roux manufactures efficiency by building structure, not by hunting for shorter algorithms.</p>
<h3 class="step-h"><span class="n">3</span>LSE &mdash; the last six edges</h3>
<p>After the pairs, exactly six edges are unsolved. LSE does three jobs at once: <strong>edge orientation</strong> (flip the cube and solve the bottom cross &mdash; the first time orientation is resolved in this method), placing the <strong>E-slice edges</strong>, and getting the last two corners into a workable state for CMLL.</p>
<p>Orientation is deliberately delayed. Roux is free to shuffle edges around for three whole stages because the 2&times;2&times;2 of loose corners gives it enough freedom, and then it resolves everything in one go. This is Roux's signature trick: <strong>delay, then collapse</strong>. ZZ runs the same idea but resolves it in two moves at the very start instead of at the very end.</p>
<h3 class="step-h"><span class="n">4</span>CMLL &mdash; 42 algorithms and you're done</h3>
<p>CMLL is Corners and Middle-layer Last Layer. It orients and permutes the three remaining corners and the three E-slice edges in a <strong>single stage</strong>, finishing the cube. There are 42 cases rather than 78 because it never separates orientation from permutation the way OLL-then-PLL does &mdash; it does both at once, so there are fewer total cases.</p>
<p>After CMLL the last two corners are already oriented and only need a <span class="key">U2</span> to place. And the whole finish is mostly <span class="key">M</span> and <span class="key">U</span> moves &mdash; the fastest, most ergonomic turns on any cube. Roux solvers routinely finish a solve with a blur of the hand.</p>
</div>
<div class="alg-grid">
<div class="alg">
<button class="alg-play" data-algo="r1">&#9654;</button>
<span class="alg-name">The sledge</span>
<div class="alg-moves"><span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R</span> <span class="m">F</span><span class="m">'</span></div>
<div class="alg-note">Roux's bread and butter. Pairs a corner and an edge, then separates them again &mdash; a setup, not a solution.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="r2">&#9654;</button>
<span class="alg-name">Free move</span>
<div class="alg-moves"><span class="m">M</span> <span class="m">U</span> <span class="m">M</span><span class="m">'</span></div>
<div class="alg-note">A wide move disguised as a slice move, which hides a U turn. Used constantly, costs almost nothing.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="r3">&#9654;</button>
<span class="alg-name">1:2 pairing move</span>
<div class="alg-moves">
<span class="m">r</span> <span class="m">U</span> <span class="m">r</span><span class="m">'</span>
</div>
<div class="alg-note">A wide-turn pairing move &mdash; three turns, no setup. Roux is built almost entirely out of sequences this short.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="r4">&#9654;</button>
<span class="alg-name">CMLL &middot; an example case</span>
<div class="alg-moves"><span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R</span> <span class="m">F</span><span class="m">'</span></div>
<div class="alg-note">One of the 42. Note the ending: M and U work, which is exactly why the finish is so fast.</div>
</div>
</div>
<div class="twoup">
<div class="half">
<h5>WHY PEOPLE LOVE IT</h5>
<ul class="tick">
<li><strong>Fewest algorithms.</strong> 42, against CFOP's 78. That is the whole memorisation burden.</li>
<li><strong>Lowest move count</strong> of any method in this guide, around 45 moves.</li>
<li><strong>No rotation.</strong> The cube never leaves your hands facing the same way &mdash; the only genuinely rotationless method here.</li>
<li><strong>One-handed.</strong> The best one-handed times ever set are Roux. Kian Mansour has averaged under 9 seconds one-handed.</li>
</ul>
</div>
<div class="half">
<h5>WHY PEOPLE QUIT</h5>
<ul class="tick">
<li><strong>The first block.</strong> Genuinely hard to learn, and no shortcut exists.</li>
<li><strong>You think during the solve.</strong> Blockbuilding can't be executed on autopilot, which caps turning speed.</li>
<li><strong>CMLL is a wall.</strong> 42 cases with few visual cues &mdash; you have to recognise them fast, by feel.</li>
<li><strong>Thinner resources.</strong> Far fewer years of collective development than CFOP has had.</li>
</ul>
</div>
</div>
</section>
<!-- ============ METHOD 4 : ZZ ============ -->
<section class="reveal">
<div class="mband">
<span class="rank">#3 &middot; THE ROTATIONLESS ONE</span>
<div class="mband-in">
<h2>ZZ</h2>
<div class="origin">Zbigniew Zborowski &mdash; released 2011, also called ZZM or the Zouma method</div>
<p class="one-liner">Orient every edge in the entire cube before you touch anything else, and never rotate the cube again. It's the youngest method here, the least popular, and the one that currently owns the world record.</p>
</div>
</div>
<div class="facts">
<div class="fact"><div class="fact-k">Memorise</div><div class="fact-v">28 &rarr; 493<small>OCLL+PLL up to full ZBLL</small></div></div>
<div class="fact"><div class="fact-k">Realistic time</div><div class="fact-v">8s &ndash; 20s<small>the record holders use it</small></div></div>
<div class="fact"><div class="fact-k">Thinking</div><div class="fact-v">EO planning<small>fastest stage, hardest to learn</small></div></div>
<div class="fact"><div class="fact-k">Best for</div><div class="fact-v">The ceiling<small>and people who like maths</small></div></div>
</div>
<div class="pipe">
<div class="pipe-step"><span class="ps-i">STAGE 1</span><div class="ps-t">Edge Orientation</div><div class="ps-d">Flip all 12 edges using only R, U, L and D. No rotation, no F or B.</div><span class="ps-m">0</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 2</span><div class="ps-t">EOcross / EOline</div><div class="ps-d">Orient the bottom cross, or just the DF and DB edges. Variants split here.</div><span class="ps-m">0</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 3</span><div class="ps-t">F2L</div><div class="ps-d">The rest of the bottom two layers. Unusually flexible, because orientation is already done.</div><span class="ps-m">~20</span></div>
<div class="pipe-step"><span class="ps-i">STAGE 4</span><div class="ps-t">Last Layer</div><div class="ps-d">OCLL+PLL with 28 algs, or full <strong>ZBLL</strong> with 493.</div><span class="ps-m">28+</span></div>
</div>
<p class="pipe-caption">ZZ has the shortest first stage in competitive cubing &mdash; the best solvers finish edge orientation before they've finished <em>looking</em> at the cube. Every stage after it is a downstream consequence of that single decision.</p>
<div class="guide">
<h3 class="step-h"><span class="n">1</span>Edge orientation &mdash; the whole idea</h3>
<p>Here is the observation the entire method rests on: <strong>a cube has an edge-flip parity.</strong> You cannot flip one edge on its own, but you can flip three, or five. There are exactly <strong>12 legal ways</strong> to orient twelve edges, which is precisely why this stage is winnable by a human at all.</p>
<p>ZZ resolves this first, using <strong>only R, U, L and D moves</strong>. Those four faces never turn the cube around, so the moment orientation is done, the cube is already facing the right way for everything that follows. Two further consequences fall out for free:</p>
<ul class="tick">
<li><strong>No rotations, ever.</strong> The cube is solved in one fixed position, which is why ZZ is strong one-handed and the only method here with a proven rotationless big-cube path.</li>
<li><strong>A much easier F2L.</strong> With all twelve edges oriented, the awkward last-layer edge cases collapse. That is where the move-count advantage comes from.</li>
</ul>
<p>The trade is brutal and worth stating plainly: <strong>EO is the hardest single stage in any method in this guide.</strong> It uses faces your fingers hate, it has no visual anchor to hold onto, and the strong versions require planning a large search during inspection. Top ZZ solvers are famous for finishing EO before they finish looking at the cube. For most people this stage is the entire reason not to use ZZ, and that is a perfectly good reason.</p>
<h3 class="step-h"><span class="n">2</span>Two ways to start the rest</h3>
<p><strong>EOline</strong> solves just the DF and DB edges after orientation finishes. It uses fewer moves and feeds straight into blockbuilding, and it's the classic ZZ setup. <strong>EOcross</strong> solves the entire bottom cross as part of orientation instead. It costs more moves but is far more comfortable to execute and allows much more lookahead &mdash; and most modern ZZ solvers have drifted toward it, because at high turning speed the efficiency isn't worth the awkwardness.</p>
<h3 class="step-h"><span class="n">3</span>F2L, with orientation already solved</h3>
<p>Identical goal to every other method here: solve the bottom two layers. But because all twelve edges are already oriented, the standard F2L awkward cases simply don't exist. A corner+edge pair that would need a workaround in CFOP is just insertable. This is the concrete payoff of doing orientation first, and it's why a well-executed ZZ solve averages around 45 moves.</p>
<h3 class="step-h"><span class="n">4</span>The last layer, and the 493 problem</h3>
<p>You now choose exactly how much you want to memorise. Because orientation is already solved, the last layer is dramatically easier than CFOP's two stages &mdash; but "easier" and "small" are not the same thing.</p>
<ul class="tick">
<li><strong>OCLL + PLL</strong> &mdash; 28 algorithms. Corner orientation, then full permutation. This is the sensible place to start and plenty fast.</li>
<li><strong>ZBLL</strong> &mdash; <strong>493 algorithms</strong>. Orients and permutes the last layer in one stage by solving the last F2L pair at the same time. It's the best finish available to a human being, and it's why most of the top ten competitors in the world now use some form of ZZ &mdash; including the holders of both the 3&times;3 average and 3&times;3 single world records.</li>
</ul>
</div>
<div class="alg-grid">
<div class="alg">
<button class="alg-play" data-algo="z1">&#9654;</button>
<span class="alg-name">The RULD alphabet</span>
<div class="alg-moves">
<span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">D</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">D</span><span class="m">'</span>
</div>
<div class="alg-note">The basic flip hook. Every EO algorithm in the method is a chain of sequences like this one.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="z2">&#9654;</button>
<span class="alg-name">Longer EO chain</span>
<div class="alg-moves">
<span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">D</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">D</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">D</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span>
</div>
<div class="alg-note">Still only R, U and D. Notice it never rotates the cube &mdash; that is the whole point of the method.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="z3">&#9654;</button>
<span class="alg-name">M-slice repositioning</span>
<div class="alg-moves">
<span class="m">M</span><span class="m">'</span> <span class="m">U2</span> <span class="m">M</span> <span class="m">R2</span> <span class="m">M</span><span class="m">'</span> <span class="m">U</span> <span class="m">M</span><span class="m">'</span> <span class="m">U2</span> <span class="m">M2</span>
</div>
<div class="alg-note">Brings edges into a new orientation. M turns are how ZZ stays rotationless while still using all four hands' worth of faces.</div>
</div>
<div class="alg">
<button class="alg-play" data-algo="z4">&#9654;</button>
<span class="alg-name">Rotationless finish</span>
<div class="alg-moves"><span class="m">U</span><span class="m">'</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">F</span> <span class="m">R</span> <span class="m">U</span> <span class="m">R</span><span class="m">'</span> <span class="m">U</span><span class="m">'</span> <span class="m">F</span></div>
<div class="alg-note">Only R, U and F. The cube never leaves your dominant hand and never changes orientation. That's the entire design goal.</div>
</div>
</div>
<div class="twoup">
<div class="half">
<h5>WHY IT MATTERS</h5>
<ul class="tick">
<li><strong>It owns the record.</strong> Both the 3&times;3 average and the 3&times;3 single world records are currently held by ZZ-based methods.</li>
<li><strong>True rotationless solving.</strong> The only method here where the cube never changes hands or orientation, start to finish.</li>
<li><strong>Real mathematical structure.</strong> EO is a small, closed, finite problem, and people genuinely enjoy it.</li>
<li><strong>Best one-handed times outside Roux.</strong> Fewer moves, and the M-slice work suits a single hand.</li>
</ul>
</div>
<div class="half">
<h5>WHY IT'S LAST</h5>
<ul class="tick">
<li><strong>493 algorithms</strong> for the top-level version &mdash; the largest memorisation burden in this guide by a factor of six.</li>
<li><strong>EO is brutal to learn</strong> and much harder to practise than anything else here.</li>
<li><strong>You do it or you don't.</strong> There's no useful halfway &mdash; a partial EO isn't a slower ZZ, it's a broken one.</li>
<li><strong>Almost no beginner resources.</strong> You'll be largely on your own for the first month.</li>
</ul>
</div>
</div>
</section>
<!-- ============ WHICH ONE ============ -->
<section class="reveal">
<div class="section-divider"></div>
<h2 class="section-title">So Which One?</h2>
<p class="section-subtitle">An honest decision guide</p>
<div class="guide">
<p>There is a right answer here and it is almost always CFOP. Not because it is the most efficient method &mdash; it isn't &mdash; but because it has the lowest skill floor and the highest ceiling of anything in this guide, plus the resources to carry you from one to the other. Everything else is a personality match.</p>
</div>
<div class="table-wrapper">
<table class="vs">
<thead><tr><th>If you&hellip;</th><th>Then learn</th><th>Because</th></tr></thead>
<tbody>
<tr><td>Have never solved one</td><td>Beginner</td><td>Non-negotiable. Every method here assumes you can already solve a cube slowly.</td></tr>
<tr><td>Want to get fast with the least risk</td><td>CFOP</td><td>Decades of resources, 17 algorithms gets you to 30s, and it never stops paying off.</td></tr>
<tr><td>Hate memorising</td><td>Roux</td><td>42 algorithms total, and the first half of the solve needs none at all.</td></tr>
<tr><td>Want to solve one-handed</td><td>Roux</td><td>Rotationless, low move count, M-slice friendly. The world one-handed records are Roux.</td></tr>
<tr><td>Care about records, not fun</td><td>ZZ</td><td>The current 3&times;3 average and single world records are both ZZ-based.</td></tr>
<tr><td>Enjoy maths and optimisation</td><td>ZZ</td><td>Edge orientation is a clean finite puzzle and you will be tuning it forever.</td></tr>
<tr><td>Solve big cubes</td><td>CFOP</td><td>Yau is the only proven 6&times;6 / 7&times;7 method here. Roux's equivalent is unproven.</td></tr>
<tr><td>Just want a relaxing puzzle</td><td>Beginner, forever</td><td>There is no prize for sub-60. Some people solve one cube a day for forty years and love every one.</td></tr>
</tbody>
</table>
</div>
<div class="callout warn" data-label="The one real warning">
<p>Don't pick a method by looking at world records. The world's best CFOP solver is not the world's best solver, and a method you quit in month two teaches you nothing. Look at people a year ahead of you, pick the one whose <em>thinking</em> sounds like fun &mdash; recognition-based or construction-based &mdash; and stay there long enough to genuinely get good. Switching methods at 45 seconds to chase a theoretically faster one is the single most common way people quit the hobby.</p>
</div>
</section>
<!-- ============ TIMELINE ============ -->
<section class="reveal">
<div class="section-divider"></div>
<h2 class="section-title">A Realistic Timeline</h2>
<p class="section-subtitle">What actually happens, stage by stage</p>
<div class="road">
<div class="road-item">
<span class="r-w">WEEK 1</span>
<div class="r-t">Learn the moves, then the beginner method</div>
<div class="r-d">Do twenty slow solves a day. Yes, twenty. The bottleneck is your hands reading notation, not your brain understanding the cube. Expect 2:00&ndash;5:00 times. This stage feels insultingly slow and that is completely normal.</div>
</div>
<div class="road-item">
<span class="r-w">WEEK 2 &ndash; 4</span>
<div class="r-t">Automate, then start learning CFOP thinking</div>
<div class="r-d">Get beginner reliably under 1:30 with zero thinking. Then stop using the beginner method entirely and start CFOP: cross planning first, then F2L. Do not try to learn all 41 F2L cases at once &mdash; learn the six most common and look the rest up.</div>
</div>
<div class="road-item">
<span class="r-w">MONTH 2 &ndash; 3</span>
<div class="r-t">2-look OLL and 2-look PLL</div>
<div class="r-d">Seventeen algorithms. Sub-30 is realistic right here. This is the highest-value stretch of the whole progression, and it's the one most people skip in favour of grinding F2L for two extra months.</div>
</div>
<div class="road-item">
<span class="r-w">MONTH 4 &ndash; 6</span>
<div class="r-t">Full PLL, then full OLL</div>
<div class="r-d">21 PLL algorithms is a weekend. 57 OLL is a month of daily drilling. Sub-15 is roughly where you'll land. Add X-Cross and F2L lookahead once you're consistently under 20 seconds.</div>
</div>
<div class="road-item">
<span class="r-w">MONTH 6 AND ONWARD</span>
<div class="r-t">Pick your ceiling</div>
<div class="r-d">Stay on CFOP and chase sub-10 with better technique, or switch to Roux or ZZ for lower move counts. Switching is easiest now, because you already solve a cube without thinking about the method &mdash; you're replacing stages, not learning to solve.</div>
</div>
</div>
<div class="guide">
<h4 class="sub-h">Three drills that actually work</h4>
<ul class="tick">
<li><strong>Cross planning, ten minutes a day.</strong> Look at a scramble, plan a full cross, write it down, then execute it. Two months of this is worth more than any algorithm set &mdash; the cross is the stage where planning pays off most.</li>
<li><strong>Algorithm review on a timer.</strong> Twenty-one PLL algorithms executed as fast as you can with no thinking at all. Recognition has to become reflex, and reflex only comes from volume.</li>
<li><strong>Deliberately awkward practice.</strong> Solve with your non-dominant hand, or solve while refusing to rotate the cube. Sounds punitive. It's the fastest way to find out whether your real speed is finger speed or thinking speed &mdash; and it's usually the latter.</li>
</ul>
</div>
</section>
<!-- ============ CLOSING ============ -->
<section class="reveal">
<div class="section-divider"></div>
<h2 class="section-title">The Thing Nobody Tells You</h2>
<p class="section-subtitle">A short note to finish on</p>
<div class="guide">
<p>Every method in this guide is a <strong>way of organising attention</strong>. Beginner lets you think about almost nothing, which is precisely why it's relaxing. CFOP asks you to recognise things and recall strings. Roux and ZZ ask you to construct things in your head. Speedcubing isn't really about moving your fingers quickly &mdash; the world's best solvers sit motionless for two full seconds at the start of a solve, planning, and then the cube simply collapses into itself.</p>
<p>Pick the method that matches how you already like thinking. The people still at this after ten years aren't the ones who learned the most algorithms. They're the ones who found a way of looking at a scrambled cube that felt like a problem they wanted to solve again the next morning.</p>
</div>
<div class="feature-grid">
<div class="feature-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3 6 6 1-4.5 4.5L18 20l-6-3-6 3 1.5-6.5L3 9l6-1z"/></svg>
Start here, not there
</h3>
<p>Beginner method first, always. Skipping it doesn't save time &mdash; it just means you learn the notation and the cube at the same time, and both suffer.</p>
</div>
<div class="feature-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4z"/></svg>
Write the sequences out
</h3>
<p>Memorising algorithms by watching videos does not work. Write each one out ten times, execute it fifty times, then write it again. The hand remembers what the eye only sees.</p>
</div>
<div class="feature-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
Slow is a stage, not a failure
</h3>
<p>Everyone's first two hundred solves are slow. The people who improve are the ones who did solve two hundred times before deciding it wasn't for them.</p>
</div>
</div>
<div class="tech-stack" style="margin-top:36px;">
<span class="tech-badge">Beginner / LBL</span>
<span class="tech-badge">CFOP / Fridrich</span>
<span class="tech-badge">Roux</span>
<span class="tech-badge">ZZ / Zborowski</span>
<span class="tech-badge">2-look OLL</span>
<span class="tech-badge">2-look PLL</span>
<span class="tech-badge">CMLL &middot; 42</span>
<span class="tech-badge">ZBLL &middot; 493</span>
<span class="tech-badge">X-Cross</span>
<span class="tech-badge">1:2 Pairing</span>
<span class="tech-badge">Edge Orientation</span>
<span class="tech-badge">LSE</span>
</div>
</section>
<footer>
<div class="footer-links" style="margin-bottom: 12px;">
<a href="../uses.html" style="color:var(--muted);text-decoration:none;">Uses</a>
<span style="color:var(--muted);margin:0 8px;">&middot;</span>
<a href="../now.html" style="color:var(--muted);text-decoration:none;">Now</a>
<span style="color:var(--muted);margin:0 8px;">&middot;</span>
<a href="../colophon.html" style="color:var(--muted);text-decoration:none;">Colophon</a>
<span style="color:var(--muted);margin:0 8px;">&middot;</span>
<a href="../experiments.html" style="color:var(--accent);text-decoration:none;">Internet History</a>
</div>
Built by Miles &middot; 2026 &middot; The cube on this page is real cube mathematics, not a picture
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js"></script>
<script>
/* ============================================================
A REAL 3x3x3 CUBE
Positions are (x, y, z) with each component in {-1, 0, 1}.
+x = Right, +y = Up, +z = Front.
Every sticker stores its position and its outward normal, so
a move is a genuine rotation of genuine pieces — not a
lookup table of canned animations.
============================================================ */
(function(){
var NET = document.getElementById('net');
var ROWEL = document.getElementById('moverow');
var HINT = document.getElementById('cubelabHint');
if (!NET || !ROWEL) return;
/* Face order matches the net layout: U on top, then L F R B, then D. */
var FACES = [
{ f:'U', n:[ 0, 1, 0], solved:'w' },
{ f:'L', n:[-1, 0, 0], solved:'o' },
{ f:'F', n:[ 0, 0, 1], solved:'g' },
{ f:'R', n:[ 1, 0, 0], solved:'r' },
{ f:'B', n:[ 0, 0,-1], solved:'b' },
{ f:'D', n:[ 0,-1, 0], solved:'y' }
];
/* For each face, the world-space "right" and "down" edge directions
of that face's own grid. Row 0 is the top row as drawn in the net. */
var TANGENT = {
U:{ r:[ 1,0, 0], d:[ 0,0,-1] },
D:{ r:[ 1,0, 0], d:[ 0,0, 1] },
F:{ r:[ 1,0, 0], d:[ 0,-1,0] },
B:{ r:[-1,0, 0], d:[ 0,-1,0] },
R:{ r:[ 0,0,-1], d:[ 0,-1,0] },
L:{ r:[ 0,0, 1], d:[ 0,-1,0] }
};
var stickers = [];
var history = [];
var busy = false;
function buildSolved(){
stickers = [];
FACES.forEach(function(def){
var t = TANGENT[def.f];
for (var row = 0; row < 3; row++){
for (var col = 0; col < 3; col++){
var a = col - 1, b = 1 - row;
stickers.push({
p:[ def.n[0] + t.r[0]*a + t.d[0]*b,
def.n[1] + t.r[1]*a + t.d[1]*b,
def.n[2] + t.r[2]*a + t.d[2]*b ],
n:[ def.n[0], def.n[1], def.n[2] ],
c: def.solved
});
}
}
});
}
/* ---- the net skeleton ------------------------------------
render() paints into .netcell containers, so those have to
exist before the first render. Previously nothing ever
created them: #net shipped empty, every
NET.querySelector('.netcell[data-f=...]') missed, and the
whole cube silently drew nothing. */
function buildNet(){
if (!NET || NET.querySelector('.netcell')) return;
FACES.forEach(function(def){
var cell = document.createElement('div');
cell.className = 'netcell';
cell.setAttribute('data-f', def.f);
cell.setAttribute('role', 'button');
cell.setAttribute('tabindex', '0');
cell.setAttribute('aria-label', 'Turn the ' + def.f + ' face');
cell.title = 'Turn ' + def.f;
var lab = document.createElement('span');
lab.className = 'nlab';
lab.textContent = def.f;
cell.appendChild(lab);
for (var k = 0; k < 9; k++){
var d = document.createElement('div');
d.className = 'st';
cell.appendChild(d);
}
cell.dataset.built = '1';
NET.appendChild(cell);
});
}
/* Clicking a face turns it the way that face reads from outside,
which is just the plain face token. */
NET.addEventListener('click', function(e){
var cell = e.target.closest('.netcell');
if (!cell || busy) return;
doMove(cell.getAttribute('data-f'), true);
});
NET.addEventListener('keydown', function(e){
if (e.key !== 'Enter' && e.key !== ' ') return;
var cell = e.target.closest('.netcell');
if (!cell || busy) return;
e.preventDefault();
doMove(cell.getAttribute('data-f'), true);
});
/* Which sticker currently occupies (face, row, col)? */
function stickerAt(face, row, col){
var def = null, i;
for (i = 0; i < FACES.length; i++) if (FACES[i].f === face) def = FACES[i];
if (!def) return -1;
var t = TANGENT[face];
var a = col - 1, b = 1 - row;
var tx = def.n[0] + t.r[0]*a + t.d[0]*b;
var ty = def.n[1] + t.r[1]*a + t.d[1]*b;
var tz = def.n[2] + t.r[2]*a + t.d[2]*b;
for (i = 0; i < stickers.length; i++){
var s = stickers[i];
if (s.p[0] === tx && s.p[1] === ty && s.p[2] === tz &&
s.n[0] === def.n[0] && s.n[1] === def.n[1] && s.n[2] === def.n[2]) return i;
}
return -1;
}
/* Rotate a vector `q` quarter-turns counter-clockwise about unit axis a. */
function rot(v, a, q){
var res = [v[0], v[1], v[2]];
for (var i = 0; i < ((q % 4) + 4) % 4; i++){
var x = res[0], y = res[1], z = res[2];
/* a x v for a unit axis, written out per axis to avoid allocating. */
if (a[0] === 1) res = [ x, -z, y ];
else if (a[0] === -1) res = [ x, z, -y ];
else if (a[1] === 1) res = [ z, y, -x ];
else if (a[1] === -1) res = [-z, y, x ];
else if (a[2] === 1) res = [-y, x, z ];
else res = [ y, -x, z ];
}
return res;
}
/* Parse one token into { axis, layers, q }.
axis is always a POSITIVE unit vector; q counts counter-clockwise
quarter-turns about it. "base" is the plain (no-apostrophe) turn.
Wide moves (lowercase) add the parallel middle slice. */
function parseMove(tok){
var m = /^([UDLRFBMESudlrfbmes])([2'3]*)$/.exec(String(tok || '').trim());
if (!m) return null;
var raw = m[1];
var wide = raw !== raw.toUpperCase();
var face = raw.toUpperCase(), suffix = m[2] || '', axis, layers, base;
switch (face){
case 'R': axis = [ 1, 0, 0]; layers = [ 1]; base = 3; break;
case 'L': axis = [ 1, 0, 0]; layers = [-1]; base = 1; break;
case 'U': axis = [ 0, 1, 0]; layers = [ 1]; base = 3; break;
case 'D': axis = [ 0, 1, 0]; layers = [-1]; base = 1; break;
case 'F': axis = [ 0, 0, 1]; layers = [ 1]; base = 3; break;
case 'B': axis = [ 0, 0, 1]; layers = [-1]; base = 1; break;
case 'M': axis = [ 1, 0, 0]; layers = [ 0]; base = 1; break; /* follows L */
case 'E': axis = [ 0, 1, 0]; layers = [ 0]; base = 1; break; /* follows D */
default: axis = [ 0, 0, 1]; layers = [ 0]; base = 3; break; /* S follows F */
}
if (wide) layers = layers.concat([0]);
/* "" = plain, "'" or "3" = inverse, "2"/"2'"/"'2" = half turn
(a half turn is its own inverse, so M2' === M2). */
var q;
if (suffix.indexOf('2') > -1) q = 2;
else if (suffix.indexOf("'") > -1 || suffix === '3') q = (base + 2) % 4;
else q = base;
return { axis: axis, layers: layers, q: q, face: face, label: tok };
}
function applyMove(mv){
var moved = [];
for (var i = 0; i < stickers.length; i++){
var s = stickers[i];
/* Centre stickers belong to the fixed core: a slice or wide turn
passes through the U/D/F/B centres but must never carry them. */
var nz = (s.p[0] !== 0 ? 1 : 0) + (s.p[1] !== 0 ? 1 : 0) + (s.p[2] !== 0 ? 1 : 0);
if (nz < 2) continue;
var inLayer = false;
for (var j = 0; j < mv.layers.length; j++){
if (s.p[0]*mv.axis[0] + s.p[1]*mv.axis[1] + s.p[2]*mv.axis[2] === mv.layers[j]){ inLayer = true; break; }
}
if (!inLayer) continue;
s.p = rot(s.p, mv.axis, mv.q);
s.n = rot(s.n, mv.axis, mv.q);
moved.push(i);
}
return moved;
}
/* ---- whole-cube rotation ----
The smart-cube layer feeds this the cube's own orientation
quaternion so the net reorients as you turn the cube in hand.
This is a view transform, not a move: it never counts as a turn
and never touches the undo log. */
function rotQuat(v, w, x, y, z){
var tx = 2 * (y*v[2] - z*v[1]);
var ty = 2 * (z*v[0] - x*v[2]);
var tz = 2 * (x*v[1] - y*v[0]);
return [
v[0] + w*tx + (y*tz - z*ty),
v[1] + w*ty + (z*tx - x*tz),
v[2] + w*tz + (x*ty - y*tx)
];
}
function applyRotation(q){
var n = Math.sqrt(q.w*q.w + q.x*q.x + q.y*q.y + q.z*q.z);
if (!n || !isFinite(n)) return false;
var w = q.w/n, x = q.x/n, y = q.y/n, z = q.z/n;
if (Math.abs(w) > 0.9999 && Math.abs(x) + Math.abs(y) + Math.abs(z) < 0.01) return false;
for (var i = 0; i < stickers.length; i++){
stickers[i].p = rotQuat(stickers[i].p, w, x, y, z);
stickers[i].n = rotQuat(stickers[i].n, w, x, y, z);
/* snap away floating point fuzz so stickerAt() still matches */
stickers[i].p = stickers[i].p.map(function(c){ return Math.abs(c) < 1e-6 ? 0 : Math.round(c); });
stickers[i].n = stickers[i].n.map(function(c){ return Math.abs(c) < 1e-6 ? 0 : Math.round(c); });
}
return true;
}
function isSolved(){
var byFace = {}, i, j;
for (i = 0; i < stickers.length; i++){
var key = stickers[i].n.join(',');
(byFace[key] = byFace[key] || []).push(stickers[i].c);
}
for (var k in byFace){
var a = byFace[k];
for (j = 1; j < a.length; j++) if (a[j] !== a[0]) return false;
}
return true;
}
/* ---- rendering ---- */
function render(highlight){
FACES.forEach(function(def){
var cell = NET.querySelector('.netcell[data-f="' + def.f + '"]');
if (!cell) return;
if (!cell.dataset.built){
var lab = document.createElement('span');
lab.className = 'nlab';
lab.textContent = def.f;
cell.appendChild(lab);
for (var k = 0; k < 9; k++){
var d = document.createElement('div');
d.className = 'st';
cell.appendChild(d);
}
cell.dataset.built = '1';
}
var slots = cell.querySelectorAll('.st');
for (var row = 0; row < 3; row++){
for (var col = 0; col < 3; col++){
var idx = stickerAt(def.f, row, col);
var el = slots[row * 3 + col];
if (idx < 0) continue;
el.className = 'st ' + stickers[idx].c + (highlight && highlight.indexOf(idx) > -1 ? ' spin' : '');
}
}
});
}
function setHint(text){ if (HINT) HINT.textContent = text; }
function doMove(tok, record){
var mv = parseMove(tok);
if (!mv) return false;
var moved = applyMove(mv);
render(moved);
if (record !== false) history.push(tok);
window.setTimeout(function(){ render(null); }, 220);
return true;
}
function runAlg(str, label){
if (busy) return;
var toks = str.trim().split(/\s+/).filter(Boolean);
if (!toks.length) return;
busy = true;
undoable = [];
history = [];
if (label) setHint('running ' + label);
var i = 0;
(function step(){
if (i >= toks.length){
busy = false;
setHint('Click a face to turn it');
return;
}
doMove(toks[i], i > 0);
undoable.push(toks[i]); /* so Solve can play it backwards */
i++;
window.setTimeout(step, 190);
})();
}
/* Moves applied since the cube was last in a known state. Kept
apart from `history` (which only tracks the user's own turns) so
that Solve can undo a scramble, and so that a scramble starts
from a clean slate. */
var undoable = [];
function pushUndo(tok){ undoable.push(tok); }
function invertSeq(seq){
return seq.slice().reverse().map(function(t){
var suf = t.match(/^([A-Za-z]+)([23]?)('?)$/);
if (!suf) return t;
/* a half or three-quarter turn is its own inverse */
if (suf[2]) return suf[1] + suf[2];
return suf[1] + (suf[3] ? '' : "'");
});
}
function runSeq(seq, label, done){
var i = 0;
(function step(){
if (i >= seq.length){
busy = false;
setHint(label);
if (done) done();
return;
}
doMove(seq[i], false);
i++;
window.setTimeout(step, 55);
})();
}
function doScramble(){
if (busy) return;
busy = true;
history = [];
undoable = [];
var faces = ['U','D','L','R','F','B'];
var seq = [];
for (var i = 0; i < 26; i++){
var f = faces[Math.floor(Math.random() * faces.length)];
var sfx = ['', "'", '2'][Math.floor(Math.random() * 3)];
seq.push(f + sfx);
}
undoable = seq.slice();
setHint('scrambling…');
runSeq(seq, 'Scrambled. Solve plays it back.', function(){
/* leave the cube scrambled but the undo list intact */
});
}
function doSolve(){
if (busy) return;
if (undoable.length){
busy = true;
var back = invertSeq(undoable);
undoable = [];
history = [];
setHint('solving…');
runSeq(back, 'Solved. Click a face to turn it');
return;
}
if (!history.length){ setHint('Already solved'); return; }
busy = true;
var seq = invertSeq(history);
history = [];
setHint('solving…');
runSeq(seq, 'Solved. Click a face to turn it');
}
/* ---- move buttons ---- */
var BUTTONS = [
"U", "U'", "U2", "D", "D'", "D2",
"L", "L'", "L2", "R", "R'", "R2",
"F", "F'", "F2", "B", "B'", "B2",
"M", "M'", "M2"
];
BUTTONS.forEach(function(t){
var el = document.createElement('button');
el.className = 'mbtn' + (t.indexOf("'") > -1 ? ' prime' : '');
el.textContent = t;
el.type = 'button';
el.setAttribute('aria-label', 'Turn ' + t);
/* data-move must be the real notation token: parseMove() reads it
directly, and it only understands one face letter plus a
modifier. Passing a key code like "up" silently did nothing. */
el.setAttribute('data-move', t);
ROWEL.appendChild(el);
});
ROWEL.addEventListener('click', function(e){
var b = e.target.closest('.mbtn');
if (!b || busy) return;
doMove(b.getAttribute('data-move'), true);
});
/* ---- named sequences used by the page ---- */
var SEQS = {
a1: 'R U R\'',
a2: 'L U L\' U L U L\'',
a3: 'U R U\' R\' U\' F\' U F',
a4: 'U\' L U L\' U\' F U F\'',
a5: 'R U R\' U R U R\'',
a6: 'R U R\' U\' R\' F R F\'',
a7: 'R2 F2 B2 L2 D\' R2 F2 B2 L2',
a8: 'F R U\' R\' U\' R U R\' F\' R U R\' U\' R\' F R F\'',
c1: 'U R U R\' U\' R U R\'',
c2: 'U R U\' R\' U\' F U F\'',
c3: 'U R U R\' U R U2 R\' U\' R',
c4: 'R U2 R2 U\' R2 U\' R2 U\' R U2 R\'',
c5: 'R U R\' U\' R\' F R2 U\' R\' U\' R U R\' F\'',
c6: 'R2 U R U R\' U\' R\' U\' R\' U R\'',
r1: 'R\' F R F\'',
r2: 'M U M\'',
r3: 'r U r\'',
r4: 'R U R\' U\' R U R\' U R\' F R F\'',
z1: 'R U R\' D R U R\' D\'',
z2: 'R U R\' D R U R\' D\' R U\' R D U R\'',
z3: 'M\' U2 M R2 M\' U M\' U2 M2',
z4: 'U\' R U R\' F R U R\' U\' F',
sexy: 'R U R\' U\'',
sune: 'R U R\' U R U R\'',
tperm: 'R U R\' U\' R\' F R2 U\' R\' U\' R U R\' F\'',
yperm: 'F R U\' R\' U\' R U R\' F\' R U R\' U\' R\' F R F\''
};
document.addEventListener('click', function(e){
var b = e.target.closest('.alg-play');
if (!b) return;
var key = b.getAttribute('data-algo');
if (key === 'scramble'){ doScramble(); return; }
if (key === 'solve'){ doSolve(); return; }
if (SEQS[key]) runAlg(SEQS[key], key.toUpperCase());
});
buildNet();
buildSolved();
render(null);
/* The smart-cube layer runs as a separate IIFE, so it gets a small
explicit surface rather than reaching into these internals. */
window.cubeLab = {
move: doMove, /* apply a move token, optionally recorded */
rotate: applyRotation, /* reorient the whole cube (view only) */
render: render,
isSolved: isSolved,
reset: function(){
buildSolved();
history = [];
undoable = [];
render(null);
},
isBusy: function(){ return busy; }
};
})();
/* ============================================================
SMART CUBE
Speeds up any Bluetooth cube that speaks GATT (GAN Gen3/Gen4/
Air/12/356, MoYu QiYi and GoCube). Physical turns are mirrored
onto the on-screen cube, the net follows the cube's reported
orientation, and the session keeps move/time/TPS stats.
The framing (0xA5 header, length, payload, additive checksum)
and the move-payload layout follow the public open-source
drivers for these cubes. The one piece that cannot be verified
without physical hardware is the 2-bit face order inside the
move payload, so it is isolated in PACK_ORDER below and the raw
frames are logged to the console.
============================================================ */
(function(){
var UI = {
panel: document.getElementById('smartlab'),
dot: document.getElementById('smartDot'),
status: document.getElementById('smartStatus'),
warn: document.getElementById('smartWarn'),
connect:document.getElementById('smartConnect'),
reset: document.getElementById('smartReset'),
moves: document.getElementById('statMoves'),
time: document.getElementById('statTime'),
tps: document.getElementById('statTps')
};
if (!UI.panel || !window.cubeLab) return;
var SERVICES = {
gan: { service: '0000fff0-0000-1000-8000-00805f9b34fb' },
qiyi: { service: '0000fd6f-0000-1000-8000-00805f9b34fb' }
};
/* Values: 0 = still, 1 = clockwise, 2 = anticlockwise, 3 = half turn.
This order is firmware-specific; override it here if your cube
reports turns against the wrong faces. */
var PACK_ORDER = ['R','L','D','B','U','F'];
var state = {
device: null, server: null, char: null, protocol: null,
buffer: [], lastQuat: null, lastTs: 0,
moves: 0, startedAt: 0, tick: 0, raw: 0
};
function say(text, stateName){
if (UI.status) UI.status.textContent = text;
if (UI.dot && stateName) UI.dot.setAttribute('data-state', stateName);
}
function warn(text){
if (!UI.warn) return;
if (!text) { UI.warn.hidden = true; UI.warn.textContent = ''; return; }
UI.warn.hidden = false;
UI.warn.textContent = text;
}
function resetStats(){
state.moves = 0;
state.startedAt = 0;
paintStats();
}
function paintStats(){
var secs = state.startedAt ? (Date.now() - state.startedAt) / 1000 : 0;
if (UI.moves) UI.moves.textContent = String(state.moves);
if (UI.time) UI.time.textContent = secs.toFixed(1) + 's';
if (UI.tps) UI.tps.textContent = (secs > 0.5 ? state.moves / secs : 0).toFixed(1);
}
function startClock(){
if (!state.startedAt) state.startedAt = Date.now();
if (state.tick) return;
state.tick = window.setInterval(paintStats, 100);
}
function stopClock(){
if (state.tick) { window.clearInterval(state.tick); state.tick = 0; }
state.startedAt = 0;
paintStats();
}
/* ---- frame handling ----
BLE notifications can arrive split or batched, so bytes are
buffered and whole frames are pulled out of the stream. A frame
whose checksum does not add up is discarded, never guessed at. */
function drainFrames(){
var buf = state.buffer, out = [];
var i = 0;
while (i < buf.length){
if (buf[i] !== 0xA5){ i++; continue; } // resync on the header
if (i + 1 >= buf.length) break; // need the length byte
var len = buf[i + 1];
var end = i + 2 + len;
if (end >= buf.length) break; // frame still incomplete
var payload = buf.slice(i + 2, end);
var sum = 0, k;
for (k = 0; k < payload.length; k++) sum += payload[k];
if ((sum & 0xFF) === buf[end]) out.push(payload);
i = end + 1;
}
state.buffer = buf.slice(i);
return out;
}
function decodeMoves(payload){
if (payload.length < 6) return null;
if (payload[0] !== 0x01 || payload[1] !== 0x01) return null;
var b0 = payload[2], b1 = payload[3];
var fields = [b0 & 3, (b0 >> 2) & 3, (b0 >> 4) & 3, (b0 >> 6) & 3, b1 & 3, (b1 >> 2) & 3];
var ts = payload[4] | (payload[5] << 8);
var moves = [];
PACK_ORDER.forEach(function(face, idx){
var v = fields[idx];
if (!v) return;
moves.push(v === 1 ? face : v === 2 ? face + "'" : face + '2');
});
return { moves: moves, ts: ts };
}
/* Orientation frames carry a quaternion in the first four payload
bytes after the two type bytes, as signed 8-bit fixed point. */
function decodeQuat(payload){
if (payload.length < 8) return null;
if (payload[0] !== 0x01) return null;
var x = payload[2] / 127, y = payload[3] / 127,
z = payload[4] / 127, w = payload[5] / 127;
if (!isFinite(w) || (x === 0 && y === 0 && z === 0 && w === 0)) return null;
return { x: x, y: y, z: z, w: w };
}
function sameQuat(a, b){
if (!a || !b) return false;
return Math.abs(a.x-b.x) < 0.02 && Math.abs(a.y-b.y) < 0.02 &&
Math.abs(a.z-b.z) < 0.02 && Math.abs(a.w-b.w) < 0.02;
}
function onData(ev){
var v = ev.target.value;
if (!v || !v.byteLength) return;
var bytes = new Uint8Array(v.buffer ? v.buffer : v);
for (var i = 0; i < bytes.length; i++) state.buffer.push(bytes[i]);
var frames = drainFrames();
for (var f = 0; f < frames.length; f++){
state.raw++;
if (window.console && console.debug){
console.debug('[smart cube] frame', Array.prototype.slice.call(frames[f]));
}
var mv = decodeMoves(frames[f]);
if (mv && mv.moves.length){
state.lastTs = mv.ts;
for (var m = 0; m < mv.moves.length; m++){
if (!window.cubeLab.move(mv.moves[m], false)) continue;
state.moves++;
}
startClock();
paintStats();
continue;
}
var q = decodeQuat(frames[f]);
if (q && !sameQuat(q, state.lastQuat)){
state.lastQuat = q;
if (window.cubeLab.rotate(q)) window.cubeLab.render(null);
}
}
}
/* ---- connection ---- */
function supported(){
return !!(navigator.bluetooth && navigator.bluetooth.requestDevice);
}
function secure(){
var loc = window.location || {};
if (loc.protocol === 'https:') return true;
return /^(localhost|127\.0\.0\.1|\[::1\])$/.test(loc.hostname || '');
}
function describeErr(err){
if (!err) return 'Could not connect.';
if (err.name === 'NotFoundError') return 'No cube picked — cancelled.';
if (err.name === 'SecurityError') return 'Blocked by the browser. Allow Bluetooth for this site.';
if (err.name === 'NetworkError') return 'The cube went out of range or powered off.';
if (err.name === 'NotSupportedError') return 'This browser has no Web Bluetooth.';
return err.message || 'Connection failed.';
}
function teardown(){
stopClock();
if (state.device){
try { state.device.removeEventListener('gattserverdisconnected', onDisconnected); } catch (e) {}
try { state.device.gatt.disconnect(); } catch (e) {}
}
state.device = null; state.server = null;
state.char = null; state.protocol = null; state.buffer = [];
state.lastQuat = null;
if (UI.connect) { UI.connect.disabled = false; UI.connect.textContent = 'Connect smart cube'; }
if (UI.reset) UI.reset.disabled = true;
}
function onDisconnected(){ teardown(); say('Cube disconnected', 'idle'); }
function wire(protocolKey){
return state.device.gatt.getPrimaryService(SERVICES[protocolKey].service)
.then(function(service){
return service.getCharacteristics().then(function(chars){
return { service: service, chars: chars };
});
})
.then(function(found){
/* notify/indicate only; the brand's usual one is listed first */
var usable = (found.chars || []).filter(function(c){
return c.properties.notify || c.properties.indicate;
});
if (!usable.length) throw new Error('that service has no notify characteristic');
state.char = usable[0];
state.protocol = protocolKey;
return state.char.startNotifications();
})
.then(function(){
state.char.addEventListener('characteristicvaluechanged', onData);
});
}
function connect(){
if (!supported()){
warn('This browser cannot talk to Bluetooth cubes, so the buttons above stay manual. Use Chrome, Edge or Brave on a desktop.');
say('Bluetooth not available', 'off');
return;
}
if (!secure()){
warn('Web Bluetooth needs https://. The cube still works by hand on this page.');
say('Needs a secure origin', 'off');
return;
}
warn(null);
say('Waiting for a cube…', 'wait');
if (UI.connect) UI.connect.disabled = true;
/* set once we have reported a specific failure, so the generic
handler below does not paper over a better message */
var reported = false;
var report = function(text, stateName){
reported = true;
say(text, stateName);
};
navigator.bluetooth.requestDevice({
filters: [
{ namePrefix: 'GAN' },
{ namePrefix: 'Gi' },
{ namePrefix: 'MoYu' },
{ namePrefix: 'QiYi' },
{ namePrefix: 'GoCube' },
{ services: [SERVICES.gan.service] },
{ services: [SERVICES.qiyi.service] }
],
optionalServices: [SERVICES.gan.service, SERVICES.qiyi.service]
}).then(function(device){
teardown();
state.device = device;
device.addEventListener('gattserverdisconnected', onDisconnected);
report('Connecting to ' + (device.name || 'cube') + '…', 'wait');
if (!device.gatt) throw new Error('That device has no GATT server');
return device.gatt.connect();
}).then(function(server){
state.server = server;
/* GAN first, then MoYu — try both before giving up */
return wire('gan')
.catch(function(){ return wire('qiyi'); })
.catch(function(err){
teardown();
report('Could not subscribe', 'err');
warn((err && err.message ? err.message + '. ' : '') +
'Some firmware revisions only hand over their move data through the vendor app.');
throw err;
});
}).then(function(device){
state.lastQuat = null;
state.buffer = [];
/* start from solved so mirroring is meaningful */
window.cubeLab.reset();
resetStats();
say('Mirroring ' + (device.name || 'cube'), 'on');
if (UI.connect) UI.connect.textContent = 'Reconnect';
if (UI.reset) UI.reset.disabled = false;
}).catch(function(err){
if (err && err.name === 'NotFoundError'){
say('Not connected', 'idle');
if (UI.connect) UI.connect.disabled = false;
return;
}
if (!reported) say(describeErr(err), 'err');
if (UI.connect) UI.connect.disabled = false;
});
}
if (UI.connect) UI.connect.addEventListener('click', function(e){ e.preventDefault(); connect(); });
if (UI.reset) UI.reset.addEventListener('click', function(e){
e.preventDefault();
resetStats();
state.lastQuat = null;
});
window.addEventListener('pagehide', teardown);
document.addEventListener('visibilitychange', function(){
if (document.hidden) stopClock(); else if (state.device) startClock();
});
/* expose the decoder so the byte-level handling can be tested */
window.smartCube = {
drainFrames: drainFrames,
decodeMoves: decodeMoves,
decodeQuat: decodeQuat,
supported: supported,
PACK_ORDER: PACK_ORDER,
_state: state,
_push: function(bytes){ for (var i = 0; i < bytes.length; i++) state.buffer.push(bytes[i]); return drainFrames(); }
};
say(supported() ? 'Not connected' : 'Bluetooth not available', supported() ? 'idle' : 'off');
paintStats();
})();
/* ============================================================
POPULARITY BARS
============================================================ */
(function(){
var bars = document.querySelectorAll('#popbars .bar-fill');
if (!bars.length) return;
function fill(){
bars.forEach(function(b){
var w = b.getAttribute('data-w');
if (w) b.style.width = w + '%';
});
}
if (window.IntersectionObserver){
var io = new IntersectionObserver(function(entries){
entries.forEach(function(en){
if (en.isIntersecting){ fill(); io.disconnect(); }
});
}, { threshold: 0.3 });
io.observe(document.getElementById('popbars'));
} else { fill(); }
})();
/* ============================================================
SCROLL REVEAL
============================================================ */
(function(){
var observer = new IntersectionObserver(function(entries){
entries.forEach(function(e){ if (e.isIntersecting) e.target.classList.add('visible'); });
}, { threshold: 0.08, rootMargin: '0px 0px -40px 0px' });
document.querySelectorAll('.reveal').forEach(function(el){ observer.observe(el); });
})();
/* ============================================================
GSAP
============================================================ */
if (window.gsap && window.ScrollTrigger){
gsap.registerPlugin(ScrollTrigger);
var heroTl = gsap.timeline({ defaults: { ease: 'power3.out' } });
heroTl
.from('.breadcrumb', { x: -30, opacity: 0, duration: 0.6 })
.from('.project-hero h1', { y: 50, opacity: 0, duration: 0.8 }, '-=0.3')
.from('.tagline', { y: 30, opacity: 0, duration: 0.7 }, '-=0.4')
.from('.meta-chip', { y: 20, opacity: 0, scale: 0.8, duration: 0.4, stagger: 0.06 }, '-=0.3')
.from('.stats-bar', { y: 30, opacity: 0, duration: 0.6 }, '-=0.2')
.from('.stat-item', { y: 20, opacity: 0, scale: 0.9, duration: 0.4, stagger: 0.08, ease: 'back.out(1.5)' }, '-=0.3');
gsap.from('nav', { y: -20, opacity: 0, duration: 0.6, ease: 'power2.out' });
document.querySelectorAll('.section-title').forEach(function(title){
gsap.from(title, {
scrollTrigger: { trigger: title, start: 'top 88%' },
y: 30, opacity: 0, duration: 0.7, ease: 'power3.out'
});
});
document.querySelectorAll('.section-divider').forEach(function(div){
gsap.from(div, {
scrollTrigger: { trigger: div, start: 'top 92%' },
width: 0, duration: 0.6, ease: 'power2.out'
});
});
document.querySelectorAll('.mband').forEach(function(band){
gsap.from(band, {
scrollTrigger: { trigger: band, start: 'top 88%' },
y: 40, opacity: 0, duration: 0.7, ease: 'power3.out'
});
});
document.querySelectorAll('.pipe').forEach(function(pipe){
gsap.from(pipe.querySelectorAll('.pipe-step'), {
scrollTrigger: { trigger: pipe, start: 'top 88%' },
y: 26, opacity: 0, duration: 0.5, stagger: 0.07, ease: 'power3.out'
});
});
document.querySelectorAll('.alg-grid').forEach(function(grid){
gsap.from(grid.querySelectorAll('.alg'), {
scrollTrigger: { trigger: grid, start: 'top 88%' },
y: 36, opacity: 0, scale: 0.96, duration: 0.5, stagger: 0.07, ease: 'power3.out'
});
});
document.querySelectorAll('.facts').forEach(function(f){
gsap.from(f.querySelectorAll('.fact'), {
scrollTrigger: { trigger: f, start: 'top 90%' },
y: 20, opacity: 0, duration: 0.45, stagger: 0.06, ease: 'power2.out'
});
});
document.querySelectorAll('.nota-grid').forEach(function(grid){
gsap.from(grid.querySelectorAll('.nota'), {
scrollTrigger: { trigger: grid, start: 'top 88%' },
y: 26, opacity: 0, duration: 0.45, stagger: 0.06, ease: 'power3.out'
});
});
document.querySelectorAll('.twoup').forEach(function(g){
gsap.from(g.querySelectorAll('.half'), {
scrollTrigger: { trigger: g, start: 'top 88%' },
y: 40, opacity: 0, duration: 0.6, stagger: 0.12, ease: 'power3.out'
});
});
document.querySelectorAll('.road-item').forEach(function(item){
gsap.from(item, {
scrollTrigger: { trigger: item, start: 'top 90%' },
x: -24, opacity: 0, duration: 0.55, ease: 'power3.out'
});
});
document.querySelectorAll('.cubelab').forEach(function(lab){
gsap.from(lab, {
scrollTrigger: { trigger: lab, start: 'top 88%' },
y: 40, opacity: 0, duration: 0.7, ease: 'power3.out'
});
gsap.from(lab.querySelectorAll('.st'), {
scrollTrigger: { trigger: lab, start: 'top 88%' },
scale: 0, opacity: 0, duration: 0.3, stagger: 0.004, ease: 'back.out(2)',
clearProps: 'all'
});
});
document.querySelectorAll('.table-wrapper').forEach(function(w){
gsap.from(w, {
scrollTrigger: { trigger: w, start: 'top 88%' },
y: 40, opacity: 0, duration: 0.7, ease: 'power3.out'
});
});
document.querySelectorAll('.callout').forEach(function(c){
gsap.from(c, {
scrollTrigger: { trigger: c, start: 'top 92%' },
y: 26, opacity: 0, duration: 0.6, ease: 'power3.out'
});
});
gsap.from('footer', {
scrollTrigger: { trigger: 'footer', start: 'top 96%' },
opacity: 0, duration: 0.8
});
window.addEventListener('load', function(){ ScrollTrigger.refresh(); });
}
</script>
<script src="script.js"></script>
</body>
</html>