:root {
  --cyan: #00C8D4;
  --cyan-dark: #00A8B4;
  --black: #0A0A0A;
  --off-black: #141414;
  --dark-grey: #1A1A1A;
  --mid-grey: #2A2A2A;
  --light-grey: #999;
  --white: #F5F5F5;
  --pure-white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem;
  letter-spacing: 0.15em; display: flex; align-items: center;
  text-decoration: none; color: var(--white);
}
.nav-logo .t-outline { color: var(--white); -webkit-text-stroke: 1.5px var(--white); -webkit-text-fill-color: transparent; }
.nav-logo .two { color: var(--cyan); -webkit-text-fill-color: var(--cyan); }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--light-grey); text-decoration: none; transition: color 0.25s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-breadcrumb {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.75rem;
  color: rgba(255,255,255,0.25); letter-spacing: 0.1em; margin-left: 1.5rem;
}

/* ── HERO ── */
.module-hero {
  padding: 8rem 3rem 3rem;
  max-width: 900px; margin: 0 auto;
}
.module-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan); padding: 0.3rem 0.8rem;
  border: 1px solid rgba(0,200,212,0.3); margin-bottom: 1.2rem;
}
.module-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: 0.04em; line-height: 0.95; margin-bottom: 1rem;
}
.module-hero .tagline {
  font-weight: 300; font-size: 1.05rem; color: var(--light-grey);
  line-height: 1.7; max-width: 600px; margin-bottom: 2rem;
}
.hero-buttons { display: flex; gap: 1rem; }
.btn-primary {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1rem 2.5rem; background: var(--cyan); color: var(--black);
  border: none; cursor: pointer; transition: all 0.3s; text-decoration: none;
}
.btn-primary:hover { background: var(--cyan-dark); transform: translateY(-2px); }
.btn-ghost {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1rem 2.5rem; background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.2); cursor: pointer;
  transition: all 0.3s; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── SECTIONS ── */
.module-content {
  max-width: 900px; margin: 0 auto; padding: 0 3rem 5rem;
}

.collapsible {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.collapsible-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 0; background: none; border: none; cursor: pointer; color: var(--white);
}
.collapsible-header h2 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1.3rem; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.8rem;
}
.section-badge {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.6rem;
  font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border: 1px solid rgba(0,200,212,0.3);
  color: var(--cyan);
}
.collapsible-arrow {
  font-size: 1.2rem; color: rgba(255,255,255,0.3);
  transition: transform 0.2s; font-family: monospace;
}
.collapsible.open .collapsible-arrow { transform: rotate(90deg); }
.collapsible-body {
  display: none; padding-bottom: 2rem;
  animation: fadeIn 0.25s ease;
}
.collapsible.open .collapsible-body { display: block; }

/* ── THEORY ── */
.theory-text {
  font-weight: 300; font-size: 0.95rem; color: var(--light-grey);
  line-height: 1.8;
}
.theory-text p { margin-bottom: 1rem; }
.theory-text strong { color: var(--white); font-weight: 600; }

.equation {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.3rem; margin: 0.8rem 0;
  background: rgba(0,200,212,0.03); border: 1px solid rgba(0,200,212,0.08);
  border-radius: 4px;
}
.equation code {
  font-family: 'Barlow', monospace; font-size: 0.95rem; color: var(--white);
  letter-spacing: 0.02em;
}
.equation .eq-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  color: rgba(255,255,255,0.25); letter-spacing: 0.1em;
}
.ref-box {
  padding: 0.9rem 1.2rem; margin-top: 1.2rem;
  background: rgba(0,200,212,0.03); border: 1px solid rgba(0,200,212,0.1);
  border-radius: 4px; display: flex; align-items: center; gap: 0.8rem;
}
.ref-box .ref-tag {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.15em; color: var(--cyan);
}
.ref-box .ref-text {
  font-size: 0.85rem; color: rgba(255,255,255,0.4);
}

