/* Terminal-inspired theme */
:root {
  /* Terminal Color Palette */
  --bg-primary: #0d1117;      /* GitHub dark background */
  --bg-secondary: #161b22;    /* Slightly lighter */
  --bg-accent: #21262d;       /* Cards/boxes */
  --text-primary: #f0f6fc;    /* Light text */
  --text-secondary: #7d8590;  /* Muted text */
  --text-accent: #58a6ff;     /* Links/accents */
  --border: #30363d;          /* Borders */
  --green: #3fb950;           /* Terminal green */
  --yellow: #d29922;          /* Warnings */
  --red: #f85149;             /* Errors */
  --shadow: rgba(0, 0, 0, 0.3);
  
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* Light mode - minimal changes */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-accent: #f6f8fa;
    --text-primary: #24292f;
    --text-secondary: #656d76;
    --text-accent: #0969da;
    --border: #d0d7de;
    --green: #1a7f37;
    --yellow: #9a6700;
    --red: #cf222e;
    --shadow: rgba(0, 0, 0, 0.1);
  }
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* Terminal-style header */
.terminal-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.terminal-window {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-accent);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow);
}

.terminal-bar {
  background: var(--bg-secondary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.terminal-content {
  padding: 2rem;
  font-family: var(--font-mono);
}

.prompt {
  color: var(--green);
  font-weight: 600;
}

.command {
  color: var(--text-accent);
}

/* Main content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Directory listing style for navigation */
.directory-listing {
  background: var(--bg-accent);
  border-radius: 6px;
  margin: 2rem 0;
  overflow: hidden;
}

.dir-header {
  background: var(--bg-secondary);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.dir-content {
  padding: 1rem;
}

.dir-item {
  display: block;
  padding: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.dir-item:hover {
  background: var(--bg-secondary);
  color: var(--text-accent);
}

.dir-item::before {
  content: "📁 ";
  margin-right: 8px;
}

.dir-item.file::before {
  content: "📄 ";
}

/* Search terminal style */
.search-terminal {
  background: var(--bg-accent);
  border-radius: 6px;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.search-prompt {
  padding: 1rem;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
}

.search-prompt::before {
  content: "$ ";
  color: var(--green);
  margin-right: 8px;
}

#search {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  flex: 1;
  outline: none;
}

#search::placeholder {
  color: var(--text-secondary);
}

.search-results {
  display: none;
  border-top: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
}

.search-result {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
}

.search-result:hover {
  background: var(--bg-secondary);
  color: var(--text-accent);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result .category {
  display: inline-block;
  background: var(--green);
  color: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  margin-left: 8px;
}

/* Content styles */
h1 {
  font-family: var(--font-mono);
  color: var(--green);
  margin-bottom: 1rem;
  font-size: 2rem;
}

h2 {
  color: var(--text-accent);
  margin: 2rem 0 1rem 0;
  font-size: 1.5rem;
}

h3 {
  color: var(--yellow);
  margin: 1.5rem 0 0.75rem 0;
}

/* Code blocks */
pre {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
}

/* Links */
a {
  color: var(--text-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navigation */
.nav-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 6px 6px 0 0;
  margin: 2rem 0 0 0;
}

.nav-tab {
  padding: 1rem 1.5rem;
  background: var(--bg-accent);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  border-right: 1px solid var(--border);
  transition: all 0.2s;
}

.nav-tab:hover,
.nav-tab.active {
  background: var(--bg-secondary);
  color: var(--text-accent);
}

.nav-tab:first-child {
  border-radius: 6px 0 0 0;
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .terminal-content {
    padding: 1rem;
  }
  
  .nav-tabs {
    flex-direction: column;
  }
  
  .nav-tab {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}