/* stylelint-disable selector-list-comma-newline-after, property-no-vendor-prefix */

/*
 * Theme Variables
 */

:root {
  /* Light theme (default) */
  --bg-color: #ffffff;
  --text-color: #555;
  --heading-color: #333;
  --masthead-bg: #428bca;
  --nav-text-color: #cdddeb;
  --nav-hover-color: #fff;
  --nav-active-color: #fff;
  --sidebar-bg: #f5f5f5;
  --footer-bg: #f9f9f9;
  --footer-border: #e5e5e5;
  --description-color: #999;
  --meta-color: #999;
  --footer-text-color: #999;
}

[data-theme="dark"] {
  /* Dark theme */
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --heading-color: #ffffff;
  --masthead-bg: #2c3e50;
  --nav-text-color: #bdc3c7;
  --nav-hover-color: #fff;
  --nav-active-color: #fff;
  --sidebar-bg: #2d2d2d;
  --footer-bg: #1e1e1e;
  --footer-border: #404040;
  --description-color: #bbb;
  --meta-color: #bbb;
  --footer-text-color: #bbb;
}

/*
 * Globals
 */

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  margin-top: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--heading-color);
  transition: color 0.3s ease;
}

/*
 * Masthead for nav
 */

.blog-masthead {
  background-color: var(--masthead-bg);
  -webkit-box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .1);
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .1);
  transition: background-color 0.3s ease;
}

/* Navigation layout */
.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-right {
  margin-left: auto;
}

/* Nav links */
.blog-nav-item {
  position: relative;
  display: inline-block;
  padding: 10px;
  font-weight: 500;
  color: var(--nav-text-color);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease;
}
.blog-nav-item:hover,
.blog-nav-item:focus {
  color: var(--nav-hover-color);
  text-decoration: none;
}

/* Theme toggle specific styles */
.theme-toggle {
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Active state gets a caret at the bottom */
.blog-nav .active {
  color: var(--nav-active-color);
}
.blog-nav .active:after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -5px;
  vertical-align: middle;
  content: " ";
  border-right: 5px solid transparent;
  border-bottom: 5px solid;
  border-left: 5px solid transparent;
}


/*
 * Blog name and description
 */

.blog-header {
  padding-top: 20px;
  padding-bottom: 20px;
}
.blog-title {
  margin-top: 30px;
  margin-bottom: 0;
  font-size: 60px;
  font-weight: 400;
}
.blog-description {
  font-size: 20px;
  color: var(--description-color);
  transition: color 0.3s ease;
}


/*
 * Main column and sidebar layout
 */

.blog-main {
  font-size: 18px;
  line-height: 1.5;
}

/* Sidebar modules for boxing content */
.sidebar-module {
  padding: 15px;
  margin: 0 -15px 15px;
}
.sidebar-module-inset {
  padding: 15px;
  background-color: var(--sidebar-bg);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.sidebar-module-inset p:last-child,
.sidebar-module-inset ul:last-child,
.sidebar-module-inset ol:last-child {
  margin-bottom: 0;
}


/* Pagination */
.pager {
  margin-bottom: 60px;
  text-align: left;
}
.pager > li > a {
  width: 140px;
  padding: 10px 20px;
  text-align: center;
  border-radius: 30px;
}


/*
 * Blog posts
 */

.blog-post {
  margin-bottom: 60px;
}
.blog-post-title {
  margin-bottom: 5px;
  font-size: 40px;
}
.blog-post-meta {
  margin-bottom: 20px;
  color: var(--meta-color);
  transition: color 0.3s ease;
}


/*
 * Footer
 */

.blog-footer {
  padding: 40px 0;
  color: var(--footer-text-color);
  text-align: center;
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.blog-footer p:last-child {
  margin-bottom: 0;
}

/* Additional dark theme support */
[data-theme="dark"] a {
  color: #4A90E2;
}

[data-theme="dark"] a:hover,
[data-theme="dark"] a:focus {
  color: #66A3E0;
}

[data-theme="dark"] .blog-nav-item:not(.theme-toggle) {
  color: var(--nav-text-color);
}

[data-theme="dark"] .blog-nav-item.active:not(.theme-toggle) {
  color: var(--nav-active-color);
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Prevent transition on page load */
.no-transition * {
  transition: none !important;
}
