@font-face {
  font-family: 'Adwaita Sans';
  src: url('../fonts/AdwaitaSans-Regular.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Adwaita Sans';
  src: url('../fonts/AdwaitaSans-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
}

@font-face {
  font-family: 'JetBrainsMono Nerd Font';
  src: url('../fonts/jetbrains/JetBrainsMonoNerdFont-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrainsMono Nerd Font';
  src: url('../fonts/jetbrains/JetBrainsMonoNerdFont-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrainsMono Nerd Font';
  src: url('../fonts/jetbrains/JetBrainsMonoNerdFont-Italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'JetBrainsMono Nerd Font';
  src: url('../fonts/jetbrains/JetBrainsMonoNerdFont-BoldItalic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
}

:root {
  --bg-color: #222226;
  --window-bg: #222226;
  --card-bg: #38383C;
  --titlebar-btn-bg: #38383C;
  --text-color: #ffffff;
  --accent-blue: #2190A4;
  --nav-btn-active-bg: var(--card-bg);
  --border-color: var(--bg-alpha-10);
  --glass-bg: rgba(34, 34, 38, 0.6);
  --code-kw: #ff7800;
  --code-str: #33d17a;
  --code-num: #f6d32d;
  --code-fn: #3584e4;
  --code-var: #c061cb;
  --code-com: #777777;

  --bg-alpha-2: rgba(255, 255, 255, 0.02);
  --bg-alpha-3: rgba(255, 255, 255, 0.03);
  --bg-alpha-5: rgba(255, 255, 255, 0.05);
  --bg-alpha-8: rgba(255, 255, 255, 0.08);
  --bg-alpha-10: rgba(255, 255, 255, 0.1);
  --bg-alpha-12: rgba(255, 255, 255, 0.12);
  --bg-alpha-15: rgba(255, 255, 255, 0.15);
  --bg-alpha-20: rgba(255, 255, 255, 0.2);
  --bg-alpha-30: rgba(255, 255, 255, 0.3);
  --bg-alpha-40: rgba(255, 255, 255, 0.4);
  --bg-alpha-50: rgba(255, 255, 255, 0.5);
  --bg-alpha-60: rgba(255, 255, 255, 0.6);
  --bg-alpha-80: rgba(255, 255, 255, 0.8);
  --bg-alpha-100: rgba(255, 255, 255, 1);
  --star-base: 255, 255, 255;

  --text-muted: #aaaaaa;
  --text-muted-darker: #cccccc;
  --text-muted-light: #eeeeee;
  --popover-bg: var(--card-bg);
  --popover-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  --header-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(0, 0, 0, 0.4);
}

body.light-mode {
  --bg-color: #FAFAFB;
  --window-bg: #f6f6f6;
  --text-color: #323237;
  --window-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  --nav-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  --accent-blue: #2190A4;
  --card-bg: #E6E6E7;
  --titlebar-btn-bg: rgba(0, 0, 0, 0.08);
  --card-hover: #dcdcdc;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --nav-btn-active-bg: #ffffff;
  --nav-btn-active-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --code-block-bg: #f0f0f1;
  --code-block-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  --blockquote-color: #555555;
  --blockquote-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --blockquote-bg: #E6E6E7;
  --table-bg: #ffffff;
  --table-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --code-kw: #c64600;
  --code-str: #26a269;
  --code-num: #cd9309;
  --code-fn: #1c71d8;
  --code-var: #9141ac;
  --code-com: #999999;

  --bg-alpha-2: rgba(0, 0, 0, 0.02);
  --bg-alpha-3: rgba(0, 0, 0, 0.03);
  --bg-alpha-5: rgba(0, 0, 0, 0.05);
  --bg-alpha-8: rgba(0, 0, 0, 0.08);
  --bg-alpha-10: rgba(0, 0, 0, 0.1);
  --bg-alpha-12: rgba(0, 0, 0, 0.12);
  --bg-alpha-15: rgba(0, 0, 0, 0.15);
  --bg-alpha-20: rgba(0, 0, 0, 0.2);
  --bg-alpha-30: rgba(0, 0, 0, 0.3);
  --bg-alpha-40: rgba(0, 0, 0, 0.4);
  --bg-alpha-50: rgba(0, 0, 0, 0.5);
  --bg-alpha-60: rgba(0, 0, 0, 0.6);
  --bg-alpha-80: rgba(0, 0, 0, 0.8);
  --bg-alpha-100: rgba(0, 0, 0, 1);
  --star-base: 30, 30, 30;

  --text-muted: #555555;
  --text-muted-darker: #333333;
  --text-muted-light: #1e1e1e;
  --popover-bg: #ffffff;
  --popover-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  --header-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0, 0, 0, 0.08);
  --border-color: rgba(0, 0, 0, 0.15);
}

body {
  margin: 0;
  font-family: 'Adwaita Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.single-article,
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* Global Theme Transition Map */
.theme-transition,
.theme-transition .page-content,
.theme-transition .gtk-headerbar,
.theme-transition .adwaita-card,
.theme-transition .liquid-navbar,
.theme-transition .nav-btn,
.theme-transition .gtk-about-window,
.theme-transition .gtk-popover,
.theme-transition .gtk-search-input,
.theme-transition .single-article table,
.theme-transition .single-article th,
.theme-transition .single-article td,
.theme-transition .single-article blockquote,
.theme-transition .single-article .highlight,
.theme-transition .boxed-list,
.theme-transition .boxed-row {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.theme-transition .stars-container {
  transition: background-color 0.4s ease;
}

.theme-transition #stars,
.theme-transition #stars2,
.theme-transition #stars3 {
  transition: filter 0.4s ease;
}

/* GTK Overlay Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-alpha-20) transparent;
  box-sizing: border-box;
  -webkit-user-drag: none;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-alpha-20);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-alpha-40);
  background-clip: padding-box;
}

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

a:hover {
  text-decoration: underline;
}

/* Scroll Container */
.scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: 100vh;
  height: 100dvh;
  scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* Sections */
.page-section {
  flex: 0 0 100vw;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .page-section {
    flex: 0 0 70vw;
    /* Wide padding creates a peephole effect */
    padding: 2rem;
    max-width: 1100px;
    /* Don't grow infinitely on ultra-wide monitors */
    min-width: 600px;
    /* Stop windows from getting squeezed before breakpoint */
  }
}

.page-content {
  width: 100%;
  height: 85vh;
  height: 85dvh;
  background: var(--bg-color);
  /* Match background with GTK header */
  border-radius: 12px;
  border: 1px solid var(--bg-alpha-10);
  box-shadow: var(--window-shadow, 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Adwaita styling */
.gtk-headerbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem;
  background: var(--bg-color);
  /* Same as window */
  border-bottom: none;
  /* Flat design */
  height: 52px;
  box-sizing: border-box;
  position: relative;
  z-index: 50;
  transition: background-color 0.4s ease, box-shadow 0.2s ease;
}

.gtk-headerbar.scrolled {
  box-shadow: var(--header-shadow);
}

.headerbar-start,
.headerbar-end {
  display: flex;
  align-items: center;
  flex: 1;
}

.headerbar-end {
  justify-content: flex-end;
}

.gtk-header-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-color);
  margin-right: 0.5rem;
  border: none;
  outline: none;
  padding: 0;
}

.gtk-header-btn:hover {
  background: var(--bg-alpha-10);
}

.gtk-header-btn.active {
  background: var(--bg-alpha-15);
}

.gtk-header-btn svg {
  width: 16px;
  height: 16px;
}

.headerbar-center {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  padding: 0 1rem;
}

.gtk-search-input {
  background: var(--card-bg, var(--bg-alpha-8));
  border: 1px solid transparent;
  color: var(--text-color);
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  max-width: 360px;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 6.5 0 c -3.578125 0 -6.5 2.921875 -6.5 6.5 s 2.921875 6.5 6.5 6.5 c 1.429688 0 2.753906 -0.46875 3.828125 -1.257812 l 2.945313 2.945312 c 0.957031 0.9375 2.363281 -0.5 1.40625 -1.4375 l -2.929688 -2.929688 c 0.785156 -1.074218 1.25 -2.394531 1.25 -3.820312 c 0 -3.578125 -2.921875 -6.5 -6.5 -6.5 z m 0 2 c 2.496094 0 4.5 2.003906 4.5 4.5 s -2.003906 4.5 -4.5 4.5 s -4.5 -2.003906 -4.5 -4.5 s 2.003906 -4.5 4.5 -4.5 z m 0 0" fill="%23aaaaaa"/></svg>');
  background-repeat: no-repeat;
  background-position: 10px center;
}

.gtk-search-input:focus {
  outline: none;
  border-color: #2190A4;
  box-shadow: 0 0 0 1px #2190A4;
  background-color: var(--bg-alpha-12);
}

.window-controls {
  display: flex;
  gap: 0.5rem;
  padding-right: 0.4rem;
  align-items: center;
}

.gtk-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  /* Libadwaita rounded boxes for icon buttons */
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  /* Invisible by default */
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-color);
}

.gtk-btn:hover {
  background: var(--bg-alpha-10);
  /* Box highlights on hover */
}

.gtk-btn.close-btn,
.gtk-btn.max-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  /* Perfect circle for window control */
  background: var(--titlebar-btn-bg);
  /* Always visible */
  margin-left: 0.3rem;
}

.gtk-btn.close-btn:hover,
.gtk-btn.max-btn:hover {
  background: var(--bg-alpha-20);
}

.gtk-btn svg {
  width: 14px;
  height: 14px;
}

.adwaita-card {
  background: var(--card-bg, var(--bg-alpha-5));
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bg-alpha-2);
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  color: var(--text-color);
}

.adwaita-card:hover {
  background: var(--card-hover, var(--bg-alpha-8));
  border-color: var(--bg-alpha-10);
  text-decoration: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.card-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-date {
  font-size: 0.85em;
  color: var(--text-muted);
  white-space: nowrap;
}

.card-summary {
  margin: 0;
  font-size: 0.95em;
  color: var(--text-muted-darker);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-list,
.journal-list {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Stars */
.about-hero {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 0;
  overflow: hidden;
}

body.light-mode .stars-container {
  background: var(--bg-color);
}

body.light-mode #stars,
body.light-mode #stars2,
body.light-mode #stars3 {
  filter: invert(1) opacity(0.5);
  /* Inverts stars to dark and softens them */
}


#stars,
#stars2,
#stars3 {
  background: transparent;
}

#stars:after {
  content: ' ';
  position: absolute;
  top: 2000px;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: inherit;
}

#stars2:after {
  content: ' ';
  position: absolute;
  top: 2000px;
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: inherit;
}

