/* General Styles */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  /* Literary serif font stack for a more scholarly appearance */
  font-family: 'Crimson Text', 'Georgia', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1rem;
}

@media (min-width: 768px) {
  body {
    font-size: 1.2rem;
  }
}

/* Text Styles */
h1 {
  font-size: 1.5rem;
}
h2 {
  font-size: 1.15rem;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
}
h4 {
  font-weight: 400;
  font-style: italic;
}
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1;
  word-wrap: break-word;
  margin: 0.5rem 0;
}
h3,
h5 {
  font-weight: 600;
}
div + h1, p + h1, ul + h1, ol + h1,
div + h2, p + h2, ul + h2, ol + h2,
div + h3, p + h3, ul + h3, ol + h3,
div + h4, p + h4, ul + h4, ol + h4,
div + h5, p + h5, ul + h5, ol + h5 {
  margin-top: 2.5em;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.33rem;
  }
  h3 {
    font-size: 1.15rem;
  }
}

hr {
  height: 1px;
  border: none;
  background-color: #cdcdcd;
}

p {
  line-height: 1.45;
}

a {
  color: rgb(24, 127, 168);
  text-decoration: none;
  word-wrap: break-word;
}
a:visited {
  color: rgb(24, 127, 168);
}
a.no-highlight {
  background: none;
}
a.no-highlight:hover {
  background: none;
}
/* Dark mode colors now handled by theme-system.html */

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

blockquote {
  border-left: 4px solid rgba(180, 255, 180, 0.75);
  margin: 1em 0;
  padding: 0 1rem;
}

ol li,
ul li {
  line-height: 1.45;
  margin-bottom: 0.2rem;
}

.header-underline {
  text-decoration: none;
  border-bottom: 4px solid red;
}

/* Layout Styles */
.row-wrap {
  margin: 0 auto;
  max-width: 45rem;
  padding: 0.66rem;
}

.row-wrap-wide {
  margin: 0 auto;
  max-width: 75rem;
  padding: 0.66rem;
}

.block-link {
  color: black;
  display: block;
  text-decoration: none;
  transition: background-color 0.2s linear;
  background-color: white;
}
.block-link:visited {
  color: black;
}
.block-link:hover {
  background-color: rgb(235, 235, 235);
}
/* Dark mode colors now handled by theme-system.html */

.header {
  text-align: center;
  /* background-color: rgb(42, 201, 196); */
  /* color: white; */
}
.header__image-container {
  flex: 1;
  margin-right: 0.5rem;
}
.header__title-container {
  flex: 5;
  text-align: center;
}
.header__title {
  color: black;
  font-size: 2.25rem;
  margin: 0;
  font-weight: 400;
  text-align: center;
}

.header__subtitle {
  color: black;
  margin: 0;
}
/* Dark mode colors now handled by theme-system.html */

@media (min-width: 768px) {
  .header__title {
    font-size: 2.75rem;
  }
}

.main-nav {
  text-align: center;
  max-width: none;
  width: 100%;
}
.main-nav > a {
  color: black;
  margin: 0 0.33rem;
  font-size: 1.5rem;
}
.main-nav > a:visited {
  color: black;
}
.main-nav__icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  vertical-align: text-bottom;
}
@media (min-width: 768px) {
  .main-nav > a {
    margin: 0 1rem;
    font-size: 1.4rem;
  }
  .main-nav__icon {
    width: 1.4rem;
    height: 1.4rem;
  }
}
/* Dark mode colors now handled by theme-system.html */

.footer {
  text-align: center;
  padding: 2rem 0;
  max-width: none;
  width: 100%;
}
.footer__address {
  font-style: normal;
}
.footer__link {
}

/* About Page Styles */
.bio {
  font-size: 1.4rem;
  font-weight: 300;
}

/* Post Styles */
.post-preview {
  padding: 1rem 0.5rem;
}
.post-preview__title {
  margin-top: 0;
  margin-bottom: 0.4rem;
}
.post-preview__body {
  margin: 0;
}

.post-body {
  margin-bottom: 2rem;
}

.post-body .footnotes {
  font-size: 1rem;
}

.post-header {
  /*margin-bottom: 0.5rem;*/
}

.post-date {
  text-transform: uppercase;
  color: #999999;
  font-weight: 600;
}

.post-title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-footer {
  margin: 1rem 0;
}

