:root {
  --bg: #fff;
  --fg: #000;
}

html.dark {
  --bg: #000;
  --fg: #fff;
}

html.lang-es .en {
  display: none;
}

html.lang-en .es {
  display: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

html {
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: 'IBM Plex Mono', 'Fira Code', 'SF Mono', 'Consolas', 'Monaco', 'Courier New', Courier, monospace;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
}

pre {
  font-family: inherit;
  white-space: pre;
  overflow-x: auto;
}

h1 {
  font-size: 1.25rem;
  font-weight: normal;
  margin-bottom: 0;
}

.invert {
  background: var(--fg);
  color: var(--bg);
  padding: 0.25rem 0.75rem;
  display: inline-block;
  margin-bottom: 0;
}

.line {
  border-top: 1px solid var(--fg);
  margin-top: 1rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

section {
  margin-bottom: 2rem;
}

h1, h2, h3, p, ul {
  margin-bottom: 1rem;
}

h2 {
  font-size: 1rem;
  font-weight: normal;
  text-transform: uppercase;
}

h3 {
  font-size: 1rem;
  font-weight: normal;
}

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

a:hover,
a:focus {
  background: var(--fg);
  color: var(--bg);
}

ul {
  list-style: none;
}

li {
  margin-bottom: 0.25rem;
}

.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inline li {
  margin-bottom: 0;
}

.inline li::before {
  content: none;
}

.inline li:not(:last-child)::after {
  content: " |";
}

.manpage section {
  padding-left: 1rem;
}

.manpage h2 {
  margin-left: -1rem;
  margin-bottom: 0.5rem;
}

.case-study {
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fg);
}

.case-study h3 {
  margin-bottom: 0.5rem;
}

.case-study p {
  margin-bottom: 0.25rem;
}

.job {
  margin-bottom: 1.5rem;
}

footer {
  border-top: 1px solid var(--fg);
  padding-top: 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.controls {
  display: flex;
  gap: 0.5rem;
}

.social {
  display: flex;
  gap: 0.5rem;
}

.social-icon {
  width: 2.125rem;
  height: 2.125rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-icon:hover,
.social-icon:focus {
  background: var(--fg);
  color: var(--bg);
}

.social-icon svg {
  width: 1rem;
  height: 1rem;
}

.theme-toggle {
  width: 2.125rem;
  height: 2.125rem;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--bg);
  color: var(--fg);
}

.lang-toggle {
  width: 2.125rem;
  height: 2.125rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--fg);
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-transform: uppercase;
}

.lang-toggle:hover,
.lang-toggle:focus {
  background: var(--fg);
  color: var(--bg);
}

@media (min-width: 768px) {
  html,
  body {
    height: 100vh;
    overflow: hidden;
  }

  body {
    padding: 1rem;
    font-size: 13px;
    line-height: 1.4;
  }

  .wrap {
    max-width: 900px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .hero {
    margin-bottom: 1rem;
  }

  .line {
    margin-top: 0.5rem;
  }

  h1, h2, h3, p, ul, li {
    margin-bottom: 0.25rem;
  }

  section {
    margin-bottom: 0.75rem;
  }

  .featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .case-study {
    margin-bottom: 0;
    padding-top: 0.5rem;
  }

  .case-study h3 {
    margin-bottom: 0.25rem;
  }

  .case-study p {
    margin-bottom: 0.15rem;
  }

  footer {
    margin-top: auto;
  }
}
