/* ============================================================
   TECHYUVA v2 — style.css
   Paper Terminal · ASCII Fluid · Gravity Sling · File Explorer
   ============================================================ */

/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Ensure the [hidden] attribute always wins over any author `display` rule.
   Several overlays (.thinking, .quiz, .cmd-palette) set display:flex, which
   otherwise overrides the browser default and keeps them visible. */
[hidden] { display: none !important; }

:root {
  --paper:   #f7f4ed;
  --paper-2: #efeadf;
  --paper-3: #e8e3d6;
  --ink:     #1c1915;
  --ink-soft:#5c564d;
  --ink-faint: rgba(28,25,21,0.35);
  --line:    #d5cfc2;
  --line-soft: rgba(213,207,194,0.5);
  --accent:  #b85c38;
  --accent-soft: rgba(184,92,56,0.1);
  --accent-glow: rgba(184,92,56,0.15);
  --java:    #b85c38;
  --cpp:     #4a7c59;
  --python:  #8b4513;
  --good:    #4a7c59;
  --bad:     #a03030;
  --dark:    #1c1915;
  --dark-ink:#f7f4ed;

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  --ease: cubic-bezier(.65, 0, .15, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --pad: clamp(1.25rem, 5vw, 5rem);
  --nav-w: 240px;
  /* Effective left edge of the content area. Starts at the full explorer
     width; collapses to a slim rail when the explorer is toggled off.
     Everything (bar, hero, sections, footer) reads this single value. */
  --nav-edge: 240px;
}
.nav.is-collapsed { --nav-edge: 48px; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: auto;
}

body.quiz-open { overflow: hidden; }

::selection { background: var(--accent); color: var(--paper); }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: italic; }
kbd {
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .05em .45em;
  font-size: .8em;
  background: var(--paper-2);
  color: var(--ink-soft);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 1001;
  background: transparent;
  pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(184, 92, 56, .4);
  transition: width .1s linear;
}

/* ============================================================
   ASCII FLUID BACKGROUND
   ============================================================ */
.ascii-fluid {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .08;
}

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain {
  position: fixed; inset: -100%;
  z-index: 998; pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); }
  70% { transform: translate(9%, 4%); }
  90% { transform: translate(-1%, 7%); }
}

/* ============================================================
   CURSOR
   ============================================================ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none !important;
}
.cursor {
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  opacity: .35;
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              opacity .3s, background-color .3s, border-color .3s;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--accent);
}
.cursor.is-hover {
  width: 56px; height: 56px;
  background: var(--accent-soft);
  border-color: var(--accent);
  opacity: .6;
}
.cursor.is-down { width: 22px; height: 22px; }

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ============================================================
   FILE EXPLORER NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  display: flex; flex-direction: column;
  width: var(--nav-w);
  background: var(--paper-2);
  border-right: 1px solid var(--line);
  transition: transform .5s var(--ease), width .5s var(--ease);
}
.nav.is-collapsed { width: var(--nav-edge); }
.nav.is-collapsed .nav__explorer { opacity: 0; pointer-events: none; }

/* Slim rail handle shown only when the explorer is collapsed.
   Sits in the 48px rail so it's always clickable to re-expand. */
.nav__expand {
  position: absolute;
  top: .85rem; left: .5rem;
  width: 36px; height: 36px;
  display: none;
  place-items: center;
  border-radius: 6px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: var(--paper);
  z-index: 5;
  transition: background .2s, color .2s, border-color .2s;
}
.nav__expand:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.nav.is-collapsed .nav__expand { display: grid; }

.nav__explorer {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 1rem 0;
  overflow-y: auto;
  transition: opacity .3s;
}
.nav__explorer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem .8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .5rem;
}
.nav__explorer-title {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: .2em; color: var(--ink-soft);
  font-weight: 600;
}
.nav__explorer-toggle {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav__explorer-toggle:hover { background: var(--line-soft); color: var(--ink); }

.nav__tree { padding: 0 .5rem; }
.nav__tree-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .6rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav__tree-item:hover { background: var(--line-soft); color: var(--ink); }
.nav__tree-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav__tree-item svg { flex-shrink: 0; opacity: .6; }
.nav__tree-item.is-active svg { opacity: 1; }

.nav__tree-item--root { font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.nav__tree-item--folder { cursor: pointer; }
.nav__tree-item--folder:hover { background: var(--line-soft); }

.nav__tree-children { padding-left: 1rem; }
.nav__tree-children.is-collapsed { display: none; }

.nav__tree-folder { margin: .1rem 0; }

.nav__bar {
  position: fixed; top: 0; left: var(--nav-edge); right: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border-bottom: 1px solid transparent;
  z-index: 99;
  transition: left .5s var(--ease), border-color .4s;
}

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 600;
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none;
}
.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav__logo-name {
  font-size: 1.05rem;
  color: var(--ink);
}
.nav__logo-sub {
  font-size: .52rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .18em;
  white-space: nowrap;
}
.nav__logo-mark {
  position: relative;
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.nav__logo-mark::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  filter: blur(8px);
  animation: logoGlow 3s ease-in-out infinite;
  z-index: -1;
}
@keyframes logoGlow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}
.nav__logo-mark img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav__actions { display: flex; align-items: center; gap: 1rem; }
.nav__cmd {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px -4px var(--accent);
}

