:root {
  --body-max-width: 720px;
  /* Base Theme Colors */
  --white-dark: #6c6a6a;
  --grey: #bbcec8;
  --grey-light: #52615c;
  --code: #52576f;
  --pre: #e1e7ee;
  --bg: rgb(229, 238, 232);
  --text: #0c140f;
  --link: #009471;
  --link-hover: #04a882;
  --link-visited: #0b5241;
  --blockquote: #005cc5;
  --blockquote-bg: #cfe0f4;
  --hover: #c11e7a;
  --shadow: #e8e8e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --white-dark: #e8e8e8;
    --grey: #303a36;
    --grey-light: #869c93;
    --code: #414558;
    --pre: #252525;
    --bg: rgb(21, 24, 22);
    --text: #f2f2f2;
    --link: #05ce9f;
    --link-hover: #40face;
    --link-visited: #027a5e;
    --blockquote: #bd93f9;
    --blockquote-bg: #353548;
    --hover: #ff80bf;
    --shadow: #252525;
  }
}

/* Reset & Base Styles */
*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.3;
  font-family: "JetBrains Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
}

body {
  max-width: var(--body-max-width, 720px);
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
.layout-default {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

a:hover,
a:visited:hover {
  color: var(--link-hover);
}

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

/* Header & Footer */
header {
  margin: 1rem auto;
}

header nav {
  margin-top: 1rem;
}

header hr {
  margin: 1rem 0;
  height: 2px;
  background: var(--grey);
  border: 0;
}

footer {
  color: var(--text);
}

/* Article & Content */
article {
  margin-bottom: 0.5rem;
}



/* Home Template Styles */
.home-header {
  text-align: center;
  margin: 1rem auto;
}

.home-title {
  font-size: 1.9rem;
  line-height: 1.15;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.home-description {
  display: block;
  margin-bottom: 1rem;
}

.home-nav {
  margin-top: 1rem;
}

.nav-link {
  font-size: 1.35rem;
  font-weight: bold;
}

.home-main {
  margin-top: 1rem;
}

.divider {
  margin: 1rem auto;
  height: 2px;
  background: var(--grey);
  border: 0;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-date {
  color: var(--grey-light);
  width: 140px;
}

.post-item {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.post-item-content {
  display: flex;
  align-items: center;
}

.post-item-date {
  color: var(--grey-light);
  font-size: 1.1rem;
  width: 140px;
  margin-right: 1rem;
}

.post-item-title {
  font-size: 1.15rem;
  flex: 1;
  margin: 0;
}

.home-footer {
  padding-bottom: 2rem;
}

/* Post Template Styles */
.post-header {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-title {
  font-size: 1.9rem;
  line-height: 1.15;
  font-weight: bold;
  margin-bottom: 1rem;
}

.post-meta {
  font-weight: bold;
  margin: 0;
  margin-bottom: 1rem;
}


.post-separator {
  margin: 0 0.5rem;
}

.post-home-link:hover {
  color: var(--link-hover);
}

.post-divider {
  margin: 1rem 0;
  height: 2px;
  background: var(--grey);
  border: 0;
}

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

.post-content {
  line-height: 1.35;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  padding: 0;
  margin: 1.5rem 0 0.9rem 0;
  font-weight: bold;
}

.post-content h1 { 
  font-size: 1.6rem;
  line-height: 1.15;
  border-bottom: 2px solid var(--grey);
  padding-bottom: 0.7rem;
}

.post-content h2 { 
  font-size: 1.3rem;
  line-height: 1.15;
}

.post-content h3 { 
  font-size: 1.2rem;
}

.post-content h4 { 
  font-size: 1rem;
}

.post-content p {
  margin-bottom: 20px;
  font-weight: 300;
  font-style: light;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
}



.post-tags {
  margin-top: 2rem;
  font-size: 0.875rem;
}

.post-tag {
  display: inline-block;
  background: var(--grey-light);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  margin: 0.25rem 0.5rem 0.25rem 0;
  border-radius: 4px;
  font-size: 0.8rem;
}

.post-footer {
  margin-top: 2rem;
  padding-bottom: 2rem;
}


.footer-updated {
  font-size: 0.875rem;
  margin-top: 1rem;
}

.update-date {
  color: var(--grey-light);
}


hr {
  color: inherit;
  border: 0;
  margin: 0;
  height: 2px;
  background: var(--grey);
  margin: 1rem auto;
  text-align: center;
  width: 100%;
}


/* JavaScript enhancement - only apply when JS is available */
.js img {
  cursor: zoom-in;
}

.zoom-copy {
  position: fixed;
  z-index: 1000;
  transition: transform 0.25s ease-in-out;
  transform-origin: 50% 50%;
  will-change: transform;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  max-height: 95vh;
  max-width: 95vw;
  width: auto;
  height: auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Adjustments */
@media only screen and (max-width: 40em) {
  body {
    padding: 0 1rem;
  }
  
  header {
    margin: 0;
  }
  
  .flex-collapse {
    flex-direction: column;
  }
}
