/* ============================================================
   Terminal Theme — CLI-inspired dark theme
   Color palette: dark background + coral/salmon accent
   ============================================================ */

:root {
  --bg-primary:     #1c1c1e;
  --bg-secondary:   #252528;
  --bg-panel:       #2a2a2d;
  --bg-chrome:      #323235;
  --text-primary:   #d4d4d4;
  --text-muted:     #888888;
  --text-dim:       #555555;
  --accent:         #d97757;
  --accent-bright:  #e8956d;
  --accent-dim:     rgba(217, 119, 87, 0.4);
  --border-subtle:  #3a3a3d;
  --border-accent:  rgba(217, 119, 87, 0.5);
  --green:          #6ca35d;
  --yellow:         #d4a017;
  --font-mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Window chrome ── */
.term-outer {
  padding: 24px 16px;
  min-height: 100vh;
}

.term-window {
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.term-chrome {
  background: var(--bg-chrome);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.term-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.term-dot.red    { background: #ff5f57; }
.term-dot.yellow { background: #febc2e; }
.term-dot.green  { background: #28c840; }

.term-chrome-title {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
  flex: 1;
  text-align: center;
}

/* ── Body ── */
.term-body {
  background: var(--bg-primary);
  padding: 28px 32px;
}

/* ── ASCII art header ── */
.term-ascii {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(6px, 1.05vw, 13px);
  line-height: 1.15;
  margin: 0 0 20px 0;
  white-space: pre;
  overflow-x: auto;
  letter-spacing: 0;
}

.term-subtitle {
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 13px;
}

.term-subtitle .accent { color: var(--accent-bright); }

/* ── Info box (dashed border panel) ── */
.term-infobox {
  border: 1px dashed var(--border-accent);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: inline-block;
}

.term-infobox .term-label {
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 4px;
}

.term-infobox .term-value {
  color: var(--text-primary);
  font-size: 13px;
}

/* ── Navigation ── */
.term-nav {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.term-nav .prompt {
  color: var(--accent);
  margin-right: 6px;
  font-weight: bold;
}

.term-nav a {
  color: var(--accent-bright);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: border-color 0.15s, color 0.15s;
  font-size: 13px;
}

.term-nav a:hover {
  border-color: var(--accent-dim);
  color: #fff;
}


/* ── Cards grid ── */
.term-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* ── Individual card ── */
.term-card {
  border: 1px dashed var(--border-accent);
  border-radius: 4px;
  padding: 16px 18px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
}

.term-card-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  margin-bottom: 12px;
  border-radius: 2px;
  opacity: 0.85;
}

.term-card-title {
  color: var(--accent-bright);
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 4px 0;
}

.term-card-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0 0 8px 0;
}

.term-card-text {
  color: var(--text-primary);
  font-size: 13px;
  flex: 1;
  margin: 0 0 12px 0;
}

.term-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.term-card-links a {
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 2px 10px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}

.term-card-links a:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ── Footer / prompt line ── */
.term-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.term-tagline {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.term-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.term-social a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.15s;
}

.term-social a:hover {
  color: var(--accent-bright);
}

.term-prompt-line {
  color: var(--text-muted);
  margin-top: 20px;
  font-size: 13px;
}

.term-prompt-line .prompt { color: var(--accent); font-weight: bold; }
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Inner page layout (publications, projects, pages, page) ── */
.term-page-header {
  margin-bottom: 24px;
}

.term-breadcrumb {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.term-breadcrumb a {
  color: var(--accent-bright);
  text-decoration: none;
}

.term-breadcrumb a:hover {
  text-decoration: underline;
}

.term-breadcrumb .sep { margin: 0 6px; color: var(--text-dim); }

.term-section-title {
  color: var(--accent);
  font-size: 13px;
  font-weight: bold;
  border-bottom: 1px dashed var(--border-accent);
  padding-bottom: 6px;
  margin: 24px 0 16px 0;
}

.term-pub-item, .term-proj-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.term-pub-item img, .term-proj-item img {
  width: 70px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
}

.term-item-body { flex: 1; }

.term-item-title {
  color: var(--accent-bright);
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 2px 0;
}

.term-item-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0 0 6px 0;
}

.term-item-text {
  color: var(--text-primary);
  font-size: 13px;
  margin: 0 0 8px 0;
}

.term-item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.term-item-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
}

.term-item-links a:hover { text-decoration: underline; }

/* ── Page content (markdown pages) ── */
.term-content h1, .term-content h2, .term-content h3 {
  color: var(--accent-bright);
  border-bottom: 1px dashed var(--border-accent);
  padding-bottom: 4px;
}

.term-content a {
  color: var(--accent-bright);
}

.term-content a:hover {
  color: #fff;
}

.term-content code {
  background: var(--bg-panel);
  color: var(--accent-bright);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.term-content pre {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
}

.term-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.term-content blockquote {
  border-left: 3px solid var(--accent);
  margin-left: 0;
  padding-left: 16px;
  color: var(--text-muted);
}

/* ── Pages list ── */
.term-pages-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.term-pages-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.term-pages-list li::before {
  content: "> ";
  color: var(--accent);
}

.term-pages-list a {
  color: var(--accent-bright);
  text-decoration: none;
}

.term-pages-list a:hover {
  text-decoration: underline;
  color: #fff;
}

/* ── Translations / lang switcher ── */
.term-translations {
  color: var(--text-muted);
  font-size: 12px;
  margin: 16px 0;
}

.term-translations a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 4px;
}

.term-translations a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .term-body { padding: 16px; }
  .term-ascii { font-size: 5px; }
  .term-cards { grid-template-columns: 1fr; }
}
