@import './variables.css';
@import './luxbar.css';
@import './normalize.css';
@import './article.css';

@font-face {
  font-family: 'Familiar Pro';
  src: url('/fonts/Familiar_Pro-Bold-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-regular.woff2') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-light.woff2') format('woff');
  font-weight: 100 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-bold.woff2') format('woff');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-italic.woff2') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

html {
  font-family: var(--main-font);
  font-weight: 300;
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
}

pre {
  background: var(--terminal-background);
  color: var(--terminal-color);
  padding: var(--base-line-height);
}

code {
  font-family: var(--code-font);
}

body {
  color: var(--text-color);
  background-color: var(--background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--head-font);
  margin: 0;
  word-wrap: break-word;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 3.998rem;
}

h2 {
  font-size: 2.827rem;
}

h3 {
  font-size: 1.999rem;
}

h4 {
  font-size: 1.414rem;
}

@media (max-width: 800px) {
  h1 {
    font-size: 3.052rem;
  }

  h2 {
    font-size: 2.441rem;
  }

  h3 {
    font-size: 1.953rem;
  }

  h4 {
    font-size: 1.563rem;
  }
}

p {
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

a {
  color: var(--compliment);
  font-weight: 700;
}

img {
  width: auto;
  height: auto;
}

ol,
ul {
  margin: 0 0 var(--base-line-height);
  padding-left: 1rem;

  & ol,
  & ul {
    margin-bottom: 0;
  }
}

table {
  border-collapse: collapse;
}

time {
  font-weight: 700;
}

.container {

  & p,
  & ul {
    hyphens: auto;
  }

  & ul {
    list-style-type: none;
  }
}

blockquote {
  margin: var(--base-line-height);
  padding: var(--base-padding);
  background: var(--blockquote-background);
  border-bottom: 4px solid var(--main-color);

  & > *:last-child {
    margin-bottom: 0;
  }
}

.img-link {
  display: inline-block;
  margin-left: var(--base-padding);
  width: 250px;
}

.cube {
  height: 1em;
  width: 1em;
  transition: height 500ms ease-in-out, width 500ms ease-in-out;
  vertical-align: middle;

  &:hover {
    height: 4em;
    width: 4em;
  }
}

.social {
  display: flex;
  flex-flow: row wrap;
  grid-gap: 0.5em;

  & a {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    white-space: nowrap;
  }

  & svg {
    flex: 0 0 auto;
    height: 1.5em;
    width: 1.5em;
    margin-right: 0.5em;
  }
}

header {
  & img {
    width: 100px;
    margin-right: var(--base-padding);
  }

  & .main_title {
    display: inline-block;
    font: 48px var(--head-font);
    margin: 0;
  }
}

.container {
  & table {
    margin-bottom: var(--base-line-height);

    & th {
      font-weight: 700;
    }

    & th,
    & td {
      padding: 1em;
      border: 1px solid var(--text-color);
    }
  }
}
.posts {
  padding: 0 var(--base-padding);
  max-width: 55rem;
  margin: auto;

  article {
    border-radius: 10px;
    box-shadow: 3px 3px 9px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    padding: 1rem;

    @media screen and (min-width: 800px) {
      flex-flow: row;
    }

    h2 {
      font-size: 1.5rem;
      margin: 0;
    }

    a {
      text-decoration: none;
    }

    img {
      display: none;
      width: 200px;
      border-radius: 5px;

      @media screen and (min-width: 800px) {
        display: initial;
      }
    }

    p {
      margin: 0;
      font-weight: normal;
    }

    time {
      display: block;
      margin-bottom: 1.5rem;
    }
  }
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;

  & iframe,
  & object,
  & embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

main {
  overflow: hidden;
  background-color: var(--background);

  & img {
    max-width: 100%;
  }
}


footer {
  display: flex;
  background-color: var(--background);
  grid-gap: 1em;
  padding: 1em;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;

  & .copyright {
    font-weight: 700;
    white-space: nowrap;
  }
}

article > h2 > a {
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

@media screen and (max-width: 480px) and (orientation: portrait) {
  footer {
    flex-direction: column;

    & span {
      margin-bottom: 0.5em;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}
