/* benward.me v6.3.0 */

:root {
  --BenWard-canvasColor: #253820;
  --BenWard-pageColor: #F7F7FF;
  --BenWard-bodyTextColor: #2B2D42;
  --BenWard-linkColor: #2B6B9E;
  --BenWard-accentColor: #B22D43;
  --BenWard-asideBackground: #2B2D42;
  --BenWard-asideTextColor: #F7F7FF;
  --BenWard-logoColor: #F7F7FF;

  --BenWard-footerTextColor: #c4d9be;
  --BenWard-footerLinkColor: #F7F7FF;
}

/* Font Sets */
html,
h1, h2, h3,
article .dateline,
ul.tags {
  font: 20px/28px sans-serif;
}

article {
  font-family: serif;
  font-weight: 200;
}

h1, h2, h3 {
  font-weight: bold;
}

/* Site */
html {
  margin: 0 auto;
  max-width: 38em;

  background: var(--BenWard-canvasColor);
  background-image:
    repeating-linear-gradient(-65deg, rgba(0, 0, 0,0) 1px, rgba(0, 0, 0, .2) 3px, rgba(0, 0, 0,0) 5px),
    repeating-linear-gradient(65deg, rgba(0, 0, 0 ,0) 0, rgba(0, 0, 0, .2) 3px, rgba(0, 0, 0, 0) 5px),
    linear-gradient(20deg, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, 0) 100%);

  color: var(--BenWard-bodyTextColor);
}

body { margin: 0 16px; }

header,
footer,
body > article,
body > section {
  padding: 32px;
}

body > article,
body > section {
  background: var(--BenWard-pageColor);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-size: 170%;
  margin: 0;
  color: var(--BenWard-logoColor);
  opacity: 0.25;
  transition: opacity .5s ease-out;
}

header h1 a:link,
header h1 a:visited {
  color: inherit;
}
header h1:hover {
  opacity: 0.75;
}

article h2 {
  transform: rotate(-1deg) translateX(-3px);
}

article .dateline {
  color: var(--BenWard-accentColor);
  margin: 6px 0;
  font-size: 16px;
  font-weight: 500;

  transform: rotate(1deg) translateX(-10px) translateY(3px);
}

article .dateline p {
  margin: 0;
}

h1 {
  font-size: 130%;
  line-height: 150%;
  margin: 0 0 16px 0;
}
h2 {
  font-size: 110%;
  line-height: 150%;
  margin: 0 0 4px 0;
}
h3, h4 {
  font-size: 100%;
  line-height: 150%
}
h3 { margin: 0 0 4px 0; }

a:link {
  color: var(--BenWard-linkColor);
  text-decoration: none;
}
a:visited { color: var(--BenWard-linkColor); }
a:hover, a:focus { text-decoration: underline; }
a:active { text-decoration: underline; }

q { quotes: none; }

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

article li {
  margin: 2px 0 2px 20px;
  list-style-position: outside;
}

article ul li {
  list-style-type: disc;
}

article ol li {
  list-style-type: decimal;
}

blockquote {
  margin: 6px 12px 6px 0;
  padding-left: 12px;
  border: 4px solid var(--BenWard-accentColor);
  border-width: 0 0 0 4px;
}

article aside {
  margin: 32px 0 32px -32px;
  font-size: 90%;
  background-color: var(--BenWard-asideBackground);
  color: var(--BenWard-asideTextColor);
  padding: 16px;
}

/* Standard margin for article block content: */
p, dl, ol, ul  {
  margin: 0 0 16px;
}

kbd, output, samp, code {
  font-family: monospace;
  display: inline-block;
  font-size: 70%;
  padding: 2px;
  color: var(--BenWard-accentColor);
  border-radius: 3px;
}

pre code {
  display: block;
  padding: 4px;
  max-width: 100%;
  overflow-x: scroll;
}

article img {
  text-align: center;
  max-width: 100%;
  margin: 0 -32px;
}

body > article > .e-content > blockquote:first-child {
  border: 0;
  font-size: 200%;
  line-height: 130%;
  padding: 0;
  margin: 16px 0;
}

article .full-bleed {
  margin: 0 -32px;
}

article .full-bleed img {
  width: 100%;
  margin: 0;
}

article .top-full-bleed {
  margin-top: -32px;
}

article .pull-left {
  float: left;
  margin: 0 8px 0 -32px;
}

article .pull-right {
  float: right;
  margin: 0 -32px 0 8px;
}

/** Section: Archive Navigation */
article header,
article footer,
section.h-feed header,
section.h-feed footer {
  margin: 16px -32px -32px -32px;
  padding: 0 32px;
  border: 1px var(--BenWard-bodyTextColor) solid;
  border-width: 1px 0 0 0;
}

section.h-feed header,
article header {
  margin: -32px -32px 16px -32px;
  border-width: 0 0 1px 0;
}

section.h-feed article {
  margin-bottom: 32px;
}

