/* CSS Variables */
:root {
  /* Colors Light Mode */
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e0e0e0;
  --color-primary: #007bff;
  --color-primary-dark: #0056b3;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  /* Colors Dark Mode */
  --color-bg-dark: #1a1a2b;
  --color-bg-dark-light: #2a2a3b;
  --color-bg-dark-light1: #2f2f4a;
  --color-bg-dark-light2: #3b3b4c;
  --color-text-dark: #eee;
  --color-text-dark-muted: #bbb;
  --color-text-secondary-dark: #ccc;
  --color-border-dark: #445;
  /* Typography */
  --font-family: system-ui, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.775rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
}

@view-transition {
  navigation: auto;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: var(--color-bg-dark-light);
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-dark);
  margin: var(--spacing-xl) 0;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--color-primary-dark);
}

ul {
  list-style-type: disc;
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}
ul li {
  margin-bottom: var(--spacing-sm);
}

ol {
  list-style-type: decimal;
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}
ol li {
  margin-bottom: var(--spacing-sm);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  background-color: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-border-dark);
  padding: var(--spacing-sm) 0;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header a#logo {
  padding-left: var(--spacing-xs);
}
header a#logo img {
  height: 40px;
  display: block;
}
header nav {
  display: flex;
}
header nav a {
  padding: var(--spacing-sm);
  color: var(--color-text-secondary-dark);
}
header nav a:hover {
  text-decoration: none;
  color: var(--color-text-dark);
}

main {
  flex: 1;
}
main h1 {
  margin: var(--spacing-md) 0;
}
main h2.tag-title {
  margin: var(--spacing-md) 0;
  padding: 0 var(--spacing-md);
}

.featureds-list, .articles-list {
  display: flex;
  flex-direction: column;
}
.featureds-list .featured, .featureds-list .article, .articles-list .featured, .articles-list .article {
  border-bottom: 1px solid var(--color-border-dark);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.featureds-list .featured a, .featureds-list .article a, .articles-list .featured a, .articles-list .article a {
  font-size: var(--font-size-lg);
  font-weight: 600;
}
.featureds-list .featured .published-at, .featureds-list .article .published-at, .articles-list .featured .published-at, .articles-list .article .published-at {
  font-size: var(--font-size-sm);
  color: var(--color-text-dark-muted);
  margin: 0 0 var(--spacing-sm) 0;
}
.featureds-list .featured .description, .featureds-list .article .description, .articles-list .featured .description, .articles-list .article .description {
  color: var(--color-text-secondary-dark);
  font-style: italic;
  margin: 0 0 0 0;
}
.featureds-list .featured:last-child, .featureds-list .article:last-child, .articles-list .featured:last-child, .articles-list .article:last-child {
  border-bottom: none;
}

.featureds-list {
  border-bottom: 1px solid var(--color-border-dark);
}

article img.cover {
  width: 100%;
  margin-bottom: -150px;
  object-fit: cover;
  height: 500px;
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  z-index: -1;
  position: relative;
}
article .header {
  padding: 0 var(--spacing-md);
}
article .header h1 {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
article .header .published-at {
  font-size: var(--font-size-sm);
  color: var(--color-text-dark-muted);
  margin: var(--spacing-md) 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
article .header .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}
article .header .tags a {
  background-color: var(--color-bg-dark-light);
  color: var(--color-text-secondary-dark);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  text-decoration: none;
}
article .header .tags a:hover {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}
article .header .description {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary-dark);
  font-style: italic;
  margin: 0 0 var(--spacing-lg) 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
article .toc {
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  background-color: var(--color-bg-dark-light2);
  margin-bottom: var(--spacing-lg);
}
article .toc ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}
article .toc ul li {
  margin-bottom: var(--spacing-sm);
}
article .toc ul li a {
  color: var(--color-text-secondary-dark);
  text-decoration: none;
  margin-bottom: var(--spacing-sm);
  display: block;
}
article .toc ul li a:hover {
  text-decoration: underline;
  color: var(--color-text-dark);
}
article .toc ul li ul {
  padding-left: var(--spacing-md);
}
article .toc > ul > li {
  border-bottom: 1px solid var(--color-border-dark);
}
article .toc > ul > li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
article .content {
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}
article table {
  width: 100%;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  border-spacing: 0;
}
article table th, article table td {
  border: 1px solid var(--color-border-dark);
  padding: var(--spacing-sm);
  text-align: left;
}
article table th {
  background-color: var(--color-bg-dark-light2);
}
article table th:first-child {
  border-top-left-radius: var(--radius-md);
}
article table th:last-child {
  border-top-right-radius: var(--radius-md);
}
article table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-md);
}
article table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-md);
}
article #disqus_thread {
  padding: 0 var(--spacing-md);
}

code {
  font-family: monospace;
  background-color: var(--color-bg-dark-light);
  color: var(--color-text-secondary-dark);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-dark);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-sm);
}

