html[theme='dark-mode'] {
  filter: invert(1) hue-rotate(180deg);
}

body {
  font: normal 15px/1.5em 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #404040;
  line-height: 1.5;
  letter-spacing: 0.008em;
}

a {
  text-decoration: none;
  color: #5badf0;
}

a:hover {
  color: #0366d6;
}

html {
  /* For older browsers */
  overflow-y: scroll;

  /* For modern browsers */
  scrollbar-gutter: stable;
}

/* Image Styling */
.content-center img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;   /* Ensure the image scales within its container */
    max-height: 350px; /* Set the maximum height */
    height: auto;      /* Maintain aspect ratio */
    margin-bottom: 20px; /* Add spacing below image */
}

.image-caption {
    font-size: 0.9em;
    color: #777;
    text-align: center;
    margin-top: 0.5em;
    max-width: 500px; /* Constrain the caption width */
    margin-left: auto;
    margin-right: auto;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Read More Link */
.read-more {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: bold;
    text-align: right;
    display: block;
}

.read-more a {
    color: #5badf0;
    text-decoration: none;
}

.read-more a:hover {
    color: #0366d6;
    text-decoration: underline;
}

/* Title Styling */
.title h1 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 10px 0;
}

/* Tags and Date Container Styling */
.tags-date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.tags a {
    background-color: #f0f0f0;
    color: #333;
    padding: 5px 10px;
    text-decoration: none;
    margin-right: 5px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.date a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}



/* markdown content styles */
blockquote {
  margin-top: 5px;
  margin-bottom: 5px;
  padding-left: 1em;
  margin-left: 0px;
  border-left: 3px solid #eee;
  color: #757575;
}

hr {
  display: block;
  border: none;
  height: 1px;
  margin: 40px auto;
  background: #f0ebeb;
}

table {
  width: 100%;
  margin: 40px 0;
  border-collapse: collapse;
  line-height: 1.5em;
}

th, td {
  text-align: left;
  padding-right: 20px;
  vertical-align: top;
}

table td, td {
  border-spacing: none;
  border-style: solid;
  padding: 10px 15px;
  border-width: 1px 0 0 0;
}
thead th, th {
  text-align: left;
  padding: 10px 15px;
  height: 20px;
  font-size: 13px;
  font-weight: bold;
  color: #444;
  cursor: default;
  white-space: nowrap;
  border: 1px solid #dadadc;
}

tr>td {
  border: 1px solid #dadadc;
}

tr:nth-child(odd)>td {
  background: #fcfcfc;
}

h1 {
    text-align: center;
}
h2 {
    text-align: left;
}
h3 {
  font-weight: 400;
}
p {
  margin-block-start: 1.5em;
  margin-block-end: 1.5em;
}
p,
pre {
  word-break: normal;
  overflow-wrap: anywhere;
}
.markdown-image img {
  max-width: 100%;
}
.anchor { 
  font-size: 100%; 
  visibility: hidden; 
  color:silver;
}
/*h1:hover a, */
h2:hover a,
h3:hover a,
h4:hover a { 
  visibility: visible
}
.highlight pre {
  padding: 7px;
  overflow-x: auto;
}

.highlight {
  max-width: 100%;
  overflow-x: auto;
}
p code {
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
  font-size: inherit;
  background-color: rgba(0, 0, 0, 0.06);
  padding: 0 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px 2px;
  line-height: inherit;
  word-wrap: break-word;
  text-indent: 0;
}
pre code {
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
}


/* navigation */

nav.navigation {
  padding: 20px 20px 0;
  background: #fff;
  background: rgba(255, 255, 255, 0.9);
  margin: 0 auto;
  text-align: right;
  z-index: 100;
}

nav.navigation a {
  top: 8px;
  right: 6px;
  padding: 8px 12px;
  color: #5badf0;
  font-size: 13px;
  line-height: 1.35;
  border-radius: 3px;
}
nav.navigation a:hover {
  color: #0366d6;
}

nav.navigation a.button {
  background: #5badf0;
  color: #fff;
  margin-left: 12px;
}
@media (max-width: 700px) {
  nav.navigation {
    padding: 20px 10px 0 0;
    background: #fff;
    background: rgba(255, 255, 255, 0.9);
    margin: 0 auto;
    text-align: right;
    z-index: 100;
  }
  nav.navigation a {
    top: 8px;
    right: 6px;
    padding: 8px 8px;
    color: #5badf0;
    font-size: 13px;
    line-height: 1.35;
    border-radius: 3px;
  }
}

