/* Variables */
:root {
  --color-active: 74, 22, 159;
  --color-info: 27, 60, 104;
  --color-warn: 253, 232, 126;

  --color-text: 30, 25, 22;

  --type-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --type-font-header: "Gill Sans";
  --type-font-mono: Menlo, Monaco, Consolas, "Andale Mono", "Bitstream Vera Sans Mono", monospace;

  --unit-medium: 1.4375em;
}

/* Base */
html, body {
  margin: 0;
  min-height: 95vh;
  padding: 0;
}

body {
  align-items: center;
  background-color: #fff;
  color: rgba(var(--color-text), 1);
  display: flex;
  line-height: var(--unit-medium);
  font-family: var(--type-font-body);
  -webkit-font-smoothing: subpixel-antialiased;
  font-size: 16px;
  font-smooth: always;
  font-weight: 300;
  justify-content: center;
  margin: 1em;
  overflow-y: scroll;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#root {
  margin: 0 auto;
}

#header {
  position: relative;
}

/* Content Layout */
article::after {
  content: "\00A7";
  display: block;
  margin: var(--unit-medium) 0;
  opacity: .175;
  text-align: center;
}

main::after {
  content: "\2597";
  display: block;
  opacity: .175;
  text-align: right;
}

/* Links */
a, a:link {
  border-bottom: 1px solid transparent;
  color: rgba(var(--color-info), 1);
}

a:visited {
  color: rgba(74, 22, 159, 1);
}

a:hover {
  color: rgba(74, 22, 159, 1);
  border-bottom: 1px dashed rgba(var(--color-active), 1);
  text-decoration: none;
}

a:focus {
  color: rgba(255, 255, 255, 1);
  background: rgba(var(--color-active), 1);
  outline: 0;
  text-decoration: none;
  text-shadow: none;
}

a:active {
  color: rgba(123, 102, 168, 1);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .dl-logo {
  font-family: var(--type-font-header);
  font-weight: 400;
}

h1, .dl-logo {
  font-size: 1.5em;
  line-height: .9583em;
  margin: 0;
  padding: .9583em 0;
}

h2 {
  font-size: 1.375em;
  line-height: 1.0455em;
  margin: 1.0455em 0;
}

h3 {
  font-size: 1.25em;
  line-height: 1.15em;
  margin: 1.15em 0;
}

h4 {
  font-size: 1.125em;
  line-height: 1.2778em;
  margin: 1.2778em 0;
}

h5, blockquote, dl, figure, hr, label, p, ol, ul {
  font-size: 1em;
  line-height: 1.5625em;
  margin: var(--unit-medium) 0;
}

h6, aside, blockquote, code, figcaption, pre, samp, small {
  font-size: .875em;
  line-height: 1.6429em;
  margin: 1.6429em 0;
}

.post aside:not(.metadata) + p,
.post blockquote + p,
.post p + p {
  text-indent: var(--unit-medium);
  margin-bottom: 0;
}

abbr {
  cursor: help;
}

blockquote {
  border-left: .5em solid rgba(var(--color-info), .1);
  margin-left: 1.5em;
  margin-right: 3em;
  padding-left: 1em;
}

code, pre, samp, td {
  font-family: var(--type-font-mono);
}

code, .code {
  background-color: rgba(var(--color-info), .1);
}

.code > code {
  background-color: transparent;
}

.code {
  margin: -.72em;
  padding: .72em;
}

dd {
  margin-left: var(--unit-medium);
}

ol, ul {
  padding-left: var(--unit-medium);
}

ol ol, ul ul, ol ul, ul ol {
  font-size: 1em;
  margin: 0 0 0 var(--unit-medium);
}

mark {
  background: rgba(var(--color-warn), 1);
}

strong {
  font-weight: 500;
}

sub, sup {
  cursor: help;
  line-height: .5em;
}

time, .metadata {
  cursor: default;
}

/* Visual */
::selection {
  background-color: rgba(var(--color-warn), .8);
}

hr {
  margin: var(--unit-medium) 0;
  background: transparent;
  border: 1px solid rgba(var(--color-text), .1);
  outline: 0;
}

img {
  box-shadow: 0 0 .5em #aaa;
  max-width: 100%;
}

/* Tables */
caption {
  caption-side: bottom;
  margin: .8215em 0;
  font-size: .875em;
  line-height: 1.6429em;
}

table {
  border-collapse: collapse;
  box-shadow: 0 0 1px 0 rgba(51, 51, 49, 1);
  font-size: .875em;
  line-height: 1.6429em;
  margin: 1.6429em 0;
  min-width: 100%;
}

thead {
  box-shadow: 0 1px 1px -1px rgba(51, 51, 49, 1);
  text-align: left;
}

td, th {
  padding: .0625em .875em;
}

tr:nth-child(2n), td:nth-child(2n), th:nth-child(2n) {
  background-color: rgba(37, 37, 37, .05);
}

tr:hover {
  background-color: rgba(37, 37, 37, .1);
}

/* Metadata */
.metadata {
  opacity: .65;
}

.metadata,
.metadata a {
  color: rgba(37, 37, 37, 1);
  display: block;
  font-size: 1em;
  line-height: 1.5625em;
  margin: 0;
  text-decoration: none !important;
}

.metadata,
.metadata:link,
.metadata:visited,
.metadata a,
.metadata a:link,
.metadata a:visited {
  color: rgba(37, 37, 37, 1);
  text-decoration: none;
}

.metadata a:hover {
  border-bottom: 1px solid transparent;
}

.metadata a:focus {
  background: transparent;
  color: rgba(255, 255, 255, 1);
  text-shadow: none;
}

.metadata time::before {
  display: inline;
  content: "\2014  ";
}

/* Forms */
button,
input,
textarea {
  -webkit-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 1);
  border: .25em solid rgba(0, 0, 0, 1);
  border-radius: 0;
  font-size: 1em;
  padding: .5em;
}

