/* region root */

:root {
  --font-color: #333232;
  --meta-color: #909090;
  --border-color: #d0d0d0;

  --header-background-color: #eeeff1;
  --footer-background-color: #363636;

  --page-header-datetime-meta-color: #a9a9a9;
  --page-header-tag-meta-color: #757575;

  --hljs-background-color: #2e3440;
  --hljs-color: #d8dee9;

  --blockquote-color: #797979;
  --blockquote-border-left-color: #d6dde3;

  --figcaption-color: var(--meta-color);

  --base-font-family: "helvetica neue", arial, sans-serif;
  --menu-font-mamily: 'M PLUS Rounded 1c', sans-serif;
  --code-font-family: "helvetica neue", arial, sans-serif;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--base-font-family);
  color: var(--font-color);
  margin: auto;
  padding: 0;
}

h2 {
  border-left: solid 10px var(--meta-color);
  border-bottom: solid 3px var(--meta-color);
  padding: 0.75rem 1.5rem;
  margin-top: 2em;
}

h3 {
  border-bottom: dashed 1px var(--meta-color);
  margin-top: 1.5em;
}

div#container {
  position: relative;
  min-height: 100%;
}

/* endregion */

/* region main */

.main {
  max-width: 900px;
  margin: auto;
  padding-bottom: 100px;
}

/* region main contents */

.contents {
  padding: 2em;
}

.contents a {
  /* リンク文字の下線はダサいので非表示 */
  text-decoration: none;
}

.contents a:hover {
  color: #ff7043;
}

.contents .img-container {
  /* ページに対して中央ぞろえする */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  /* デフォルトだと figure の margin が大きすぎるので和らげる */
  margin: 1em auto;
}

.contents img {
  max-width: 100%;
}

.contents figcaption {
  /* img との間にちょ～っとだけ間をあける */
  margin-top: 0.5em;

  color: var(--figcaption-color);
  font-size: 95%;
}

.border-img {
  border: 2px solid var(--border-color);
}

.footnotes {
  /* 脚注はちょっと文字を小さくする */
  font-size: 0.8em;
}

/* region contents quote */

.contents blockquote {
  padding: .3em 1.2em;
  margin: 1em;
  border-left: 2px solid var(--blockquote-border-left-color);
  color: var(--blockquote-color);
}

.contents blockquote p {
  margin: 0;
}

.contents blockquote cite {
  display: block;
  color: #a6a6a6;
  font-size: .8em;
  text-align: right;
}

/* endregion */

/* endregion */

/* endregion */

/* region menu */

.header, .footer {
  font-family: var(--menu-font-mamily);
}

/* region menu header */

.header {
  background-color: var(--header-background-color);
  padding-bottom: 0.5em;
}

.header-logo a {
  font-size: 3em;
  font-weight: bold;
  padding: 0.5em 0 0.5em 0;
}

.header-menu a {
  margin: 0 1em 1em 1em;
}

/* endregion menu header */

/* region menu footer */

.footer {
  background-color: var(--footer-background-color);
  text-align: center;

  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100px;
}

/* endregion menu footer */

/* endregion */

/* region Section Index */

.index li {
  border-bottom: 1px dashed;
  border-color: var(--border-color);
  margin: 10px 0 10px 0;
}

.index li a small {
  margin-left: 5px;
}

/* endregion */

/* region Section About */

.about-center-info {
  /* 中央寄せ */
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  /* 上下の余白 */
  margin-bottom: 2em;
}

.about-icon img {
  /* 画像を丸くトリミング */
  border-radius: 50%;
  width: 10em;
  object-fit: cover;

  /* ボーダーを描画 */
  border: 5px solid transparent;

  /* ボーダーを画像からちょっとだけ離れているように見せる */
  box-shadow: 1px 1px 3px 2px var(--border-color);
}

.social-icon {
  /* 子要素を水平方向の中央に配置する */
  display: flex;
  align-items: center;

  /* 画面中央寄りにする */
  justify-content: safe center;
}

.social-icon-item {
  /* アイコンの左右にスペースを空ける */
  margin: 0 0.5em 0 0.5em;
}

.social-icon-item img {
  /* アイコンの画像サイズを揃える */
  width: 2em;
}