#stars3:after {
  content: ' ';
  position: absolute;
  top: 2000px;
  width: 3px;
  height: 3px;
  background: transparent;
  box-shadow: inherit;
}

@keyframes animStar {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-2000px);
  }
}

.profile-card {
  z-index: 10;
}

.hero-logo {
  border-radius: 50%;
  border: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.profile-card h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5em;
}

.hero-social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hero-social-btn {
  color: var(--text-color);
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-social-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Navbar */
.liquid-navbar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.5rem;
  z-index: 1000;
  box-shadow: var(--nav-shadow, 0 10px 30px rgba(0, 0, 0, 0.5));
}


.liquid-navbar ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.liquid-navbar .nav-btn {
  background: transparent;
  border: none;
  color: var(--bg-alpha-60);
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-family: inherit;
}

.liquid-navbar .nav-btn:hover {
  color: var(--text-color);
  background: var(--bg-alpha-5);
}

.liquid-navbar .nav-btn.active {
  background: var(--nav-btn-active-bg, var(--bg-alpha-15));
  color: var(--text-color);
  box-shadow: var(--nav-btn-active-shadow, inset 0 1px 0 var(--bg-alpha-10));
}

/* Popover Menu */
.gtk-popover {
  position: absolute;
  background: var(--popover-bg);
  border-radius: 12px;
  border: 1px solid var(--bg-alpha-10);
  box-shadow: var(--popover-shadow);
  width: 260px;
  padding: 0.5rem;
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.gtk-popover.active {
  display: flex;
}

.gtk-popover hr {
  border: none;
  border-top: 1px solid var(--bg-alpha-10);
  margin: 0.5rem 0;
}

/* Theme selector */
.theme-selector {
  display: flex;
  justify-content: space-around;
  padding: 0.5rem;
}

.theme-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.theme-btn.system {
  background: linear-gradient(135deg, #ffffff 50%, #1e1e1e 50%);
  box-shadow: inset 0 0 0 1px var(--bg-alpha-10);
}

.theme-btn.light {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--bg-alpha-10);
}

.theme-btn.dark {
  background: #1e1e1e;
  box-shadow: inset 0 0 0 1px var(--bg-alpha-10);
}

.theme-btn.active {
  box-shadow: inset 0 0 0 1px var(--bg-alpha-10), 0 0 0 2px #2190A4;
}

.theme-btn.dark.active {
  box-shadow: 0 0 0 2px #2190A4;
}

.theme-btn .check-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #2190A4;
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--popover-bg);
}