@media (max-width: 900px) {
  :root { --nav-edge: 0; --pad: 1rem; }
  .nav { position: fixed; left: calc(-1 * var(--nav-w)); width: var(--nav-w); height: 100%; z-index: 1000; transition: left .35s var(--ease-out); }
  .nav.is-open { left: 0; }
  .nav__bar { left: 0 !important; position: fixed; top: 0; width: 100vw; z-index: 999; padding: .5rem 1rem; }
  html { overflow-x: hidden; }

  /* ─── Hero ─── */
  .hero { padding: 5rem 1rem 2rem; min-height: auto; }
  .hero__content { max-width: 100%; }
  .hero__eyebrow { font-size: .65rem; margin-bottom: .8rem; letter-spacing: .12em; justify-content: center; }
  .hero__title { font-size: clamp(1.8rem, 10vw, 2.6rem); line-height: 1.08; }
  .line > span { transform-origin: center top; }
  .hero__bottom { flex-direction: column; align-items: center; gap: .6rem; margin-top: 1rem; }
  .hero__copy { max-width: 100%; font-size: .82rem; line-height: 1.5; text-align: center; }
  .hero__actions { justify-content: center; gap: .8rem; }
  .hero__actions .btn { font-size: .75rem; padding: .6rem 1.2rem; }
  .hero__stats { justify-content: center; gap: 1.2rem; margin-top: 1.2rem; padding-top: 1rem; }
  .stat__num { font-size: 1.4rem; }
  .stat p { font-size: .6rem; }

  /* ─── Sections ─── */
  .section { padding: 2rem 1rem; }
  .section--dark { padding: 2rem 1rem; }
  .section__head { margin-bottom: 1.2rem; max-width: 100%; }
  .section__index { font-size: .65rem; margin-bottom: .3rem; }
  .section__title { font-size: 1.35rem; line-height: 1.15; text-align: center; }
  .section__sub { font-size: .75rem; margin-top: .4rem; text-align: center; max-width: 100%; }

  /* ─── Courses Grid ─── */
  .courses { grid-template-columns: 1fr; gap: .8rem; padding: 0; }
  .course__content { padding: 1rem 1rem; }
  .course__head { margin-bottom: .4rem; }
  .course__index { font-size: .75rem; }
  .course__lang { font-size: .65rem; }
  .course__badge { font-size: .58rem; }
  .course__name { font-size: 1.05rem; line-height: 1.15; }
  .course__desc { font-size: .74rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .course__batches { margin-top: .4rem; }
  .course__batch-tag { font-size: .58rem; padding: .15em .5em; }
  .course__foot { margin-top: .7rem; flex-direction: column; gap: .5rem; align-items: flex-start; }
  .course__duration { font-size: .65rem; }
  .course__cta { font-size: .7rem; padding: .5rem 1rem; }

  /* ─── Schedule Table ─── */
  .schedule-wrap { border-radius: 10px; margin: 0; }
  .schedule-wrap table { font-size: .66rem; }
  .schedule-wrap th { padding: .55rem .6rem; font-size: .58rem; letter-spacing: .06em; }
  .schedule-wrap td { padding: .5rem .6rem; font-size: .66rem; }
  .schedule-wrap td br { display: none; }
  .schedule-wrap td span { display: inline; }

  /* ─── Study Zone ─── */
  .sz-update-card { padding: .75rem .9rem; border-radius: 10px; }
  .sz-update__title { font-size: .82rem; }
  .sz-update__desc { font-size: .68rem; -webkit-line-clamp: 2; }
  .sz-update__tags { gap: .25rem; margin-top: .2rem; }
  .sz-tag { font-size: .54rem; padding: .1em .45em; }
  .sz-update__date { font-size: .56rem; }
  .sz-update__body { gap: .2rem; }

  /* ─── YouTube ─── */
  .yt-channel-card { padding: .75rem .85rem; border-radius: 10px; gap: .6rem; }
  .yt-channel-card__icon { width: 34px; height: 34px; }
  .yt-channel-card__name { font-size: .9rem; }
  .yt-channel-card__sub { font-size: .56rem; }
  .yt-channel-card .btn { font-size: .65rem; padding: .4rem .75rem; margin-left: 0; }
  .yt-videos { grid-template-columns: 1fr; gap: .5rem; }
  .yt-video-card { padding: .6rem .75rem; gap: .6rem; }
  .yt-video-card__thumb { width: 40px; height: 26px; }
  .yt-video-card__title { font-size: .68rem; }
  .yt-video-card__meta { font-size: .56rem; }

  /* ─── Location ─── */
  .location-row { grid-template-columns: 1fr; }
  .location-row__map { min-height: 200px; border-radius: 10px; }

  /* ─── Contact ─── */
  .contact-grid { grid-template-columns: 1fr; gap: .6rem; padding: 0; }
  .contact-card { padding: 1rem .9rem; border-radius: 10px; }
  .contact-card__icon { width: 36px; height: 36px; margin-bottom: .5rem; }
  .contact-card__label { font-size: .58rem; }
  .contact-card__value { font-size: .74rem; }
  .contact-card__socials { gap: .6rem; }
  .social-link { width: 34px; height: 34px; }
  .ratings-row { font-size: .68rem; padding: .6rem .9rem; }

  /* ─── Footer ─── */
  .footer { flex-direction: column; text-align: center; gap: .3rem; padding: 1.2rem 1rem; font-size: .7rem; }
  .footer__logo { font-size: .85rem; }
  .footer-credits { font-size: .58rem; padding: .45rem 1rem; text-align: center; }

  /* ─── WhatsApp ─── */
  .wa-float { bottom: 80px !important; right: 1rem; width: 44px !important; height: 44px !important; z-index: 999 !important; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
  .wa-float svg { width: 18px; height: 18px; }

  /* ─── Nav ─── */
  .nav__expand { width: 36px; height: 36px; }
  .nav__logo-name { font-size: .88rem; }
  .nav__logo-sub { display: none; }
  .nav__logo-mark { width: 26px; height: 26px; }
  .nav__cmd { width: 30px; height: 30px; }
  .nav__cmd svg { width: 14px; height: 14px; }

  /* ─── Quiz ─── */
  .quiz { padding: 1rem; border-radius: 12px; }
  .quiz__question { font-size: 1rem; }
  .quiz__options { gap: .5rem; }
  .quiz__option { padding: .75rem .9rem; font-size: .8rem; }

  /* ─── Results ─── */
  .results__grid { grid-template-columns: 1fr 1fr; }
  .card--score { grid-column: span 2; }

  /* ─── Empty states ─── */
  .empty-state { padding: 1.5rem .5rem; }

  /* ─── Skeleton ─── */
  .skeleton--card { height: 60px; }
  @keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

  /* ─── General overflows ─── */
  .owner-page, .course-page { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.cmd-palette {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
}
.cmd-palette__backdrop {
  position: absolute; inset: 0;
  background: rgba(28,25,21,.25);
  backdrop-filter: blur(4px);
}
.cmd-palette__modal {
  position: relative;
  width: min(560px, 90vw);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 40px 80px -20px rgba(28,25,21,.2);
  overflow: hidden;
  animation: palette-in .3s var(--ease-out);
}
@keyframes palette-in {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.cmd-palette__input-wrap {
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.cmd-palette__prompt {
  font-family: var(--font-mono);
  font-size: 1rem; color: var(--accent);
  font-weight: 600;
}
.cmd-palette__input {
  flex: 1;
  font: inherit; font-family: var(--font-mono);
  font-size: .95rem;
  border: none; background: none;
  color: var(--ink);
  outline: none;
}
.cmd-palette__input::placeholder { color: var(--ink-faint); }
.cmd-palette__results { max-height: 320px; overflow-y: auto; }
.cmd-palette__result {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s;
}
.cmd-palette__result:hover,
.cmd-palette__result.is-selected {
  background: var(--accent-soft);
  color: var(--ink);
}
.cmd-palette__result kbd {
  margin-left: auto;
  font-size: .7rem;
  opacity: .5;
}

/* ============================================================
   BUTTONS & LINKS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .85rem 1.8rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
  font-size: .85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  position: relative; overflow: hidden;
  isolation: isolate;
  transition: color .4s var(--ease), border-color .4s;
  font-family: var(--font-mono);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateY(101%); border-radius: 50% 50% 0 0;
  transition: transform .5s var(--ease), border-radius .5s var(--ease);
}
.btn:hover { color: var(--paper); }
.btn:hover::before { transform: translateY(0); border-radius: 0; }

.btn svg { width: 1.1em; height: 1.1em; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--primary::before { background: var(--ink); }
.btn--small { padding: .55rem 1.1rem; font-size: .72rem; }
.btn--big { padding: 1.1rem 2.8rem; font-size: .9rem; }
.btn--full { width: 100%; justify-content: center; }

.btn__text {
  font-family: var(--font-mono);
  letter-spacing: 0;
  text-transform: none;
}

.link-arrow {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: .5rem;
  position: relative; padding-bottom: 3px;
  background: none; border: 0;
  font-family: var(--font-mono);
}
.link-arrow::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(1); transform-origin: left;
  transition: transform .4s var(--ease);
}
.link-arrow:hover::before { transform: scaleX(0); transform-origin: right; }
.link-arrow::after { content: "→"; transition: transform .4s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(7rem, 14vh, 9rem) var(--pad) 5rem;
  padding-left: calc(var(--nav-edge) + var(--pad));
  position: relative;
}

.hero__content { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.hero__eyebrow { justify-content: center; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ink-soft);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero__eyebrow::before {
  content: ""; width: 2.5rem; height: 1px; background: var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.hero__title em { font-style: italic; }
.hero__title .accent { color: var(--accent); }

.line { display: block; overflow: hidden; }
.line > span {
  display: block;
  transform: translateY(115%) rotate(1.5deg);
  transition: transform 1.2s var(--ease);
  transform-origin: left top;
}
.lines-in .line > span { transform: translateY(0) rotate(0); }
.lines-in .line:nth-child(2) > span { transition-delay: .1s; }
.lines-in .line:nth-child(3) > span { transition-delay: .2s; }

.hero__bottom {
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem; margin-top: 2.4rem;
}
.hero__copy { max-width: 48ch; color: var(--ink-soft); font-size: .98rem; line-height: 1.65; text-align: center; }
.hero__actions { display: flex; align-items: center; justify-content: center; gap: 1.6rem; flex-wrap: wrap; }

.hero__stats {
  display: flex; gap: clamp(1.6rem, 4vw, 3.4rem);
  margin-top: clamp(2.6rem, 6vh, 4rem);
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  justify-content: center;
  flex-wrap: wrap;
}
.stat__num, .stat__suffix {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.stat__suffix { color: var(--accent); }
.stat p { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-top: .2rem; }

.hero__scroll {
  position: absolute; bottom: 2rem; right: var(--pad);
  width: 1px; height: 48px; overflow: hidden;
  background: var(--line);
  z-index: 3;
}
.hero__scroll span {
  position: absolute; inset: 0;
  background: var(--accent);
  animation: scroll-line 1.8s var(--ease) infinite;
}
@keyframes scroll-line {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ----- Hero Terminal Stage ----- */
.hero__terminal {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero__orb {
  position: absolute;
  top: 50%; left: 50%;
  width: 140%; height: 140%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 60% 40%, var(--accent-glow), transparent 65%);
  filter: blur(30px);
  z-index: 0;
  animation: orbBreathe 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orbBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .7; }
  50%      { transform: translate(-50%, -50%) scale(1.06); opacity: .9; }
}

.hero__ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px dashed var(--line);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.hero__ring--1 {
  width: 120%; height: 120%;
  animation: ringSpin 28s linear infinite;
}
.hero__ring--2 {
  width: 140%; height: 140%;
  border-style: dotted;
  border-color: rgba(184, 92, 56, .2);
  animation: ringSpin 42s linear infinite reverse;
}
@keyframes ringSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero__chips {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}
.hero__chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(.72rem, 1vw, .88rem);
  font-weight: 500;
  padding: .45em .85em;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px -10px rgba(28, 25, 21, .25);
  transform: rotate(var(--rot));
  animation: chipFloat 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.hero__chip.is-accent {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
@keyframes chipFloat {
  0%, 100% { transform: rotate(var(--rot)) translateY(0); }
  50%      { transform: rotate(var(--rot)) translateY(-10px); }
}

@media (max-width: 1024px) {
  .hero__chips { display: none; }
}

/* ============================================================
   WHITE PAPER TERMINAL
   ============================================================ */
.terminal {
  max-width: 100%;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow:
    0 2px 0 rgba(255,255,255,.5) inset,
    0 -1px 0 rgba(0,0,0,.03) inset,
    0 30px 60px -30px rgba(28, 25, 21, .15),
    0 0 0 1px rgba(184, 92, 56, .06);
  font-family: var(--font-mono);
  position: relative;
}

/* Letterpress effect on terminal */
.terminal::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
  z-index: 10;
}

.terminal__bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1rem;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
}
.terminal__dots { display: flex; gap: .4rem; }
.terminal__dots i {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal__dots i:nth-child(1) { background: #c9a9a0; }
.terminal__dots i:nth-child(2) { background: #c4b896; }
.terminal__dots i:nth-child(3) { background: #a0b8a0; }

.terminal__title {
  font-size: .72rem;
  color: var(--ink-faint);
  margin-right: auto;
  letter-spacing: .04em;
  font-family: var(--font-mono);
}

.terminal__langs { display: flex; gap: .25rem; }
.term-tab {
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: .3rem .6rem;
  border-radius: 5px;
  color: var(--ink-faint);
  border: 1px solid transparent;
  transition: color .25s, background-color .25s, border-color .25s;
  cursor: pointer;
}
.term-tab:hover { color: var(--ink); background: rgba(28,25,21,.04); }
.term-tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(184, 92, 56, .25);
}

.terminal__body {
  padding: 1.2rem 1.4rem;
  min-height: 280px;
  display: flex; flex-direction: column;
  gap: .8rem;
}
.terminal__code, .terminal__out {
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.terminal__code { color: #3a3530; }

/* Vintage syntax colors */
.tok-kw   { color: #b85c38; font-weight: 500; }
.tok-fn   { color: #8b6914; }
.tok-str  { color: #4a7c59; }
.tok-num  { color: #8b4513; }
.tok-com  { color: #a09888; font-style: italic; }
.tok-type { color: #5a6b8a; }
.tok-punc { color: rgba(58, 53, 48, .45); }

/* Typewriter caret */
.term-caret {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

.terminal__out { opacity: 0; transform: translateY(4px); }
.terminal__out.is-shown {
  opacity: 1; transform: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.terminal__out .out-prompt { color: #a09888; }
.terminal__out .out-line   { color: #3a3530; }
.terminal__out .out-emoji  { color: var(--accent); }

.terminal__statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem 1rem;
  background: var(--paper-3);
  border-top: 1px solid var(--line);
  font-size: .65rem;
  color: var(--ink-faint);
  letter-spacing: .04em;
}
.terminal__status { display: inline-flex; align-items: center; gap: .4rem; }
.terminal__status i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #a09888;
}
.terminal__status.is-running i { background: #c4b896; animation: pulse 1s ease-in-out infinite; }
.terminal__status.is-done i    { background: #a0b8a0; }
.terminal__cursor-info { font-family: var(--font-mono); font-size: .6rem; }

@media (max-width: 560px) {
  .terminal__title { display: none; }
  .terminal__body { padding: 1rem; font-size: .78rem; min-height: 240px; }
  .terminal__code, .terminal__out { font-size: .75rem; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  background: var(--paper-2);
}
.marquee__track {
  display: flex; align-items: center; gap: 2.5rem;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  font-style: normal; white-space: nowrap;
  letter-spacing: .02em;
  color: var(--ink-soft);
}
.marquee__track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-33.333%); } }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
  padding-left: calc(var(--nav-edge) + var(--pad));
  position: relative; z-index: 1;
}

.section__head { margin-bottom: clamp(3rem, 7vh, 5rem); position: relative; }
.section__index {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem; letter-spacing: .2em;
  color: var(--accent); margin-bottom: 1rem;
}
.section__index::after { content: " /"; color: var(--ink-soft); }
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  line-height: 1.05; letter-spacing: -.01em;
}
.section__sub { color: var(--ink-soft); margin-top: 1.2rem; max-width: 44ch; font-size: .95rem; }

.section--dark {
  background: var(--dark); color: var(--dark-ink);
  --line: rgba(247, 244, 237, .12);
  --ink-soft: rgba(247, 244, 237, .5);
  --paper: #1c1915;
  --paper-2: #24201c;
}

/* ============================================================
   REVEAL (scroll-triggered)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* ============================================================
   ASCII TITLE EFFECT
   ============================================================ */
.ascii-title-char {
  display: inline-block;
  transition: opacity .3s, transform .3s;
}
.ascii-title-char.is-scrambling {
  opacity: .5;
  transform: translateY(-2px);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.4rem;
}
.feature {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem 1.8rem 5.5rem;
  background: var(--paper);
  overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              border-color .4s;
  will-change: transform;
}
.feature:hover {
  border-color: var(--ink);
  box-shadow: 0 20px 40px -24px rgba(28, 25, 21, .2);
}
.feature__num {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.4rem; color: var(--accent);
}
.feature h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.4rem; margin: .8rem 0 .6rem;
}
.feature p { color: var(--ink-soft); font-size: .92rem; line-height: 1.6; }

.feature__art { position: absolute; bottom: 1.2rem; right: 1.4rem; }

.feature__art--rings { display: flex; }
.feature__art--rings i {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  margin-left: -10px;
  transition: transform .5s var(--ease);
}
.feature:hover .feature__art--rings i:nth-child(1) { transform: translateX(-5px); }
.feature:hover .feature__art--rings i:nth-child(3) { transform: translateX(5px); }

.feature__art--bars { display: flex; align-items: flex-end; gap: 4px; height: 36px; }
.feature__art--bars i {
  width: 6px; background: var(--accent); border-radius: 3px;
  height: 30%;
  transition: height .6s var(--ease);
}
.feature__art--bars i:nth-child(2) { height: 55%; }
.feature__art--bars i:nth-child(3) { height: 40%; }
.feature__art--bars i:nth-child(4) { height: 75%; }
.feature__art--bars i:nth-child(5) { height: 50%; }
.feature:hover .feature__art--bars i { height: 100%; }
.feature:hover .feature__art--bars i:nth-child(odd) { height: 65%; }

.feature__art--check svg { width: 40px; height: 40px; color: var(--accent); }
.check-path {
  stroke-dasharray: 50; stroke-dashoffset: 50;
  transition: stroke-dashoffset .7s var(--ease) .1s;
}
.feature:hover .check-path { stroke-dashoffset: 0; }

/* ============================================================
   COURSES WITH ASCII CARDS
   ============================================================ */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.4rem;
}
.course {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(247, 244, 237, .03);
  transition: transform .5s var(--ease-out), border-color .4s, background-color .4s;
  display: flex; flex-direction: column;
}
.course:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(184, 92, 56, .04);
}
.course::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: center;
  transition: transform .5s var(--ease);
}
.course:hover::before { transform: scaleX(1); }

.course__ascii {
  position: relative;
  height: 140px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .65rem;
  line-height: 1.3;
  color: var(--ink-faint);
  white-space: pre;
  letter-spacing: .08em;
  transition: opacity .4s, transform .4s;
}
.course:hover .course__ascii {
  opacity: .15;
  transform: scale(1.05);
}

.course__content {
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex; flex-direction: column;
  flex: 1;
}

.course__head {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: 1rem;
}
.course__index {
  font-family: var(--font-mono);
  font-size: .78rem; color: var(--ink-soft);
}
.course__lang {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}
.course__badge {
  margin-left: auto;
  font-size: .65rem; text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 100px;
  padding: .25em .7em; color: var(--ink-soft);
}
.course__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.05; margin-bottom: .7rem;
}
.course__desc {
  color: var(--ink-soft); font-size: .92rem;
  margin-bottom: 1.2rem;
}
.course__modules {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-bottom: 1.4rem;
  display: grid; gap: .5rem;
  flex: 1;
}
.course__modules li {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: .5rem;
}
.course__modules li::before {
  content: "▹"; color: var(--accent);
}
.course__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.course__duration {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-soft);
}
.course__cta {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--accent);
  transition: gap .3s var(--ease);
  white-space: nowrap;
}
.course__cta:hover { gap: .7rem; }
.course__cta svg { width: 1em; height: 1em; }

.cta__text {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.courses__note {
  margin-top: 2.5rem;
  font-size: .92rem; color: var(--ink-soft);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}

/* ============================================================
   STUDENT ZONE
   ============================================================ */
.zone {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1.4rem;
}
@media (max-width: 940px) { .zone { grid-template-columns: 1fr; } }

.zone__login {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark);
  color: var(--dark-ink);
  min-height: 400px;
  display: flex;
}
.zone__login-inner {
  position: relative; z-index: 2;
  padding: 2rem;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%;
}
.zone__tag {
  font-family: var(--font-mono);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: .8rem;
}
.zone__login h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.6rem; margin-bottom: 1.4rem;
}
.zone__form { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; }
.field span {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(247,244,237,.55);
  font-family: var(--font-mono);
}
.field input {
  font: inherit; color: var(--dark-ink);
  background: rgba(247, 244, 237, .06);
  border: 1px solid rgba(247, 244, 237, .15);
  border-radius: 8px;
  padding: .7rem .9rem;
  transition: border-color .3s, background-color .3s;
  font-family: var(--font-mono);
  font-size: .85rem;
}
.field input::placeholder { color: rgba(247,244,237,.3); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(247, 244, 237, .1);
}
.zone__hint {
  margin-top: .4rem;
  font-size: .75rem; color: rgba(247,244,237,.5);
}
.zone__hint a { color: var(--accent); }

.zone__login-art {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden;
}
.floating-dots { position: absolute; inset: 0; }
.floating-dots i {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .35;
  animation: floatUp 9s linear infinite;
}
.floating-dots i:nth-child(1) { left: 12%; animation-delay: 0s; }
.floating-dots i:nth-child(2) { left: 32%; animation-delay: 1.4s; background: var(--java); }
.floating-dots i:nth-child(3) { left: 52%; animation-delay: 2.6s; background: var(--cpp); }
.floating-dots i:nth-child(4) { left: 72%; animation-delay: 3.8s; background: var(--python); }
.floating-dots i:nth-child(5) { left: 88%; animation-delay: 5s; }
.floating-dots i:nth-child(6) { left: 24%; animation-delay: 6.4s; background: var(--cpp); }
@keyframes floatUp {
  0%   { bottom: -20px; opacity: 0; transform: translateX(0); }
  10%  { opacity: .4; }
  90%  { opacity: .4; }
  100% { bottom: 110%; opacity: 0; transform: translateX(20px); }
}

.zone__dash {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.8rem;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 1.6rem;
}
.dash__top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.dash__label {
  font-family: var(--font-mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--ink-soft);
}
.dash__status {
  font-size: .7rem; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--good);
  font-family: var(--font-mono);
}
.dash__status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good);
  animation: pulse 1.6s ease-in-out infinite;
}

.dash__progress { display: grid; gap: .9rem; }
.dash__course-head {
  display: flex; justify-content: space-between;
  font-size: .82rem; margin-bottom: .35rem;
}
.dash__course-head strong { font-weight: 500; }
.dash__course-head span {
  font-family: var(--font-mono); color: var(--accent);
  font-size: .8rem;
}
.progress {
  height: 5px; background: var(--paper-2);
  border-radius: 100px; overflow: hidden;
}
.progress span {
  display: block; height: 100%; width: var(--p);
  background: linear-gradient(90deg, var(--accent), var(--java));
  border-radius: 100px;
  animation: progressFill 1.4s var(--ease) both;
}
@keyframes progressFill { from { width: 0; } }

.dash__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .9rem;
}
.dash__stat {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .9rem .4rem;
}
.dash__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 400;
}
.dash__stat small {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft);
}

.dash__next { display: grid; gap: .5rem; }
.dash__next-label, .dash__resources-label {
  font-family: var(--font-mono);
  font-size: .65rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--ink-soft);
}
.dash__next-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: .9rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.dash__next-time {
  font-family: var(--font-mono); font-size: .7rem; color: var(--accent);
  display: block;
}
.dash__next-item strong {
  font-family: var(--font-display); font-weight: 400;
  font-size: .95rem;
}

