:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.7;
}

.flex-grow {
   flex: 1;
}

section {
  margin-top: 90px;
  margin-bottom: 60px;
}

footer {
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Modern navbar styling */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.025em;
}

.navbar-collapse {
  flex-grow: 1;
}

.navbar-nav {
  flex-direction: row !important;
  align-items: center;
  margin-bottom: 0 !important;
}

.navbar-nav .nav-item {
  display: inline-block;
}

.nav-link {
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.9375rem;
}

.nav-link:hover {
  transform: translateY(-1px);
}

/* Compact search form */
.navbar form.d-flex {
  margin-left: auto;
}

.navbar .form-control {
  height: 32px;
  font-size: 0.8125rem;
  padding: 0.25rem 0.625rem;
  width: 160px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.navbar .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.navbar .form-control:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.navbar .btn {
  height: 32px;
  font-size: 0.8125rem;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  line-height: 1.5;
}

/* Ensure navbar items stay on one line on desktop */
@media (min-width: 768px) {
  .navbar-collapse {
    display: flex !important;
    flex-direction: row;
    align-items: center;
  }
}

/* Code blocks */
pre.highlight {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

/* Posts index */
.post {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.post:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.post>h3.title {
  position: relative;
  padding-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.75rem;
  line-height: 1.3;
}

.post>h3.title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post>h3.title a:hover {
  color: var(--primary-color);
}

.post>h3.title span.date {
  position: relative;
  right: auto;
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.post>.more {
  margin: 1.5rem 0 0 0;
  text-align: left;
}

.post>.more a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.post>.more a:hover {
  color: var(--accent-color);
  transform: translateX(4px);
  display: inline-block;
}

/* Post full */
.post-full .date {
  margin-bottom: 2rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.post-full h1, .post-full h2, .post-full h3 {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-full p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.post-full a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.post-full a:hover {
  border-bottom-color: var(--primary-color);
}

/* Tag box - Modern pill style */
.tag_box {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag_box li {
  line-height: 1;
}

.tag_box li i {
  opacity: 0.7;
}

.tag_box.inline li {
  display: inline-block;
}

.tag_box a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--text-secondary);
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.tag_box a span {
  vertical-align: baseline;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 0.25rem;
}

.tag_box a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tag_box a.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.highlight .hll {
  background-color: #ffffcc
}

.highlight .c {
  color: #999988;
  font-style: italic
}

/* Comment */

.highlight .err {
  color: #a61717;
  background-color: #e3d2d2
}

/* Error */

.highlight .k {
  color: #000000;
  font-weight: bold
}

/* Keyword */

.highlight .o {
  color: #000000;
  font-weight: bold
}

/* Operator */

.highlight .cm {
  color: #999988;
  font-style: italic
}

/* Comment.Multiline */

.highlight .cp {
  color: #999999;
  font-weight: bold;
  font-style: italic
}

/* Comment.Preproc */

.highlight .c1 {
  color: #999988;
  font-style: italic
}

/* Comment.Single */

.highlight .cs {
  color: #999999;
  font-weight: bold;
  font-style: italic
}

/* Comment.Special */

.highlight .gd {
  color: #000000;
  background-color: #ffdddd
}

/* Generic.Deleted */

.highlight .ge {
  color: #000000;
  font-style: italic
}

/* Generic.Emph */

.highlight .gr {
  color: #aa0000
}

/* Generic.Error */

.highlight .gh {
  color: #999999
}

/* Generic.Heading */

.highlight .gi {
  color: #000000;
  background-color: #ddffdd
}

/* Generic.Inserted */

.highlight .go {
  color: #888888
}

/* Generic.Output */

.highlight .gp {
  color: #555555
}

/* Generic.Prompt */

.highlight .gs {
  font-weight: bold
}

/* Generic.Strong */

.highlight .gu {
  color: #aaaaaa
}

/* Generic.Subheading */

.highlight .gt {
  color: #aa0000
}

/* Generic.Traceback */

.highlight .kc {
  color: #000000;
  font-weight: bold
}

/* Keyword.Constant */

.highlight .kd {
  color: #000000;
  font-weight: bold
}

/* Keyword.Declaration */

.highlight .kn {
  color: #000000;
  font-weight: bold
}

/* Keyword.Namespace */

.highlight .kp {
  color: #000000;
  font-weight: bold
}

/* Keyword.Pseudo */

.highlight .kr {
  color: #000000;
  font-weight: bold
}

/* Keyword.Reserved */

.highlight .kt {
  color: #445588;
  font-weight: bold
}

/* Keyword.Type */

.highlight .m {
  color: #009999
}

/* Literal.Number */

.highlight .s {
  color: #d01040
}

/* Literal.String */

.highlight .na {
  color: #008080
}

/* Name.Attribute */

.highlight .nb {
  color: #0086B3
}

/* Name.Builtin */

.highlight .nc {
  color: #445588;
  font-weight: bold
}

/* Name.Class */

.highlight .no {
  color: #008080
}

/* Name.Constant */

.highlight .nd {
  color: #3c5d5d;
  font-weight: bold
}

/* Name.Decorator */

.highlight .ni {
  color: #800080
}

/* Name.Entity */

.highlight .ne {
  color: #990000;
  font-weight: bold
}

/* Name.Exception */

.highlight .nf {
  color: #990000;
  font-weight: bold
}

/* Name.Function */

.highlight .nl {
  color: #990000;
  font-weight: bold
}

/* Name.Label */

.highlight .nn {
  color: #555555
}

/* Name.Namespace */

.highlight .nt {
  color: #000080
}

/* Name.Tag */

.highlight .nv {
  color: #008080
}

/* Name.Variable */

.highlight .ow {
  color: #000000;
  font-weight: bold
}

/* Operator.Word */

.highlight .w {
  color: #bbbbbb
}

/* Text.Whitespace */

.highlight .mf {
  color: #009999
}

/* Literal.Number.Float */

.highlight .mh {
  color: #009999
}

/* Literal.Number.Hex */

.highlight .mi {
  color: #009999
}

/* Literal.Number.Integer */

.highlight .mo {
  color: #009999
}

/* Literal.Number.Oct */

.highlight .sb {
  color: #d01040
}

/* Literal.String.Backtick */

.highlight .sc {
  color: #d01040
}

/* Literal.String.Char */

.highlight .sd {
  color: #d01040
}

/* Literal.String.Doc */

.highlight .s2 {
  color: #d01040
}

/* Literal.String.Double */

.highlight .se {
  color: #d01040
}

/* Literal.String.Escape */

.highlight .sh {
  color: #d01040
}

/* Literal.String.Heredoc */

.highlight .si {
  color: #d01040
}

/* Literal.String.Interpol */

.highlight .sx {
  color: #d01040
}

/* Literal.String.Other */

.highlight .sr {
  color: #009926
}

/* Literal.String.Regex */

.highlight .s1 {
  color: #d01040
}

/* Literal.String.Single */

.highlight .ss {
  color: #990073
}

/* Literal.String.Symbol */

.highlight .bp {
  color: #999999
}

/* Name.Builtin.Pseudo */

.highlight .vc {
  color: #008080
}

/* Name.Variable.Class */

.highlight .vg {
  color: #008080
}

/* Name.Variable.Global */

.highlight .vi {
  color: #008080
}

/* Name.Variable.Instance */

.highlight .il {
  color: #009999
}

/* Literal.Number.Integer.Long */