@charset "UTF-8";

/* #region reset */

html,
body,
p,
dt,
dd,
figure,
fieldset,
blockquote,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

button,
input,
select {
  margin: 0;
}

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

.main {
  max-width: 767px;
}

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
}

video {
  height: auto;
  max-width: 100%;
}

iframe {
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

/* #endregion */

html {
  font-size: 0.9rem;
  box-sizing: border-box;

  /* === Light mode (default) === */
  --colors-text: rgba(0, 0, 0, 0.8);
  --colors-text-light: rgba(255, 247, 247, 1);
  --colors-muted: #b3b3b1;
  --colors-primary: #4363bb;
  --colors-divider: rgb(226, 232, 240);
  --colors-primary-light: #8ca0d4;
  --colors-code-background: rgba(39, 133, 184, 0.283);
  --colors-navbar: rgba(32, 73, 105, 1);
  --colors-background: rgba(250, 250, 255, 1);
  --colors-article: rgba(250, 250, 255, 1);
  --colors-special: rgba(8, 255, 200, 1);
  --colors-header: #003c6d;
  --colors-header-text: #ffffff;
  --colors-border: #e9edf0;
  --colors-inline-code-bg: rgba(39, 133, 184, 0.12);
  --colors-inline-code-border: rgba(39, 133, 184, 0.3);
  --colors-inline-code-text: #2d7ab8;
  --colors-card-bg: #ffffff;
  --colors-card-text: #2c3e50;
  --colors-card-hover: #e74c3c;
  --colors-link: #000000;
  --colors-link-visited: #013127;
  --colors-table-odd: rgba(187, 222, 214, 1);
  --colors-table-even: rgba(138, 198, 209, 1);
  --colors-table-hover: #e9edf0;
  --colors-theme-toggle-bg: rgba(255,255,255,0.15);
  --colors-theme-toggle-text: #ffffff;
}

/* === Dark mode via data-theme attribute === */
[data-theme="dark"] {
  --colors-text: rgba(220, 228, 240, 0.92);
  --colors-text-light: rgba(255, 247, 247, 1);
  --colors-muted: #6b7280;
  --colors-primary: #7fa3e8;
  --colors-divider: #2a3650;
  --colors-primary-light: #9fb8ee;
  --colors-code-background: rgba(39, 133, 184, 0.35);
  --colors-navbar: rgba(14, 30, 54, 1);
  --colors-background: #0f1623;
  --colors-article: #141c2b;
  --colors-special: rgba(8, 255, 200, 1);
  --colors-header: #1a3356;
  --colors-header-text: #dce4f0;
  --colors-border: #2a3650;
  --colors-inline-code-bg: rgba(127, 163, 232, 0.12);
  --colors-inline-code-border: rgba(127, 163, 232, 0.25);
  --colors-inline-code-text: #93b4ee;
  --colors-card-bg: #1e2a3d;
  --colors-card-text: #dce4f0;
  --colors-card-hover: #7fa3e8;
  --colors-link: #dce4f0;
  --colors-link-visited: #a3c4e8;
  --colors-table-odd: rgba(30, 52, 80, 1);
  --colors-table-even: rgba(22, 40, 64, 1);
  --colors-table-hover: #2a3a56;
  --colors-theme-toggle-bg: rgba(255,255,255,0.1);
  --colors-theme-toggle-text: #ffffff;
}

/* === Auto dark mode based on system preference (when no manual override) === */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --colors-text: rgba(220, 228, 240, 0.92);
    --colors-text-light: rgba(255, 247, 247, 1);
    --colors-muted: #6b7280;
    --colors-primary: #7fa3e8;
    --colors-divider: #2a3650;
    --colors-primary-light: #9fb8ee;
    --colors-code-background: rgba(39, 133, 184, 0.35);
    --colors-navbar: rgba(14, 30, 54, 1);
    --colors-background: #0f1623;
    --colors-article: #141c2b;
    --colors-special: rgba(8, 255, 200, 1);
    --colors-header: #1a3356;
    --colors-header-text: #dce4f0;
    --colors-border: #2a3650;
    --colors-inline-code-bg: rgba(127, 163, 232, 0.12);
    --colors-inline-code-border: rgba(127, 163, 232, 0.25);
    --colors-inline-code-text: #93b4ee;
    --colors-card-bg: #1e2a3d;
    --colors-card-text: #dce4f0;
    --colors-card-hover: #7fa3e8;
    --colors-link: #dce4f0;
    --colors-link-visited: #a3c4e8;
    --colors-table-odd: rgba(30, 52, 80, 1);
    --colors-table-even: rgba(22, 40, 64, 1);
    --colors-table-hover: #2a3a56;
    --colors-theme-toggle-bg: rgba(255,255,255,0.1);
    --colors-theme-toggle-text: #ffffff;
  }
}