section.h-feed nav,
article.h-entry nav {
  display: flex;
  justify-content: space-between;
}

section.h-feed nav a,
article.h-entry nav a {
  display: block;
  text-align: center;
  margin: 16px 0;
  white-space: nowrap;
}

section.h-feed nav a:first-child,
article nav a:first-child {
  text-align: left;
}
section.h-feed nav a:last-child,
article nav a:last-child {
  text-align: right;
}

section.h-feed nav a,
article.h-entry nav a {
  flex-basis: 33%;
}

section.h-feed.annual nav a,
section.h-feed.recent nav a {
  flex-basis: 50%;
}

/** Section: Archives */
.archives.annual section article {
  margin-left: 24px;
  position: relative;
}

/** Section: Page Footer */
body > footer {
  color: var(--BenWard-footerTextColor);
  font-size: 80%;
  line-height: 21px; /* match Twitter button */
}

body > footer address {
  display: inline;
  font-style: normal;
}

body > footer a:link,
body > footer a:visited,
body > footer a:hover,
body > footer a:focus {
  color: var(--BenWard-footerLinkColor);
}

body > footer .footnote {
  margin-top: 100%;
  color: rgba(255,255,255,0.2);
  text-shadow: rgba(0, 0, 0, 0.7) -1px 0 2px;
  text-align: center;
}

/** Section: Cover Image */
.cover {
  margin: -32px -32px 16px -32px;
  height: 700px;
  background: transparent url('https://media.benward.uk/web/yosemite-header.webp') no-repeat 0 0;
  background-size: cover;
  position: relative;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.5);
}
.cover p {
  position: absolute;
  bottom: 0; left: 0;
  margin: 0 0 8px 0;
  padding: 8px 32px;
  background: rgba(0,0,0,0.5);
  color: var(--BenWard-asideTextColor);
}
.cover .photo-credit {
  position: absolute;
  top: 0; right: 0;
  margin: 32px;
}
.cover a:link,
.cover a:visited {
  color: var(--BenWard-asideTextColor);
  text-decoration: underline;
}
.cover a:hover {
  background: var(--BenWard-pageColor);
  color: var(--BenWard-accentColor);
}

/** Section: Post tags */
ul.tags {
  padding: 0;
}
ul.tags li {
  margin: 0;
  padding: 0;
  display: inline-block;
  list-style: none;
  padding: 4px;
  border-radius: 4px;
  border-bottom-left-radius: 15px 50%;
  border-top-left-radius: 15px 50%;
  padding-left: 10px;
  transform: rotate(-5deg);
  border: 2px solid var(--BenWard-accentColor);
  color: var(--BenWard-accentColor);
  font-size: 80%;
  margin-bottom: 4px;
  line-height: 120%;
}
ul.tags li a {
  display: inline-block;
  color: inherit;
}

/** Section: Sharing */
.share {
  position: relative;
}
.share p {
  font-size: 90%;
}
.share kbd {
  font-family: sans-serif;
  font-size: 90%;
  line-height: 100%;
  background: none;
}

/** Section: Button */
.button:link,
.button:active,
.button:visited,
.button:hover,
.button:focus {
  display: inline-block;
  background-color: #f8f8f8;
  background-image: linear-gradient( #fff, #dedede);
  border: #ccc solid 1px;
  border-radius: 3px;
  padding: 3px 8px;
  color: var(--BenWard-bodyTextColor);
  font: bold 13px/20px Helvetica, sans-serif;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  user-select: none;
  cursor: pointer;
  height: 18px;
}

.button:hover,
.button:focus {
  border-color: var(--BenWard-linkColor);
}

/** Section: Legacy comments */
#comments h2 {
  font-size: 100%;
}
#comments .about-comments {
  font-size: 80%;
}
#comments > ol {
  margin: 0; padding: 0;
}
#comments > ol > li {
  margin: 0 0 16px 0;
  list-style: none;
}
#comments .hentry {
  position: relative;
  padding-left: 30px;
}
#comments .hentry .photo {
  position: absolute;
  top: 0; left: 0;
  width: 50px; height: 50px;
}

/** Section: Narrow */
@media (max-width: 420px) {
  body { margin: 0; }
  header,
  footer,
  body > article,
  body > section { padding: 16px; }
  header { padding: 32px 16px; }
  .cover { margin: -16px -16px 16px -16px; }
  .cover p { padding: 8px 16px; }
  article .full-bleed { margin: 0 -16px; }
  article .pull-left { margin: 0 8px 0 -16px; }
  article .pull-right { margin: 0 -16px 0 8px; }
  section.hfeed header,
  article header,
  section.hfeed footer,
  article footer {
    margin: 16px -16px -16px -16px;
    padding: 0 16px;
  }
  section.hfeed header,
  article header { margin: -16px -16px 16px -16px; }
  section.hfeed nav a,
  article.hentry nav a { font-size: 80%; }
  article > aside { margin-left: -8px; }
}
