/* Telos Dark Theme — for Thierry's personal knowledge site */

:root {
  --bg-primary: #1a1b1e;
  --bg-secondary: #25262b;
  --bg-tertiary: #2c2e33;
  --text-primary: #c1c2c5;
  --text-secondary: #909296;
  --text-muted: #5c5f66;
  --accent: #7c3aed;
  --accent-hover: #8b5cf6;
  --border: #373a40;
  --link: #60a5fa;
  --link-visited: #a78bfa;
  --todo: #ef4444;
  --done: #22c55e;
  --wait: #f59e0b;
  --strt: #3b82f6;
  --cncl: #9ca3af;
  --proj: #a855f7;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
  --content-width: 800px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
}

/* Navigation */
.site-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.site-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* Main content */
main#content {
  max-width: var(--content-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.8rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.3rem; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; color: var(--text-secondary); }

.title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: 2rem;
}

/* Paragraphs */
p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-visited);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

li::marker {
  color: var(--accent);
}

/* Checkboxes */
input[type="checkbox"] {
  accent-color: var(--accent);
  margin-right: 0.4rem;
  transform: scale(1.1);
}

/* TODO keywords */
.todo {
  color: var(--todo);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.done {
  color: var(--done);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.wait {
  color: var(--wait);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.strt {
  color: var(--strt);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.proj {
  color: var(--proj);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(168, 85, 247, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

/* Tags */
.tag {
  color: var(--text-muted);
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin-left: 0.2rem;
}

/* Code blocks */
pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-tertiary);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

th, td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

tr:nth-child(even) {
  background: var(--bg-secondary);
}

tr:hover {
  background: var(--bg-tertiary);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Footer */
footer#postamble {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Priority cookies */
.priority {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.2rem;
}

/* Properties drawer — hide in HTML */
.org-src-container {
  margin: 1rem 0;
}

/* Responsive */
@media (max-width: 600px) {
  .site-nav {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }
  
  .site-nav a {
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
  }
  
  main#content {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
}