body {
  font-family: "Noto Serif TC", "Noto Sans TC", "PingFang TC", "PingFang SC", "Arial", "Helvetica", "Helvetica Neue", sans-serif;
  color: var(--colors-text);
  background-color: var(--colors-background);
  /* Offset for fixed navbar */
  padding-top: 56px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

#root {
  margin-left: auto;
  margin-right: auto;
  max-width: 120rem;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Noto Sans TC", "PingFang TC", "PingFang SC", "Arial", sans-serif;
  padding-top: 1.4rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  font-weight: 500;
  position: relative;
}

h1 {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
}

article h1 {
  position: relative;
  padding-left: 30px;
}

article h1::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 1.6rem;
  background-color: var(--colors-primary);
  top: 60%;
  left: 0;
  transform: translateY(-50%);
}

article section h1 {
  font-size: 1.4rem;
}

article div h1 {
  font-size: 2rem;
  padding-left: 0;
}

article div h1:before {
  content: none;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}

h4,
h5 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

strong {
  font-weight: 600;
}

pre {
  position: relative;
  color: #e8eaed;
  background: linear-gradient(135deg, #1e2837 0%, #252d3d 100%);
  margin: 1.5rem 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  overflow: auto;
  padding-top: 3em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
              0 2px 8px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

pre:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2),
              0 4px 12px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px 12px 0 0;
}

code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.92rem;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background: var(--colors-inline-code-bg);
  border: 1px solid var(--colors-inline-code-border);
  color: var(--colors-inline-code-text);
  font-weight: 500;
}

pre>code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  background-color: transparent;
  background: none;
  border: none;
  display: inline-block;
  min-width: 100%;
  color: #e8eaed;
  font-weight: 400;
  /* Prevent adjustments of font size after orientation changes in iOS. See https://github.com/edwardtufte/tufte-css/issues/81#issuecomment-261953409 */
}

code td {
  padding-left: 1rem;
}