.dash__resources { display: grid; gap: .6rem; }
.dash__resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .6rem;
}
.resource {
  display: flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .9rem;
  font-size: .8rem;
  transition: border-color .3s, transform .3s var(--ease-out), background-color .3s;
}
.resource span { font-size: 1rem; }
.resource:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--accent-soft);
}

/* ============================================================
   QUIZ (fullscreen overlay)
   ============================================================ */
.quiz {
  position: fixed; inset: 0; z-index: 500;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: 1.5rem var(--pad) 2rem;
  padding-left: calc(var(--nav-edge) + var(--pad));
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.quiz.is-open { opacity: 1; transform: none; }

.quiz__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.quiz__quit {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ink-soft);
  transition: color .3s;
  font-family: var(--font-mono);
}
.quiz__quit:hover { color: var(--bad); }

.quiz__subject {
  font-family: var(--font-mono); font-style: normal;
  font-size: 1rem; color: var(--accent);
}

.quiz__timer { position: relative; width: 48px; height: 48px; }
.quiz__timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.timer-ring {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke .3s;
}
.timer-ring.is-low { stroke: var(--bad); }
.quiz__timer span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.quiz__progress {
  height: 2px; background: var(--line);
  margin: 1rem 0 0; border-radius: 2px; overflow: hidden;
}
.quiz__progress span {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  transition: width .6s var(--ease);
}

