/*
 *
 * Global Variables
 *
 *  - borrowed from hylia.website
 */
:root {
  --color-primary: #173854;
  --color-primary-shade: #102538;
  --color-primary-glare: #22547c;
  --color-highlight: #fedb8b;
  --color-light: #ffffff;
  --color-mid: #cccccc;
  --color-dark: #333333;
  --color-slate: #404040;
  --color-mode: "light";
  --color-bg: #ffffff;
  --color-bg-glare: #ffffff;
  --color-text: #333333;
  --color-text-glare: #333333;
  --color-selection-text: #ffffff;
  --color-selection-bg: #333333;
  --color-stroke: #cccccc;
  --color-action-bg: #173854;
  --color-action-text: #ffffff;
  --color-theme-primary: #173854;
  --color-theme-primary-glare: #22547c;
  --color-theme-highlight: #fedb8b;
  --color-theme-highlight-block: #fedb8b;

  --flow-space: 1rem;

  --blur-radius: 12px;
  --animation-length: 0.3s;
}

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

/*
 *
 * Page layout
 *
 */
body {
  height: 100%;
  box-sizing: border-box;
  padding: 1em;
  display: flex;
  flex-direction: column;
  
  display: grid;
  grid-gap: 0em;

  grid-template-columns: auto;
  grid-template-areas:
    "header sidebar"
    "content content"
    "footer footer";
}

@media(min-width: 48rem) {

  body {
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;

    grid-template-columns: auto 200px;
    /*grid-template-areas:
      "header sidebar"
      "content content"
      "footer footer";*/
  }

}

body > header {
  grid-area: header;
  text-align: center;
}

body > aside {
  grid-area: sidebar;
  justify-self: end;
}

body > main {
  grid-area: content;
  overflow-x: auto;
}

body > footer {
  grid-area: footer;
  margin-top:5rem;
}

/*
 *
 * Text sizing and colours
 *
 */
@font-face {
  font-family: 'Raleway', sans-serif;
  font-style: normal;
  font-weight: 300;}

body {
  line-height: 1.56;
  font-family: 'Raleway', sans-serif;
  color: var(--color-text);
}

main {
  font-smooth: always;
  font-size: 1.25rem;
  font-weight: 400;
}
strong{
  font-weight: 600;
}
a {
  color: var(--color-primary);
}

h1, h2 {
  font-weight: 500;
}

article > *+* {
  margin-top: var(--flow-space);
}

article > header > time {
  display: block;
  margin: 0 0 1em;
  font-size: 1rem;
}

article > header > h2 {
  display: block;
  margin: 0 0;
}

article.comment {
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2rem;
}

aside {
  display: flex;
  justify-content: space-between;
}
aside > nav{
  margin-top:4rem;
}
aside > nav > ul {
  font-weight: 400;
  font-size: 1rem;
  text-decoration-skip-ink: auto;
  cursor: pointer;

  list-style: none;
  padding-left: 0;

  display: flex;
  align-items: center;
}

aside > nav > ul > li {
  padding-right: 1rem;
  flex-shrink: 0;
}

aside > nav > ul a:not(:hover),
header a:not(:hover) {
  text-decoration: none;
}
a:hover{
    background-image: linear-gradient(90deg, #F79533 0%, #F37055 15%, #EF4E7B 30%, #A166AB 44%, #5073B8 58%, #1098AD 72%, #07B39B 86%, #6DBA82 100%);
    background-size: cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.skipLink {
  text-decoration: none;
}



/*@media(min-width: 48rem) {

  aside {
    display: block;
    padding-left: 1rem;
  }

  aside > nav > ul {
    display: block;

    line-height: 2.3rem;
    font-size: 1.35rem;

    list-style: none;
    padding-left: 0;
  }

  .skipLink {
    display: block;
  }
}*/

/* Aspect ratio, per:
    https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again/
 */
main article > picture,
main article > picture > img,
main article > figure > picture > img,
main article > img,
.gallery img {
  width: 100%;
  height: auto;
}

main article > figure > figcaption {
  text-align: center;
}

div.gallery {
  padding: 0;
}

figure.piece {
  margin-bottom: 6rem;
  margin-left: 0;
  margin-right: 0;
  width: 100%;

}

figure.piece > figcaption {
  text-align: right;
  font-size: 0.8rem;
}

.gallery .smallnote {
  text-align: center;
  font-size: 1rem;
  width: 90%;
}

/*
 *
 * Blurry image preview utilities.
 *
 */
@keyframes unblur {
  0% {
    filter: blur(var(--blur-radius));
  }

  100% {
    filter: blur(0);
  }
}

img.loaded {
  animation: unblur var(--animation-length) ease-out forwards;
  will-change: filter;
}

img.unloaded {
  filter: blur(var(--blur-radius));
  will-change: filter;
}


/*
 *
 * Overrides for plugin styling and legacy WP positioning
 *
 */
.tweet-body {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

article{
  margin-bottom:3em;
}

article > .aligncenter {
  display: block;
  margin: 0 auto;
}

/* TODO(slightlyoff): rework w/ variables */
article > blockquote:not(.tweet-card) {
  border: none;
  border: 1px solid #dbd9e6;
  background-color: #e4f1ff;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding: 0.1em 1.5em 0.1em 1.5em;
  font-size: 1em;
  font-style: italic;
  border-radius: 4px;
  background: linear-gradient(to bottom, #eeecfa, #d3d7f1);
}

p.cc {
  font-size:0.8rem;
}

header h1 {
  text-align:left;
}

header img {
  --blur-radius: 2px;
  --animation-length: 0s;
}

blockquote {
  font-style: italic;
}

