:root {
    --primary: #FD5622;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #e5e7eb;
  }
  
  /* RESET */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: Inter, system-ui, sans-serif;
    background: var(--light);
    color: var(--dark);
    scroll-behavior: smooth;
  }
  
  img, iframe, table, pre {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* HEADER */
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #FD5622);
    color: white;
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .header-large {
    padding: 48px 24px;
  }
  
  .header-compact {
    padding: 12px 24px;
    display: none;
  }
  
  header.compact .header-large {
    display: none;
  }
  
  header.compact .header-compact {
    display: block;
  }
  
  header h1 {
    margin: 0;
    font-size: 36px;
  }
  
  header p {
    max-width: 800px;
    opacity: 0.95;
  }
  
  /* CONTAINER */
  .container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 200px 24px 32px 324px; /* top = header+spacing, left = sidebar width + margin */
    gap: 32px;
    width: 100%;
    transition: padding 0.3s ease;
  }
  
  /* SIDEBAR */
  aside {
    position: fixed;
    top: 200px; /* header-large height */
    left: 24px;
    width: 280px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    transition: top 0.3s ease, max-height 0.3s ease;
  }
  
  header.compact ~ .container aside {
    top: 100px; /* compact header height */
    max-height: calc(100vh - 140px);
  }
  
  aside h3 {
    margin-top: 0;
  }
  
  aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  aside li {
    margin: 10px 0;
  }
  
  aside a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    display: block;
  }
  
  aside a:hover {
    color: var(--primary);
  }
  
  /* MAIN CONTENT */
  main {
    flex: 1;
    min-width: 0;
  }
  
  main section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 32px;
    overflow-wrap: break-word;
  }
  
  /* TYPOGRAPHY */
  h2 {
    border-left: 4px solid var(--primary);
    padding-left: 12px;
  }
  
  code {
    background: #f1f5f9;
    padding: 4px 6px;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-word;
  }
  
  /* CODE BLOCK */
  pre {
    background: #020617;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }
  
  /* FOOTER */
  footer {
    text-align: center;
    padding: 32px;
    font-size: 14px;
    color: #475569;
  }
  
  /* SCROLL BUTTON */
  #scrollTopBtn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 65px;
    height: 65px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 999;
  }
  
  #scrollTopBtn svg {
    position: absolute;
    width: 65px;
    height: 65px;
    transform: rotate(-90deg);
  }
  
  #progressText {
    position: relative;
    font-size: 14px;
  }
  
  /* RESPONSIVE IMAGES / IFRAME */
  main img,
  main .gap img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    margin: 16px 0;
    object-fit: contain;
  }
  
  main iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 16px 0;
  }
  
  /* MOBILE RESPONSIVE */
  @media (max-width: 900px) {
    .container {
      flex-direction: column;
      padding: 180px 12px 32px 12px;
    }
  
    aside {
      position: relative;
      width: 100%;
      top: 0;
      max-height: unset;
      margin-bottom: 24px;
    }
  
    .header-large {
      padding: 32px 16px;
    }
  
    header h1 {
      font-size: 28px;
    }
  
    main section {
      padding: 20px;
    }
  }
  