.copy-code-button {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: linear-gradient(135deg, #4a5568 0%, #3a4556 100%);
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
  opacity: 0;
  pointer-events: none;
}

pre:hover .copy-code-button {
  opacity: 1;
  pointer-events: auto;
}

.copy-code-button:hover {
  background: linear-gradient(135deg, #5a6678 0%, #4a5566 100%);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copy-code-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

pre.z-code {
  position: relative;
  padding: 3em 1.25rem 1rem;
  overflow: auto;
  max-width: 100%;
}

pre.z-code>code {
  display: inline-block;
  min-width: 100%;
}

hr {
  display: block;
  height: 1px;
  width: 100%;
  border: 0.5px solid var(--colors-divider);
  margin: 20px 20px
}

article ol li {
  margin-left: 0.3rem;
}

article ul li {
  margin-left: -0.7rem;
}

p {
  margin: 0.5rem 0.8rem;
  text-align: justify;
}

blockquote {
  padding: 1px 0 1px 1rem;
  margin: 1rem 0;
  font-size: 1.2rem;
  font-weight: 500;
  border-left: 5px solid var(--colors-primary);
}

blockquote p {
  margin: 0.5rem 0;
}

p,
dl,
ol,
ul {
  font-size: 1.2rem;
  line-height: 2;
}

ol,
ul {
  margin-top: 0;
  margin-bottom: 0;
}

.no-underline {
  text-decoration: none;
}

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

a:visited {
  -webkit-transition: color 200ms ease;
  transition: color 200ms ease;
  text-decoration: none;
  color: var(--colors-link-visited);
  text-decoration-thickness: 0.1rem;
}

.body-zone {
  flex-direction: column;
}

.no-underline:link,
.no-underline:visited,
.sidebar a:link,
.sidebar a:visited {
  text-decoration: none;
}

.no-underline:hover,
a:hover {
  color: var(--colors-primary);
  text-decoration: underline;
}

.muted {
  padding-bottom: 1.5rem;
  color: var(--colors-muted);
}

a.muted,
.muted:link,
.muted:visited {
  color: var(--colors-muted);
}

.text {
  font-size: 1.2rem;
}

.text-color,
.text-color:link,
.text-color:visited {
  color: var(--colors-text);
}

.flex {
  display: flex;
}

.flex-1 {
  flex: 1;
}

.justify-between {
  justify-content: space-between;
}

.py {
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

/* Legacy navbar classes removed – replaced by .site-nav */

article {
  padding-bottom: 0.2rem;
  background-color: var(--colors-background);
  transition: background-color 0.25s ease;
}

article:last-of-type {
  padding-bottom: 0;
}

.zola-anchor {
  margin-left: 0.5rem;
  text-decoration: none;
}

.zola-anchor:link,
.zola-anchor:visited {
  text-decoration: none;
}

.sidebar {
  border-top: 1px solid var(--colors-divider);
}

li.inline {
  display: inline-block;
  margin-right: 0.5rem;
}

.text-lg {
  font-size: 1.5rem;
}

.text-sm {
  font-size: 1rem;
}

.sidebar ul {
  margin-top: 0;
  padding-left: 1rem;
  list-style: none;
}

.sidebar li {
  font-size: 1rem;
}


.main-inner {
  padding-left: 1.4rem;
  padding-right: 1.4rem;
  border-bottom: 3px solid var(--colors-background);
  background-color: var(--colors-article);
}

.image-caption {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}

.view-count {
  font-size: 0.8rem;
  color: #777;
}

/* Table styles */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background-color: var(--colors-header);
  color: var(--colors-header-text);
  font-weight: bold;
  padding: 0.5rem;
  text-align: left;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

th:last-child {
  border-right: none;
}

td {
  border-bottom: 1px solid var(--colors-border);
  border-right: 1px solid var(--colors-border);
  padding: 0.5rem;
  text-align: right;
}

.reading-notes-table td {
  text-align: left;
}

td:last-child {
  border-right: none;
}

tr:nth-child(even) td {
  background-color: var(--colors-divider);
  opacity: 0.6;
}

tr:first-child th {
  text-align: center;
}

.sort-asc::after {
  content: "▲";
  font-size: 10px;
  margin-left: 5px;
}

.sort-desc::after {
  content: "▼";
  font-size: 10px;
  margin-left: 5px;
}

.sidebar-element {
  width: 100%;
  background-color: var(--colors-article);
  padding-left: 0rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  /* box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; */
  max-width: 36vw;
  min-width: 20vw;
  margin-top: 1.4rem;
  margin-left: 0rem;
  margin-right: 0rem;
  margin-bottom: 2rem;
  display: none;
}

.sort-buttons {
  width: 95%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.sort-buttons label {
  margin-right: 0.5rem;
}

.sort-buttons select {
  margin-right: 1rem;
}

.external-link {
  position: relative;
  text-decoration: underline;
  color: #00f;
}

.external-link::after {
  content: '';
  background-image: url('/images/external-link.svg');
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 1px;
  margin-right: 1px;
  vertical-align: middle;
}

[data-theme="dark"] .external-link::after {
  filter: invert(0.7) brightness(1.5);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .external-link::after {
    filter: invert(0.7) brightness(1.5);
  }
}

@media (min-width: 767px) {
  #root {
    display: flex;
    justify-content: center;
  }

  .main-inner {
    padding-left: 8rem;
    padding-right: 8rem;
    background-color: var(--colors-article);
    padding-top: 2rem;
    padding-bottom: 2.8rem;
    max-width: 64rem;
    min-width: 52rem;
    margin: 0 auto;
  }

  .no-toc {
    width: 20rem;
  }

  .main-toc {
    display: none;
  }

  .body-zone {
    flex-direction: row;
  }

  .py {
    margin-right: 10rem;
  }

  .sidebar {
    position: sticky;
    border-top: none;
    top: 8px;
    z-index: 1;
    height: 100vh;
    overflow-y: auto;
    width: 25rem;
  }

  .sidebar ul {
    border-left: 1px solid var(--colors-divider);
    list-style: none;
  }

  .sidebar li {
    font-size: 1rem;
  }

  .sidebar h2,
  .sidebar h3 {
    margin-bottom: 0;
    font-size: 1rem;
    /* font-weight: 400; */
    padding-bottom: 1rem;
    border: none;
  }

  .sidebar-element {
    display: block;
  }

  .reading-notes-table {
    width: 95%;
    margin: 0 auto;
    border-collapse: collapse;
    margin-bottom: 2rem;
  }

  .reading-notes-table th,
  .reading-notes-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e9edf0;
  }

  .reading-notes-table th {
    font-weight: 600;
    background-color: var(--colors-header);
    color: var(--colors-header-text);
  }

  .reading-notes-table tbody tr:nth-child(odd) {
    background-color: var(--colors-table-odd);
  }

  .reading-notes-table tbody tr:nth-child(even) {
    background-color: var(--colors-table-even);
  }

  .reading-notes-table tbody tr:hover {
    background-color: var(--colors-table-hover);
    cursor: pointer;
  }
}

/* #region Navigation */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background-color: var(--colors-navbar);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  font-family: "Noto Sans TC", "PingFang TC", "Arial", sans-serif;
  transition: background-color 0.25s ease;
}

.site-nav__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 56px;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-nav__logo img {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 6px;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Desktop nav links */
.site-nav__links {
  display: none; /* hidden on mobile by default */
}

.site-nav__link {
  color: var(--colors-text-light);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  border-radius: 4px;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.site-nav__link:link,
.site-nav__link:visited {
  color: var(--colors-text-light);
  text-decoration: none;
}

.site-nav__link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--colors-text-light);
  text-decoration: none;
}

/* Dropdown */
.site-nav__dropdown {
  position: relative;
}

.site-nav__dropdown-btn {
  background: none;
  border: none;
  color: var(--colors-text-light);
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.site-nav__dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.site-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: var(--colors-navbar);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 200;
  overflow: hidden;
}

.site-nav__dropdown:hover .site-nav__dropdown-menu,
.site-nav__dropdown-menu:hover {
  display: block;
}

.site-nav__dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--colors-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.site-nav__dropdown-item:link,
.site-nav__dropdown-item:visited {
  color: var(--colors-text-light);
  text-decoration: none;
}

.site-nav__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--colors-text-light);
  text-decoration: none;
}

