/* ── akshay.sh ── warm terminal ─────────────────────────────────
   Drop-in stylesheet. Link it and forget it.
   ─────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg:       #111113;
  --fg:       #c8c5be;
  --fg-dim:   #706d64;
  --fg-head:  #e0ddd5;
  --accent:   #d4a64a;
  --accent2:  #8a7340;
  --link:     #c9953a;
  --link-h:   #e8bf6a;
  --border:   #2a2a2f;
  --code-bg:  #1e1e23;
  --code-fg:  #d4c9a8;
  --mono:     'IBM Plex Mono', monospace;
  --sans:     'IBM Plex Sans', sans-serif;
}

/* ── Reset & base ── */

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  max-width: 80ch;
  overflow-x: hidden;
}

/* ── Site header ── */

.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-header a {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: none;
}

.site-header a:hover { color: var(--link-h); }

.site-header .prompt {
  color: var(--fg-dim);
  user-select: none;
}

/* ── Typography ── */

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--fg-head);
  line-height: 1.3;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 2rem;
}

h2 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

p  { margin: 0 0 1rem; }

/* ── Links ── */

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--accent2);
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: var(--link-h);
  border-bottom-color: var(--link-h);
}

/* ── Code ── */

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  border-radius: 2px;
}

pre code {
  background: none;
  color: var(--fg);
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ── Syntax highlighting (pandoc) ── */

code span.kw { color: #d4a64a; font-weight: 500; }  /* Keyword */
code span.cf { color: #d4a64a; font-weight: 500; }  /* ControlFlow */
code span.op { color: #c8c5be; }                     /* Operator */
code span.dt { color: #e8bf6a; }                     /* DataType */
code span.dv { color: #c9a3e8; }                     /* DecVal (numbers) */
code span.bn { color: #c9a3e8; }                     /* BaseN */
code span.fl { color: #c9a3e8; }                     /* Float */
code span.st { color: #a8c77a; }                     /* String */
code span.ch { color: #a8c77a; }                     /* Char */
code span.ss { color: #a8c77a; }                     /* SpecialString */
code span.vs { color: #a8c77a; }                     /* VerbatimString */
code span.co { color: #706d64; font-style: italic; } /* Comment */
code span.do { color: #706d64; font-style: italic; } /* Documentation */
code span.an { color: #706d64; font-style: italic; } /* Annotation */
code span.fu { color: #e0ddd5; }                     /* Function */
code span.er { color: #e05252; font-weight: 500; }   /* Error */
code span.wa { color: #e8bf6a; font-weight: 500; }   /* Warning */
code span.al { color: #e05252; }                     /* Alert */
code span.cn { color: #c9a3e8; }                     /* Constant */
code span.sc { color: #e8bf6a; }                     /* SpecialChar */
code span.im { color: #d4a64a; }                     /* Import */
code span.bu { color: #e0ddd5; }                     /* BuiltIn */
code span.va { color: #c8c5be; }                     /* Variable */
code span.at { color: #e8bf6a; }                     /* Attribute */
code span.pp { color: #d4a64a; }                     /* Preprocessor */
code span.in { color: #706d64; font-style: italic; } /* Information */
code span.re { color: #e8bf6a; }                     /* RegionMarker */

/* ── Figures ── */

figcaption { text-align: center; }

/* ── Images ── */

img, video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 1.25rem auto;
}

/* ── Blockquote ── */

blockquote {
  border-left: 3px solid var(--accent2);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--fg-dim);
  font-style: italic;
}

/* ── Lists ── */

ul, ol { padding-left: 1.5rem; margin: 0 0 1rem; }
li     { margin-bottom: 0.3rem; }

/* ── Horizontal rule ── */

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

/* ── Tables (general) ── */

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

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

th {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
  font-weight: 500;
}

/* ── Index table ── */

#index table         { table-layout: auto; }
#index table thead   { display: none; }
#index table col     { width: auto !important; }
#index table th,
#index table td      { border: none; padding: 0.6rem 0; vertical-align: baseline; }
#index table tr      { border-bottom: 1px solid var(--border); }
#index table tr:last-child { border-bottom: none; }

#index table td:first-child {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
  padding-right: 1.5rem;
  white-space: nowrap;
  width: 1%;
}

#index table a {
  color: var(--fg);
  border-bottom-color: transparent;
  white-space: nowrap;
}

#index table a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent2);
}

/* ── Mobile ── */

@media (max-width: 600px) {
  html { font-size: 15px; }
  body { padding: 1.5rem 1rem; }
  h1   { font-size: 1.35rem; }
  pre  { padding: 0.75rem 0.9rem; }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  col { width: auto !important; }

  th, td {
    font-size: 0.85rem;
    white-space: normal;
    padding: 0.4rem 0.5rem;
  }

  #index table td:first-child {
    padding-right: 0.75rem;
  }

  #index table a {
    white-space: normal;
  }
}
