:root {
  /* 
    Colors
  */

  --bg-1: #ffffff;
  --bg-2: #fff4bf;
  --bg-3: #e0c438;
  --bg-4: #fffbe8;
  --text-1: #404040;
  --text-2: #606060;
  --text-3: #040404;
  --text-link: #407fff;
  --shadow-light: #fbfbfb;
  --shadow-med: #e8e8e8;
  --shadow: #afafaf;
  --acc-1: #9ea6ff;
  --acc-2: #9efff7;
  --acc-3: #ffe79e;
  --acc-4: #ff9ecf;
  --acc-5: #a6ff9e;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0 1em;
}

body {
  font-family: "Helvetica", Arial, sans-serif;
  margin: 1em auto;
  max-width: 800px;
  background-color: var(--bg-1);
  color: var(--text-1);
  font-size: 1.2rem;
  line-height: 1.6rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-1);
}

h1 {
  line-height: 3rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.4rem;
}

h4 {
  font-size: 1.25rem;
  margin-block-start: 2rem;
  margin-block-end: 0.5rem;
}

h5 {
  font-size: 1.125rem;
  margin-block-start: 2rem;
  margin-block-end: 0.5rem;
}

h6 {
  font-size: 1rem;
  margin-block-start: 2rem;
  margin-block-end: 0.5rem;
}

hgroup > * {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

hgroup > *:first-child {
  margin-top: 1em;
}

hgroup > *:last-child {
  margin-bottom: 1em;
}

a {
  color: var(--text-link);
}

.post article {
  font-family: Georgia, serif;
}

.post article h1,
.post article h2,
.post article h3,
.post article h4,
.post article h5,
.post article h6 {
  font-family: "Helvetica", Arial, sans-serif;
}

.post hr {
  border: none;
  border-top: 3px double var(--acc-2);
  margin: 2rem 30px;
  overflow: visible;
  text-align: center;
  height: 5px;
}

.post hr:after {
  background: var(--bg-1);
  content: "🪁";
  padding: 0 4px;
  position: relative;
  top: -0.75rem;
  border-radius: 2rem;
  height: 2rem;
  display: inline-block;
}

.post figure img {
  width: 100%;
}

dialog {
  background-color: var(--bg-4);
  border-color: var(--text-1);
}

details {
  border: 1px solid var(--text-2);
  margin: 1rem 0;

  border-radius: 2px;
}

summary {
  background-color: var(--bg-4);
}

details > * {
  padding: 2px 5px 0px;
}

details > div {
  border-top: 1px solid var(--text-1);
}

#site-title {
  margin: 1rem 0;
}

#site-title a {
  color: var(--text-1);
  text-decoration: none;
}

h3.post-title {
  margin-top: 0.25rem;
}

.post-header-image img {
  max-height: 400px;
  position: relative;
  top: 3px;
  left: 3px;
  box-shadow: -3px -3px 6px 0px var(--acc-2);
  border-radius: 3px;
}

ul.menu,
ul.post-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

ul.menu > li {
  margin: 0.25rem 0;
  padding-left: 0.5rem;
  position: relative;
}

ul.menu > li:hover {
  border-left-width: 16px;
  left: -12px;
  background-color: var(--shadow-light);
}

ul.menu > li:active {
  border-left-width: 32px;
  left: -28px;
  background-color: var(--shadow-light);
}

ul.menu > li > a {
  /* background-color: orange; */
  width: 100%;
  display: inline-block;
}

.menu-about {
  border-left: 4px solid var(--acc-1);
}

.menu-blog {
  border-left: 4px solid var(--acc-2);
}

.menu-portfolio {
  border-left: 4px solid var(--acc-3);
}

.menu-now {
  border-left: 4px solid var(--acc-4);
}

.menu-links {
  border-left: 4px solid var(--acc-5);
}

address.no-decoration-address {
  font-style: normal;
}

.project-header .cover {
  text-align: center;
}

.project-header .cover img {
  max-height: 400px;
  position: relative;
  top: 3px;
  left: 3px;
  box-shadow: -3px -3px 6px 2px var(--acc-3);
}

.project dl dt,
.project dl dd {
  display: inline-block;
  margin: 0;
}

.projhrect dl div {
  margin: 0.25rem;
}

.project dl.links dt::after {
  content: ": ";
}

.project-tag-list {
  padding: 0;
}

.project-tag-list li {
  display: inline-block;
  border: 1px solid var(--text-2);
  margin: 3px 3px 3px 0;
  padding: 2px 5px;
  border-radius: 3px;
}

.project-tag-list li a {
  color: var(--text-1);
  text-decoration: none;
}

.project-tag-list li a:hover {
  color: var(--text-3);
  text-decoration: underline;
}

blockquote.project-note {
  border-left: 4px solid var(--acc-3);
  border-radius: 2px;
  margin-left: 1rem;
  box-shadow: -3px -3px 9px 0px var(--shadow);
}

ul.project-images {
  margin: 2rem 0;
  padding: 0;
  list-style-type: none;
}

ul.menu a img {
  max-width: 100%;
}

pre {
  white-space: pre-wrap;
}

pre {
  padding: 10px;
  border-radius: 5px;
}

figure.no-padding-figure > pre {
  margin: 0;
}

code,
samp {
  background-color: var(--bg-2);
  padding: 2px 4px;
  font-size: 0.9375rem;
}

code.code-regular {
  background-color: transparent;
  padding: 0;
}

portal {
  display: block;
  width: 400px;
  height: 300px;
  border: 1px solid black;
}

.fake-code {
  background-color: var(--bg-2);
  padding: 10px;
  border-radius: 5px;
}

