:root {
  --tt-orange: #ff6f1f;
  --tt-orange-soft: #ffe6d6;
  --tt-ink: #0f172a;
  --tt-slate: #334155;
  --tt-mist: #f8fafc;
  --tt-wave: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--tt-ink);
  background:
    radial-gradient(circle at 5% 5%, #fff4ec 0%, transparent 28%),
    radial-gradient(circle at 95% 30%, #fff1e8 0%, transparent 30%),
    linear-gradient(180deg, #fff 0%, #fff 28%, #fffaf5 100%);
}

.tt-navbar {
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--tt-orange);
  box-shadow: 0 0 0 6px rgba(255, 111, 31, 0.2);
}

.btn-tt-primary {
  background: var(--tt-orange);
  border: 1px solid var(--tt-orange);
  color: #fff;
}

.btn-tt-primary:hover,
.btn-tt-primary:focus {
  background: #ea5d10;
  border-color: #ea5d10;
  color: #fff;
}

.hero-section {
  padding: 9rem 0 5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--tt-orange);
}

.hero-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 16px 32px -22px rgba(15, 23, 42, 0.55);
  padding: 1.5rem;
}

.section-block {
  padding: 5rem 0;
}

.section-light {
  background: transparent;
}

.section-pattern {
  background:
    linear-gradient(180deg, rgba(255, 111, 31, 0.08), rgba(255, 111, 31, 0.02)),
    repeating-linear-gradient(
      -45deg,
      rgba(15, 23, 42, 0.03) 0,
      rgba(15, 23, 42, 0.03) 8px,
      rgba(15, 23, 42, 0.01) 8px,
      rgba(15, 23, 42, 0.01) 16px
    );
}

.section-dark {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 111, 31, 0.35) 0%, transparent 35%),
    #0b1220;
}

.section-title {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-weight: 700;
}

.simple-steps {
  padding-left: 1.2rem;
}

.simple-steps li {
  margin-bottom: 0.5rem;
}

.code-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #111827;
}

.code-title {
  margin: 0;
  padding: 0.9rem 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: #f8fafc;
  border-bottom: 1px solid rgba(248, 250, 252, 0.15);
}

.code-card pre {
  margin: 0;
  padding: 1rem;
}

.code-card code {
  color: #c6e7ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.guide-index {
  background: #fff;
  border-radius: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.accordion-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.project-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 28px -20px rgba(15, 23, 42, 0.65);
}

.collab-list {
  padding-left: 1.2rem;
}

.collab-list li {
  margin-bottom: 0.55rem;
}

.toolbox-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.3rem;
}

.roadmap-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1.2rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.roadmap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -18px rgba(255, 111, 31, 0.35);
}

.roadmap-badge {
  position: absolute;
  top: -12px;
  left: 1rem;
  background: var(--tt-orange);
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.site-footer a {
  color: var(--tt-orange);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

.text-sm {
  font-size: 0.9rem;
}

.docs-page {
  padding-top: 5.5rem;
}

.docs-hero {
  padding: 2.5rem 0 1.25rem;
}

.docs-layout {
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 6.25rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 0.9rem;
  padding: 1rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
}

.docs-sidebar a {
  display: block;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.25rem;
  border-radius: 0.45rem;
  color: var(--tt-slate);
  text-decoration: none;
  font-size: 0.94rem;
}

.docs-sidebar a:hover {
  background: var(--tt-orange-soft);
  color: #9a3412;
}

.docs-term-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.docs-term-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.docs-meta {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 0.9rem;
}

.docs-term-card .docs-meta strong {
  color: #1e293b;
}

.docs-term-card pre {
  margin: 0;
  background: #111827;
  border-radius: 0.8rem;
  padding: 0.9rem;
}

.docs-term-card code {
  color: #c6e7ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.level-page {
  padding-top: 7rem;
}

.level-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fff1e5 70%, #ffe4d2 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 18px 30px -24px rgba(15, 23, 42, 0.55);
}

.level-title {
  font-size: clamp(1.7rem, 2.3vw + 1rem, 3rem);
  line-height: 1.1;
  margin-bottom: 0.85rem;
}

.level-subtitle {
  max-width: 780px;
  font-size: 1.05rem;
  color: var(--tt-slate);
  margin-bottom: 0;
}

.level-warning {
  border: 1px solid rgba(255, 111, 31, 0.35);
  background: #fff8ec;
}

.notebook-card {
  display: flex;
  flex-direction: column;
}

.notebook-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: #fff;
}

.modal-note {
  font-size: 0.9rem;
  color: #475569;
}

.reader-page {
  padding-top: 2.5rem;
}

.reader-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fff4ea 78%, #ffe2cf 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1.6rem;
}

.reader-title {
  font-size: clamp(1.35rem, 1.8vw + 1rem, 2.4rem);
  margin: 0;
}

.reader-subtitle {
  color: #475569;
  margin: 0.5rem 0 0;
}

.notebook-cell {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.9rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.notebook-body {
  padding: 1rem 1.1rem;
}

.notebook-body :last-child {
  margin-bottom: 0;
}

.notebook-code-head {
  background: #111827;
  color: #cbd5e1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
}

.notebook-code pre {
  margin: 0;
  background: #0b1220;
  color: #dbeafe;
  padding: 1rem;
  overflow-x: auto;
}

.notebook-code code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  white-space: pre;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 7.5rem;
  }

  .level-page {
    padding-top: 6.5rem;
  }

  .tt-navbar .btn {
    margin-top: 0.5rem;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 575.98px) {
  .section-block {
    padding: 4rem 0;
  }

  .level-hero {
    padding: 1.35rem;
  }

  .reader-hero {
    padding: 1.25rem;
  }

  .hero-card,
  .guide-index,
  .project-card,
  .toolbox-card {
    border-radius: 0.85rem;
  }
}