.post-category-label {
  font-size: 0.75rem;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.25rem;
  background: rgb(230, 230, 230);
}
/* Dark mode colors now handled by theme-system.html */

.youtube-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.table-wrapper {
  overflow-x: auto;
}

.MathJax_Display {
  overflow-x: auto;
}

/* Photos Page */
.photo-container {
}
.photo-container > a {
  text-align: center;
}
.photo-container > p {
  margin: 0;
  line-height: 1;
}
.photo-container small {
  color: gray;
}
.photo {
  border-radius: 0.33rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

/* MathJAX Styles */
.MJXc-display {
  overflow-x: auto;
}

/**
 * Syntax Highlighting
 **/

/* Custom syntax highlighting styles  */
div.highlight {
  padding: 0.5rem;
  overflow-y: auto;
  overflow-x: auto;
  max-height: 100rem;
  line-height: 1.2;
  background: #f8f8f8;
  border-radius: 4px;
}

/* Use for markdown with backticks, ex: `some_code_thing` */
code.highlighter-rouge {
  font-weight: 600;
  line-height: 1.2;
  font-size: 1rem;
  padding: 0.1rem 0.25rem;
  background-color: rgb(230, 230, 230);
  color: #1f779a;
  word-wrap: break-word;
}
@supports (color-scheme: dark light) {
  @media screen and (prefers-color-scheme: dark) {
    code.highlighter-rouge {
      background-color: rgb(40, 40, 40);
      color: #f26b10;
    }
  }
}

pre[class="highlight"] > code {
  line-height: 1.2;
  font-size: 0.9rem;
  background: transparent;
  color: inherit;
}



/* Ensure margins between consecutive code blocks */
[class^="language-"] {
  margin: 1rem 0;
}

/**
 * Pygment Syntax Highlighting Themes
 **/ 

/* Pygments Default Highlighting Theme for Light Mode */

.highlight .hll {
  background-color: #ffffcc;
}
.highlight {
  background: #f8f8f8;
  color: #333;
}
.highlight .c {
  color: #408080;
  font-style: italic;
} /* Comment */
.highlight .err {
  border: 1px solid #ff0000;
} /* Error */
.highlight .k {
  color: #008000;
  font-weight: bold;
} /* Keyword */
.highlight .o {
  color: #666666;
} /* Operator */
.highlight .ch {
  color: #408080;
  font-style: italic;
} /* Comment.Hashbang */
.highlight .cm {
  color: #408080;
  font-style: italic;
} /* Comment.Multiline */
.highlight .cp {
  color: #bc7a00;
} /* Comment.Preproc */
.highlight .cpf {
  color: #408080;
  font-style: italic;
} /* Comment.PreprocFile */
.highlight .c1 {
  color: #408080;
  font-style: italic;
} /* Comment.Single */
.highlight .cs {
  color: #408080;
  font-style: italic;
} /* Comment.Special */
.highlight .gd {
  color: #a00000;
} /* Generic.Deleted */
.highlight .ge {
  font-style: italic;
} /* Generic.Emph */
.highlight .gr {
  color: #ff0000;
} /* Generic.Error */
.highlight .gh {
  color: #000080;
  font-weight: bold;
} /* Generic.Heading */
.highlight .gi {
  color: #00a000;
} /* Generic.Inserted */
.highlight .go {
  color: #888888;
} /* Generic.Output */
.highlight .gp {
  color: #000080;
  font-weight: bold;
} /* Generic.Prompt */
.highlight .gs {
  font-weight: bold;
} /* Generic.Strong */
.highlight .gu {
  color: #800080;
  font-weight: bold;
} /* Generic.Subheading */
.highlight .gt {
  color: #0044dd;
} /* Generic.Traceback */
.highlight .kc {
  color: #008000;
  font-weight: bold;
} /* Keyword.Constant */
.highlight .kd {
  color: #008000;
  font-weight: bold;
} /* Keyword.Declaration */
.highlight .kn {
  color: #008000;
  font-weight: bold;
} /* Keyword.Namespace */
.highlight .kp {
  color: #008000;
} /* Keyword.Pseudo */
.highlight .kr {
  color: #008000;
  font-weight: bold;
} /* Keyword.Reserved */
.highlight .kt {
  color: #b00040;
} /* Keyword.Type */
.highlight .m {
  color: #666666;
} /* Literal.Number */
.highlight .s {
  color: #ba2121;
} /* Literal.String */
.highlight .na {
  color: #7d9029;
} /* Name.Attribute */
.highlight .nb {
  color: #008000;
} /* Name.Builtin */
.highlight .nc {
  color: #0000ff;
  font-weight: bold;
} /* Name.Class */
.highlight .no {
  color: #880000;
} /* Name.Constant */
.highlight .nd {
  color: #aa22ff;
} /* Name.Decorator */
.highlight .ni {
  color: #999999;
  font-weight: bold;
} /* Name.Entity */
.highlight .ne {
  color: #d2413a;
  font-weight: bold;
} /* Name.Exception */
.highlight .nf {
  color: #0000ff;
} /* Name.Function */
.highlight .nl {
  color: #a0a000;
} /* Name.Label */
.highlight .nn {
  color: #0000ff;
  font-weight: bold;
} /* Name.Namespace */
.highlight .nt {
  color: #008000;
  font-weight: bold;
} /* Name.Tag */
.highlight .nv {
  color: #19177c;
} /* Name.Variable */
.highlight .ow {
  color: #aa22ff;
  font-weight: bold;
} /* Operator.Word */
.highlight .w {
  color: #bbbbbb;
} /* Text.Whitespace */
.highlight .mb {
  color: #666666;
} /* Literal.Number.Bin */
.highlight .mf {
  color: #666666;
} /* Literal.Number.Float */
.highlight .mh {
  color: #666666;
} /* Literal.Number.Hex */
.highlight .mi {
  color: #666666;
} /* Literal.Number.Integer */
.highlight .mo {
  color: #666666;
} /* Literal.Number.Oct */
.highlight .sa {
  color: #ba2121;
} /* Literal.String.Affix */
.highlight .sb {
  color: #ba2121;
} /* Literal.String.Backtick */
.highlight .sc {
  color: #ba2121;
} /* Literal.String.Char */
.highlight .dl {
  color: #ba2121;
} /* Literal.String.Delimiter */
.highlight .sd {
  color: #ba2121;
  font-style: italic;
} /* Literal.String.Doc */
.highlight .s2 {
  color: #ba2121;
} /* Literal.String.Double */
.highlight .se {
  color: #bb6622;
  font-weight: bold;
} /* Literal.String.Escape */
.highlight .sh {
  color: #ba2121;
} /* Literal.String.Heredoc */
.highlight .si {
  color: #bb6688;
  font-weight: bold;
} /* Literal.String.Interpol */
.highlight .sx {
  color: #008000;
} /* Literal.String.Other */
.highlight .sr {
  color: #bb6688;
} /* Literal.String.Regex */
.highlight .s1 {
  color: #ba2121;
} /* Literal.String.Single */
.highlight .ss {
  color: #19177c;
} /* Literal.String.Symbol */
.highlight .bp {
  color: #008000;
} /* Name.Builtin.Pseudo */
.highlight .fm {
  color: #0000ff;
} /* Name.Function.Magic */
.highlight .vc {
  color: #19177c;
} /* Name.Variable.Class */
.highlight .vg {
  color: #19177c;
} /* Name.Variable.Global */
.highlight .vi {
  color: #19177c;
} /* Name.Variable.Instance */
.highlight .vm {
  color: #19177c;
} /* Name.Variable.Magic */
.highlight .il {
  color: #666666;
} /* Literal.Number.Integer.Long */


/* Dracula Pygments Highlighting Theme for Dark Mode */
@supports (color-scheme: dark light) {
  @media screen and (prefers-color-scheme: dark) {
    /* Dracula Theme v1.2.5
    *
    * https://github.com/zenorocha/dracula-theme
    *
    * Copyright 2016, All rights reserved
    *
    * Code licensed under the MIT license
    * http://zenorocha.mit-license.org
    *
    * @author Rob G <wowmotty@gmail.com>
    * @author Chris Bracco <chris@cbracco.me>
    * @author Zeno Rocha <hi@zenorocha.com>
    */

    div.highlight { background: #282a36; }
    .highlight .hll { background-color: #f1fa8c }
    .highlight  { background: #282a36; color: #f8f8f2 }
    .highlight .c { color: #6272a4 } /* Comment */
    .highlight .err { color: #f8f8f2 } /* Error */
    .highlight .g { color: #f8f8f2 } /* Generic */
    .highlight .k { color: #ff79c6 } /* Keyword */
    .highlight .l { color: #f8f8f2 } /* Literal */
    .highlight .n { color: #f8f8f2 } /* Name */
    .highlight .o { color: #ff79c6 } /* Operator */
    .highlight .x { color: #f8f8f2 } /* Other */
    .highlight .p { color: #f8f8f2 } /* Punctuation */
    .highlight .ch { color: #6272a4 } /* Comment.Hashbang */
    .highlight .cm { color: #6272a4 } /* Comment.Multiline */
    .highlight .cp { color: #ff79c6 } /* Comment.Preproc */
    .highlight .cpf { color: #6272a4 } /* Comment.PreprocFile */
    .highlight .c1 { color: #6272a4 } /* Comment.Single */
    .highlight .cs { color: #6272a4 } /* Comment.Special */
    .highlight .gd { color: #8b080b } /* Generic.Deleted */
    .highlight .ge { color: #f8f8f2; text-decoration: underline } /* Generic.Emph */
    .highlight .gr { color: #f8f8f2 } /* Generic.Error */
    .highlight .gh { color: #f8f8f2; font-weight: bold } /* Generic.Heading */
    .highlight .gi { color: #f8f8f2; font-weight: bold } /* Generic.Inserted */
    .highlight .go { color: #44475a } /* Generic.Output */
    .highlight .gp { color: #f8f8f2 } /* Generic.Prompt */
    .highlight .gs { color: #f8f8f2 } /* Generic.Strong */
    .highlight .gu { color: #f8f8f2; font-weight: bold } /* Generic.Subheading */
    .highlight .gt { color: #f8f8f2 } /* Generic.Traceback */
    .highlight .kc { color: #ff79c6 } /* Keyword.Constant */
    .highlight .kd { color: #8be9fd; font-style: italic } /* Keyword.Declaration */
    .highlight .kn { color: #ff79c6 } /* Keyword.Namespace */
    .highlight .kp { color: #ff79c6 } /* Keyword.Pseudo */
    .highlight .kr { color: #ff79c6 } /* Keyword.Reserved */
    .highlight .kt { color: #8be9fd } /* Keyword.Type */
    .highlight .ld { color: #f8f8f2 } /* Literal.Date */
    .highlight .m { color: #bd93f9 } /* Literal.Number */
    .highlight .s { color: #f1fa8c } /* Literal.String */
    .highlight .na { color: #50fa7b } /* Name.Attribute */
    .highlight .nb { color: #8be9fd; font-style: italic } /* Name.Builtin */
    .highlight .nc { color: #50fa7b } /* Name.Class */
    .highlight .no { color: #f8f8f2 } /* Name.Constant */
    .highlight .nd { color: #f8f8f2 } /* Name.Decorator */
    .highlight .ni { color: #f8f8f2 } /* Name.Entity */
    .highlight .ne { color: #f8f8f2 } /* Name.Exception */
    .highlight .nf { color: #50fa7b } /* Name.Function */
    .highlight .nl { color: #8be9fd; font-style: italic } /* Name.Label */
    .highlight .nn { color: #f8f8f2 } /* Name.Namespace */
    .highlight .nx { color: #f8f8f2 } /* Name.Other */
    .highlight .py { color: #f8f8f2 } /* Name.Property */
    .highlight .nt { color: #ff79c6 } /* Name.Tag */
    .highlight .nv { color: #8be9fd; font-style: italic } /* Name.Variable */
    .highlight .ow { color: #ff79c6 } /* Operator.Word */
    .highlight .w { color: #f8f8f2 } /* Text.Whitespace */
    .highlight .mb { color: #bd93f9 } /* Literal.Number.Bin */
    .highlight .mf { color: #bd93f9 } /* Literal.Number.Float */
    .highlight .mh { color: #bd93f9 } /* Literal.Number.Hex */
    .highlight .mi { color: #bd93f9 } /* Literal.Number.Integer */
    .highlight .mo { color: #bd93f9 } /* Literal.Number.Oct */
    .highlight .sa { color: #f1fa8c } /* Literal.String.Affix */
    .highlight .sb { color: #f1fa8c } /* Literal.String.Backtick */
    .highlight .sc { color: #f1fa8c } /* Literal.String.Char */
    .highlight .dl { color: #f1fa8c } /* Literal.String.Delimiter */
    .highlight .sd { color: #f1fa8c } /* Literal.String.Doc */
    .highlight .s2 { color: #f1fa8c } /* Literal.String.Double */
    .highlight .se { color: #f1fa8c } /* Literal.String.Escape */
    .highlight .sh { color: #f1fa8c } /* Literal.String.Heredoc */
    .highlight .si { color: #f1fa8c } /* Literal.String.Interpol */
    .highlight .sx { color: #f1fa8c } /* Literal.String.Other */
    .highlight .sr { color: #f1fa8c } /* Literal.String.Regex */
    .highlight .s1 { color: #f1fa8c } /* Literal.String.Single */
    .highlight .ss { color: #f1fa8c } /* Literal.String.Symbol */
    .highlight .bp { color: #f8f8f2; font-style: italic } /* Name.Builtin.Pseudo */
    .highlight .fm { color: #50fa7b } /* Name.Function.Magic */
    .highlight .vc { color: #8be9fd; font-style: italic } /* Name.Variable.Class */
    .highlight .vg { color: #8be9fd; font-style: italic } /* Name.Variable.Global */
    .highlight .vi { color: #8be9fd; font-style: italic } /* Name.Variable.Instance */
    .highlight .vm { color: #8be9fd; font-style: italic } /* Name.Variable.Magic */
    .highlight .il { color: #bd93f9 } /* Literal.Number.Integer.Long */
  }
}

/* Homepage Hero Styles */
.home {
  height: 100vh;
  overflow: hidden;
}

.hero-intro {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1rem;
  margin: 0;
  box-sizing: border-box;
}

/* Nav within hero section */
.hero-intro .main-nav {
  width: 100%;
  padding: 0;
  max-width: none;
  flex-shrink: 0;
}

/* Center content in hero */
.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Spacer to balance nav at top */
.hero-spacer {
  height: 2rem;
  flex-shrink: 0;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-content {
  max-width: 48rem;
  margin: 0 auto;
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero-content .lead {
  font-size: 1.3rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-content p {
    font-size: 1.25rem;
  }
  .hero-content .lead {
    font-size: 1.5rem;
  }
}

/* Essay preview styling */
.essay-preview-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.essay-preview-link:hover {
  text-decoration: none;
}

.essay-preview-title {
  margin-bottom: 0.75rem;
}

.essay-preview-meta,
.note-preview-meta {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.essay-preview-meta .status-badge,
.note-preview-meta .status-badge {
  display: inline-flex;
  margin: 0;
}

.meta-separator {
  color: #999;
  margin: 0 0.25rem;
}

/* Articles List Styles */
.all-articles {
  margin: 3rem 0;
  padding: 0 1rem;
}

.all-articles h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: center;
}

.article-list {
  max-width: 56rem;
  margin: 0 auto;
}

.article-item {
  display: flex;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.article-item:last-child {
  border-bottom: none;
}

.article-date {
  flex-shrink: 0;
  width: 110px;
  padding-right: 1.5rem;
  font-size: 0.9rem;
  color: #666;
  text-align: right;
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-title a:hover {
  color: rgb(24, 127, 168);
}

.article-authors {
  font-size: 0.95rem;
  color: #666;
  margin: 0.25rem 0;
  font-style: italic;
}

.article-excerpt {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
  margin: 0.5rem 0 0 0;
}

.view-all {
  text-align: center;
  margin-top: 3rem;
}

.view-all-link {
  display: inline-block;
  margin: 0 1rem;
  font-size: 1.1rem;
}

/* Essay styles */
.essay-preview-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: #666;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  font-style: italic;
  line-height: 1.4;
}

/* Essay and Note page title spacing */
.essay-title,
.note-title {
  margin-top: 0;
  margin-bottom: 0.5rem; /* Small space below title before meta info */
}

.essay-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  color: #666;
  margin-top: 0;
  margin-bottom: 1.5rem; /* Good space after subtitle */
  font-style: italic;
  line-height: 1.5;
}

.essay-authors {
  font-size: 1.1rem;
  color: #666;
  margin-top: 0;
  margin-bottom: 1.5rem; /* Space after author names */
  font-style: italic;
}

.essay-abstract {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-left: 3px solid #e0e0e0;
  background: #f9f9f9;
}

.essay-header,
.note-header {
  margin-bottom: 2rem; /* Space after entire header section */
}

/* About page h2 spacing */
.about-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Note preview styles */
.note-preview-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.note-preview-link:hover {
  text-decoration: none;
}

/* Note and essay separators */
.note-preview,
.essay-preview {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.note-preview-link:first-child .note-preview,
.essay-preview-link:first-child .essay-preview {
  border-top: none !important;
  padding-top: 0;
}
.note-preview-link:last-child .note-preview,
.essay-preview-link:last-child .essay-preview {
  border-bottom: none !important;
  margin-bottom: 0;
}

/* Dark mode adjustments for essay elements */
@media (prefers-color-scheme: dark) {
  .essay-subtitle {
    color: #999;
  }
  
  :root:not([data-theme="light"]) .note-preview,
  :root:not([data-theme="light"]) .essay-preview {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .essay-authors {
    color: #999;
  }
  
  .essay-abstract {
    color: #aaa;
    border-left-color: #444;
    background: #1a1a1a;
  }
}

/* Dark mode adjustments for homepage */
@supports (color-scheme: dark light) {
  @media screen and (prefers-color-scheme: dark) {
    body {
      background-color: #121212;
      color: #e0e0e0;
    }
    
    .article-item {
      border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .article-date {
      color: #999;
    }
    
    .article-title a {
      color: #e0e0e0;
    }
    
    .article-title a:hover {
      color: rgb(34, 194, 255);
    }
    
    .article-authors {
      color: #999;
    }
    
    .article-excerpt {
      color: #bbb;
    }
    
    .essay-preview-subtitle {
      color: #999;
    }
  }
}

/* Author inline styles for conversation format */
.inline-author {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  vertical-align: middle;
}

.inline-author .author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
}

.inline-author .author-mini-pic {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: middle;
}

.inline-author .author-name {
  font-weight: 600;
  font-size: 0.95em;
}

.inline-author .author-link:hover .author-name {
  color: rgb(24, 127, 168);
  text-decoration: underline;
}

/* Slack-style conversation formatting */
.conversation {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.conversation-message {
  margin: 1rem 0;
  line-height: 1.5;
}

.conversation-message:first-child {
  margin-top: 0;
}

.conversation-message:last-child {
  margin-bottom: 0;
}

/* Remove top margin from first paragraph to align with Slack style */
.conversation-message > p:first-of-type {
  margin-top: 0;
}

/* Remove bottom margin from last paragraph before reactions */
.conversation-message > p:last-of-type {
  margin-bottom: 0;
}

.conversation-timestamp {
  font-size: 0.85em;
  color: #666;
  margin-left: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .conversation {
    background: #1a1a1a;
    border-color: #333;
  }
  
  .inline-author .author-link:hover .author-name {
    color: rgb(34, 194, 255);
  }
  
  .conversation-timestamp {
    color: #999;
  }
}

html[data-theme="dark"] .conversation {
  background: #1a1a1a;
  border-color: #333;
}

html[data-theme="dark"] .inline-author .author-link:hover .author-name {
  color: rgb(34, 194, 255);
}

html[data-theme="dark"] .conversation-timestamp {
  color: #999;
}

/* Light mode conversation styles */
html[data-theme="light"] .conversation {
  background: #f9f9f9;
  border-color: #e5e5e5;
}

/* Message reactions styling */
.message-reactions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.message-reactions .reaction {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  background: rgba(24, 127, 168, 0.1);
  border: 1px solid rgba(24, 127, 168, 0.2);
  border-radius: 12px;
  font-size: 0.85em;
  color: #666;
}

@media (prefers-color-scheme: dark) {
  .message-reactions .reaction {
    background: rgba(34, 194, 255, 0.1);
    border-color: rgba(34, 194, 255, 0.2);
    color: #aaa;
  }
}

html[data-theme="dark"] .message-reactions .reaction {
  background: rgba(34, 194, 255, 0.1);
  border-color: rgba(34, 194, 255, 0.2);
  color: #aaa;
}

/* IMPORTANT: Theme overrides must come last to take precedence */
/* These explicitly override any media query rules when theme is manually set */
html[data-theme="light"] .note-preview,
html[data-theme="light"] .essay-preview {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="dark"] .note-preview,
html[data-theme="dark"] .essay-preview {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}