@font-face {
  font-family: teranoptia;
  src: url("/fonts/teranoptia/fonts/Teranoptia-Furiae.ttf");
}

/* CSS Variables - Light theme by default */
:root {
  --text: #212121;
  --muted-text: #777777;
  --bg: #fff;
  --highlight: #ddd;
  --code: #212121;
  --code-bg: #f5f5f5;
  --link: #1565c0;
  --border: #b2b2b2;
}

/* Dark theme when toggle is checked */
body:has(#theme-toggle:checked) {
  --text: #dadada;
  --muted-text: #777777;
  --bg: #1a1a1a;
  --highlight: #444;
  --code: #dadada;
  --code-bg: #333;
  --link: #42a5f5;
  --border: #424242;
}

/* Invert images with invertible class in dark mode */
body:has(#theme-toggle:checked) img.invertible {
  filter: brightness(90%) invert(1);
}

/* Prevent flash of unstyled content */
.preload-transitions * {
  transition: none !important;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: "Noto Serif", serif;
  font-size: 18px;
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

hr {
  margin: 20px;
}

ul, ol {
  margin: 0 40px;
}

li {
  padding: 5px 0;
}

main {
  max-width: 850px;
  padding: 0 25px;
  margin: auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

h1 {
  font-size: 42px;
  line-height: 46px;
  margin: 40px 0 25px;
  text-align: center;
}

h2 {
  font-size: 28px;
  margin: 40px 0 25px;
}

h3 {
  font-size: 25px;
  margin: 40px 0 25px;
}

h4 {
  font-size: 22px;
  margin: 40px 0 25px;
}

h5 {
  font-size: 20px;
  margin: 40px 0 25px;
}

p {
  margin: 15px 0;
  text-align: justify;
  text-justify: auto;
  hyphens: auto;
}

input, textarea {
  background-color: var(--bg);
  color: var(--text);
  padding: 5px;
  line-height: 1.8;
  border: 1px solid var(--muted-text);
  border-radius: 5px;
}

button {
  background-color: var(--bg);
  color: var(--text);
  padding: 5px 10px;
  line-height: 1.8;
  border: 1px solid var(--muted-text);
  border-radius: 5px;
}

blockquote {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--border);
  font-style: italic;
  line-height: 1.5;
}

code {
  padding: 3px 6px;
  border-radius: 5px;
  font-family: monospace;
  background-color: var(--highlight);
}

pre code {
  width: 100%;
  overflow-x: scroll;
  display: inline-block;
  background-color: var(--code-bg);
  color: var(--code);
  padding: 20px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 16px;
}

table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.notice {
  font-style: italic;
  background-color: #42a5f51a;
  border-radius: 5px;
  position: relative;
  margin: 40px 0;
  padding: 20px;
  overflow: auto;
}

.info {
  background-color: #42a5f51a;
}

.warning {
  background-color: #ffca281a;
}

.fleuron {
  text-align: center !important;
  width: 100%;
  font-size: 30px;
  font-family: teranoptia;
  line-height: 70px;
  margin: 80px 0;
}

.fleuron a {
  color: var(--muted-text)
}

.fleuron a:hover {
  text-decoration: none;
}

.home-card {
  display: flex;
  justify-content: center; 
  border-bottom: 1px solid var(--border);
}

.home-card img {
  max-width: 150px; 
  margin: 50px;
}

.home-card h2 {
  text-align: left; 
  margin-bottom: 0; 
  line-height: 150%;
}

.home-card p {
  font-size: medium; 
  line-height: 150%; 
  text-align: justify; 
  margin: 10px 0;
}

@media (max-width: 600px) {
  .home-card {
    display: flex;
    flex-direction: column;
    align-items: center; 
    border-bottom: 1px solid var(--border);
  }
  .home-card img {
    margin-bottom: 0;
  }
  .home-card h2 {
    margin-top: 20px;
    text-align: center;
  }
  .social-links {
    justify-content: center;
    margin-bottom: 30px;
  }
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  color: var(--muted-text);
  text-transform: uppercase;
  font-size: 1.6rem;
}

.social-links a svg {
  width: 30px;
  height: 30px;
}

.list-entry {
  text-align: left;
  padding: 20px;
  text-decoration: none;
  border: 1px solid  var(--bg);
}
.list-entry:hover {
  text-decoration: none;
  transition: border-color ease-in 0.1s;
  border: 1px solid var(--muted-text);
  border-radius: 5px;
}
.list-entry * {
  margin: 0;
  margin-top: 10px;
  line-height: 130%;
  text-decoration: none;
  text-align: left;
}
.list-entry img {
  width: 100%;
}
.list-entry .title {
  color: var(--text);
  font-weight: bold;
  text-decoration: none;
}
.list-entry .desc {
  font-size: small;
  color: var(--muted-text);
  text-decoration: none;
}
.list-entry .date {
  font-style: italic;
  line-height: 0.8; 
  font-size: small;
  color: var(--muted-text);
  text-decoration: none;
}

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  text-align: center;
}

/* Theme toggle */
label[for="theme-toggle"] {
  position: fixed;
  top: 20px;
  right: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background: var(--bg);
  /* border: 1px solid var(--border); */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

label[for="theme-toggle"]:hover {
  background: var(--border);
}

label[for="theme-toggle"] svg {
  display: block;
  color: var(--text);
}

/*
ul {
  list-style: none;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation * /
.navigation {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.navigation-title {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
}

.navigation-list {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.navigation-item {
  display: inline;
}

.navigation-link {
  font-size: 16px;
}

/* Mobile menu * /
#menu-toggle {
  display: none;
}

.menu-button {
  display: none;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .menu-button {
    display: block;
    float: right;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
  }

  .menu-button i {
    color: var(--text) !important;
  }

  .navigation-list {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
  }

  #menu-toggle:checked ~ .navigation-list {
    display: flex;
  }
}

/* Footer * /
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  text-align: center;
}

/* Dark mode toggle * /
.float-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.colorscheme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 20px;
}

/* Icons * /
.home-icon {
  width: 2em;
  height: 2em;
}

/* Content * /
.content {
  padding: 40px 0;
}

.post-title .title {
  margin: 0 0 10px;
}

.title-link {
  color: var(--text);
}

.post-content {
  margin-top: 30px;
}

.post-content h1 {
  margin-top: 50px;
}

.post-content h2 {
  margin-top: 40px;
}

.post-content p {
  margin: 20px 0;
}

.post-content ul,
.post-content ol {
  margin: 20px 0 20px 30px;
  list-style: disc;
}

.post-content code {
  padding: 3px 6px;
  background: #f5f5f5;
  border-radius: 3px;
  font-family: monospace;
  font-size: 16px;
}

body:has(#theme-toggle:checked) .post-content code {
  background: #2d2d2d;
}

.post-content pre {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 5px;
  overflow-x: auto;
}

body:has(#theme-toggle:checked) .post-content pre {
  background: #2d2d2d;
}

.post-content pre code {
  padding: 0;
  background: transparent;
}

.post-content blockquote {
  margin: 20px 0;
  padding-left: 20px;
  border-left: 3px solid var(--link);
  font-style: italic;
}

.post-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content img {
  margin: 20px 0;
}

/* List page * /
.list ul {
  margin-top: 30px;
}

.list li {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.list .date {
  min-width: 150px;
  color: #777;
  font-style: italic;
}

.list .title {
  margin: 0;
  font-size: 18px;
  font-weight: normal;
}

/* About page * /
.about {
  gap: 30px;
  margin-bottom: 40px;
}

.about .avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

.about ul {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
