html,
body {
  margin: 0;
  font-family: "Noto Sans KR";
  overflow-x: hidden;
  display: block;
  font-size: 17px;
  text-size-adjust: 100%;
  color: #3c3c3c;
}

/* (TODO) Move these css to different file. */

img {
  max-width: 100%;
  margin: 0 0 1rem;
  border-radius: 1px;
}

pre {
  margin-top: 0;
}

/* Header */

.top-static-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
  margin-left: 0px;
  z-index: 9999;
}

.top-static-header-row {
  height: 48px;
  display: flex;
  padding: 0 24px 0 24px;
}

.top-static-header-main {
  border-bottom: 1px solid #bdbdbd;
}

.modoocode-name {
  font-size: 22.5px;
  font-weight: bold;
  margin-top: 6px;
  margin-bottom: 6px;
  margin-left: 15px;
}

.modoocode-name a {
  color: #505050;
}

/* Category */

.header-category {
  width: 100%;
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

.header-category-list {
  list-style-type: none;
  display: block;
  width: 100%;
  padding: 0 0 3px 0;
  margin: 0;
}

.category-item {
  display: inline-flex;
  align-items: center;
  margin: 0;
  height: 100%;
  font-size: 17px;
  color: rgb(117, 117, 117);
  position: relative;
}

.category-item-link {
  padding: 0 24px 0 24px;
  text-decoration: none;
  color: inherit;
  height: 100%;
  margin-top: 20px;
}

.category-item:hover {
  color: #212121;
  font-weight: bold;
  cursor: pointer;
}

.category-item-active {
  border-bottom: 3px solid black;
  color: black;
  font-weight: bold;
}

.header-category-dropdown {
  display: none;
  position: absolute;
  top: 45px;
  background: white;
  border-bottom: 1px solid #bdbdbd;
  z-index: 1;
  padding-top: 3px;
  padding-left: 0px;
  -moz-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.14);
  -webkit-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.14);
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.14);
}

.category-item:hover > .header-category-dropdown,
.header-category-dropdown:hover {
  display: block;
}

.header-category-dropdown-item {
  list-style: none;
  font-weight: normal;
  padding: 5px 20px 5px 10px;
  border-top: 1px solid #bdbdbd;
  font-family: monospace;
}

.header-category-dropdown .category-item-link {
  padding: 0;
}

.header-category-dropdown-item:hover {
  background-color: #eaeaea;
}

/* Google Custom Search */

.google-custom-search {
  margin-left: auto;
}

.google-custom-search .gsc-control-cse {
  padding: 10px !important;
  background-color: transparent !important;
  border: none !important;
}

.google-custom-search .gsc-control-cse button.gsc-search-button {
  padding: 6px 13px 6px 13px !important;
}

@media (max-width: 474px) {
  .google-custom-search {
    display: none;
  }
}

/* Top Login Button & Account image */

.login-button-div {
  padding-top: 10px;
  padding-bottom: 10px;
  margin-left: 10px;
}

.login-button {
  font-size: 15px;
  border: none;
  background-color: transparent;
  color: #4d90fe;
  cursor: pointer;
}

