/* JetBrains Mono, self-hosted (Latin subset, SIL OFL 1.1, see ../fonts/OFL.txt) */
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-700-italic.woff2") format("woff2");
}

:root {
  --bg-top: #515e6a;      /* top of the background gradient */
  --bg: #2e3a46;          /* bottom of the background gradient */
  --text: #d9dee4;
  --muted: #c0c8d0;
  --accent: #f2d680;
  --rule: #3c4955;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

/* "fixed" keeps the gradient to the viewport height. iOS Safari ignores it
   and stretches the gradient over the full page instead. */
body {
  min-height: 100vh;
  background: var(--bg) linear-gradient(to bottom, var(--bg-top), var(--bg)) fixed;
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
}

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

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.avatar {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 40px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35));
}

section { margin-bottom: 32px; }
section p { display: inline; margin: 0; }

h2 {
  display: inline;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.icon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 6px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

ul.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
ul.list li {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 8px;
  font-size: 14px;
}
ul.list .date { color: var(--muted); font-style: italic; }

.placeholder { color: var(--muted); font-style: italic; }

/* Sentence with current listening, reading, coding, records and beer (inc_now.php) */
.now {
  max-width: 520px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}
.now .name { display: block; margin: 0 auto 15px; font-weight: bold;}
.now .v { color: var(--accent); }

/* 4 icons on the first row and 5 on the second. Each icon spans two of ten half-width
   columns, and the first one starts half an icon in, so the top row is centred. */
.profiles {
  display: grid;
  grid-template-columns: repeat(5, 110px);
  justify-content: center;
  gap: 28px 0;
  margin: 8px auto 48px;
}
/* Narrow screens: 3 + 3 + 2 + 2. Six half-width columns, each icon spans two, and the
   first icon on each row of two starts one half column in, so those rows are centred.
   Own order, so the icons with counts fill the first rows:
   discogs, last.fm, setlist.fm / books, github, untappd / spotify, imdb / linkedin, instagram */
@media (max-width: 600px) {
  .profiles { grid-template-columns: repeat(6, 55px); }
  .profiles > a { grid-column: span 2; }
  .profiles > a[href*="discogs.com"]   { order: 1; }
  .profiles > a[href*="last.fm"]       { order: 2; }
  .profiles > a[href*="setlist.fm"]    { order: 3; }
  .profiles > a[data-stats="books"]    { order: 4; }
  .profiles > a[href*="github.com"]    { order: 5; }
  .profiles > a[href*="untappd.com"]   { order: 6; }
  .profiles > a[href*="spotify.com"]   { order: 7; grid-column: 2 / span 2; }
  .profiles > a[href*="imdb.com"]      { order: 8; }
  .profiles > a[href*="linkedin.com"]  { order: 9; grid-column: 2 / span 2; }
  .profiles > a[href*="instagram.com"] { order: 10; }
}
.profiles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  transition: color .15s;
}
.profiles a span { color: var(--muted); }
.profiles a:hover { color: var(--accent); text-decoration: none; }
/* Brand colours on hover, matched on the link target. Colours that are too dark
   for the background are replaced with white or a lighter shade. */
.profiles a[href*="discogs.com"]:hover   { color: #ffffff; }
/* The book icon: every book on the shelf gets its own colour */
.profiles a[data-stats="books"]:hover .b1 { fill: #e8955a; }
.profiles a[data-stats="books"]:hover .b2 { fill: #b39cff; }
.profiles a[data-stats="books"]:hover .b3 { fill: #5fd3c8; }
.profiles a[data-stats="books"]:hover .b4 { fill: #f2d680; }
.profiles a[data-stats="books"]:hover .b5 { fill: #e3dbd0; }
.profiles a[href*="spotify.com"]:hover   { color: #1ed760; }
.profiles a[href*="last.fm"]:hover       { color: #ff6f61; }
.profiles a[href*="untappd.com"]:hover   { color: #ffc000; }
.profiles a[href*="instagram.com"]:hover { color: #ff6aa6; }
.profiles a[href*="github.com"]:hover    { color: #ffffff; }
.profiles a[href*="linkedin.com"]:hover  { color: #70b5ff; }
.profiles a[href*="imdb.com"]:hover      { color: #f5c518; }
.profiles a[href*="setlist.fm"]:hover    { color: #b0d564; }
/* Counts under the profile icons (inc_now.php). The icons are nudged up so they
   line up with the digits, which sit above the middle of the text line. */
.profiles .stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: -2px;
  font-size: 9px;
  line-height: 1.3;
  color: var(--muted);
  opacity: .85;
}
/* The counts take the accent colour while their icon is hovered */
.profiles a:hover .stats { color: var(--accent); }
.profiles .stats i {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-style: normal;
  white-space: nowrap;
}
.profiles .stats svg {
  display: block;
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  transform: translateY(-1.25px);
}

.profiles svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35));
}

footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer .site { margin-top: 8px; }
/* Shown when errors.log has lines (inc_now.php, now_log_alert) */
footer .log-alert { display: flex; justify-content: center; margin-top: 8px; color: #ff6b6b; }
footer .log-alert[hidden] { display: none; }
footer .log-alert svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 480px) {
  ul.list li { grid-template-columns: 1fr; gap: 0; margin-bottom: 6px; }
}
