/* Custom CSS for ltandev blog using #4678e4 as base color */

/* Color palette adhering to WCAG guidelines */
:root {
  --primary: #4678e4;          /* Base color */
  --primary-light: #6b93ea;    /* Lighter shade for hover states */
  --primary-dark: #2b5bc8;     /* Darker shade for active states */
  --accent: #e47646;           /* Complementary color */
  --text-dark: #2a2a2a;        /* Dark text color (for light backgrounds) */
  --text-light: #ffffff;       /* Light text color (for dark backgrounds) */
  --background-light: #f5f7fa; /* Light background */
  --sidebar-bg: #f0f4fc;       /* Sidebar background */
  --tag-bg: #eef2fd;           /* Tag background */
}

/* Main layout styles */
html, body {
  min-height: 100vh;
  background-color: white;
  color: var(--text-dark);
  font-family: Verdana, Geneva, sans-serif;
}

/* Apply Verdana font to all elements */
* {
  font-family: Verdana, Geneva, sans-serif !important;
}

/* Ensure these specific elements have Verdana */
.navbar,
.sidebar,
.article,
.footer,
.menu-label,
.menu-list a,
.tag,
.title,
.subtitle {
  font-family: Verdana, Geneva, sans-serif !important;
}

/*post tag list */
.tag-list a:after {
    content: ', ';
}
.tag-list a:last-child:after {
	content: '';
}

.site-container {
  min-height: 100vh;
  background-color: white;
}

/* Sticky sidebar */
.sidebar {
  position: sticky;
  top: 1rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 6px;
  height: calc(100vh);
  overflow-y: auto;
}

/* Profile image styling */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin: 0 auto 1.5rem;
  display: block;
}

/* Social icons styling */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile social icons specifically */
.mobile-social-icons {
  margin: 1rem 0;
}

/* Site title styling */
.site-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.site-title a {
  color: var(--primary) !important;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--primary-dark) !important;
}

/* Menu and category alignment */
.menu-label, .menu-list {
  text-align: right;
}

/* Tag cloud styling */
.tags .tag {
  background-color: var(--tag-bg);
  color: var(--primary);
  margin: 0.2rem;
}

.tags .tag:hover {
  background-color: var(--primary);
  color: var(--text-light);
}


/* Custom navbar for mobile */
.navbar {
  background-color: white;
  border-bottom: 1px solid #f0f0f0;
}

.navbar-burger span {
  background-color: var(--primary);
}

.navbar-menu.is-active {
  background-color: var(--sidebar-bg);
}

/* Mobile menu collapsible sections */
.mobile-menu-trigger {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: var(--primary);
  background-color: white;
}

.mobile-menu-trigger .icon {
  margin-left: 0.5rem;
}

.mobile-menu-trigger:hover {
  background-color: var(--tag-bg);
}

.is-hidden-mobile-menu {
  display: none;
}