@media (max-width: 324px) {
  nav.navigation a.button {
    display: none;
  }
}

/* toc */
.toc {
  margin: auto;
  background: #f8f8f8;
  border-radius: 0;
  padding: 10px 7px;
  margin-top: 36px;
}
.toc details summary {
  cursor: zoom-in;
  margin-inline-start: 14px;
  font-weight: 500;
}
.toc details[open] summary {
  cursor: zoom-out;
}
.toc #TableOfContents {
  margin-left: 10px;
}
.toc ul {
  padding-inline-start: 24px;
}

/* comment */
#comment {
  margin-top: 64px;
}

/* footer */
#footer {
  margin-top: 100px;
  margin-bottom: 100px;
  text-align: center;
  color: #bbbbbb;
  font-size: 14px;
}
#footer .copyright {
  margin: 20px auto;
  font-size: 15px;
}
.powerby {
  margin: 20px auto;
  font-size: 13px;
}
#footer .split {
  cursor: pointer;
}
#footer .split:hover path {
  fill: #ff3356;
  transition: 0.7s ease-out;
  cursor: pointer;
}

#social a {
  margin: 0 4px;
}

/* main content */
.main {
  width: 100%;
  margin: 0 auto;
}

/* profile  */

.profile {
  margin: 50px auto 30px auto;
  text-align: center;
}

.profile .avatar {
  display: inline-block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}


.tags a {
    background: #f2f2f2; /* Default background color */
    padding: 4px 7px;
    color: #757575; /* Default text color */
    font-size: 14px;
    margin-right: 3px;
    text-decoration: none;
    border-radius: 3px;
}

.tags a:hover {
    color: #0366d6; /* Hover color */
}

/* Specific tag styles with very light colors */
.tags a.narrative {
    background-color: #f3eaf7; /* Very light lavender */
}

.tags a.article {
    background-color: #ff7f8b;
    color: #fbfbfb !important;
    font-weight: 500;
}

.tags a.article:hover {
    background-color: #a03535;
    color: #fbfbfb !important;
}

.tags a.research {
    background-color: #e8f3fb; /* Very light blue */
}

.tags a.design {
    background-color: #eef7eb; /* Very light mint */
}

.tags a.journal {
    background-color: #eaeff9; /* Very light steel blue */
}

.tags a.tool {
    background-color: #fefbec; /* Very light lemon */
}

.tags a.gamesindustry {
    background-color: #f7eef4; /* Very light orchid */
}

.tags a.ai {
    background-color: #f3f7ea; /* Very light olive */
}

.tags a.playable {
    background-color: #619cd7;
    color: #fbfbfb !important;
    font-weight: 500;
}

.tags a.playable:hover {
    background-color: #507fb8;
    color: #fbfbfb !important;
}


.tags-date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px; /* Adjust as needed */
    min-height: 24px; /* Ensure minimum height to account for no tags */
}

.tags {
    margin-bottom: 0;
}

.date {
    margin-left: auto;
    color: #bbb;
    text-align: right;
}


.profile h1 {
  font-weight: 400;
  letter-spacing: 0px;
  font-size: 20px;
  color: #364e4a;
  margin-bottom: 0;
  margin-top: 0;
}

.profile h2 {
  font-size: 20px;
  font-weight: 300;
  color: #757575;
  margin-top: 0;
}

/* index post list */
#list-page {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 24px;
}

#list-page .item {
  margin: 10px 0;
}

#list-page .title {
  display: inline-block;
  color: #404040;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 10px;
  width: 100%;
}

#list-page .title a {
  color: #404040;
  display: block;
}

#list-page .title a:hover {
  color: #0366d6;
}

#list-page .date {
  width: 28%;
  float: right;
  text-align: right;
  position: relative;
  top: 1px;
  color: #bbb;
}

#list-page .summary {
  color: #757575;
  margin-top: 12px;
  word-break: normal;
  overflow-wrap: anywhere;
  margin-bottom: 36px;
}

#list-page .cover {
  width: 100px;
  height: 100px;
  background: #fff;
}

