@import "fonts.css";
@import "frontmatter.css";

:root {
  --black: #000000;
  --text_high: hsl(0, 0%, 100%);
  --text_mid: hsl(0, 0%, 75%);
  --border: hsl(0, 0%, 20%);
  --spacing: 1rem;
  --sidebar-width: 18em;
}

html {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

p {
  font-family: "Space Grotesk", sans-serif;
  white-space: pre-line;
}

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

body {
  display: flex;
  flex-wrap: wrap;
  background-color: var(--black);
  color: var(--text_high);
  margin: 0;
  font-family: "FreeSans", "Helvetica Neue", Arial, sans-serif;
}

:not(pre) > code {
  background-color: #000000 !important;
  font-size: 1em;
  border: 1px solid var(--border);
  font-family: "ShareTechMono" !important
}

pre {
  background-color: #000000 !important;
  padding: var(--spacing);
  font-size: 1em;
  border-radius: 0 !important;
  overflow-x: auto;
  line-height: 1.2;
  border: 1px solid var(--border);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

pre * {
  font-family: "ShareTechMono";
}

pre::-webkit-scrollbar {
  display: none;
}

header,
footer {
  flex-basis: 100%;
}

body > nav {
  width: var(--sidebar-width);
  padding: var(--spacing);
}

article {
  flex: 1;
  min-width: 0;
  padding: var(--spacing);
  border-left: 1px solid var(--border);
}

header nav {
  display: flex;
  justify-content: space-between;
}


header {
  display: grid;
  /* uncomment to center above sidebar, comment to center to page */
  grid-template-columns: var(--sidebar-width) 1fr;
  border-bottom: 1px solid var(--border);
  padding: var(--spacing) 0;
}

header h1 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  width: 100%;
}

h1 a {
  all: unset;
  cursor: pointer;
  padding: 0 1em;
  display: flex;
  align-items: center;
  color: var(--black);
  background-color: var(--highlight);
}

.logo {
  height: 1.8em;
  display: block;
}

header h1 span {
  margin-left: 1em;
  font-size: 50%;
  font-style: italic;
}

footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: var(--spacing);
  color: var(--text_mid);
  font-size: 0.85rem;
}

a:not(h1 a),
a:not(h1 a):visited {
  color: var(--highlight);
  text-decoration: none;
}

a:not(h1 a):hover,
.sidebar-active,
.sidebar-active:visited {
  color: var(--black);
  background-color: var(--highlight);
}

ul {
  list-style-type: square;
}

nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav li {
  overflow: hidden;
  text-overflow: ellipsis;
}

nav li ul {
  padding-left: 0.6em;
}

li {
  line-height: 1.6;
}
li p {
  margin: 0;
}
li img {
  vertical-align: top;
}

.sideBarTitle {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text_mid);
  margin: 1.4rem 0 0.3rem;
}

.sidebar-inner > .sideBarTitle:first-child {
  margin-top: 0;
}

.sidebar-subheading {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text_mid);
  margin-top: 0.6rem;
  margin-bottom: -0.2rem;
  pointer-events: none;
}

article h1,
article h2,
article h3 {
  color: var(--text_high);
}

article h1 {
  margin-top: 0;
}

blockquote {
  border-left: 2px solid var(--border);
  padding-left: var(--spacing);
  color: var(--text_mid);
  margin-left: 0;
}

.top-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.top-note {
  margin-top: 0.25rem;
  font-style: italic;
  color: var(--text_mid);
  font-size: 0.95rem;
}

.tag {
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
  font-size: 0.8rem;
  color: var(--text_mid);
}

.dir-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Editorial New";
}

header > h1 {
  font-family: "Space Grotesk", sans-serif;
}


/* POEM SHORTCODE */
.poem {
  position: relative;
  display: inline-block;
  padding: 2rem;
  max-width: 30em;

  font-family: "ReenieBeanie", cursive;
  font-size: 2rem;
  line-height: 1;
  color: var(--text_high);

  transform: rotate(1.3deg);
}

.sidebar-toggle-input,
.sidebar-toggle {
  display: none;
}

img {
    max-width: 100%;
    max-height: 90vh;  /* Prevents overflowing viewport height */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;    /* Centers the image */
    object-fit: contain; /* Maintains aspect ratio */
}