/* Copilot CLI Learning Journal — Terminal Theme */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-card: #1a1f26;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-dim: #484f58;
  --green: #3fb950;
  --green-dim: #238636;
  --blue: #58a6ff;
  --purple: #bc8cff;
  --orange: #d29922;
  --red: #f85149;
  --cyan: #39c5cf;
  --border: #30363d;
  --prompt-color: #3fb950;
  --command-color: #c9d1d9;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Terminal window chrome */
.terminal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-close { background: #ff5f57; }
.dot-minimize { background: #febc2e; }
.dot-maximize { background: #28c840; }

.window-title {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.window-meta {
  color: var(--text-dim);
  font-size: 12px;
}

/* Page navigation */
.page-nav {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-link.active {
  color: var(--green);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

/* ASCII banner */
.banner {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.ascii-art {
  color: var(--green);
  font-size: 10px;
  line-height: 1.2;
  margin-bottom: 16px;
  overflow-x: auto;
}

.ascii-art .accent {
  color: var(--cyan);
  font-weight: 700;
  font-size: 14px;
}

/* Terminal body */
.terminal-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Terminal line styling */
.terminal-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-family: var(--font-mono);
}

.prompt {
  color: var(--prompt-color);
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

.command {
  color: var(--command-color);
  font-weight: 500;
}

.output {
  color: var(--text-primary);
}

.output.dim {
  color: var(--text-dim);
}

.error .prompt { color: var(--red); }
.error .output { color: var(--red); }

/* Table of Contents */
.toc {
  margin: 24px 0;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.toc-item:hover {
  border-color: var(--green-dim);
  background: var(--bg-card);
}

.toc-icon {
  color: var(--green);
  font-weight: 700;
  width: 16px;
  text-align: center;
}

.toc-label {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

.toc-count {
  color: var(--text-dim);
  font-size: 11px;
}

/* Category sections */
.category {
  margin: 32px 0;
}

.category-header {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.section-title {
  color: var(--cyan);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Journal entries */
.entry {
  margin: 8px 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.entry:hover {
  border-color: var(--text-dim);
}

.entry-header {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
}

.entry-header:hover {
  background: var(--bg-tertiary);
}

.chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.entry.expanded .chevron {
  transform: rotate(90deg);
  color: var(--green);
}

.inline-cmd {
  background: var(--bg-primary);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid var(--border);
  margin-left: 8px;
}

/* Difficulty badges */
.badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.badge-beginner {
  color: var(--green);
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.badge-intermediate {
  color: var(--orange);
  background: rgba(210, 153, 34, 0.15);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge-advanced {
  color: var(--purple);
  background: rgba(188, 140, 255, 0.15);
  border: 1px solid rgba(188, 140, 255, 0.3);
}

/* Entry content (collapsed by default) */
.entry-content {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.entry.expanded .entry-content {
  display: block;
}

.terminal-output {
  padding: 12px 0;
}

.output-line {
  color: var(--text-primary);
  padding: 2px 0;
  font-size: 13px;
  line-height: 1.7;
}

.output-line.bullet {
  color: var(--text-primary);
  padding-left: 4px;
}

.output-line.numbered {
  color: var(--text-primary);
  padding-left: 4px;
}

.output-line:empty {
  height: 12px;
}

/* Tip box */
.tip-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: 6px;
  font-size: 12px;
}

.tip-icon {
  flex-shrink: 0;
}

.tip-text {
  color: var(--green);
  line-height: 1.5;
}

/* Footer */
.terminal-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cursor-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.cursor {
  color: var(--green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .ascii-art {
    font-size: 7px;
  }

  .terminal-body {
    padding: 16px 8px;
  }

  .toc-grid {
    grid-template-columns: 1fr;
  }

  .entry-header {
    flex-wrap: wrap;
    gap: 4px;
  }

  .inline-cmd {
    margin-left: 24px;
    margin-top: 4px;
  }

  .badge {
    margin-left: 24px;
    margin-top: 4px;
  }
}

/* Welcome line animation */
.welcome .output {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 2s steps(60) forwards;
  width: 0;
}

@keyframes typing {
  to { width: 100%; }
}

/* ═══════════════════════════════════════ */
/* Ideas Grid & Cards                     */
/* ═══════════════════════════════════════ */

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  padding: 0 8px 24px;
}

.idea-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  cursor: pointer;
}

.idea-card:hover {
  border-color: var(--green-dim);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.idea-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.idea-card-header .command {
  font-weight: 600;
  font-size: 14px;
}

.idea-card-tagline {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
}

.idea-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.idea-time {
  color: var(--text-dim);
}

.idea-read-more {
  color: var(--blue);
  font-size: 12px;
}

.idea-card:hover .idea-read-more {
  color: var(--cyan);
}

/* ═══════════════════════════════════════ */
/* Idea Detail Page                       */
/* ═══════════════════════════════════════ */

.idea-detail {
  max-width: 800px;
}

.idea-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0 8px;
  margin-left: 24px;
}

.idea-category {
  color: var(--text-dim);
  font-size: 12px;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

.idea-tagline {
  padding: 8px 0 24px;
  font-size: 14px;
  color: var(--cyan);
  display: flex;
  gap: 8px;
}

.idea-tagline .prompt {
  color: var(--cyan);
}

.idea-body {
  padding: 0 0 24px;
}

.idea-h2 {
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.idea-h3 {
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  margin: 20px 0 8px;
}

.idea-prompt-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0;
  display: flex;
  gap: 8px;
}

.idea-prompt-block .prompt {
  color: var(--green);
  flex-shrink: 0;
}

.idea-prompt-block .command {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.idea-spacer {
  height: 8px;
}

.idea-body .output-line {
  padding-left: 8px;
}

@media (max-width: 768px) {
  .ideas-grid {
    grid-template-columns: 1fr;
  }

  .idea-detail {
    padding: 0 8px;
  }
}

/* ═══════════════════════════════════════ */
/* Blog                                   */
/* ═══════════════════════════════════════ */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0 8px 24px;
  max-width: 800px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-dim);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.blog-card:hover {
  border-left-color: var(--green);
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.blog-card-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.blog-card-date .prompt {
  color: var(--text-dim);
  font-size: 10px;
}

.blog-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card:hover .blog-card-title {
  color: var(--green);
}

.blog-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.blog-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-tag {
  font-size: 10px;
  color: var(--purple);
  background: rgba(188, 140, 255, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(188, 140, 255, 0.2);
}

/* Blog Detail */

.blog-detail {
  max-width: 800px;
}

.blog-post-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  margin: 16px 0 12px;
  line-height: 1.3;
}

.blog-post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.blog-post-author {
  color: var(--cyan);
}

.blog-post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.blog-code-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.blog-code-block .code-line {
  white-space: pre;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cyan);
}

/* ═══════════════════════════════════════ */
/* Agents & Skills                        */
/* ═══════════════════════════════════════ */

/* Framework Overview */
.agent-framework-section {
  margin-bottom: 8px;
}

.framework-overview {
  padding: 16px 8px;
}

.section-heading {
  color: var(--green);
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 16px;
}

.section-count {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
}

.framework-diagram {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow-x: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.framework-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 120px;
}

.fw-icon {
  font-size: 20px;
}

.fw-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}

.fw-desc {
  font-size: 10px;
  color: var(--text-dim);
}

.fw-arrow {
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
}

.framework-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.framework-summary code {
  color: var(--cyan);
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* Agent Cards */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  padding: 8px 0 24px;
}

.agent-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  border-top: 3px solid transparent;
}

.agent-card:hover {
  border-top-color: var(--purple);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.agent-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.agent-icon {
  font-size: 28px;
  line-height: 1;
}

.agent-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.agent-card:hover .agent-card-title {
  color: var(--purple);
}

.agent-category {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-ai-project {
  color: var(--cyan);
  background: rgba(86, 219, 255, 0.1);
  border: 1px solid rgba(86, 219, 255, 0.2);
}

.badge-conductor {
  color: var(--purple);
  background: rgba(188, 140, 255, 0.1);
  border: 1px solid rgba(188, 140, 255, 0.2);
}

.badge-review {
  color: var(--yellow);
  background: rgba(229, 192, 123, 0.1);
  border: 1px solid rgba(229, 192, 123, 0.2);
}

.agent-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
}

.agent-card-footer {
  display: flex;
  justify-content: flex-end;
}

/* Skills Section */
.skill-category-group {
  margin-bottom: 20px;
}

.skill-category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-dim);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.skill-card:hover {
  border-left-color: var(--green);
  background: var(--bg-tertiary);
  transform: translateX(3px);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.skill-icon {
  font-size: 18px;
}

.skill-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-card:hover .skill-card-title {
  color: var(--green);
}

.skill-card-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Agent/Skill Detail Page */
.agent-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.agent-detail-icon {
  font-size: 40px;
}

.agent-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

.agent-workflow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 8px 0 16px;
}

.workflow-step {
  font-size: 11px;
  color: var(--cyan);
  background: rgba(86, 219, 255, 0.1);
  border: 1px solid rgba(86, 219, 255, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.workflow-arrow {
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}

.trigger-tags, .tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 16px;
}

.trigger-tag {
  font-size: 11px;
  color: var(--yellow);
  background: rgba(229, 192, 123, 0.1);
  border: 1px solid rgba(229, 192, 123, 0.2);
  padding: 3px 10px;
  border-radius: 3px;
}

.tool-tag {
  font-size: 11px;
  color: var(--purple);
  background: rgba(188, 140, 255, 0.1);
  border: 1px solid rgba(188, 140, 255, 0.2);
  padding: 3px 10px;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .framework-diagram {
    flex-direction: column;
  }
  .fw-arrow {
    transform: rotate(90deg);
  }
}

/* Blog diagrams */
.blog-diagram {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1117;
}

.blog-diagram img {
  width: 100%;
  height: auto;
  display: block;
}