@media screen and (max-width: 768px) {
  .menu-list {
    padding-left: 1rem;
  }
  
  .navbar-item .menu {
    width: 100%;
  }
  
  /* Center navbar items on mobile */
  .navbar-start {
    justify-content: center;
    margin: 0 auto;
  }
  
  .navbar-item {
    justify-content: center;
    text-align: center;
  }
  
  .navbar-item .menu-label {
    text-align: center;
  }
  
  /* Mobile social icons styling */
  .mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .mobile-social-icons .social-icon {
    /* Slightly smaller on mobile */
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* Main content styling */
.main-content {
  padding: 2rem;
  background-color: white;
  border-radius: 6px;
}

/* Article styling - Enhanced for better typography */
.article {
  font-size: 0.875rem;
  line-height: 1.7;
}

.article h1, .main-content h1 {
  color: var(--text-dark);
  font-size: 2.0rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.article h2, .main-content h2 {
  color: var(--text-dark);
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
}

.article h3, .main-content h3 {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
}

.article h4, .main-content h4 {
  color: var(--text-dark);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.article h5, .main-content h5 {
  color: var(--text-dark);
  font-size: 1.125rem;
  margin: 1.25rem 0 0.625rem;
}

.article h6, .main-content h6 {
  color: var(--text-dark);
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
}

.article p, .main-content p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.article a, .main-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.article a:hover, .main-content a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

.article blockquote, .main-content blockquote {
  border-left: 4px solid var(--primary-light);
  padding: 1rem 1.5rem;
  background-color: var(--tag-bg);
  color: #555;
  font-style: italic;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.article ul, .article ol, .main-content ul, .main-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.article li, .main-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.article img, .main-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article code, .main-content code {
  background-color: var(--tag-bg);
  color: var(--primary-dark);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace !important;
  font-size: 0.8rem;
  border: 1px solid #e0e8f0;
}

.article pre, .main-content pre {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.4;
  max-width: 650px;
  width: 100%;
  white-space: pre;
  word-wrap: normal;
}

.article pre code, .main-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
}

/* Hide sidebar on mobile and show navbar */
@media screen and (max-width: 768px) {
  .sidebar-column {
    display: none;
  }
  
  .navbar {
    display: block;
  }
}

/* Hide navbar on desktop */
@media screen and (min-width: 769px) {
  .navbar {
    display: none;
  }
  
  /* Hide mobile social icons on desktop */
  .mobile-social-icons {
    display: none;
  }
}

/* Font styling */
body,
button,
input,
select,
textarea,
p,
h1, h2, h3, h4, h5, h6,
a,
span,
div {
  font-family: Verdana, Geneva, sans-serif !important;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: Verdana, Geneva, sans-serif !important;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

h1 {
  font-size: 2.0rem;
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  color: var(--text-dark);
}

h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  letter-spacing: -0.015em;
  color: var(--text-dark);
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-dark);
}

h5 {
  font-size: 1.125rem;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  letter-spacing: -0.005em;
  color: var(--text-dark);
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-dark);
}

/* Typography - Text Elements */
p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

/* Enhanced text spacing and readability */
.main-content p + p {
  margin-top: 1rem;
}

.main-content p:last-child {
  margin-bottom: 0;
}

/* Lists */
ul, ol {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
  margin: 0.5rem 0;
  font-size: 0.825rem;
}

/* Text formatting elements */
strong, b {
  font-weight: 700;
  color: var(--text-dark);
}

em, i {
  font-style: italic;
}

small {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

a:visited {
  color: var(--primary-dark);
}

/* Blockquotes */
blockquote {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary-light);
  background-color: var(--tag-bg);
  color: #555;
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.75rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Code elements */
code {
  font-family: 'Courier New', monospace !important;
  font-size: 0.8rem;
  background-color: var(--tag-bg);
  color: var(--primary-dark);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #e0e8f0;
}

pre {
  font-family: 'Courier New', monospace !important;
  font-size: 0.8rem;
  line-height: 1.4;
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #ddd;
  max-width: 650px;
  width: 100%;
  white-space: pre;
  word-wrap: normal;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  line-height: 1.5;
}

th {
  background-color: var(--tag-bg);
  font-weight: 600;
  color: var(--primary-dark);
}

/* Horizontal rule */
hr {
  border: none;
  height: 2px;
  background-color: var(--primary-light);
  margin: 2rem 0;
  border-radius: 1px;
}

/* Mobile typography adjustments */
@media screen and (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.375rem;
  }
  
  h4 {
    font-size: 1.125rem;
  }
  
  h5 {
    font-size: 1rem;
  }
  
  h6 {
    font-size: 0.875rem;
  }
  
  p, ul, ol {
    font-size: 0.8125rem;
  }
  
  blockquote {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
  }
  
  pre {
    padding: 1rem;
    font-size: 0.75rem;
    max-width: 650px;
    width: 100%;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
  }
}

/* Utility classes */
.has-text-primary {
  color: var(--primary) !important;
}

.has-background-primary {
  background-color: var(--background-light) !important;
  color: var(--text-dark) !important;
}

/* Footer specific styles */
footer.footer {
  background-color: var(--background-light) !important;
  color: var(--text-dark) !important;
}

footer.footer a {
  color: #485fc7 !important;
}

footer.footer a:hover {
  color: #363636 !important;
  text-decoration: underline;
}

.button.is-primary {
  background-color: var(--primary);
}

.button.is-primary:hover {
  background-color: var(--primary-light);
}

.button.is-primary:active {
  background-color: var(--primary-dark);
}