@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #2e3440;
  --bg-elevated: #3b4252;
  --border: #525d72;
  --border-strong: #34393e;
  --text: #e7e6e1;
  --text-dim: #b4c6d7;
  --text-faint: #809ebb;
  --accent: #88c0d0;
  --accent-dim: #47596e;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --max-width: 760px;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 64px 24px 96px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  display: block;
  max-width: var(--max-width);
  margin: 0 auto 32px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}

body::after {
  content: '● ● ●';
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(calc(-1 * var(--max-width) / 2 + 16px));
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 4px;
  line-height: 28px;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  margin: 0;
}

h1 {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 20px 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1::before {
  content: '$ ';
  color: var(--accent);
}

h1::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 18px;
  margin-left: 8px;
  background: var(--accent);
  vertical-align: -3px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

body > h2:first-of-type {
  max-width: var(--max-width);
  margin: 4px auto 0;
  padding: 0 20px 24px;
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  border-bottom: 1px solid var(--border);
}

body > h2:first-of-type::before {
  content: '// ';
  color: var(--text-faint);
  font-style: normal;
}

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding-bottom: 32px;
}

section > h2 {
  padding-top: 32px;
  padding-bottom: 20px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

section > h2::before {
  content: '$ ls ./';
  color: var(--accent);
}

section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

section > h2 {
  grid-column: 1 / -1;
}

article {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease;
}

article:hover {
  border-color: var(--border-strong);
}

article h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  padding-inline: 8px;
  width: min-content;
}

article h3 img {
  border-radius: 3px;
  filter: grayscale(0.2);
}

article h3 span::before {
  content: '';
}

article p[itemprop='description'] {
  margin: 0;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.6;
}

article p[itemprop='description'] i {
  color: var(--text);
  font-style: normal;
  border-bottom: 1px dashed var(--border-strong);
}

article a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

article a[itemprop='url']::before {
  content: '\21e2';
  font-size: 16px;
}

article a[itemprop='installUrl']::before {
  content: '\21e3';
  font-size: 16px;
}

article a:hover {
  outline: 1.5px solid var(--accent-dim);
  outline-offset: 4px;
}

article a:focus-visible,
body a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

article hr {
  width: 100%;
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0;
}

article h4 {
  margin: 0 0 -4px;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

article h4::before {
  content: '// ';
}

article div[itemprop='keywords'] {
  font-size: 11.5px;
  color: var(--accent-dim);
  background: #68a3cd0f;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--accent);
  line-height: 1.7;
  word-break: break-word;
}

@media (max-width: 480px) {
  body {
    padding: 40px 12px 64px;
  }

  body::after {
    transform: translateX(-50%);
    left: 50%;
    top: 40px;
  }

  h1 {
    font-size: 18px;
  }

  section {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  h1::after {
    animation: none;
  }

  article {
    transition: none;
  }
}