.quiz__body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 800px; width: 100%; margin: 0 auto;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.quiz__body.is-switching { opacity: 0; transform: translateY(16px); }

.quiz__count {
  font-family: var(--font-mono);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent); margin-bottom: .8rem;
}
.quiz__question {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 2rem;
}

.quiz__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: .7rem;
}
.option {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  font-size: .92rem;
  font-family: var(--font-mono);
  background: var(--paper);
  transition: border-color .25s, background-color .25s, transform .25s var(--ease-out);
}
.option:hover { border-color: var(--ink); transform: translateX(3px); }
.option kbd { flex-shrink: 0; }

.option.is-correct {
  border-color: var(--good);
  background: rgba(74, 124, 89, .08);
  color: var(--good);
}
.option.is-wrong {
  border-color: var(--bad);
  background: rgba(160, 48, 48, .06);
  color: var(--bad);
  animation: shake .4s var(--ease);
}
.option.is-dim { opacity: .35; pointer-events: none; }
.quiz__options.is-locked .option { pointer-events: none; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.quiz__hint {
  text-align: center; font-size: .75rem;
  color: var(--ink-soft); margin-top: 1.2rem;
  font-family: var(--font-mono);
}
@media (hover: none) { .quiz__hint { visibility: hidden; } }

/* ============================================================
   RESULTS / ANALYSIS
   ============================================================ */
.results__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem;
  background: var(--paper);
}
.card small {
  display: block;
  font-family: var(--font-mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft);
  margin-bottom: .4rem;
}
.card--stat span {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 400;
}

