/* CSS Custom Properties */
:root {
  /* Light theme colors */
  --color-primary: #ee455c;
  --color-primary-hover: #b91c3c;
  --color-border: black;
  --color-callout: #1e90ff;
  --color-text: #232333;
  --color-text-muted: #737373;
  --color-text-meta: #999999;
  --color-background: #f6fafd;
  --color-background-code: #f1f1f1;
  --color-background-pre: #ececec;
  --color-background-toc: #ececec;
  --color-background-draft: #f9f2f4;

  /* Dark theme colors */
  --color-primary-dark: #ee455c;
--color-primary-hover-dark: #3dd458;
  --color-border-dark: white;
  --color-text-dark: #ffffff;
  --color-text-muted-dark: #dddddd;
  --color-background-dark: #202124;
  --color-background-code-dark: #3a3a3a;
  --color-background-pre-dark: #272822;
  --color-background-toc-dark: #272822;
  --color-background-draft-dark: #0066ff;

  /* Spacing and sizing */
  --content-max-width: 900px;
  --content-padding: 1ch;
  --border-radius: 5px;
  --font-size-base: 19px;
  --line-height-base: 1.6;
  --line-height-content: 1.65;
}
/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color: var(--color-text, #232333);
  font-family: 'courier', 'Roboto Mono', 'Courier New', monospace;
  font-size: var(--font-size-base, 19px);
  line-height: var(--line-height-base, 1.6);
}

