@font-face {
  font-family: 'Ubuntu Mono';
  src: url('/fonts/UbuntuMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu Mono';
  src: url('/fonts/UbuntuMono-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu Mono';
  src: url('/fonts/UbuntuMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu Mono';
  src: url('/fonts/UbuntuMono-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --accent-color: #e05a00;
  --toolbar-background: #ffffff;
  --toolbar-foreground: #111111;
  --toolbar-foreground-hover: #000000;
  --code-background: transparent;
  --code-foreground: var(--text-color);
  --footer-background: #ffffff;
  --background-color: #ffffff;
  --text-color: #111111;
  --title-color: #0f0c0a;
  --subtitle-color: #2f2925;
  --link-color: #1a4fb5;
  --link-color-visited: #5a3c99;
  --button-width: 48px;
  --angle: 90deg;
  --syntax-text: #2b2b2b;
  --syntax-comment: #8e908c;
  --syntax-keyword: #8959a8;
  --syntax-string: #718c00;
  --syntax-number: #f5871f;
  --syntax-attr: #4271ae;
}

@media (prefers-color-scheme: dark) {
  :root {
    --toolbar-background: #0b0b0b;
    --code-background: #0f0f0f;
    --background-color: #0b0b0b;
    --text-color: #d8d8d8;
    --title-color: #ffffff;
    --subtitle-color: #a8a8a8;
    --footer-background:#0b0b0b;
    --link-color: #7fa6ff;
    --link-color-visited: #b199e8;
    --toolbar-foreground: #e6e6e6;
    --toolbar-foreground-hover: #ffffff;
    --syntax-text: #eaeaea;
    --syntax-comment: #969896;
    --syntax-keyword: #cc99cd;
    --syntax-string: #99cc99;
    --syntax-number: #f99157;
    --syntax-attr: #81a2be;
  }
  .themed {
    filter: invert(1);
    background: transparent;
  }
}


html {
  width: 100%;
  font-family: 'Ubuntu Mono', 'Courier New', Courier, monospace;
  background: var(--background-color);
}

::selection {
  background: var(--accent-color);
  color: #ffffff;
}

a {
  color: var(--link-color);
  text-decoration: underline;
}

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

nav {
  user-select: none;
  font-kerning: auto;
  background: var(--toolbar-background);
  overflow: hidden;
  height: 80px;
  line-height: 1;
}

nav a:visited {
 color: var(--toolbar-foreground);
}

nav a {
  color: var(--toolbar-foreground);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent-color);
}

nav > div {
  width: 100%;
  overflow: hidden;
  padding: 0 28px 0 22px;
  display: flex;
  justify-content: space-between;
}

nav .links {
  display: flex;
  justify-content: space-evenly;
  width: fit-content;
  padding-right: 10px;
}

@media (max-width: 436px) {
  .full {
    display: none;
  }
}

nav h1 {
  font-size: 1.7em;
  margin-top: 17px;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 4px;
}

.home-tilde {
  color: var(--accent-color) !important;
  margin-left: 6px;
  text-decoration: none;
}

nav h2 {
  padding-top: 4px;
  padding-right: 26px;
  font-size: larger;
  float: right;
}

body {
  color: var(--text-color);
  background: var(--background-color);
  margin: 0;
  position: absolute;
  width:100%;
  min-height: 100vh;
  font-size: 14pt;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.3px;
  word-spacing: 1px;
}

h1 {
  color: var(--title-color);
  letter-spacing: 0.4px;
}

h2 {
  color: var(--subtitle-color);
}

img{
  max-width:100%;
  max-height:100%;
  margin-left:auto;
  margin-right:auto;
  display: flex;
  border-radius: 0;
  background: white;
  border: 1px solid var(--subtitle-color);
}

pre, .codehilite {
  border-radius: 0;
}

pre {
  background: var(--code-background);
  color: var(--code-foreground);
  overflow-x: auto;
  border: 1px solid var(--subtitle-color);
  box-shadow: none;
  padding: 14px;
  position: relative;
  word-spacing: normal;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--text-color);
  color: var(--background-color);
  border: none;
  padding: 4px 10px;
  font-size: 12pt;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

pre:hover .copy-button {
  opacity: 1;
}

.copy-button:hover {
  background: var(--accent-color);
  color: #ffffff;
}

/* Syntax highlighting overrides (Tomorrow-inspired light, muted dark) */
pre code.hljs, code.hljs {
  background: transparent;
  color: var(--syntax-text);
}
.hljs-comment,
.hljs-quote {
  color: var(--syntax-comment);
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: var(--syntax-keyword);
}
.hljs-string,
.hljs-doctag,
.hljs-regexp {
  color: var(--syntax-string);
}
.hljs-number,
.hljs-meta,
.hljs-built_in {
  color: var(--syntax-number);
}
.hljs-attr,
.hljs-attribute,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-variable,
.hljs-template-variable,
.hljs-name,
.hljs-title {
  color: var(--syntax-attr);
}
.hljs-type,
.hljs-symbol,
.hljs-bullet {
  color: var(--syntax-number);
}
.hljs-emphasis {
  font-style: italic;
}
.hljs-strong {
  font-weight: bold;
}

blockquote {
  font-style: italic;
  color: var(--subtitle-color);
  text-align: center;
}

footer {
  background: var(--footer-background);
  color: var(--subtitle-color);
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  text-align: center;
  padding: 50px 0;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--accent-color);
}

.content {
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.post-content {
  max-width: 800px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  padding: 0 22px;
}

.comment-section {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 25px;
}

.posts-list {
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.post-header {
  max-height: 450px;
  width: 100%;
  resize: none;
  object-fit: cover;
  border-radius: 0;
}

.posts-list li {
  display: flex;
  flex-direction: column;
}

.posts-list p {
  margin-top: 5px;
}

.posts-list span {
  font-size: small;
  color: var(--subtitle-color);
  justify-content: right;
}

code {
  font-size: 12pt;
  font-weight: 400;
}

p > code, li > code {
    background: #000000;
    color: #ffffff;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 0;
    border: none;
}

@media (prefers-color-scheme: dark) {
  p > code, li > code {
      background: #ffffff;
      color: #000000;
  }
}


.date {
  color: var(--subtitle-color);
  opacity: 0.9;
  font-size: small;
}

.author {
  color: var(--subtitle-color);
  opacity: 0.9;
  font-size: small;
  margin-left: 0.5em;
}

.updated {
  color: var(--subtitle-color);
  opacity: 0.9;
  font-size: small;
  margin-left: 0.5em;
}

table, td, th {
  text-align: left;
  padding: 5px 16px;
  border-collapse: collapse;
  border: 1px solid var(--subtitle-color);
}

table {
  margin-left: 0;
  margin-right: auto;
}

.title {
  margin-bottom: 0;
}

.subtitle {
  margin: 0;
}