.card--score {
  grid-row: span 2; grid-column: span 2;
  display: grid; place-items: center;
}

.donut { position: relative; width: min(220px, 55vw); }
.donut svg { width: 100%; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: var(--line); stroke-width: 9; }
.donut-ring {
  fill: none; stroke: var(--accent); stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 414.7;
  stroke-dashoffset: 414.7;
  transition: stroke-dashoffset 1.4s var(--ease) .3s;
}
.donut__label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut__label span {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 400;
}
.donut__label small {
  font-size: .72rem; text-transform: uppercase;
  letter-spacing: .15em; color: var(--ink-soft);
}

.card--chart { grid-column: span 2; }
.card--chart em { font-style: italic; text-transform: none; letter-spacing: 0; }
.barchart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 120px; padding-top: .4rem;
}
.barchart .bar {
  flex: 1; position: relative;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transform-origin: bottom;
  animation: bar-grow .8s var(--ease) both;
}
.barchart .bar.is-wrong { background: var(--bad); opacity: .8; }
.barchart .bar span {
  position: absolute; top: -1.2rem; left: 50%;
  transform: translateX(-50%);
  font-size: .65rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
@keyframes bar-grow { from { transform: scaleY(0); } }

@media (max-width: 900px) {
  .results__grid { grid-template-columns: repeat(2, 1fr); }
  .card--score, .card--chart { grid-column: span 2; }
}

.results__review { margin-top: 3.5rem; }
.results__review h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.5rem; margin-bottom: 1.2rem;
}
.review-item {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: .9rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.review-item__mark {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .75rem; color: var(--paper); font-weight: 700;
}
.review-item.is-right .review-item__mark { background: var(--good); }
.review-item.is-wrong .review-item__mark { background: var(--bad); }
.review-item__q { font-weight: 500; margin-bottom: .25rem; font-size: .95rem; }
.review-item__a { font-size: .88rem; color: var(--ink-soft); }
.review-item__a b { color: var(--good); font-weight: 600; }
.review-item__a s { color: var(--bad); }
.review-item__topic {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .65rem; text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 100px;
  padding: .12em .7em; margin-top: .5rem;
  color: var(--ink-soft);
}

.results__actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  min-height: 70svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.5rem;
  text-align: center;
  padding: 4rem var(--pad);
  padding-left: calc(var(--nav-edge) + var(--pad));
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cta__orb {
  position: absolute;
  width: 450px; height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  filter: blur(10px);
  animation: orbDrift 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orbDrift {
  0%, 100% { transform: translate(-30%, -20%); }
  50%      { transform: translate(20%, 15%); }
}
.cta__title {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 1.02; letter-spacing: -.02em;
}
.cta__title em { color: var(--accent); }
.cta .btn { position: relative; z-index: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding: 2.5rem var(--pad);
  padding-left: calc(var(--nav-edge) + var(--pad));
  border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-soft);
}
.footer__logo {
  font-family: var(--font-mono);
  font-size: 1rem; color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   YOUTUBE SECTION
   ============================================================ */
.yt-channel-card {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  margin-bottom: .8rem;
  flex-wrap: wrap;
}
.yt-channel-card__icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.yt-channel-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}
.yt-channel-card__sub {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
}
.yt-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.yt-video-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color .2s;
}
.yt-video-card:hover { border-color: var(--accent); }
.yt-video-card__thumb {
  width: 52px; height: 36px;
  border-radius: 6px;
  background: var(--paper-2);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.yt-video-card__info {
  display: flex; flex-direction: column;
  min-width: 0;
}
.yt-video-card__title {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.yt-video-card__meta {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
}

@media (max-width: 600px) {
  .yt-videos { grid-template-columns: 1fr; }
  .yt-channel-card { padding: .85rem 1rem; }
  .yt-channel-card .btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============================================================
   LOCATION
   ============================================================ */
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  background: var(--paper);
}
.contact-card__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
  margin: 0 auto .8rem;
}
.contact-card__label {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-soft);
  margin-bottom: .5rem;
}
.contact-card__value {
  display: block;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink);
  text-decoration: none;
  padding: .15rem 0;
  transition: color .2s;
}
.contact-card__value:hover { color: var(--accent); }
.contact-card__socials {
  display: flex;
  justify-content: center;
  gap: .8rem;
  margin-top: .3rem;
}
.social-link {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-soft);
  transition: border-color .2s, color .2s, background .2s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; gap: .8rem; }
  .contact-card { padding: 1.3rem 1rem; }
}