#list-page .cover img {
  width: 100%;
  text-align: center;
}

#list-page .pagination {
  margin: 48px 0;
  width: 100%;
  height: 32px;
  margin-top: 48px;
}

#list-page .pagination .pre {
  float: left;
}
#list-page .pagination .next {
  float: right;
}

#notes-page {
  margin-top: 30px; /* adjust as needed */
}

/* Sketchbook (formerly Notes) grid layout */
#notes-page #list-page.sketchbook-grid {
  /* Maximum 3 columns of 350px items with 50px gutter */
  max-width: 1200px; /* 3 * 350px + 2 * 50px gaps + 16px padding = 1216px, rounded to 1200px */
  margin: 0 auto;
  padding: 0 8px; /* minimal outer padding to favor 2 columns */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
  column-gap: 50px; /* requested column spacing */
  row-gap: 0;       /* no vertical spacing between items */
  justify-content: center;
}

#notes-page #list-page.sketchbook-grid .item {
  max-width: 350px; /* clamp item cell to 350px */
  width: 100%;      /* follow column width (300–350px) */
  margin: 0; /* grid handles spacing */
}

/* In grid, use width-based constraint and keep aspect ratio */
#notes-page #list-page.sketchbook-grid .content-center img {
  width: 100%;       /* fill the item column width */
  height: auto;      /* maintain aspect ratio */
  max-width: 350px;  /* width cap instead of height */
  max-height: none;  /* ensure height isn't capped in grid */
}

/* Date at top of each item, tight to image */
#notes-page #list-page.sketchbook-grid .date-top {
  text-align: right;
  color: #bbb;
  font-size: 0.9rem;
  margin: 0; /* no margins as requested */
}

/* Summary text alignment within grid items */
#notes-page #list-page.sketchbook-grid .summary-text {
  text-align: left;
}

/* Pagination styling for sketchbook grid */
#notes-page #list-page.sketchbook-grid .pagination {
  grid-column: 1 / -1; /* span all columns */
  margin-top: 30px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#notes-page #list-page.sketchbook-grid .pagination .prev {
  text-align: left;
}

#notes-page #list-page.sketchbook-grid .pagination .next {
  text-align: right;
  margin-left: auto;
}

/* single page */
#single {
  max-width: 680px;
  margin: 60px auto 0 auto;
  padding: 0 64px;
}

#single .title {
  text-align: center;
  font-size: 32px;
  font-weight: 400;
  line-height: 48px;
}

@media (max-width: 700px) {
  #single {
    padding: 0 18px;
    margin: 20px auto 0 auto;
  }
  #single .title {
    font-size: 24px;
    line-height: 32px;
  }
}

#single .tip {
  text-align: center;
  color: #8c8c8c;
  margin-top: 18px;
  font-size: 14px;
}
#single .tip .split {
  margin: 0 4px;
}

#single .content {
  margin-top: 36px;
}

#single .tags {
  margin-top: 24px;
}
#single .tags a {
  background: #f2f2f2;
  padding: 4px 7px;
  color: #757575;
  font-size: 14px;
  margin-right: 3px;
}
#single .tags a:hover {
  color: #0366d6;
}


#archive {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 24px;
}

#archive .total {
  font-size: 15px;
}

#archive .group {
  margin: 24px auto; 
}
#archive .group .key {
  font-size: 20px;
  margin-bottom: 12px;
}
#archive .group .value {
  display: block;
  font-size: 16px;
  margin-bottom: 12px;
}
#archive .group .value .date {
  display: inline-block;
  color: #999;
  min-width: 60px;
  margin-right: 10px;
}
#archive .group .value .title {
  display: inline;
}
#archive .group .value .title a {
  color:#404040;
}
#archive .group .value .title a:hover {
  color: #0366d6;
}
#archive .group .value .tags {
  display: inline;
  margin-left: 7px;
}
#archive .group .value .tags a {
  background: #f2f2f2;
  padding: 4px 7px;
  color: #999;
  font-size: 14px;
  margin-right: 3px;
}
#archive .group .value .tags a:hover {
  color: #0366d6;
}