/* ── BLURRED DOC ── */
.blurred-doc {
  border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05); margin-top: 1rem;
  position: relative;
}
.blurred-doc-header {
  padding: 0.4rem 0.8rem; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; gap: 0.5rem;
}
.blurred-doc-header svg { width: 12px; height: 12px; color: rgba(255,255,255,0.2); }
.blurred-doc-header span {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.65rem;
  color: rgba(255,255,255,0.3); letter-spacing: 0.08em;
}
.blurred-doc-body {
  padding: 0.8rem; background: rgba(0,0,0,0.2);
  filter: blur(4px); -webkit-filter: blur(4px);
  user-select: none; pointer-events: none;
  max-height: 110px; overflow: hidden;
  font-family: monospace; font-size: 0.65rem;
  color: rgba(255,255,255,0.12); line-height: 1.6;
}
.blurred-doc-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(transparent, rgba(10,10,10,0.85));
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0.8rem;
}
.blurred-doc-overlay span {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.6rem;
  color: rgba(255,255,255,0.25); letter-spacing: 0.12em; text-transform: uppercase;
}

/* ── CODE BLOCK (BLURRED) ── */
.code-block {
  border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06); margin-top: 0.8rem;
  position: relative;
}
.code-block-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 1rem; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.code-block-lang {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  color: var(--cyan); font-weight: 700; letter-spacing: 0.1em;
}
.code-block-file {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  color: rgba(255,255,255,0.3); margin-left: 0.6rem; letter-spacing: 0.05em;
}
.code-block-lock {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.55rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 3px;
  color: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.08);
}
.code-block-content {
  position: relative;
}
.code-block pre {
  margin: 0; padding: 1rem; background: rgba(0,0,0,0.3);
  font-family: monospace; font-size: 0.75rem; line-height: 1.6;
  color: rgba(255,255,255,0.7); overflow-x: auto;
  filter: blur(5px); -webkit-filter: blur(5px);
  user-select: none; pointer-events: none;
  max-height: 240px; overflow: hidden;
}
.code-block-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.85) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
}
.lock-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(0,200,212,0.3);
  display: flex; align-items: center; justify-content: center;
}
.lock-icon svg { width: 16px; height: 16px; }
.code-block-overlay h4 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.08em;
}
.code-block-overlay p {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  color: rgba(255,255,255,0.35); text-align: center; max-width: 220px;
  letter-spacing: 0.05em;
}
.btn-unlock {
  margin-top: 0.2rem; padding: 0.5rem 1.5rem;
  background: rgba(0,200,212,0.1); border: 1px solid rgba(0,200,212,0.3);
  border-radius: 4px; color: var(--cyan);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s; text-decoration: none;
}
.btn-unlock:hover { background: rgba(0,200,212,0.2); }

/* ── CANVAS VISUALISER ── */
.visualiser-wrap {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.visualiser-canvas {
  flex: 1 1 340px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.visualiser-controls {
  flex: 0 0 200px;
}
.control-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.25); margin-bottom: 0.8rem;
}
.control-row {
  margin-bottom: 0.7rem;
}
.control-row .ctrl-header {
  display: flex; justify-content: space-between; margin-bottom: 0.15rem;
}
.control-row .ctrl-name {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
}
.control-row .ctrl-val {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.75rem;
  color: var(--cyan); letter-spacing: 0.05em;
}
.control-row input[type="range"] {
  width: 100%; accent-color: var(--cyan); height: 3px;
}
.speed-btns {
  display: flex; gap: 0.4rem; margin-top: 0.8rem; justify-content: center;
}
.speed-btn {
  padding: 0.3rem 0.8rem; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: rgba(255,255,255,0.35);
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.2s;
}
.speed-btn.active {
  border-color: var(--cyan); background: rgba(0,200,212,0.08);
  color: var(--cyan);
}