/* ---------- Ratings Row ---------- */
.ratings-row {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink);
  background: var(--paper);
}
.ratings-row__stars {
  display: flex; gap: 1px;
}
.ratings-row__score {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}
.ratings-row__sep {
  color: var(--ink-faint);
}
.ratings-row__link {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s;
}
.ratings-row__link:hover { color: var(--accent); }

@media (max-width: 480px) {
  .ratings-row { font-size: .7rem; gap: .35rem; padding: .7rem 1rem; }
}

/* ============================================================
   ASCII MASCOT
   ============================================================ */
.mascot {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  gap: .8rem;
  pointer-events: none;
}
.mascot__body {
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  transition: transform .3s var(--ease-spring);
}
.mascot__body:hover { transform: scale(1.1); }
.mascot__ascii {
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: pre;
  padding: .6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px -12px rgba(28,25,21,.2);
  transition: color .3s, border-color .3s;
}
.mascot__body:hover .mascot__ascii {
  color: var(--accent);
  border-color: var(--accent);
}
.mascot__bubble {
  position: absolute;
  bottom: calc(100% + .6rem);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 8px 24px -12px rgba(28,25,21,.15);
  animation: bubble-in .3s var(--ease-out);
}
.mascot__bubble::after {
  content: "";
  position: absolute;
  bottom: -6px; right: 1.2rem;
  width: 10px; height: 10px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .mascot { bottom: 1rem; right: 1rem; }
  .mascot__ascii { font-size: .65rem; }
}