/* endregion Section About */

/* region Section Link */

.section-link img {
  /* ボーダーを描画 */
  border: 2px solid var(--footer-background-color);
}

.section-link-item {
  margin-bottom: 2em;
}

/* endregion Section Link */

/* region Section Term */

.terms {
  padding: 0;

  /* 子要素を水平方向の中央に配置する */
  display: flex;
  align-items: center;

  line-height: 1.5;
}

.terms li {
  margin: 0 10px 0 10px;
}

/* endregion Term */

/* region page-header */

.page-header {
  margin-bottom: 3em;
}

.page-metadata {
  /* 子要素を水平方向の中央に配置する */
  display: flex;
  align-items: center;
}

.page-datetime {
  margin-right: 1em;
  color: var(--page-header-datetime-meta-color);
  font-weight: bold;

  /* 上下を揃えるおまじない */
  margin-top: 0.1em;
}

.page-tag {
  background-color: var(--page-header-tag-meta-color);
  border-radius: 100px;
  padding: 5px 15px 4px;
  margin: 0 0.5em 0 0;
  font-size: 0.8em;
}

.page-tag a {
  color: white;
}

.page-tag a:hover {
  color: white;
}

/* endregion page-header */

/* region code */

code {
  background-color: var(--hljs-background-color);
  border-radius: 3px;
  color: var(--hljs-color);
  font-family: var(--code-font-family);
  padding: 0 5px;
}

/* endregion */

/* region flex系 */

.flex-row {
  display: flex; /* 要素は、ブロック要素のように動作しつつ、そのコンテンツをフレックスボックスモデルに従ってレイアウトします。 */
  flex-direction: row; /* 行のテキストの方向に配置 */
}

.flex-column {
  display: flex; /* 要素は、ブロック要素のように動作しつつ、そのコンテンツをフレックスボックスモデルに従ってレイアウトします。 */
  flex-direction: column; /* 積み重なるように配置する */
}

.flex-wrap {
  /* フレックスアイテムは複数行に分割されます */
  flex-wrap: wrap;
}

.flex-space-between {
  /* 各アイテムを均等に配置し, 最初のアイテムは先頭に寄せ、最後のアイテムは末尾に寄せる */
  justify-content: space-between;
}

.flex-space-evenly {
  /* 各アイテムを均等に配置し, 各アイテムの周りに同じ大きさの間隔を置く */
  justify-content: space-evenly;
}

.flex-space-center {
  justify-content: safe center;
}

/* endregion flex系 */

/* region その他Util系 */

.no-padding {
  padding: 0;
}

.list-none {
  list-style: none;
}

.no-decoration a {
  color: black;
  text-decoration: none;
}

.metadata {
  color: var(--meta-color);
}

.not-found {
  font-size: 42px;
  font-weight: bold;
  padding: 100px 0;
  text-align: center;
}

/* endregion その他Util系 */

/* region linkcard */

.link-card {
  border: solid 1px var(--border-color);
  display: flex;
  border-radius: 5px;

  max-height: 10em;

  color: var(--font-color);

  margin-top: 2em;
  margin-bottom: 2em;
}

.link-card:hover {
  opacity: 0.6;
  transition: 0.1s;
}

.link-card-body {
  padding: 12px;
  width: 100%;
}

.link-card-image img {
  max-width: 7em;
  height: 100%;
  border-radius: 5px 0 0 5px;
  object-fit: cover;

  border-right: solid 1px var(--border-color);
}


.link-card-title {
  font-size: 1em;

  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  font-weight: bold;
  margin-bottom: .5em;
}

.link-card-description {
  font-size: .8em;

  color: var(--figcaption-color);
  
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  margin-bottom: .5em;
}

.link-card-hostname {
  font-size: .8em;

  display: flex;
  align-items: center;
  height: 1.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* endregion */

/* region TOC */
/* 参考URL: https://qiita.com/S_SenSq/items/39027868524e7970c12d */

#TableOfContentsContainer {
  padding: 1em;
  border: solid 1px var(--border-color);
  border-radius: 5px;
}

#TableOfContents ul {
  counter-reset: section;
  list-style-type: none;
  margin: 0;
  padding: 0 1em;
}

/* endregion */