@import url("monolisa.css");
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

html, body, *, *::before, *::after {
  box-sizing: border-box;
}


@media screen and (max-width: 768px) {
  html, body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    font-size: 16px;
  }
  body {
    padding: 1.2rem 0.5rem;
  }
  article.post {
    padding: 0 0.5rem;
    max-width: 100vw;
  }
  .go-home-link {
    margin: 0.7rem 0 1rem 0;
  }
  article.post h1, article.post h2, article.post h3, article.post h4, article.post h5, article.post h6 {
    font-size: 1.2rem;
  }
    article.post header h1 {
      font-size: 1.8rem !important;
      word-break: normal !important;
      white-space: normal !important;
      hyphens: none !important;
      overflow-wrap: break-word !important;
      line-height: 1.2 !important;
    }
}

@media screen and (max-width: 480px) {
  html, body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    font-size: 15px;
  }
  body {
    padding: 0.7rem 0.2rem;
  }
  .go-home-link {
    font-size: 0.95rem;
    margin: 0.5rem 0 0.7rem 0;
  }
    article.post header h1 {
      font-size: 1.5rem !important;
      word-break: normal !important;
      white-space: normal !important;
      hyphens: none !important;
      overflow-wrap: break-word !important;
      line-height: 1.2 !important;
    }
  article.post h2 {
    font-size: 1.1rem;
  }
}




table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid var(--accent-color);
  padding: 0.5rem;
}
article.post table {
  font-size: 0.92rem;
  table-layout: auto;
  width: 100%;
  border-collapse: collapse;
  word-break: break-word;
}

article.post th, article.post td {
  border: 1px solid var(--accent-color);
  padding: 0.4rem 0.5rem;
  word-break: break-word;
  white-space: normal;
  text-align: left;
}

@media screen and (max-width: 600px) {
  article.post table {
    font-size: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
  }
  
  article.post table thead,
  article.post table tbody {
    display: table;
    width: 100%;
  }
  
  article.post table tr {
    display: table-row;
  }
  
  article.post table th,
  article.post table td {
    display: table-cell;
  }
}

@media screen and (max-width: 360px) {
  html, body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    font-size: 14px;
  }
  body {
    padding: 0.3rem 0.1rem;
  }
  .go-home-link {
    font-size: 0.9rem;
    margin: 0.3rem 0 0.5rem 0;
  }
    article.post header h1 {
      font-size: 1.2rem !important;
      word-break: normal !important;
      white-space: normal !important;
      hyphens: none !important;
      overflow-wrap: break-word !important;
      line-height: 1.2 !important;
    }
}



:root {
  --background-color: oklch(93% 0.075 70);
  --accent-color: oklch(25% 0.2 305);
  --text-color: black;
  --link-color: oklch(from var(--accent-color) 0.5 c 260);
  --transition-time: 0.4s;
  font-size: 18px;
}

 [data-theme="dark"] {
  --background-color: #121212;
  --text-color: #e0e6f0;
  --accent-color: #60a5fa;
  --link-color: #60a5fa;
  --code-foreground: #e0e6f0;
}

@media (min-width: 1250px) {
  :root {
    font-size: 26px;
  }
}

html, body {
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  scroll-behavior: smooth;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Rubik', sans-serif;
  transition: color var(--transition-time), background-color var(--transition-time);
  overflow-x: hidden;
}

/* JetBrains Mono for digits in .mono-digits */

.mono-digits {
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}


time, .mono-date {
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

body a {
  color: var(--link-color);
  text-underline-offset: 0.15lh;
  text-decoration-thickness: 0.1lh;
  transition: color var(--transition-time);
}

body a:visited {
  color: oklch(from var(--link-color) l c calc(h + 50));
}

body a:hover,
body a:focus {
  text-decoration-thickness: 0.15lh;
}

body a:active {
  text-decoration-thickness: 0.2lh;
}

/* Theme Switch Styling */
.theme-switch-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 30px;
    background-color: oklch(93% 0.075 70 / 0.7); /* oklch sepia background, 70% opacity */
    backdrop-filter: blur(5px); /* Blur effect for modern browsers */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-time);
}

[data-theme="dark"] .theme-switch-container {
    background-color: oklch(28.5% 0.032 264 / 0.7); /* oklch of #232b36, 70% opacity */
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 48px;
}

.theme-switch input {
  display: none;
}