.theme-btn.active .check-icon {
  display: flex;
}

.theme-btn .check-icon svg {
  stroke: #ffffff;
  stroke-width: 3;
}

/* Text zoom */
.zoom-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
}

.zoom-btn {
  background: var(--bg-alpha-10);
  border: none;
  color: var(--text-color);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.zoom-btn:hover {
  background: var(--bg-alpha-20);
}

.zoom-value {
  font-weight: 700;
  color: var(--text-muted);
}

/* List buttons in popover */
.popover-btn {
  background: transparent;
  color: var(--text-muted-light);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.2s;
  font-family: inherit;
}

.popover-btn:hover {
  background: var(--bg-alpha-8);
}

/* Modal Overlay */
.gtk-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.gtk-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gtk-about-window {
  width: 380px;
  background: var(--window-bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.5rem 1rem;
  position: relative;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.gtk-modal-overlay.active .gtk-about-window {
  transform: scale(1);
  opacity: 1;
}

.gtk-about-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alpha-8);
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gtk-about-close:hover {
  background: var(--bg-alpha-15);
}

.about-header {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.about-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #2190A4, #1b7a8a);
  border-radius: 20px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  -webkit-user-select: none;
  user-select: none;
}

.about-icon.notes {
  background: linear-gradient(135deg, #e5a50a, #f6d32d);
}

.about-icon.journal {
  background: linear-gradient(135deg, #e01b24, #c01c28);
}

.about-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 0.2rem 0;
}

.about-developer {
  color: var(--text-muted);
  margin: 0 0 0.8rem 0;
}

.about-version {
  display: inline-block;
  background: var(--bg-alpha-10);
  padding: 0.2rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  color: #78aeed;
}

.boxed-list {
  background: var(--card-bg, var(--bg-alpha-5));
  border-radius: 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.boxed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  color: var(--text-muted-light);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.boxed-row:last-child {
  border-bottom: none;
}

.boxed-row:hover {
  background: var(--card-hover, var(--bg-alpha-8));
}

.boxed-row-icon {
  color: var(--text-muted);
}

/* Responsive Article Content */
.single-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1.5rem auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.single-article pre,
.single-article .highlight {
  background: var(--code-block-bg, var(--bg-color));
  color: var(--text-muted-light);
  border-radius: 8px;
  overflow-x: auto;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px var(--bg-alpha-5);
  /* very soft subtle border */
  margin: 1.5rem 0;
}

.single-article pre {
  padding: 1rem;
  margin: 0;
  /* Let .highlight handle margin if present */
  white-space: pre;
  /* Don't wrap */
}

.single-article .highlight {
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--code-block-bg, var(--bg-color));
  border: 1px solid var(--border-color);
  box-shadow: var(--code-block-shadow, inset 0 2px 4px rgba(0, 0, 0, 0.2));
}

.single-article .highlight pre {
  margin: 0;
  padding: 1.2rem;
  background: transparent;
  box-shadow: none;
}

.single-article code {
  font-family: 'JetBrainsMono Nerd Font', monospace;
  background: var(--bg-alpha-10);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-article pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* Maximized View overrides */
.page-content.maximized {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  border: none !important;
  box-shadow: none !important;
}

.page-section:has(.page-content.maximized) {
  padding: 0 !important;
  flex: 0 0 100vw !important;
  max-width: none !important;
}

@media (max-width: 767px) {
  .max-btn {
    display: none !important;
  }
}

/* Blockquote Component Styling */
.single-article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--accent-blue, #2190A4);
  background: var(--blockquote-bg, var(--bg-alpha-5));
  border-radius: 0 8px 8px 0;
  color: var(--blockquote-color, #dddddd);
  font-style: italic;
  box-shadow: var(--blockquote-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
}

.single-article blockquote p {
  margin: 0;
}

/* Table Component Styling */
.single-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--table-shadow, 0 4px 15px rgba(0, 0, 0, 0.2));
  background: var(--table-bg, var(--window-bg));
}

.single-article th,
.single-article td {
  padding: 0.8rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.single-article th {
  background: var(--card-bg, var(--border-color));
  font-weight: 600;
}

.single-article tr:last-child td {
  border-bottom: none;
}

.single-article tr:nth-child(even) {
  background: var(--bg-alpha-5);
}

/* Adwaita Code Highlight Theme mappings */
.chroma {
  color: var(--text-color);
  font-family: 'JetBrainsMono Nerd Font', monospace;
  font-size: 0.9em;
}

.chroma .err {
  color: #e01b24;
}

.chroma .c,
.chroma .ch,
.chroma .cm,
.chroma .cp,
.chroma .cpf,
.chroma .c1,
.chroma .cs {
  color: var(--code-com);
  font-style: italic;
}

.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr,
.chroma .kt,
.chroma .kv {
  color: var(--code-kw);
  font-weight: bold;
}

.chroma .n,
.chroma .nx {
  color: var(--text-color);
}

.chroma .na {
  color: var(--code-fn);
}

.chroma .nb {
  color: var(--code-var);
}

.chroma .nc {
  color: var(--code-fn);
  font-weight: bold;
}

.chroma .no {
  color: var(--code-kw);
}

.chroma .nd {
  color: var(--code-num);
}

.chroma .ni {
  color: var(--code-var);
}

.chroma .ne {
  color: var(--code-kw);
}

.chroma .nf,
.chroma .fm {
  color: var(--code-fn);
}

.chroma .nn {
  color: var(--code-fn);
}

.chroma .nt {
  color: var(--code-fn);
  font-weight: bold;
}

.chroma .nv,
.chroma .vc,
.chroma .vg,
.chroma .vi,
.chroma .vm {
  color: var(--code-var);
}

.chroma .o,
.chroma .ow {
  color: var(--text-color);
}

.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .sr,
.chroma .s1,
.chroma .ss {
  color: var(--code-str);
}

.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo {
  color: var(--code-num);
}

/* Dropdown Animation Parameters */
.contact-dropdown {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, var(--bg-alpha-2));
  transition: max-height 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, border-width 0.3s ease;
  border-top: 0px solid var(--border-color);
  border-bottom: 0px solid var(--border-color);
}

.contact-dropdown.expanded {
  max-height: 200px;
  opacity: 1;
  border-top-width: 1px;
  border-bottom-width: 1px;
}

/* Extracted Utility Classes */
.scroll-container.single-view {
  justify-content: center;
  position: relative;
}

.stars-container {
  pointer-events: none;
}

.page-section.single-view {
  min-width: 0;
  width: 100%;
  position: relative;
  z-index: 10;
}

.page-content.single-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gtk-header-btn.back-btn {
  text-decoration: none;
  width: auto;
  padding: 0 0.8rem;
}

.back-btn-text {
  margin-left: 0.5rem;
  font-weight: 600;
}

.search-toggle-btn {
  margin-left: 0.5rem;
}

.header-title-text {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.gtk-btn.close-btn.link-close {
  text-decoration: none;
}

.gtk-search-bar {
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
  flex-shrink: 0;
}

.gtk-search-input.search-note-input {
  width: 400px;
  max-width: 90%;
  background-position: 10px center;
  padding-left: 32px;
  border-radius: 8px;
}

.notes-list.single-view-content {
  padding: clamp(1.5rem, 4vh, 2rem) clamp(1rem, 8vw, 4rem);
  flex-grow: 1;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.single-article {
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.article-meta {
  font-size: 0.9em;
  opacity: 0.8;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-title {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 2.5em;
  line-height: 1.2;
}

/* Baseof */
.about-header-spacious {
  margin-bottom: 1.5rem;
}

img.about-icon {
  object-fit: cover;
  background: transparent;
  box-shadow: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  padding: 0.5rem;
  height: 140px;
  width: 140px;
}

body.light-mode img.about-icon {
  background: #d2d2d230;
  border: 2px solid rgb(0 0 0 / 8%);
}

.boxed-row-icon.rotate-transition {
  transition: transform 0.2s;
}

.boxed-row.contact-item {
  padding-left: 2rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
}

.boxed-row.contact-item.last {
  border-bottom: none;
}

.boxed-row.credits-item {
  cursor: default;
  pointer-events: none;
}

/* List Page & About Layout */
.flex-grow-1 {
  flex-grow: 1;
}

.text-bold {
  font-weight: 600;
}

.list-page-section {
  flex: 1 1 auto;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 4rem;
}

.list-view-content {
  height: auto;
  min-height: 80vh;
}

.list-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-btn-home {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}

.list-card-container {
  padding: 2rem;
}

/* User scaling system target bindings */
.notes-list,
.journal-list,
.about-hero,
.list-header-bar h2 {
  font-size: var(--content-zoom);
  transition: font-size 0.3s ease;
}

/* Code Block Copy Button */

.highlight {
  position: relative;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s;
  z-index: 10;
}

.highlight:hover .copy-code-btn,
.copy-code-btn.copied {
  opacity: 1;
}

.copy-code-btn:hover {
  background: var(--bg-alpha-10);
}

.copy-code-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1);
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}

body.light-mode .copy-code-btn img {
  filter: invert(0);
}