/* ============================================================
   DARK THEME — skippednote.dev
   Design language from VarLambda (varlambda.com)
   ============================================================ */

/* --- Google Fonts loaded in base.html --- */

/* ---- CSS Variables ---- */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --border: #27272a;
  --code-bg: #1a1a1a;
  --radius: 0.5rem;

  --sans-font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono-font: 'Space Mono', 'Fira Code', Consolas, monospace;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--sans-font);
  color: var(--text);
  background-color: var(--bg);
  /* Dot grid + radial glows */
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(6, 182, 212, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 100% 100%, rgba(6, 182, 212, 0.06), transparent 60%),
    radial-gradient(rgba(6, 182, 212, 0.22) 1.5px, transparent 1.5px);
  background-size: auto, auto, 32px 32px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Fade grid at edges */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, transparent 40%, rgba(10,10,10,0.85) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout wrapper ---- */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding: 2rem 0 4rem;
}

/* ---- Header / Nav ---- */
header {
  background: transparent !important;
  border-bottom: none !important;
  padding: 0 !important;
}

header .site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

header .site-nav h1,
header h1 {
  font-family: var(--sans-font);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

header .site-nav h1 a,
header h1 a {
  color: var(--text);
  text-decoration: none;
}

header .navBar,
header nav.navBar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}

header .navBar a,
header nav.navBar a,
header nav a {
  font-family: var(--sans-font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border: none !important;
  border-radius: 0;
  background: transparent;
  transition: color 0.2s ease;
  position: relative;
}

header .navBar a::after,
header nav.navBar a::after,
header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.65rem;
  right: 0.65rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

header .navBar a:hover,
header nav.navBar a:hover,
header nav a:hover,
header .navBar a:visited:hover,
header nav.navBar a:visited:hover {
  color: var(--accent);
  text-decoration: none;
  filter: none;
}

header .navBar a:hover::after,
header nav.navBar a:hover::after,
header nav a:hover::after {
  transform: scaleX(1);
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border) !important;
  margin-top: 4rem;
  padding: 2rem 0 !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  font-size: 0.82rem;
}

footer hr {
  display: none;
}

.footContainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: left;
}

.footContainer p {
  margin: 0;
  color: var(--text-muted);
}

.footContainer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footContainer a:hover {
  color: var(--accent);
}

.icons__background svg path {
  fill: var(--text-muted) !important;
}

.icons__background:hover svg path {
  fill: var(--accent) !important;
}

.footContainer > p:last-child {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans-font);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

a, a:visited {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- Code ---- */
code, kbd, samp {
  font-family: var(--mono-font);
  font-size: 0.82em;
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: #1e1e2e !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: transparent !important;
  border: none !important;
  padding: 0;
  font-size: 0.875rem;
  color: inherit;
}

/* ---- Lists ---- */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
  color: var(--text);
}

/* ---- HR ---- */
hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ---- Blockquote ---- */
blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

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

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

tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

/* ---- Article / Post cards / sections ---- */
article, .card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* ---- Post list (section.html) ---- */
.titleList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.titleList li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.titleList li:last-child {
  border-bottom: none;
}

.titleList li .date,
.date {
  font-family: var(--mono-font);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.titleList li a {
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
}

.titleList li a:hover {
  color: var(--accent);
  text-decoration: none;
}

.titleList h3 {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2rem;
  margin-bottom: 0.25rem;
}

/* ---- Tags ---- */
.tag, a.tag, a.tag:visited {
  font-family: var(--mono-font);
  font-size: 0.68rem;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  text-decoration: none;
  margin-right: 0.35rem;
  display: inline-block;
}

.tag:hover, a.tag:hover {
  background: rgba(6, 182, 212, 0.2);
  text-decoration: none;
}

/* ---- Post page ---- */
.metaData {
  font-family: var(--mono-font);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pageMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

time {
  font-family: var(--mono-font);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

address {
  font-style: normal;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tagsData {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Breadcrumb */
.metaData a {
  color: var(--text-muted);
}

/* ---- WIP badge ---- */
.wip {
  font-family: var(--mono-font);
  font-size: 0.65rem;
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* ---- Library page ---- */
.library-title {
  margin-top: 0;
}

.details {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

.cover {
  width: 100px;
  height: auto;
  border-radius: calc(var(--radius) / 2);
  flex-shrink: 0;
  object-fit: cover;
}

.details > div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.details strong {
  color: var(--text);
}

/* ---- Rides page ---- */
.paginator, .metaData {
  font-family: var(--mono-font);
  font-size: 0.78rem;
}

/* ---- Callout ---- */
.callout {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.callout span {
  margin-right: 0;
}

.callout-warning {
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.3);
  color: var(--text);
}

/* ---- Pagination ---- */
.metaData a {
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 0.85rem;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Images ---- */
img, video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

img {
  opacity: 0.9;
}

/* ---- Selection ---- */
::selection {
  background: rgba(6, 182, 212, 0.25);
  color: var(--text);
}

/* ---- Mobile ---- */
@media (max-width: 720px) {
  html { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  header .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  header .navBar,
  header nav.navBar {
    flex-wrap: wrap;
    gap: 0;
  }

  header .navBar a,
  header nav.navBar a {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .details {
    flex-direction: column;
  }

  .cover {
    width: 80px;
  }

  .footContainer {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ---- Override PureCSS/SimpleCSS leftovers from original theme ---- */
body > * { grid-column: unset; }
body { display: block; grid-template-columns: unset; }
body > header { grid-column: unset; background: transparent; border: none; text-align: left; padding: 0; }