.slider {
      /*background-color: var(--profileBorderColor);*/
    background-color: oklch(35% 0.07 50 / 0.2);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.theme-switch-container .icon {
  margin: 0 8px;
  font-size: 18px;
  color: var(--sepiaText);
}

article.post {
  margin: 0 auto;
  max-width: 1320px;
  width: auto;
  padding: 0rem 1rem;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  text-align: justify;
  --code-background: oklch(from var(--accent-color) l 0.1 h);
  --code-foreground: oklch(from var(--accent-color) calc(l + 0.6) 0.1 h) !important;
}


/* Go Home link styling for main and post pages */
.go-home-link {
  text-align: center;
  margin: 1.2rem 0 1.1rem 0;
}
.go-home-link a {
  color: var(--accent-color);
  font-size: 1rem;
  text-decoration: underline;
}

.go-home-link a:hover {
  color: var(--code-foreground);
}


article.post h1,
article.post h2,
article.post h3,
article.post h4,
article.post h5,
article.post h6 {
  text-align: center;
  color: var(--accent-color);
  transition: color var(--transition-time);
}

article.post p {
  line-height: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-size: 1rem;
  color: var(--sepiaText);
  transition: color var(--transition-time);
}

article.post header {
  text-align: center;
  margin-bottom: 2.5rem;
}

article.post header h1 {
  margin: 2rem 0;
  font-size: 2.75rem;
  font-weight: 900;
}

article.post header .post-meta {
  color: var(--accent-color);
  font-style: italic;
  font-weight: 600;
  font-size: 1.2rem;
  text-align: center;
}

article.post header #about {
  color: var(--accent-color);
  font-style: italic;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 5rem;
  row-gap: 0.5rem;
}

article.post header #about time[itemprop="datePublished"] {
  font-weight: 600;
  font-size: 2rem;
}

article.post header #about address {
  font-style: normal;
  font-weight: 600;
  font-size: 1.5rem;
}

article.post header #about address a {
  text-decoration: none;
  color: inherit;
}

article.post header img {
  width: 75%;
}

article.post img {
  display: block;
  margin: 2rem auto;
  object-fit: contain;
  width: 75%;
}

article.post header {
  text-align: center;
  margin-bottom: 2.5rem;
}

article.post header h1 {
  margin: 2rem 0;
  font-size: 2.75rem;
  font-weight: 900;
}

article.post header #about {
  color: var(--accent-color);
  font-style: italic;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 5rem;
  row-gap: 0.5rem;
}

article.post header #about time[itemprop="datePublished"] {
  font-weight: 600;
  font-size: 2rem;
}

article.post header #about address {
  font-style: normal;
  font-weight: 600;
  font-size: 1.5rem;
}

article.post header #about address a {
  text-decoration: none;
  color: inherit;
}

article.post h2 {
  margin: 1.75rem 0;
  font-size: 1.75rem;
}

article.post h3 {
  margin: 1.5rem 0;
  font-size: 1.5rem;
}

article.post h4 {
  margin: 1.25rem 0;
  font-size: 1.25rem;
}

article.post p:has(+ ul) {
  margin-bottom: 0;
}

article.post ul,
article.post ol {
  overflow-x: auto;
}

article.post ul > li,
article.post ol > li {
  margin: 0.5rem 0;
  line-height: 2rem;
}

article.post blockquote {
  --left-bar-width: 0.5rem;
  margin: 1.5rem;
  margin-left: 0;
  padding-left: 1.5rem;
  position: relative;
  display: block;
}

article.post blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  height: 100%;
  width: var(--left-bar-width);
  background-color: var(--accent-color);
  border-radius: var(--left-bar-width);
}

article.post code {
  padding: 0.1rem 0.25rem;
  white-space: nowrap;
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  font-size: 0.97em;
}

article.post code a {
  color: oklch(from var(--link-color) calc(l + 0.25) c h);
}

article.post code a:visited {
  color: oklch(from var(--link-color) calc(l + 0.25) c calc(h + 50));
}

article.post code,
article.post pre {
  background-color: var(--code-background);
  border-color: white;
  border-radius: 0.5rem;
  color: var(--code-foreground);
}

article.post pre {
  overflow: hidden;
  display: flex;
  position: relative;
  --code-padding-x: 0.75rem;
}

article.post pre > code {
  white-space: inherit;
  mask-image: linear-gradient(to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) var(--code-padding-x),
      rgba(0, 0, 0, 1) calc(100% - var(--code-padding-x)),
      rgba(0, 0, 0, 0) 100%);
  margin: 0;
  background-color: unset;
  border-radius: unset;
  padding: 0.75rem var(--code-padding-x);
  overflow-x: auto;
  width: 100%;
  display: inline-block;
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  font-size: 0.97em;
}

article.post img {
  display: block;
  margin: 2rem auto;
  object-fit: contain;
  width: 75%;
}
