/* ========================================
   Mini-CoderBrain Professional Styling
   Enterprise-grade polish with Inter font
   Beautiful Jekyll theme custom overrides
   ======================================== */

/* --- Google Fonts - Inter --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* --- Base Typography - Much Smaller & Professional --- */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #2c3e50;
  font-weight: 400;
}

/* --- Professional Heading Sizes (Reduced) --- */

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.875rem;
  color: #1a252f;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a252f;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  color: #2c3e50;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #34495e;
}

h5 {
  font-size: 0.925rem;
  font-weight: 600;
  color: #34495e;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #586069;
}

/* --- Paragraph & Text Spacing --- */

p {
  margin-bottom: 1rem;
  font-size: 14px;
  line-height: 1.6;
}

/* --- Navigation Bar - Compact & Professional --- */

.navbar {
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  min-height: auto;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 !important;
  letter-spacing: -0.01em;
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
  height: 40px;
}

.navbar-nav {
  font-size: 0.875rem;
}

.navbar-nav .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

.navbar-nav .dropdown-menu {
  font-size: 0.75rem;
  padding: 0.25rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: auto;
}

.navbar-nav .dropdown-item {
  padding: 0.35rem 0.875rem;
  font-size: 0.75rem;
  white-space: nowrap;
  line-height: 1.4;
}

.navbar-nav .dropdown-item:hover {
  background-color: #f6f8fa;
}

/* Fix dropdown text wrapping */
.navbar-nav .dropdown-menu a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* --- Header/Intro Sections - Compact --- */

.intro-header {
  margin-bottom: 1rem;
  padding: 1.25rem 0 1rem;
}

.intro-header .page-heading {
  text-align: center;
}

.intro-header .page-heading h1 {
  font-size: 1.75rem;
  margin-bottom: 0.375rem;
  font-weight: 700;
}

.intro-header .page-subheading {
  font-size: 0.9375rem;
  color: #586069;
  font-weight: 400;
  line-height: 1.4;
}

.intro-header .post-heading h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

/* --- Code Styling - Compact --- */

code {
  background-color: #f6f8fa;
  padding: 0.15em 0.35em;
  margin: 0;
  font-size: 0.85em;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  color: #d73a49;
}

pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 12px;
  overflow: auto;
  font-size: 0.8125em;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: #24292e;
  border-radius: 0;
  font-size: 1em;
}

/* --- List Styling - Compact --- */

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.75rem;
}

li {
  margin-bottom: 0.375rem;
  line-height: 1.6;
  font-size: 14px;
}

ul ul, ol ol, ul ol, ol ul {
  margin-top: 0.375rem;
  margin-bottom: 0.375rem;
}

/* --- Link Styling --- */

a {
  color: #0366d6;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #0256c7;
  text-decoration: underline;
}

/* --- Button Styling - Compact --- */

.btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-transform: none;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  color: white;
}

.btn-primary {
  background-color: #0366d6;
  color: white;
}

.btn-primary:hover {
  background-color: #0256c7;
  color: white;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.625rem 1.25rem;
}

/* --- Container & Layout --- */

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1rem;
}

.container {
  max-width: 1140px;
  padding: 0.75rem 1rem;
}

/* --- Blockquotes - Compact --- */

blockquote {
  border-left: 3px solid #0366d6;
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0.875rem;
  color: #586069;
  font-style: italic;
  background-color: #f6f8fa;
  padding: 0.625rem 1rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
}

/* --- Tables - Compact --- */

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

table th, table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e1e4e8;
  text-align: left;
}

table th {
  background-color: #f6f8fa;
  font-weight: 600;
  color: #24292e;
  font-size: 0.875rem;
}

table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* --- Horizontal Rules --- */

hr {
  border: 0;
  border-top: 1px solid #e1e4e8;
  margin: 1.5rem 0;
}

/* --- Footer - Compact --- */

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e1e4e8;
  font-size: 0.8125rem;
  color: #586069;
}

footer p {
  font-size: 0.8125rem;
}

/* --- Custom Classes --- */

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  margin-right: 0.375rem;
}

.badge-success {
  background-color: #28a745;
  color: white;
}

.badge-info {
  background-color: #17a2b8;
  color: white;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

/* Highlight boxes - Compact */
.highlight-box {
  background-color: #f0f7ff;
  border-left: 3px solid #0366d6;
  padding: 0.75rem;
  margin: 0.875rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
}

.warning-box {
  background-color: #fffbeb;
  border-left: 3px solid #ffc107;
  padding: 0.75rem;
  margin: 0.875rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
}

.success-box {
  background-color: #f0fdf4;
  border-left: 3px solid #28a745;
  padding: 0.75rem;
  margin: 0.875rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
}

/* --- Avatar/Logo - Smaller --- */

/* Hide centered avatar - logo is in navbar-brand title instead */
.intro-header .avatar-container,
.navbar-custom .avatar-container {
  display: none !important;
}

.navbar-custom .avatar-container .avatar-img,
.navbar-custom.top-nav-regular .avatar-container .avatar-img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  margin-right: 0 !important;
  display: inline-block !important;
  object-fit: cover !important;
}

.navbar-brand {
  display: flex !important;
  align-items: center !important;
  padding: 0.5rem 0 !important;
}

.navbar-brand img {
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  height: 48px !important;
  width: 48px !important;
  margin-right: 0.75rem !important;
  display: inline-block !important;
  object-fit: cover !important;
}

.avatar-container img {
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  max-height: 48px !important;
  max-width: 48px !important;
  width: 48px !important;
  height: 48px !important;
  object-fit: cover !important;
}

/* --- Post Content Spacing --- */

.post-content,
.main-explain-area {
  margin-top: 1rem;
  font-size: 14px;
}

.post-content h1,
.main-explain-area h1 {
  margin-top: 1rem;
}

/* --- Professional Spacing --- */

section {
  margin-bottom: 1.5rem;
}

/* --- Get Started Buttons --- */

.get-started-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1rem 0;
}

.get-started-wrap .btn {
  flex: 1 1 auto;
  min-width: 180px;
}

/* --- Responsive Design --- */

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.075rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-nav .nav-link {
    font-size: 0.8125rem;
    padding: 0.35rem 0.5rem;
  }

  .intro-header .page-heading h1 {
    font-size: 1.6rem;
  }

  .intro-header .page-subheading {
    font-size: 0.9375rem;
  }

  .get-started-wrap {
    flex-direction: column;
  }

  .get-started-wrap .btn {
    width: 100%;
  }

  .main-content {
    padding: 1rem 0.75rem;
  }
}

/* --- Improved Readability --- */

.main-content p,
.post-content p {
  max-width: 750px;
}

/* --- Professional Polish --- */

.page-heading,
.post-heading {
  margin-bottom: 1.5rem;
}

/* Override any large Beautiful Jekyll defaults */
.navbar-custom {
  padding: 0.5rem 0;
}

.navbar-custom .navbar-brand {
  font-size: 1.1rem;
  line-height: 1.5;
}

.navbar-custom .nav-link {
  font-size: 0.875rem;
}

/* Compact content sections */
.posts-list .post-preview {
  padding: 1.25rem 0;
}

.post-preview h2 {
  font-size: 1.4rem;
  margin-top: 0;
}

.post-preview .post-meta {
  font-size: 0.8125rem;
}

/* --- Clean Professional Appearance --- */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Better visual hierarchy */
strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}
