/* Variables
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  --rgb-surface: 0, 0, 0;
  --rgb-background: 255, 255, 255;
  --rgb-primary: 42, 171, 159;
  --rgb-secondary: 0, 120, 210;
  --alpha-100: 0.07;
  --alpha-200: 0.14;
  --alpha-300: 0.21;
  --alpha-400: 0.38;
  --alpha-500: 0.6;
  --alpha-600: 0.87;
}

/* Dark theme
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media (prefers-color-scheme: dark) {
  :root {
    --rgb-surface: 255, 255, 255;
    --rgb-background: 45, 45, 45;
    --rgb-primary: 42, 171, 159;
    --rgb-secondary: 255, 135, 45;
  }
}

/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */

html {
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
  color: rgba(var(--rgb-surface), var(--alpha-600));
  background: rgb(var(--rgb-background));
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  padding: 0;
}

/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */

h1,
h2,
h3,
h4,
h5,
h6 {
  -moz-font-feature-settings: "palt";
  -webkit-font-feature-settings: "palt";
  font-feature-settings: "palt";
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: 300;
}

h1 {
  font-size: 2.2rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1rem;
}
h5 {
  font-size: 0.8rem;
}
h6 {
  font-size: 0.6rem;
}

/* Larger than phablet */

@media (min-width: 550px) {
  h1 {
    font-size: 2.4rem;
  }
  h2 {
    font-size: 2.2rem;
  }
  h3 {
    font-size: 1.8rem;
  }
  h4 {
    font-size: 1.2rem;
  }
  h5 {
    font-size: 1rem;
  }
  h6 {
    font-size: 0.8rem;
  }
}

strong {
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(252, 252, 84, 0.8) 60%
  );
  border-radius: 2px;
}
/* Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */

a {
  color: rgb(var(--rgb-secondary));
  text-decoration: none;
}
a:hover {
  color: rgba(var(--rgb-secondary), var(--alpha-500));
}

/* Lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */

ul {
  list-style: circle;
}
ol {
  list-style: decimal;
}

ol,
ul {
  padding-left: 0;
  margin-top: 0;
}

ul ul,
ul ol,
ol ol,
ol ul {
  margin: 1.5rem 0 1.5rem 3rem;
}

li {
  margin-bottom: 1rem;
}

/* Code
–––––––––––––––––––––––––––––––––––––––––––––––––– */

code {
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
  color: rgb(var(--rgb-primary));
  background: rgba(var(--rgb-surface), var(--alpha-100));
  border: 1px rgba(var(--rgb-surface), var(--alpha-200)) solid;
  border-radius: 2px;
}

pre > code {
  display: block;
  padding: 1rem 1.5rem;
  color: rgba(var(--rgb-surface), var(--alpha-600));
  white-space: pre;
  overflow: hidden;
}

.highlight > pre {
  border-radius: 4px;
}
.highlight > pre > code {
  color: rgba(255, 255, 255, var(--alpha-600));
}

/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */

button,
.button {
  margin-bottom: 1rem;
}

input,
textarea,
select,
fieldset {
  margin-bottom: 1.5rem;
}

pre,
blockquote,
form,
dl,
figure,
table,
p,
ul,
ol,
form,
.google-auto-placed {
  margin-bottom: 2.5rem;
}

p {
  margin-top: 0;
}
img {
  vertical-align: middle;
}

blockquote {
  margin: 0;
  padding-left: 3rem;
  border-left: 0.4rem rgba(var(--rgb-surface), var(--alpha-200)) solid;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  font-size: 0.8rem;
}

/* Affiliate
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.__m {
  display: block !important;
  margin: 1em 0 !important;
}
.__m_i {
  float: left !important;
  width: 100px !important;
  margin: 10px !important;
}

/* Utilities
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.u-full-width {
  width: 100%;
  box-sizing: border-box;
}
.u-max-full-width {
  max-width: 100%;
  box-sizing: border-box;
}

.u-pull-right {
  float: right;
}
.u-pull-left {
  float: left;
}
.u-dn {
  display: none;
}
.u-mute {
  color: rgba(var(--rgb-surface), var(--alpha-500));
}
.u-txs {
  font-size: 0.8rem;
}
.u-mtn {
  margin-top: 0 !important;
}
.u-mbn {
  margin-bottom: 0 !important;
}
.u-mrm {
  margin-right: 10px !important;
}

/* Misc
–––––––––––––––––––––––––––––––––––––––––––––––––– */
hr {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  border-width: 0;
  border-top: 1px solid rgba(var(--rgb-surface), var(--alpha-200));
}