/* ── FILE LIST ── */
.file-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.file-item:last-child { border-bottom: none; }
.file-name {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.85rem;
  color: var(--white); letter-spacing: 0.05em;
}
.file-desc {
  font-size: 0.8rem; color: rgba(255,255,255,0.35); margin-left: 0.8rem;
}
.file-lang {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.55rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 3px;
}
.file-lang.matlab { color: #e16737; border: 1px solid rgba(225,103,55,0.3); }
.file-lang.python { color: #3776ab; border: 1px solid rgba(55,118,171,0.3); }
.file-lang.simulink { color: #006eb8; border: 1px solid rgba(0,110,184,0.3); }

/* ── SETUP STEPS ── */
.setup-step {
  display: flex; gap: 1.2rem; margin-bottom: 1.5rem;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--cyan); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem;
  color: var(--cyan); font-weight: 700;
}
.step-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.step-desc {
  font-weight: 300; font-size: 0.85rem; color: var(--light-grey); line-height: 1.6;
}
.step-desc code {
  color: var(--cyan); font-family: monospace; font-size: 0.8rem;
}

/* ── PRICING ── */
.pricing-grid {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.price-card {
  flex: 1 1 240px; padding: 2rem; border-radius: 6px;
}
.price-card.student {
  border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.015);
}
.price-card.pro {
  border: 1px solid rgba(0,200,212,0.25); background: rgba(0,200,212,0.03);
}
.price-tier {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.price-card.student .price-tier { color: rgba(255,255,255,0.35); }
.price-card.pro .price-tier { color: var(--cyan); }
.price-amount {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.8rem; line-height: 1;
}
.price-amount .per {
  font-family: 'Barlow', sans-serif; font-size: 0.9rem;
  color: rgba(255,255,255,0.3); font-weight: 300;
}
.price-desc {
  font-weight: 300; font-size: 0.8rem; color: rgba(255,255,255,0.35);
  line-height: 1.6; margin: 0.8rem 0 1.5rem;
}
.price-card .btn-primary, .price-card .btn-ghost {
  width: 100%; text-align: center; display: block;
  padding: 0.7rem; font-size: 0.8rem;
}

/* ── FOOTER NOTE ── */
.module-note {
  margin-top: 3rem; padding: 1.3rem 1.5rem; border-radius: 6px;
  background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.05);
}
.module-note p {
  font-weight: 300; font-size: 0.85rem; color: rgba(255,255,255,0.4); line-height: 1.7;
}
.module-note strong { color: var(--white); }
.back-link {
  margin-top: 2.5rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.back-link a {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem;
  color: rgba(255,255,255,0.25); text-decoration: none;
  letter-spacing: 0.08em; transition: color 0.25s;
}
.back-link a:hover { color: var(--cyan); }

/* ── FOOTER ── */
footer {
  padding: 2rem 3rem; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
}
footer span { font-size: 0.8rem; color: rgba(255,255,255,0.3); font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.1em; }
footer .socials { display: flex; gap: 1.5rem; }
footer .socials a { color: rgba(255,255,255,0.3); text-decoration: none; font-size: 0.8rem; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.25s; }
footer .socials a:hover { color: var(--cyan); }

/* ── TORNADO CHART ── */
.tornado-row {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem;
}
.tornado-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.75rem;
  color: rgba(255,255,255,0.5); width: 140px; letter-spacing: 0.05em;
}
.tornado-bar-wrap {
  flex: 1; height: 18px; position: relative;
  background: rgba(255,255,255,0.02); border-radius: 3px;
}
.tornado-center {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: rgba(255,255,255,0.12);
}
.tornado-bar {
  position: absolute; top: 2px; bottom: 2px; border-radius: 2px; opacity: 0.7;
}
.tornado-bar.negative { background: var(--cyan); }
.tornado-bar.positive { background: #ff5252; }
.tornado-val {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  width: 45px; text-align: right; letter-spacing: 0.05em;
}
.tornado-val.neg { color: var(--cyan); }
.tornado-val.pos { color: #ff5252; }

/* ── DASH PREVIEW ── */
.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem;
}
.dash-cell {
  padding: 1.5rem; background: rgba(255,255,255,0.02); border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem;
  color: rgba(255,255,255,0.3); text-align: center; letter-spacing: 0.08em;
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .module-hero { padding: 6rem 1.5rem 2rem; }
  .module-content { padding: 0 1.5rem 4rem; }
  .visualiser-wrap { flex-direction: column; }
  .visualiser-controls { flex: 1 1 auto; }
  .pricing-grid { flex-direction: column; }
  .dash-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; }
}