br + input,
br + textarea {
  left: -.75em;
  width: 100%;
}

button,
input[type=submit] {
  padding-left: .75em;
  padding-right: .75em;
  text-transform: capitalize;
  -webkit-tap-highlight-color: rgba(38, 139, 210, .25);
}

br + button,
br + input[type=submit] {
  left: -1em;
}

button:hover,
button:focus,
input[type=submit]:hover,
input[type=submit]:focus {
  background-color: rgba(0, 0, 0, 1);
  color: rgba(255, 255, 255, 1);
  cursor: pointer;
}

button:active,
input[type=submit]:active {
  background-color: rgba(124, 199, 127, 1);
  border-color: rgba(38, 139, 210, 1);
}

input:focus,
textarea:focus {
  outline: .25em solid rgba(38, 139, 210, 1);
}

/* Special Formatting */
#headshot {
  display: block;
  float: left;
  margin: 0 .5em 0 0;
  padding: .9583em 0;
  width: 2.8em;
  background: transparent url("/static/images/headshot.jpg") no-repeat 0 0;
  background-size: 100% 100%;
  border-radius: .5em;
  border: 1px solid rgba(51, 51, 49, .3);
  box-shadow: inset .2em .2em .2em rgba(51, 51, 49, .5);
  font-size: 1.5em;
  line-height: .9583em;
  text-indent: -9000px;
}

/* Small Screen */
@media screen and (min-width: 640px) {
  #root {
    width: 32em;
  }

  img {
    border: .5em solid #fff;
    margin: -.5em;
  }
}

/* Medium Screen */
@media screen and (min-width: 769px) {
  body {
    font-size: 18px;
  }

  #root {
    width: 34em;
  }

  #headshot {
    float: none;
    left: -3.6em;
    margin: 0;
    position: absolute;
  }

  #footer,
  #header {
    margin: 2.875em auto var(--unit-medium);
  }

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

@media screen and (min-width: 1025px) {
  article, section {
    position: relative;
  }

  .metadata {
    left: -11em;
    width: 10em;
    text-align: right;
    position: absolute;
  }

  .metadata time {
    display: block;
  }

  .metadata time::before {
    display: none;
  }
}

/* Large Screen */
@media screen and (min-width: 1279px) {
  body {
    font-size: 20px;
  }
}

/* Print Media */
@media print {
  body {
    font-family: serif;
    margin: 0 10em;
  }

  .no-print {
    display: none !important;
  }

  #footer p::after {
    content: ", https://daniellacy.com";
  }
}
