@tailwind base;
@tailwind components;
@tailwind utilities;
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;700&display=swap");

:root {
  --bg-primary: #222222;
  --text-primary: #ffffff;
  --text-secondary: #bdbdbd;
  --hover-bg: #3a3a3a;
  --scrollbar-thumb: rgba(255, 255, 255, 0.18);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
  font-family: "Fira Code", monospace;
}

// ::-webkit-scrollbar {
//   display: none;
// }

/* Mac-style scrollbar for Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 8px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

code {
  line-break: anywhere;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255,0.18) transparent;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  width: 100dvw;
  height: 100svh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: lighter;
}

#___gatsby,
#gatsby-focus-wrapper {
  width: 100vw;
  height: 100%;
}

#gatsby-focus-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

p,
a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

h1 {
  margin: 10px 0 5px;
  font-size: 30px;

  @media (min-width: 730px) {
    font-size: 40px;
  }
}

h2 {
  font-size: 16px;
  font-weight: lighter;
  margin: 0 0 10px;

  @media (min-width: 730px) {
    font-size: 18px;
  }

  a {
    color: var(--tw-text-gray-primary);
    text-decoration: underline;
  }
}

h4 {
  color: var(--tw-text-gray-secondary);
  font-size: 16px;
  margin: 10px 0;
  line-height: 16px;
  font-weight: bold;
}

h5 {
  color: var(--tw-text-gray-secondary);
  font-size: 14px;
  font-weight: lighter;
  margin: 10px 0;
  line-height: 24px;
  text-decoration: underline;
}

button,
.button {
  background: none;
  display: flex;
  align-items: center;
  box-shadow: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 0px;
  appearance: none;
  font-weight: lighter;
  line-height: 14px;

  svg {
    transition: transform 0.3s ease;
  }

  &:hover {
    text-decoration: none;
    cursor: pointer;
    background-color: var(--hover-bg);

    p {
      color: var(--text-primary);
    }

    svg {
      transform: scale(1.2);
      stroke: var(--text-primary);
    }
  }

  &.-toggle {
    padding: 0;
    font-size: 16px;
    color: var(--tw-text-gray-secondary);

    &:hover {
      background: none;
      text-decoration: underline;
      color: var(--tw-text-gray-primary);
    }
  }

  &.-icon {
    p {
      margin-left: 10px;
    }
  }

  &.--active {
    color: var(--tw-text-gray-primary);
    text-decoration: underline;
  }
}

blockquote {
  font-style: italic;
  color: var(--tw-text-gray-secondary);
  text-decoration: overline;
  margin: 10px 0;
}

.only-desktop.only-desktop {
  display: none;
  @media (min-width: 730px) {
    display: flex;
  }
}

.only-mobile.only-mobile {
  display: flex;
  @media (min-width: 730px) {
    display: none;
  }
}