/* ============================================================
   THINKING OVERLAY
   ============================================================ */
.thinking {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
}
.thinking__backdrop {
  position: absolute; inset: 0;
  background: rgba(247,244,237,.85);
  backdrop-filter: blur(8px);
}
.thinking__content {
  position: relative;
  display: flex; align-items: center; gap: .6rem;
  padding: 2rem 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(28,25,21,.15);
}
.thinking__log {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}
.thinking__cursor {
  width: 2px; height: 1.1em;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
@media (max-width: 900px) {
  .section, .hero, .cta, .footer, .quiz {
    padding-left: var(--pad);
  }
}

/* ============================================================
   TOUCH TARGETS — minimum 44×44px for all interactive elements
   ============================================================ */
@media (pointer: coarse) {
  button, .btn, a.btn, [role="button"],
  .nav__tree-item, .owner-tab, .sz-sidebar__item,
  input[type="submit"], input[type="button"],
  select, .action-btn, .owner-tab {
    min-height: 44px;
    min-width: 44px;
  }
  input, textarea, select {
    font-size: 16px !important; /* prevent iOS zoom on focus */
  }
}

/* Section dividers */
.section { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vh, 5rem); }
.section:first-of-type { border-top: none; }

@media (max-width: 480px) {
  .hero__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.6rem !important; }
}