/* Clearing
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.container:after,
.row:after,
.u-cf {
  content: "";
  display: table;
  clear: both;
}

.rm {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.rm iframe {
  position: absolute;
  top: 0;
  right: 0;
  width: 100% !important;
  height: 100% !important;
}

.ad {
  margin-bottom: 10px;
  padding: 10px 10px 0;
  background: rgba(var(--rgb-surface), var(--alpha-100));
  text-align: center;
}

.ad a,
.ad iframe {
  display: block;
  margin: auto;
}

.ad:after {
  content: "AD";
  display: block;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  font-size: 0.6rem;
}

.hero {
  width: 100%;
  height: 340px;
  margin: -3rem 0 3rem;
  background: rgba(var(--rgb-surface), var(--alpha-100)) top center no-repeat;
  background-size: cover;
}

/* Site
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.site-header {
  margin-bottom: 3rem;
  background: rgba(var(--rgb-surface), var(--alpha-100));
}

.site-header img {
  vertical-align: middle;
}

.site-header a {
  display: block;
  float: left;
  padding: 1.5rem 1.5rem 1.1rem;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  font-weight: bold;
  border-bottom: 3px transparent solid;
}

.site-header a:hover {
  border-bottom: 3px rgb(var(--rgb-primary)) solid;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px rgba(var(--rgb-surface), var(--alpha-100)) solid;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  background: rgba(var(--rgb-surface), var(--alpha-100));
}

.site-author {
  margin: auto;
  font-size: 0.8rem;
}

.site-author-pic {
  border: 3px rgb(var(--rgb-background)) solid;
  border-radius: 42px;
  transition-property: border;
  transition-duration: 0.6s;
  transition-timing-function: ease-out;
}

a:hover .site-author-pic {
  border: 3px rgb(var(--rgb-primary)) solid;
}

.site-author-info {
  margin-left: 7rem;
}
.site-author-desc {
  margin-bottom: 1em;
}
.social-links {
  list-style: none;
}

.social-links li {
  display: inline;
  margin-right: 8px;
}

.social-links svg {
  fill: rgba(var(--rgb-surface), var(--alpha-400));
  width: 24px;
  height: 24px;
  transition-property: fill;
  transition-duration: 0.6s;
  transition-timing-function: ease-out;
}

a:hover .social-links-rss {
  fill: #ff7043;
}
a:hover .social-links-twitter {
  fill: #29b6f6;
}
a:hover .social-links-github {
  fill: #444;
}
a:hover .social-links-dribbble {
  fill: #fe378a;
}
a:hover .social-links-linkedin {
  fill: #42a5f5;
}

.site-copyright {
  text-align: center;
}

.c-article {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  padding-top: 3rem;
  border-width: 0;
  border-bottom: 1px solid rgba(var(--rgb-surface), var(--alpha-100));
}

.c-article:last-child {
  border: 0;
}
.c-article h3 {
  margin-bottom: 1rem;
}

/* Post
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.post-header {
  margin-bottom: 4rem;
}

.post-header::after {
  display: block;
  margin: 1rem 0;
  width: 3rem;
  height: 0.3rem;
  background: rgba(var(--rgb-surface), var(--alpha-200));
  content: " ";
}

.post-h1 {
  margin: 1rem 0 0 0 !important;
}

.post-desc {
  margin-top: -2rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

.post-social {
  margin: 4rem 0 0;
}

.post-social svg {
  margin-right: 12px;
  width: 24px;
  height: 24px;
}

.post-pager {
  font-size: 0.8rem;
}
.post-next {
  text-align: right;
}

.post p {
  font-size: 18px;
}

.post img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
}

.post .citation {
  background: rgba(var(--rgb-surface), var(--alpha-100));
  border-left: 0.4rem #bbdefb solid;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  font-size: 0.8rem;
  font-style: normal;
  padding: 0.75em;
  display: block;
}

.post table {
  width: 100%;
  border-collapse: collapse;
}

.post tr {
  border-top: 1px solid rgba(var(--rgb-surface), var(--alpha-300));
}

.post th,
.post td {
  padding: 6px 12px;
  border: 1px solid rgba(var(--rgb-surface), var(--alpha-200));
}

.post table tr:nth-child(2n) {
  background-color: rgba(var(--rgb-surface), var(--alpha-100));
}

.post .citation img {
  width: 40px;
  border-radius: 40px;
  margin: 0 0.5em 0 0;
}

.post .fluid {
  position: relative;
  height: 20em;
  margin-bottom: 2.5em;
}

.post .fluid iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.post .azlink-box {
  margin-bottom: 2.5rem;
}

.post h2,
.post h3,
.post h4 {
  margin-top: 4rem;
}

.post-tags a {
  display: inline-block;
  line-height: 22px;
  padding: 5px 10px;
  border-radius: 3px;
  color: rgba(var(--rgb-surface), var(--alpha-500));
  background: rgba(var(--rgb-surface), var(--alpha-100));
  font-size: 0.8rem;
}

.post-tags a:hover {
  color: rgba(var(--rgb-surface), var(--alpha-500));
}

.post-tags a::first-letter {
  text-transform: uppercase;
}

.post .__media {
  margin-bottom: 2rem;
}
.post .__media:after {
  content: "";
  display: table;
  clear: both;
}
.post .__media__body > div {
  margin-bottom: 2rem;
}
.post .__media__text {
  color: rgba(var(--rgb-surface), var(--alpha-600));
}
.post .__media__image {
  margin-bottom: 1.5rem;
}
@media (min-width: 550px) {
  .post .__media__image {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 0;
    width: 140px;
  }
}

.container {
  position: relative;
  width: 90%;
  max-width: 700px;
  margin: 0 auto;
  box-sizing: border-box;
}

.column,
.columns {
  width: 100%;
  float: left;
  box-sizing: border-box;
}

/* For devices larger than 400px */
@media (min-width: 400px) {
  .container {
    width: 85%;
    padding: 0;
  }
}