pre {
  position: relative;
  background-color: var(--color-bg-dark);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--color-border-dark);
  margin-bottom: var(--spacing-md);
}
pre code {
  font-family: monospace;
  font-size: var(--font-size-sm);
}
pre button {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background-color: var(--color-bg-dark-light);
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-secondary-dark);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
}
pre button:hover {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}

footer {
  flex-shrink: 0;
  background-color: var(--color-bg-dark);
  border-top: 1px solid var(--color-border-dark);
  padding: var(--spacing-lg) 0;
  color: var(--color-text-dark-muted);
}
footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: var(--spacing-lg);
}
footer .section {
  flex: 1;
  min-width: 200px;
  padding: 0 var(--spacing-md);
}
footer .section#social-links {
  display: flex;
  gap: var(--spacing-md);
}
footer .section#social-links a {
  color: var(--color-text-secondary-dark);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}
footer .section#social-links a:hover {
  color: var(--color-text-dark);
  text-decoration: none;
}
footer .section#copyright {
  text-align: center;
  font-size: var(--font-size-sm);
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  z-index: 999;
  display: none;
}
#cookie-banner > div {
  padding: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  background-color: var(--color-bg-dark);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}
#cookie-banner > div button {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-xl);
  cursor: pointer;
}
#cookie-banner > div button:hover {
  background-color: var(--color-primary);
  color: var(--color-bg-dark);
}

.theme-base16-dracula-min pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em;
}

.theme-base16-dracula-min code.hljs {
  padding: 3px 5px;
}

.theme-base16-dracula-min .hljs {
  color: #e9e9f4;
  background: #282936;
}

.theme-base16-dracula-min .hljs ::-moz-selection, .theme-base16-dracula-min .hljs::-moz-selection {
  background-color: #4d4f68;
  color: #e9e9f4;
}

.theme-base16-dracula-min .hljs ::selection, .theme-base16-dracula-min .hljs::selection {
  background-color: #4d4f68;
  color: #e9e9f4;
}

.theme-base16-dracula-min .hljs-comment {
  color: #626483;
}

.theme-base16-dracula-min .hljs-tag {
  color: #62d6e8;
}

.theme-base16-dracula-min .hljs-operator, .theme-base16-dracula-min .hljs-punctuation, .theme-base16-dracula-min .hljs-subst {
  color: #e9e9f4;
}

.theme-base16-dracula-min .hljs-operator {
  opacity: 0.7;
}

.theme-base16-dracula-min .hljs-bullet, .theme-base16-dracula-min .hljs-deletion, .theme-base16-dracula-min .hljs-name, .theme-base16-dracula-min .hljs-selector-tag, .theme-base16-dracula-min .hljs-template-variable, .theme-base16-dracula-min .hljs-variable {
  color: #ea51b2;
}

.theme-base16-dracula-min .hljs-attr, .theme-base16-dracula-min .hljs-link, .theme-base16-dracula-min .hljs-literal, .theme-base16-dracula-min .hljs-number, .theme-base16-dracula-min .hljs-symbol, .theme-base16-dracula-min .hljs-variable.constant_ {
  color: #b45bcf;
}

.theme-base16-dracula-min .hljs-class .hljs-title, .theme-base16-dracula-min .hljs-title, .theme-base16-dracula-min .hljs-title.class_ {
  color: #00f769;
}

.theme-base16-dracula-min .hljs-strong {
  font-weight: 700;
  color: #00f769;
}

.theme-base16-dracula-min .hljs-addition, .theme-base16-dracula-min .hljs-code, .theme-base16-dracula-min .hljs-string, .theme-base16-dracula-min .hljs-title.class_.inherited__ {
  color: #ebff87;
}

.theme-base16-dracula-min .hljs-built_in, .theme-base16-dracula-min .hljs-doctag, .theme-base16-dracula-min .hljs-keyword.hljs-atrule, .theme-base16-dracula-min .hljs-quote, .theme-base16-dracula-min .hljs-regexp {
  color: #a1efe4;
}

.theme-base16-dracula-min .hljs-attribute, .theme-base16-dracula-min .hljs-function .hljs-title, .theme-base16-dracula-min .hljs-section, .theme-base16-dracula-min .hljs-title.function_, .theme-base16-dracula-min .ruby .hljs-property {
  color: #62d6e8;
}

.theme-base16-dracula-min .diff .hljs-meta, .theme-base16-dracula-min .hljs-keyword, .theme-base16-dracula-min .hljs-template-tag, .theme-base16-dracula-min .hljs-type {
  color: #b45bcf;
}

.theme-base16-dracula-min .hljs-emphasis {
  color: #b45bcf;
  font-style: italic;
}

.theme-base16-dracula-min .hljs-meta, .theme-base16-dracula-min .hljs-meta .hljs-keyword, .theme-base16-dracula-min .hljs-meta .hljs-string {
  color: #00f769;
}

.theme-base16-dracula-min .hljs-meta .hljs-keyword, .theme-base16-dracula-min .hljs-meta-keyword {
  font-weight: 700;
}