/*
 * olivierbugalotto.com
 *
 */

:root {
  --paper:      #f2f3f5;
  --surface:    #ffffff;
  --ink:        #16181d;
  --ink-2:      #4a525e;
  --ink-3:      #7b8492;
  --rule:       #d8dbe1;
  --accent:     #2b4c8c;
  --code-bg:    #f6f7f9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #131519;
    --surface: #1a1d23;
    --ink:     #e6e9ed;
    --ink-2:   #a7afbb;
    --ink-3:   #79818f;
    --rule:    #2b3037;
    --accent:  #87a9e0;
    --code-bg: #20242b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 6rem;
}

/* ---------- en-tete ---------- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-head a { color: var(--ink-3); text-decoration: none; }
.site-head a:hover { color: var(--accent); }
.site-head .name { color: var(--ink); font-weight: 600; }

/* ---------- typographie ---------- */

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .6rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 3rem 0 .8rem;
  text-wrap: balance;
}

h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  margin: 2rem 0 .6rem;
}

p { margin: 0 0 1.2rem; }

.standfirst {
  font-size: 1.12rem;
  color: var(--ink-2);
  margin-bottom: 2.5rem;
}

.dateline {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2.5rem;
}

a { color: var(--accent); text-underline-offset: 2px; }

blockquote {
  margin: 1.8rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}
blockquote p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
li { margin-bottom: .4rem; }

strong { font-weight: 600; }

/* ---------- code ---------- */

code, pre {
  font-family: "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: .84em;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .08em .32em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}
pre code { background: none; border: none; padding: 0; }

/* ---------- tableaux ---------- */

.tablewrap { overflow-x: auto; margin-bottom: 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* ---------- index des articles ---------- */

.writing-list { list-style: none; padding: 0; margin: 0; }
.writing-list li { margin-bottom: 1.8rem; }
.writing-list a { font-size: 1.2rem; text-decoration: none; font-weight: 600; }
.writing-list a:hover { text-decoration: underline; }
.writing-list .blurb { color: var(--ink-2); font-size: .96rem; margin: .3rem 0 0; }

/* ---------- pied ---------- */

.site-foot {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .8rem;
  color: var(--ink-3);
}