body {
  margin: 20px;
  background-color: var(--color-background);
/*  TODO this causes the awful fade, but also it really does look better this way*/
/*  transition: background-color 0.2s ease, color 0.2s ease;*/
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* Selection styles */
::selection {
  background: var(--color-primary, #dc143c);
  color: #ffffff;
}

::-moz-selection {
  background: var(--color-primary, #dc143c);
  color: #ffffff;
}

/* Typography */
p {
  font-size:90%;
  font-family: 'arvo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: var(--line-height-content, 1.5);
  /* Fallback for older browsers */
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

@supports (margin-block: 0.5em) {
  p {
    margin-top: unset;
    margin-bottom: unset;
    margin-block: 0.8em;
  }
}

blockquote {
  /* Fallback for older browsers */
  border-left: 3px solid var(--color-border, #663399);
  padding-left: 1em;
  color: var(--color-text-muted, #737373);
  margin: 0;
  font-style: italic;
}

@supports (border-inline-start: 3px solid var(--color-border, #663399)) {
  blockquote {
    border-left: unset;
    padding-left: unset;
    border-inline-start: 3px solid var(--color-border, #663399);
    padding-inline-start: 1em;
  }
}

a {
  color: #c8394f;
}


.title-red{
  color:#d83f56;
}

a:hover,
a:focus {
  background-color: var(--hmphhh, #fce1e4);
  outline: 2px solid var(--hmphhh, #fce1e4);
  outline-offset: 2px;
  transition: background 0.1s ease, transform 0.1s ease;
}

a:focus {
  outline-style: solid;
}

.top-text {
  text-decoration-line: wavy;
}

.support {
  color: inherit;
}

li {
  font-family:'arvo';
  font-size:90%;
  list-style-type: "- ";
}

/* tooltips */
.term {
  position: relative;
  display: inline-block;
  border-bottom: 3px dotted #1793cc;
  cursor: help;
  margin:0px;
}

.tooltip {
  position: absolute;
  display:block;

  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);

  max-width: 20rem;
  width: max-content;
  padding: 0.4rem 0.6rem;

  background: #ececec;
  border: 2px solid #1793cc;
  color: black;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 3px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 1000;
}

.term:hover .tooltip {
  opacity: 1;
}

figure {
  display:block;
  margin:0px;
  max-width:100%;

}

/* Images */
img {
  border-radius: var(--border-radius, 5px);
  margin-top:10px;
  margin-bottom:20px;
  max-width:100%;
}

figure h4 {
  font-size: 1rem;
  margin: 0;
  /* Fallback for older browsers */
  margin-bottom: 1em;
  /* Modern logical properties */
  margin-block-end: 1em;
}

figure h4::before {
  content: '↳ ';
  color: var(--color-primary, #dc143c);
}

/* Code blocks */
code {
  background-color: var(--color-background-code, #f1f1f1);
  padding: 0.1em 0.2em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background-color: var(--color-background-pre, #ececec);
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
  border-radius: var(--border-radius, 5px);
  border: 1px solid var(--color-border, #663399);
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/* Layout containers */
.content {
  /* Fallback for older browsers */
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--content-max-width, 800px);
  padding-left: var(--content-padding, 1ch);
  padding-right: var(--content-padding, 1ch);
  /* Modern logical properties */
  margin-block-end: 4em;
  margin-inline: auto;
  max-inline-size: var(--content-max-width, 800px);
  padding-inline: var(--content-padding, 1ch);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Header */
header {
  justify-content: space-between;
  align-items: center;
  /* Fallback for older browsers */
  margin-top: 1em;
  margin-bottom: 1em;
  /* Modern logical properties */
  margin-block: 1em;
  line-height: 2.5em;
  gap: 1rem;
}

header .main {
  font-size: 1.7rem;
  display:flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom:0.4rem;
}

/* Headings */
h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-top:0rem;
    margin-bottom:0.1rem;
}


h2, h3, h4, h5, h6 {
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

main {
  display:flex;
  flex-direction:column;
/*  justify-content:space-between;*/
  gap:20px;
}

.sidebar::before
  {
      /*  reset previous styles first because bruh i can't get this line to go away */
      content:"";
      display: block;            /* restore layout behavior */
      border-top: 0.17rem dashed black;
      padding:0px;
      margin-top: 1rem;
      margin-bottom: 1.5rem;
  }

/*.sidebar {
  min-width:22%;
  max-width:22%;
}

@media (max-width: 1000px) {
  main {
    flex-direction: column;
  }

  .sidebar {
    max-width: none;
  }


}*/

h2 {
  font-size:1.35rem;
}

h3, h4, h5, h6 {
  font-size:1.15rem;
}

.list-item-link {
  all:unset;
  display: block;
  color: inherit;
  margin-bottom:1.35rem;
  margin-top:1rem;
  cursor: pointer;
  border-left: 3px solid #ee455c;
  padding-left: 1rem;
}

.image-holder {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.thumbnail-div {
  align-items:center;
}

.thumbnail {
  border:none;
  border-radius:4px;
  min-width:175px;
  width:175px;
  height:110px;
  margin-top:0.1rem;
  margin-bottom:0.1rem;
}

.list-item-link,
.list-item-link:hover,
.list-item-link:focus,
.list-item-link:visited {
  color: inherit;
}


/*  jank is here. breaks when it's a class, works just fine when it's put as a real tag. not sure why this is but i just want it to work so i'm gonna roll with it*/
post-title {
/*  border-block-end: 3px solid var(--color-primary, #dc143c);*/
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}



.posts {
   font-size: 20px;
}

.main-page-post{
  margin-top:0px;
  margin-bottom:0px;
}

/*h1::before { color: var(--color-primary, #dc143c); content: '-> '; }*/
/*h2::before { color: var(--color-primary, #dc143c); content: '## '; }
h3::before { color: var(--color-primary, #dc143c); content: '### '; }
h4::before { color: var(--color-primary, #dc143c); content: '#### '; }
h5::before { color: var(--color-primary, #dc143c); content: '##### '; }
h6::before { color: var(--color-primary, #dc143c); content: '###### '; }*/

.meta {
  color: #6f6f6f;
  letter-spacing: -0.5px;
  font-size: 0.9em;
}

.post-tags{
  color:#6f6f6f;
  font-size: 0.9em;
}

/* Post layout */
.post-container {
  /* Flexbox fallback for older browsers */
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

@supports (display: grid) {
  .post-container {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media screen and (min-width: 60em) {
  .post-container {
    /* Flexbox fallback */
    flex-wrap: nowrap;
  }

  @supports (display: grid) {
    .post-container {
      grid-template-columns: 1fr auto;
    }
  }
}

.post-content {
  /* Flexbox fallback */
  flex: 1;
  min-width: 0;
  /* Modern properties */
  min-inline-size: 0;
  overflow-wrap: break-word;
}

.toc {
  background-color: var(--color-background-toc, #ececec);
  border-radius: var(--border-radius, 5px);
  color: var(--color-text, #232333);
  /* Fallback for older browsers */
  max-width: 18.75rem;
  /* Flexbox fallback */
  flex: 0 0 auto;
  /* Modern properties */
  max-inline-size: 18.75rem;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--color-border, #663399);
}

@media screen and (min-width: 60em) {
  .toc {
    position: sticky;
    /* Fallback for older browsers */
    top: 1.25rem;
    /* Modern logical properties */
    inset-block-start: 1.25rem;
  }
}

@media screen and (max-width: 59.99em) {
  .toc {
    /* Fallback for older browsers */
    margin-bottom: 1.5rem;
    /* Modern logical properties */
    margin-block-end: 1.5rem;
    order: -1;
  }
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  /* Fallback for older browsers */
}

.footer-hr {
  margin-top: 2rem;
}

hr {
  /*  reset previous styles first because bruh i can't get this line to go away */
  all: unset;                /* wipes ALL default styles */
  display: block;            /* restore layout behavior */
  border-top: 0.17rem dashed black;
  padding:0px;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}



.soc {
  display: flex;
  align-items: center;
  /* Fallback for older browsers */
  border-bottom: none;
  /* Modern logical properties */
  border-block-end: none;
  transition: color 0.2s ease;
}

.soc:hover,
.soc:focus {
  color: #ffffff;
  outline: 2px solid var(--color-primary, #dc143c);
  outline-offset: 2px;
}

.border {
  margin-inline: 0.5rem;
  border: 1px solid var(--color-border, #663399);
}

time {
  color: var(--color-text-muted, #737373);
  font-size: 0.9em;
}

/* Callouts */
.callout {
  background-color: var(--color-callout, #1e90ff);
  color: #ffffff;
  padding: 1em;
  border-radius: var(--border-radius, 5px);
  /* Fallback for older browsers */
  margin-top: 1em;
  margin-bottom: 1em;
  /* Modern logical properties */
  margin-block: 1em;
}

.callout p {
  margin: 0;
}

.callout a:hover,
.callout a:focus {
  background-color: #ffffff;
  color: var(--color-callout, #1e90ff);
}

/* Callout variants */
.callout-alert {
  color: #721c24;
  background-color: #f8d7da;
  border: 3px solid #f5c2c7;
}

.callout-tip {
  color: #055160;
  background-color: #d1ecf1;
  border: 3px solid #b8daff;
}

.callout-warning {
  color: #664d03;
  background-color: #fff3cd;
  border: 3px solid #ffecb5;
}

.callout-custom {
  /* Custom styles will be applied inline */
  color: inherit;
}

/* Site and content elements */
.site-description {
display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Tags */
.tags {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  list-style-type: none;
  list-style: none;
}

.no-decor-li li {
  list-style-type: "";
  list-style: none;
}

.no-decor-li > li::before {
  content: none;
}


/*for the dark/light icon*/
svg {
  /* Fallback for older browsers */
  max-height: 1rem;
  max-width: 1rem;
  /* Modern logical properties */
  max-block-size: 1rem;
  max-inline-size: 1rem;
}

/*for the dark/light icon*/
.feather {
  /* Fallback for older browsers */
  width: 1.5rem;
  height: 1.5rem;
  /* Modern logical properties */
  inline-size: 1.5rem;
  block-size: 1.5rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}

/* Tables */
table {
  border-spacing: 0;
  border-collapse: collapse;
  /* Fallback for older browsers */
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  /* Modern logical properties */
  inline-size: 100%;
  margin-block: 1rem;
  border-radius: var(--border-radius, 5px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table th {
  padding: 0.75rem;
  border: 1px solid var(--color-border, #663399);
  font-weight: bold;
  background-color: var(--color-background-pre, #ececec);
  text-align: start;
}

table td {
  padding: 0.75rem;
  border: 1px solid var(--color-border, #663399);
}

table tr:nth-child(even) {
  background-color: var(--color-background-code, #f1f1f1);
}

/* Navigation and theme toggle */
nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-toggle {
  /* Reset button styles */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  background: none;
  margin: 0;
  font: inherit;
  cursor: pointer;

  /* Custom styling */
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom:0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  /* Ensure icon is always visible */
  color: var(--color-text, #232333);
}

.nav-toggle:hover,
.nav-toggle:focus {
  background-color: var(--hmphhh, #fce1e4);
  outline: 2px solid var(--hmphhh, #fce1e4);
  outline-offset: 2px;
  transition: background 0.1s ease, transform 0.1s ease;
}

.nav-toggle:focus {
  outline-style: solid;
}

.post {
    margin-top:0.8rem;
    font-family: "courier";
    padding-left: 0.8rem;
    border-left: 3px solid #ee455c;
}

kbd {
  border: 1px solid var(--color-border, #663399);
  border-radius: 4px;
  background-color: var(--color-background, #ffffff);
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
}



/* Media queries for responsive design */
@media (max-width: 37.4em) {
  .content {
    /* Fallback for older browsers */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    /* Modern logical properties */
    padding-inline: 0.5rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .site-description {
    flex-direction: column;
    align-items: flex-start;
  }
}


.search-status {
  margin-block: 1rem 0;
}

.search-status-empty,
.search-status-error {
  color: var(--color-text-muted, #737373);
}

.search-status-error {
  color: var(--color-primary, #dc143c);
}

.search-results {
  list-style: none;
  padding: 0;
  margin-block: 1rem 0;
}

.search-results li {
  text-indent: 0;
  list-style-type: "";
}

.search-results > li::before,
.search-tag-list > li::before {
  content: none;
}

.search-result + .search-result {
  margin-block-start: 1rem;
}

.search-result-card {
  border: 1px solid var(--color-border, #663399);
  border-radius: var(--border-radius, 5px);
  background-color: var(--color-background, #ffffff);
  padding: 1rem;
}

.search-result-title {
  margin-block: 0 0.35rem;
}

.search-result-meta {
  color: var(--color-text-muted, #737373);
  font-size: 0.95em;
  margin-block: 0;
}

.search-result-snippet {
  margin-block: 0.75rem 0;
}

.search-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-block: 0.75rem 0;
}

.search-tag-list li {
  text-indent: 0;
  list-style-type: "";
  list-style: none;
}

.search-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-primary, #dc143c);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.9em;
}

.search-label {
  display: block;
  font-weight: bold;
  margin-block-end: 0.5rem;
}

.search-input {
  inline-size: 100%;
  border: 1px solid black;
  border-radius: 4px;
  background-color: var(--color-background, #ffffff);
  color: var(--color-text, #232333);
  font: inherit;
  padding: 0.75rem 0.9rem;
}

.search-input:focus {
  outline: 2px solid var(--color-primary, #dc143c);
  outline-offset: 2px;
}

.search-hint {
  color: var(--color-text-muted, #737373);
  font-size: 0.95em;
  margin-block: 0.75rem 0;
}

/* Search */
.search-page {
  display: grid;
  gap: 1.5rem;
}

.search-intro {
  margin-block-start: -0.5rem;
}

.search-panel {
  border-radius: var(--border-radius, 5px);
  padding: 1rem;
}

.alt-a {
  text-decoration:none;
}

.uncolored-a {
  color:inherit;
}

.title-text {
  color:inherit;
  text-decoration-style: wavy;
  text-decoration-thickness:0.06em;
  text-underline-offset: 11px;
  text-decoration-color: #ee455c;
}


.description-text {
  margin-top:0.1rem;
  margin-bottom:0px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.header-glow {
  text-shadow: 2px 2px 0px #dedcdc;
}

.footer-info {
  font-size: 90%;
}