/* taxonomy */
#tags {
  max-width: 700px;
  margin: 48px auto 0 auto;
  padding: 0 12px;
  text-align: center;
}
#tags .tag {
  display: inline-block;
  margin: 7px 7px;
}
@media (max-width: 700px) {
  #tags {
    margin: 0 auto 0 auto;
  }
  #tags .tag {
    display: inline-block;
    margin: 4px 5px;
  }
}

#tags .tag a {
  background: #f2f2f2;
  padding: 4px 7px;
  color: #404040;
  font-size: 14px;
  margin-right: 3px;
}
#tags .tag a:hover {
  color: #0366d6;
}

/* section page */
#section {
  max-width: 580px;
  margin: 48px auto 0 auto;
  padding: 0 12px;
}

/* 404 page */
#page-404 {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 24px;
}
#page-404 .item {
  margin: 12px 0 0 0;
}

#page-404 .title {
  display: inline-block;
  color: #404040;
  font-size: 15px;
  font-weight: 400;
  margin: 0;
  width: 80%;
}

#page-404 .text {
  text-align: center;
  margin-top: 60px;
}

#page-404 .read-more {
  font-weight: 300;
  font-size: 20px;
  margin-top: 48px;
  margin-bottom: 12px;
}

#page-404 .date {
  width: 20%;
  float: right;
  text-align: right;
  position: relative;
  top: 1px;
  color: #bbb;
}

/* ---- Shortcodes styling ---- */
/* Responsive iframe container */
.iframe-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 1em auto;
}
.iframe-container iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Centered audio block */
.audio-container {
  text-align: center;
  margin: 1.5em auto;
}
.audio-container audio {
  max-width: 100%;
}

/* details/summary styling */
details { margin: 1em 0; }
summary { font-weight: bold; cursor: pointer; }
details summary::after { content: " ▼"; float: right; }
details[open] summary::after { content: " ▲"; }

.summary-text {
    margin-block-start: 0em;
    margin-block-end: 0em;
}

/* Feature page grid layout */
#list-page.feature-grid {
  /* Maximum 3 columns of 350px items with 50px gutter */
  max-width: 1200px; /* 3 * 350px + 2 * 50px gaps + 16px padding = 1216px, rounded to 1200px */
  margin: 0 auto;
  padding: 0 8px; /* minimal outer padding to favor 2 columns */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
  column-gap: 50px; /* requested column spacing */
  row-gap: 30px;    /* some vertical spacing between items */
  justify-content: center;
  position: relative;
}

#list-page.feature-grid .item {
  max-width: 350px; /* clamp item cell to 350px */
  width: 100%;      /* follow column width (300–350px) */
  margin: 0; /* grid handles spacing */
  position: relative;
}

/* Dot divider between items */
#list-page.feature-grid .item::after {
  content: '';
  position: absolute;
  width: 148px;
  height: 1px;
  background-color: #bbb;
  border-radius: 50%;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

/* Hide the post divider in grid layout */
#list-page.feature-grid .post-divider {
  display: none;
}

/* In grid, use width-based constraint and keep aspect ratio */
#list-page.feature-grid .content-center img {
  width: 100%;       /* fill the item column width */
  height: auto;      /* maintain aspect ratio */
  max-width: 350px;  /* width cap instead of height */
}

/* Title styling in grid - fixed 2 lines with ellipsis */
#list-page.feature-grid .item .title {
  margin-bottom: 10px;
  height: calc(1.2rem * 1.4 * 2); /* 2 lines */
  display: flex;
  align-items: center;
}

#list-page.feature-grid .item .title h1 {
  font-size: 1.2rem;
  font-weight: normal;
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  width: 100%;
}

/* Summary text alignment within grid items */
#list-page.feature-grid .summary-text {
  text-align: left;
  margin-top: 10px;
}

/* Tags and date container below title - tags left, date right */
#list-page.feature-grid .tags-date-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  min-height: 24px;
}

#list-page.feature-grid .tags-date-container .date a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.9rem;
}

#list-page.feature-grid .tags-date-container .date a:hover {
  color: #0366d6;
}

/* Pagination styling for grid */
#list-page.feature-grid .pagination {
  grid-column: 1 / -1; /* span all columns */
  margin-top: 30px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#list-page.feature-grid .pagination .prev {
  text-align: left;
}

#list-page.feature-grid .pagination .next {
  text-align: right;
  margin-left: auto;
}