.top-bar-account-icon {
  height: 100%;
  width: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Outline */

.main-wrap {
}

/* Sidebar */

.sidebar-wrap {
  z-index: 100; /* Keep it above articles */
  top: 0;
  margin-top: 96px;
  position: fixed;
  height: 100%;
  /* Modify category-content when this is modified. */
  width: max(256px, 20vw);
  float: left;
}

@media (max-width: 1300px) {
  .sidebar-wrap {
    display: none;
  }
}

div.sidebar-box-header {
  font-size: 110%;
  color: #505050;
  margin: 0 0 10px 10px;
  border: none;
}

/* Right sidebar */
@media (max-width: 1453px) {
  .sidenote {
    font-size: smaller;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #5e6973;
    margin-bottom: 10px;
  }
}

@media (min-width: 1454px) {
  .sidenote {
    position: absolute;
    left: calc((780px + 100vw) / 2) !important;
    width: 288px;
    font-size: smaller;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #5e6973;
  }
}

/* Category Sidebar */
.sidebar-categories a:hover {
  font-weight: bold;
}

div.sidebar-category-header {
  font-size: 110%;
  color: #505050;
  margin: 0 0 10px 10px;
  border: none;
}

ul.sidebar-category-list {
  padding-left: 15px;
  margin: 0px;
}

li.sidebar-category-elem {
  list-style-type: none;
  margin-bottom: 10px;
}
li.sidebar-category-elem:last-child {
  list-style-type: none;
  margin-bottom: 0;
}

li.current-article-sidebar-elem {
  font-weight: bold;
}

li.current-article-sidebar-elem::before {
  content: " →  ";
}

div.sidebar-show-more {
  text-align: center;
  padding: 10px;
}
div.sidebar-show-more:hover {
  cursor: pointer;
  background-color: #eee;
}

div.sidebar-show-more p {
  font-size: small;
  margin: 0;
}
div.sidebar-show-more a {
  padding: 0;
}

div.show-more-above {
  text-align: center;
}

/* TOC */

div.toc-header {
  font-size: 110%;
  color: #505050;
  margin: 0 0 10px 10px;
  border: none;
}

.sidebar-box {
  margin-left: 15px;
  padding: 10px;
  background-color: #fbfbfc;
  margin-top: 20px;
}

.toc-container {
  margin-top: 20px;
}

.toc-container > .toc-list {
  position: relative;
  overflow: hidden;
}

.toc-list {
  padding-left: 13px;
  margin: 0;
}

.toc-list-item {
  list-style: none;
  padding-bottom: 5px;
  line-height: 29px;
}

.toc-item-link {
  text-decoration: none;
  color: black;
  height: 100%;
  cursor: pointer;
}

.toc-item-link::before {
  background-color: #eee;
  content: " ";
  display: inline-block;
  left: 0;
  margin-top: -1px;
  position: absolute;
  width: 3px;
  height: inherit;
}

.toc-active-item::before {
  background-color: #54bc4b !important;
}

.toc-item-link:hover {
  font-weight: bold;
}

.toc-item-link:hover:before {
  background-color: #54bc4b;
}

/* Article */

.article-content-wrap {
  position: absolute;
  height: 100%;
  width: 100%;

  margin-top: 96px; /* For the top bar. */

  display: flex;
  flex-direction: column;
  align-items: center;
}

.article-content-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.article-content-header h2 {
  margin-bottom: 10px;
}

.article-content-header h2 a {
  color: #505050;
  padding: 0;
}

.article-content-header small {
  color: #737373;
  font-size: 70%;
  font-weight: 400;
}

.article-content {
  max-width: 45em;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
}

.anchor-offset:target {
  padding-top: 105px;
  display: block;
}

/* Page.css */

code {
  margin: 0.25em 0.2em;
  padding-left: 5px;
  padding-right: 5px;
  font-size: 95%;
  background-color: #f9f9f9;
  color: #bf616a;
  border-radius: 3px;
}
code,
pre {
  font-family: "Source Code Pro", Menlo, Monaco, "Courier New", monospace;
}

a.link-code {
  font-family: "Source Code Pro";
  color: #0645ad;
  font-size: 95%;
}
a {
  color: #268bd2;
  text-decoration: none;
  padding-right: 5px;
  padding-left: 5px;
}

.chroma {
  font-family: "Source Code Pro", "Noto Sans KR", monospace;
  font-size: 13px;
  line-height: 20px;
  border: 1px solid black;
  background: #2d2a2e;
  color: white;
  overflow-x: auto !important;
  word-wrap: normal;
  white-space: pre;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
  background-color: #f9f9f9;
}

.article-content table {
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-collapse: collapse;
}
.article-content td,
th {
  padding: 0.25rem 0.5rem;
  border: 1px solid #e5e5e5;
}
.article-content tbody tr:nth-child(even) td,
.article-content tbody tr:nth-child(even) th {
  background-color: #f9f9f9;
}

/* For category article */

.category-article-header {
  font-size: 20px;
}

.category-content-wrap {
  width: inherit !important;
}

.category-content {
  /* Modify this when sidebar-wrap is modified. */
  margin-left: max(276px, 23vw);
}

@media (max-width: 1300px) {
  .category-content {
    margin-left: 10vw;
  }
}

a.category-article-header {
  text-decoration: none;
}

a:hover.category-article-header {
  text-decoration: underline;
}

.category-article-info {
  font-size: 12px;
  margin-bottom: 0;
}

.category-article-info > span {
  margin-right: 3px;
  color: #4c4c4c;
}

.category-article-info > .publish-date {
  padding-right: 3px;
}

.child-category-header {
  font-size: 1.5rem;
}

.child-category-article-listing {
  padding-left: 10px;
}

/* Search box */

.search-box {
  margin: 1em;
  border: 2px solid #dedede;
  padding-left: 1rem;
}

.search-bar-text {
  margin-top: 10px;
  font-size: 120%;
  font-weight: bolder;
}

/* Comment */
.comment-post-section .manual {
  margin-left: 50px;
}

.comment-post-section .small-comment {
  margin-top: 5px;
  margin-bottom: 5px;
}

.comment-textarea {
  margin-top: 3px;
  height: 80%;
  width: 100%;
  border: 2px solid #dedede;
  border-radius: 3px;
  padding: 8px 0 5px 10px;
  resize: none;
  font-size: 17px;
  box-sizing: border-box;
}

@media (max-width: 587px) {
  .login-box {
    margin-left: 12%;
    margin-top: 25px;
    flex-direction: column;
  }
}

@media (min-width: 588px) {
  .login-box {
    margin-left: 12%;
    margin-top: 25px;
  }
}

/* Block quote */
blockquote {
  padding: 0.5rem 1rem;
  margin: 0.8rem 0;
  color: #000000;
  border-left: 0.25rem solid #e5e5e5;
}
blockquote p:last-child {
  margin-bottom: 0;
}
@media (min-width: 30em) {
  blockquote {
    padding-right: 5rem;
    padding-left: 1.25rem;
  }
}