.data {
  max-height: 20em;
  overflow-y: scroll;
}

.table-wrapper {
  overflow-x: scroll;
  max-width: 100%;
}

th,
td {
  border: 1px solid var(--acc-1);
}

figure {
  margin: 0;
  background-color: var(--shadow-light);
  padding: 0.5rem;
  border: 1px solid var(--shadow-med);
  border-radius: 3px;
}

figure.blockquote-figure {
  border: none;
  background-color: #00000000;
}

figure.figure-with-outline {
  border: 1px solid var(--shadow);
  border-radius: 5px;
  padding: 10px;
}

figure.no-padding-figure {
  padding: 0;
}

figure p {
  margin: 0;
}

figcaption {
  font-size: 1rem;
}

blockquote {
  background-color: var(--bg-1);
  padding: 1rem 1.5rem;
  border: 1px solid var(--acc-1);
  border-radius: 5px;
}

blockquote > h4 {
  margin: 0 0 0.5rem;
}

blockquote > p {
  margin: 10px;
}

p.s img {
  display: block;
  max-width: 100%;
}

.special-message {
  padding: 1em;
  border: 2px solid red;
}

h2.page-header a {
  text-decoration: none;
  color: var(--text-1);
}

h2.page-header a:hover {
  text-decoration: underline;
  color: var(--text-3);
}

.blob,
.post,
.project {
  margin: 1em 0 f;
  max-width: 100%;
}

.blob img,
.post img,
.project img,
.blob figure,
.post figure,
.project figure,
.post iframe,
.post video,
.post embed,
.post object,
.post portal {
  max-width: 100%;
  height: auto;
}

.post .footnotes li {
  padding: 3px;
  border: 2px solid #00000000;
}

.blob img,
ul.project-images img {
  max-height: 400px;
}

ul.project-images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

ul.project-images li {
  flex-basis: Calc(50% - 5px);
  padding: 0.75rem;
  box-shadow: -3px -3px 9px 0px var(--shadow);
  border-radius: 3px;
  display: flex;
  justify-content: center;
}

.cover img {
  border-radius: 3px;
}

#about .blob,
.post,
.project,
#now .section,
#links .section,
#error-404 .blob {
  box-shadow: -3px -3px 9px 0px var(--shadow);
  padding: 0 1.5rem 1rem;
  margin-bottom: 2rem;
  border-radius: 6px 0 0 0;
}

#about .blob {
  border-top: 3px solid var(--acc-1);
  border-left: 3px solid var(--acc-1);
}

.post {
  border-top: 3px solid var(--acc-2);
  border-left: 3px solid var(--acc-2);
}

.project {
  border-top: 3px solid var(--acc-3);
  border-left: 3px solid var(--acc-3);
}

#now .section {
  border-top: 3px solid var(--acc-4);
  border-left: 3px solid var(--acc-4);
}

#links .section {
  border-top: 3px solid var(--acc-5);
  border-left: 3px solid var(--acc-5);
}

#error-404 .blob {
  border-top: 3px solid var(--text-2);
  border-left: 3px solid var(--text-2);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.post-date {
  font-size: 1rem;
  line-height: 1rem;
  margin-top: 1.5rem;
}

.editors-note-header {
  margin: 0.25rem 0;
}

blockquote.editors-note {
  margin: 1rem 1rem 2rem;
  border-left: 4px solid var(--acc-2);
  box-shadow: -3px -3px 9px 0px var(--shadow);
}

.editors-note {
  margin-top: 0;
}

.social-post {
  font-style: italic;
}

.long-link {
  word-break: break-all;
  font-size: 1rem;
  line-height: 1.1rem;
}

.tag {
  padding: 0.5rem;
  border-radius: 3px;
  display: inline-block;
}

.tag a {
  color: var(--text-1);
  text-decoration: none;
}

dl.links div:first-child {
  margin-bottom: 0.5rem;
}

kbd {
  border: 1px solid var(--shadow);
  border-radius: 4px;
  padding: 2px 5px;
  display: inline-block;
  text-align: center;
}

del,
del > code {
  background-color: #ffbfcf;
}

ins,
ins > code {
  background-color: #bfffcf;
}

ins::before,
ins::after,
del::before,
del::after {
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

ins::before {
  content: " [insertion start] ";
}

ins::after {
  content: " [insertion end] ";
}

ins::before {
  content: " [deletion start] ";
}

ins::after {
  content: " [deletion end] ";
}

u.u-sp {
  text-decoration: red wavy underline;
}

/* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s */
s::before,
s::after {
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

s::before {
  content: " [start of stricken text] ";
}

s::after {
  content: " [end of stricken text] ";
}

@media (min-width: 800px) {
  .index-item-header {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    align-content: flex-start;
  }

  .index-item-header > p,
  .index-item-header > div {
    flex-basis: 50%;
    margin-top: 0;
  }

  .index-item-header div.full-width {
    flex-basis: 100%;
  }

  .project-header .cover {
    text-align: right;
  }
}

@media (max-width: 600px) {
  html {
    margin: 0 0.5em 0 0.6em;
  }

  h1 {
    font-size: 2.5rem;
    line-height: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .project-header .cover,
  .project-header .project-details {
    width: 100%;
  }

  .project-header .cover {
    margin-bottom: 0.5rem;
  }

  .project-header .project-details {
    margin: 0;
  }

  .post-date {
    margin-top: 1rem;
  }

  #about .blob,
  .post,
  .project,
  #now .section,
  #links .section,
  #error-404 .blob {
    padding: 0 0.5rem 0.5rem;
  }
}