/* For devices larger than 550px */
@media (min-width: 550px) {
  .container {
    width: 80%;
    padding: 0;
  }
  .ad {
    float: right;
    margin-bottom: 0;
  }
  .column,
  .columns {
    margin-left: 4%;
  }
  .column:first-child,
  .columns:first-child {
    margin-left: 0;
  }
  .one.column,
  .one.columns {
    width: 4.66666666667%;
  }
  .two.columns {
    width: 13.3333333333%;
  }
  .three.columns {
    width: 22%;
  }
  .four.columns {
    width: 30.6666666667%;
  }
  .five.columns {
    width: 39.3333333333%;
  }
  .six.columns {
    width: 48%;
  }
  .seven.columns {
    width: 56.6666666667%;
  }
  .eight.columns {
    width: 65.3333333333%;
  }
  .nine.columns {
    width: 74%;
  }
  .ten.columns {
    width: 82.6666666667%;
  }
  .eleven.columns {
    width: 91.3333333333%;
  }
  .twelve.columns {
    width: 100%;
    margin-left: 0;
  }
  .one-third.column {
    width: 30.6666666667%;
  }
  .two-thirds.column {
    width: 65.3333333333%;
  }
  .one-half.column {
    width: 48%;
  }
  /* Offsets */
  .offset-by-one.column,
  .offset-by-one.columns {
    margin-left: 8.66666666667%;
  }
  .offset-by-two.column,
  .offset-by-two.columns {
    margin-left: 17.3333333333%;
  }
  .offset-by-three.column,
  .offset-by-three.columns {
    margin-left: 26%;
  }
  .offset-by-four.column,
  .offset-by-four.columns {
    margin-left: 34.6666666667%;
  }
  .offset-by-five.column,
  .offset-by-five.columns {
    margin-left: 43.3333333333%;
  }
  .offset-by-six.column,
  .offset-by-six.columns {
    margin-left: 52%;
  }
  .offset-by-seven.column,
  .offset-by-seven.columns {
    margin-left: 60.6666666667%;
  }
  .offset-by-eight.column,
  .offset-by-eight.columns {
    margin-left: 69.3333333333%;
  }
  .offset-by-nine.column,
  .offset-by-nine.columns {
    margin-left: 78%;
  }
  .offset-by-ten.column,
  .offset-by-ten.columns {
    margin-left: 86.6666666667%;
  }
  .offset-by-eleven.column,
  .offset-by-eleven.columns {
    margin-left: 95.3333333333%;
  }
  .offset-by-one-third.column,
  .offset-by-one-third.columns {
    margin-left: 34.6666666667%;
  }
  .offset-by-two-thirds.column,
  .offset-by-two-thirds.columns {
    margin-left: 69.3333333333%;
  }
  .offset-by-one-half.column,
  .offset-by-one-half.columns {
    margin-left: 52%;
  }
}
