/* ============================================
   CodeShelf — Notes & Cheat Sheet Pages
   ============================================ */

.page-hero {
  position: relative; z-index: 1;
  padding: 7rem 3rem 3rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
}
.page-hero-icon { font-size: 4rem; flex-shrink: 0; }
.page-hero-text {}
.page-lang-label {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.page-title {
  font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 0.8rem;
}
.page-subtitle { color: var(--text-secondary); font-size: 1rem; max-width: 500px; }

/* Tab Navigation */
.tab-nav {
  position: sticky; top: 64px; z-index: 50;
  background: rgba(14,10,13,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 3rem;
}
.tab-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 0;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); padding: 1rem 1.5rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s; letter-spacing: 0.03em;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

/* Content Area */
.content-area {
  max-width: 1200px; margin: 0 auto;
  padding: 3rem; position: relative; z-index: 1;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Notes Grid */
.notes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}
.note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem; overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.note-card:hover { border-color: var(--border-hover); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.note-card-header {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem;
}
.note-num {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  padding: 0.2rem 0.5rem; border-radius: 4px;
}
.note-title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  color: var(--text-primary);
}
.note-body { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.75; margin-bottom: 1rem; }
.note-body strong { color: var(--text-primary); }

/* Code blocks */
pre {
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto;
  margin: 0.8rem 0; position: relative;
}
code {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7;
  color: #e2c99a;
}
.inline-code {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: rgba(201,168,124,0.1); color: var(--accent-gold);
  padding: 0.1rem 0.4rem; border-radius: 4px;
  border: 1px solid rgba(201,168,124,0.2);
}

/* Cheat Sheet */
.cheatsheet-container { display: flex; flex-direction: column; gap: 2rem; }
.cs-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.cs-section-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.8rem;
}
.cs-section-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--text-primary);
}
.cs-table { width: 100%; border-collapse: collapse; }
.cs-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.cs-table tr:last-child { border-bottom: none; }
.cs-table tr:hover { background: rgba(255,255,255,0.02); }
.cs-table td {
  padding: 0.7rem 1.5rem; font-size: 0.85rem; vertical-align: top;
}
.cs-table td:first-child {
  font-family: var(--font-mono); color: var(--accent-gold);
  width: 40%; border-right: 1px solid rgba(255,255,255,0.05);
}
.cs-table td:last-child { color: var(--text-secondary); }

/* Tip boxes */
.tip-box {
  background: rgba(201,168,124,0.07); border: 1px solid rgba(201,168,124,0.2);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 8px 8px 0; padding: 1rem 1.2rem;
  margin: 1rem 0; font-size: 0.88rem; color: var(--text-secondary);
}
.tip-box strong { color: var(--accent-gold); }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  font-family: var(--font-mono); letter-spacing: 0.05em;
  transition: color 0.2s; margin-bottom: 1rem;
}
.back-link:hover { color: var(--accent-gold); }

@media (max-width: 768px) {
  .page-hero { padding: 6rem 1.5rem 2rem; flex-direction: column; text-align: center; }
  .content-area { padding: 2rem 1.5rem; }
  .tab-nav { padding: 0 1rem; }
  .notes-grid { grid-template-columns: 1fr; }
  .cs-table td { padding: 0.6rem 1rem; }
}