/* Study Zone update cards (index page) */
.sz-update-card {
  position: relative; overflow: hidden;
  display: block; padding: 1rem 1.2rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.sz-update-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--line); transition: background .25s;
}
.sz-update-card:hover::before { background: var(--accent, var(--sz-career)); }
.sz-update-card:hover { border-color: var(--accent, #d4784a); box-shadow: 0 3px 12px rgba(0,0,0,.05); transform: translateY(-1px); }
.sz-update__body { display: flex; flex-direction: column; gap: .3rem; }
.sz-update__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.sz-update__title { font-family: var(--font-display); font-weight: 400; font-size: 1rem; line-height: 1.25; }
.sz-update__arrow { color: var(--ink-soft); flex-shrink: 0; transition: transform .2s; }
.sz-update-card:hover .sz-update__arrow { transform: translateX(2px); }
.sz-update__desc { font-size: .78rem; color: var(--ink-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sz-update__tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.sz-tag { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .04em; padding: .12em .5em; border-radius: 100px; background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line); }
.sz-tag--a { font-weight: 500; }
.sz-update__date { font-family: var(--font-mono); font-size: .6rem; color: var(--ink-faint); margin-left: auto; }

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 800;
  display: flex; align-items: center;
  gap: .4rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .3s, color .3s;
}
.wa-float:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton--text { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton--text-sm { height: 10px; width: 60%; }
.skeleton--title { height: 18px; width: 70%; margin-bottom: 10px; }
.skeleton--card { height: 100px; width: 100%; }

/* ============================================================
   FOOTER CREDITS
   ============================================================ */
.footer-credits {
  display: flex;
  justify-content: center;
  gap: .4rem .8rem;
  padding: .65rem var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-soft);
  letter-spacing: .03em;
  flex-wrap: wrap;
}
.footer-credits span { white-space: nowrap; }
.footer-credits a { color: inherit; text-decoration: none; opacity: 1; }

@media (max-width: 900px) {
  .footer-credits {
    flex-direction: column; align-items: center; text-align: center;
    gap: .2rem; padding: .5rem 1rem; font-size: .62rem;
  }
  .footer-credits a { font-size: .55rem; order: -1; padding-bottom: .15rem; }
}
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: .4rem 1rem .5rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  padding: .35rem .6rem; border-radius: 10px;
  color: var(--ink-faint); text-decoration: none;
  font-family: var(--font-mono); font-size: .58rem;
  transition: color .3s; position: relative; z-index: 1;
}
.bottom-nav__item.is-active { color: var(--accent); }
.bottom-nav__item.is-active span { font-weight: 600; }
.bottom-nav__liquid {
  position: absolute; top: .25rem; height: calc(100% - .5rem);
  background: var(--accent-soft); border-radius: 10px;
  transition: left .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1);
  z-index: 0; pointer-events: none;
}

@media (min-width: 901px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

@media (max-width: 900px) {
  body { padding-bottom: 68px; }
}

/* Owner — hidden discreet link */
.footer-credits a { color: inherit; text-decoration: none; opacity: 1; }

/* ============================================================
   WALKTHROUGH TOUR
   ============================================================ */
.tour-overlay {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem; padding-bottom: 2rem;
}
.tour-overlay[hidden] { display: none; }
.tour-backdrop {
  position: absolute; inset: 0;
  background: rgba(28,25,21,.6);
  backdrop-filter: blur(6px);
}
.tour-card {
  position: relative; z-index: 1;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.5rem 1.5rem 1.2rem;
  max-width: 340px; width: 100%;
  text-align: center;
  animation: tourIn .4s var(--ease-out);
}
@keyframes tourIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: none; }
}
.tour-step {
  font-family: var(--font-mono); font-size: .62rem;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: .6rem;
}
.tour-card h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 400; margin-bottom: .5rem; color: var(--ink);
}
.tour-card p {
  font-size: .82rem; color: var(--ink-soft); line-height: 1.5;
  margin-bottom: 1rem;
}
.tour-actions {
  display: flex; gap: .6rem; justify-content: center;
}
.tour-actions .btn { font-size: .72rem; padding: .5rem 1.2rem; }