/* Mobile-only toggle: visible on mobile, hidden on desktop */
.theme-toggle.theme-toggle--mobile {
  display: flex;
}

/* Desktop toggle inside nav links: hidden on mobile, pushed right on desktop */
.theme-toggle.site-nav__theme-toggle {
  display: none;
  margin-left: auto;
}

/* Search */
.site-nav__search {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.5rem;
}

.site-nav__search-input {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--colors-text-light);
  font-size: 0.9rem;
  width: 130px;
  font-family: inherit;
  outline: none;
}

.site-nav__search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.site-nav__search-input:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.site-nav__search-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--colors-text-light);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.site-nav__search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hamburger button */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--colors-text-light);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hamburger open state */
.hamburger-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav open state */
.site-nav__links.is-open {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 2px;
}

/* Desktop layout */
@media (min-width: 768px) {
  .site-nav__topbar {
    height: 56px;
  }

  .hamburger-btn {
    display: none;
  }

  .site-nav__links {
    display: flex !important;
    flex: 1;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem 0 0.5rem;
    gap: 2px;
    border-top: none;
    height: 44px;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 56px;
    padding: 0;
  }

  .site-nav__topbar {
    padding: 0 0 0 1rem;
    flex-shrink: 0;
    height: 56px;
    gap: 0;
  }

  .site-nav__actions {
    gap: 10px;
  }

  /* Swap toggle visibility on desktop */
  .theme-toggle.theme-toggle--mobile {
    display: none;
  }

  .theme-toggle.site-nav__theme-toggle {
    display: flex;
  }

  .site-nav__links.is-open {
    flex-direction: row;
    padding: 0;
    border-top: none;
  }
}

/* #endregion */

/* #region Theme Toggle */

.theme-toggle {
  background: var(--colors-theme-toggle-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--colors-theme-toggle-text);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0);
}

/* #endregion */

/* #region Recommended Articles */

.recommended-article {
  width: 100%;
  max-width: 300px;
  background: var(--colors-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommended-article:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.article-image {
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-info {
  padding: 15px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.article-category {
  color: #e74c3c;
  font-weight: bold;
  text-transform: uppercase;
}

.article-relevance {
  color: #e74c3c;
  font-size: 0.85rem;
  text-align: right;
}

.article-date {
  color: #7f8c8d;
}

.article-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.article-title a {
  color: var(--colors-card-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-title a:hover {
  color: var(--colors-card-hover);
}

.cards-container {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 16px;
}

.cards-container .recommended-article {
  flex: 0 0 auto;
  width: 300px;
}

@media (max-width: 768px) {
  .recommended-article {
    max-width: 100%;
  }
}

/* #endregion */
