:root {
  --header-background: #37474F;
  --header-border-color: #263238;
  --header-color: #fff;

  --description-background: #4f5b62;
  --description-color: var(--header-color);
  --description-slant-height: 20px;

  --head-card-flare: #F4511E;

  --body-background: #cfcfcf;
  --body-dot-colour: var(--header-border-color);

  --card-background: #fff;
  --card-color: #000;

  --body-pattern:
    linear-gradient(90deg, var(--body-background) 20px, transparent 1%) center,
    linear-gradient(var(--body-background) 20px, var(--body-dot-colour) 1%) center,
    var(--body-background);

  --material-shadow-1: 0 01px 03px rgba(0, 0, 0, 0.12), 0 01px 02px rgba(0, 0, 0, 0.24);
  --material-shadow-2: 0 03px 06px rgba(0, 0, 0, 0.16), 0 03px 06px rgba(0, 0, 0, 0.23);
}

body {
  position: relative;
  margin: 0;
  background: var(--body-background, #fff);
  background: var(--body-pattern);
  background-size: 22px 22px;
  font-family: sans-serif;
  overflow-x: hidden;
}

nav.header {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 1;
  height: 50px;
  line-height: 50px;
  color: var(--header-color, #fff);
  background: var(--header-background, #000);
  border-bottom: 1px solid var(--header-border-color, #000);
  box-shadow: var(--header-shadow, var(--material-shadow-1));
}

nav.header .contents {
  display: none;
}

button.menu {
  margin: 11.5px;
  background: transparent;
  border: none;
}

button.menu span {
  display: block;
  width: 35px;
  height: 5px;
  background-color: var(--header-color);
  margin-top: 5px;
}

button.menu span:first-child {
  margin-top: 0px;
}

.slide_navigation nav.draw {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  height: 100vh;
  width: 350px;
  max-width: 80vw;
  background: var(--description-background);
  transform: translateX(-100%);
  transition: transform 150ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.slide_navigation ul.menu {
  margin: 0;
  list-style-type: none;
  padding-left: 0;
}

.slide_navigation ul.menu a {
  display: block;
  text-decoration: none;
  color: var(--description-color);
  padding: 15px 0;
  width: 100%;
  text-align: center;
}

.slide_navigation .backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.slide_navigation:not([inert]) nav.draw {
  transform: translateX(0);
}

.slide_navigation:not([inert]) .backdrop {
  opacity: 1;
  pointer-events: auto;
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 50px;
  background: var(--header-background, #000);
  border-top: 1px solid var(--header-border-color, #000);
  color: var(--header-color);
}

footer .contents {
  display: flex;
  justify-content: space-between;
}

footer .contents a {
  text-decoration: none;
  color: currentColor;
  font-weight: bold;
}

footer .contents a:hover,
footer .contents a:focus {
  text-decoration: underline;
}

header.description {
  position: relative;
  padding: 5px 0;
  background: var(--description-background);
  color: var(--description-color);
  margin-bottom: calc(var(--description-slant-height, 50px) + 0.5em);
}

header.description h1 {
  margin-top: 0px;
}

header.description::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: calc(var(--description-slant-height, 50px) * -1 + 1px);
  border-style: solid;
  border-width: var(--description-slant-height, 50px) 100vw 0 0;
  border-color: var(--description-background) transparent transparent transparent;
}

*.center {
  text-align: center;
}

.profile {
  position: relative;
  margin-top: 1em;
  width: 50vmin;
  height: 50vmin;
  max-width: 256px;
  max-height: 256px;
  border-radius: 50%;
  box-shadow: var(--profile-shadow, var(--material-shadow-2));
  left: 50%;
  transform: translateX(-50%);
}

.contents {
  margin: 0 auto;
  width: calc(100% - 1em);
}

#main_body.contents {
  margin-bottom: 0.5em;
}

.card-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card-group .card {
  min-width: calc(50% - 50px - 1em);
}

#blog.card-group .card {
  min-width: calc(100% - 50px - 1em);
}

.date {
  opacity: 0.6;
}

.anchor {
  position: absolute;
  top: calc((50px + 1em) * -1);
}

.card {
  flex-grow: 1;
  flex-basis: 0;
  margin: 0.5em;
  position: relative;
  border-radius: 2px;
  background: var(--card-background);
  color: var(--card-color);
  box-shadow: var(--card-shadow, var(--material-shadow-1));
  padding: 15px 25px;
}

.head.card {
  border-bottom: solid var(--head-card-flare, #F4511E) 4px;
  border-radius: 2px 2px 0 0;
}

.blog:has(+ .card-group:empty) {
  display: none;
}

.social img {
  display: block;
  margin: 0 auto;
  width: 60px;
  transition: transform 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

#intro a {
  text-decoration: none;
  color: currentColor;
  font-weight: bold;
}

#intro a:hover,
#intro a:focus {
  text-decoration: underline;
}

a.social {
  text-decoration: none;
  color: currentColor;
  transition: box-shadow 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

a.social:hover h3,
a.social:focus h3 {
  text-decoration: underline;
}

a.social h3 {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

a.social:hover,
a.social:focus {
  box-shadow: var(--material-shadow-2);
}

/* Tablet Portrait */
@media only screen and (min-width: 600px) {

  .card-group .card,
  #blog.card-group .card {
    min-width: calc((100% / 3) - 50px - 1em);
  }
}

/* Tablet Landscape */
@media only screen and (min-width: 900px) {
  :root {
    --description-slant-height: 45px;
  }

  .card-group .card,
  #blog.card-group .card {
    min-width: calc(25% - 50px - 1em);
  }
}

/* Desktop */
@media only screen and (min-width: 1200px) {

  a.social:hover img,
  a.social:focus img {
    transform: scale(1.1) rotate(-10deg);
  }

  .profile {
    width: 150px;
    height: 150px;
    border-width: 8px;
  }

  .contents {
    width: 1150px;
  }

  .card-group .card {
    min-width: 200px;
  }

  nav.header .contents {
    display: flex;
    justify-content: space-between;
  }

  nav.header ul.menu {
    margin: 0;
    display: inline-flex;
    text-transform: uppercase;
    list-style-type: none;
    padding-left: 0;
  }

  nav.header ul.menu a {
    text-decoration: none;
    color: var(--header-color);
    margin: 0 6px;
  }

  nav.header ul.menu a:hover,
  nav.header ul.menu a:focus {
    text-decoration: underline;
  }

  button.menu {
    display: none;
  }

  div.splash {
    position: absolute;
    width: 100vw;
    height: 300px;
    bottom: 0;
    background: var(--description-background);
    z-index: -1;
  }

  div.splash::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: calc(-1 * var(--description-slant-height, 50px));
    border-style: solid;
    border-width: 0 0 var(--description-slant-height, 50px) 100vw;
    border-color: transparent transparent var(--description-background) transparent;
  }
}

/* Large Desktop */
@media only screen and (min-width: 1600px) {
  .contents {
    width: 1300px;
  }
}