/* ==========================================================================
   Corvus Consulting stylesheet

   Sections:
     1. Settings   (colors, fonts, sizes: change the look here)
     2. Base       (page-wide defaults)
     3. Layout     (header, two columns, footer)
     4. Posts      (post lists, single posts, archive)
     5. Sidebar
     6. Small screens
   ========================================================================== */


/* 1. Settings
   -------------------------------------------------------------------------- */
:root {
  --color-background: #ffffff;
  --color-text:       #222222;
  --color-muted:      #666666;
  --color-link:       #1a4f8b;
  --color-border:     #dddddd;
  --color-header:     #14233c;   /* dark band at the top */
  --color-header-text:#ffffff;
  --color-code-bg:    #f4f4f4;

  --font-body:    Georgia, "Times New Roman", serif;
  --font-ui:      system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code:    Consolas, Menlo, monospace;

  --page-width:    62rem;   /* total width of the site */
  --sidebar-width: 16rem;
  --gap:           2.5rem;  /* space between content and sidebar */
}


/* 2. Base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: var(--color-link);
}

h1, h2, h3 {
  line-height: 1.25;
}

img {
  max-width: 100%;
  height: auto;
}

code, pre {
  font-family: var(--font-code);
  font-size: 0.9rem;
}

code {
  background: var(--color-code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

pre {
  background: var(--color-code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 3px;
}

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

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--color-border);
  color: var(--color-muted);
}


/* 3. Layout
   -------------------------------------------------------------------------- */

/* Centers things and limits their width. Used in the header, page and footer. */
.wrapper {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* The dark band at the top */
.site-header {
  background: var(--color-header);
  color: var(--color-header-text);
  padding: 1.5rem 0 0;
}

.site-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-header-text);
  text-decoration: none;
}

.site-tagline {
  margin: 0.25rem 0 1rem;
  font-style: italic;
  opacity: 0.8;
}

.site-nav {
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 1rem 0.6rem 0;
  color: var(--color-header-text);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Content on the left, sidebar on the right */
.page {
  display: flex;
  gap: var(--gap);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.content {
  flex: 1;
  min-width: 0;   /* lets wide code blocks scroll instead of stretching the page */
}

.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 1.5rem 0;
}


/* 4. Posts
   -------------------------------------------------------------------------- */
.post-title,
.page-title {
  margin: 0 0 0.25rem;
}

.post-summary .post-title {
  font-size: 1.6rem;
}

.post-summary .post-title a {
  text-decoration: none;
}

.post-summary .post-title a:hover {
  text-decoration: underline;
}

.post-summary {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-meta {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

/* Archive page: a plain list of dates and titles */
.archive-list {
  list-style: none;
  padding: 0;
}

.archive-list li {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0;
}

.archive-list time {
  flex-shrink: 0;   /* keeps the date from being squeezed */
  min-width: 7rem;
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

/* 5. Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.5;
}

.sidebar section {
  margin-bottom: 2rem;
}

.sidebar h2 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar ul {
  margin: 0;
  padding-left: 1.1rem;
}

.sidebar li {
  margin-bottom: 0.4rem;
}


/* 6. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 48rem) {
  .page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}
