/* Reset & base */
* { box-sizing: border-box; margin:0; padding:0; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  background:#fff; 
  color:#222;
  line-height:1.6;
}

/* Wrapper for sidebar + content */
.page-wrapper {
  display: flex;
}

/* Sidebar */
aside.sidebar {
  width: 420px;
  position: fixed;       /* keep sidebar fixed */
  top: 0;
  left: 0;
  bottom: 0;
  background:#f4f7fa;
  border-left:1px solid #ddd;
  padding:40px;
  overflow:auto;
}

.sidebar-footer {
  text-align: center;
}

.bottom-logos {
  display: flex;
  justify-content: center;
  gap: 15px;  /* space between the two logos */
  margin-top: 10px;
}

.bottom-logos img {
  width: 80px;  /* adjust logo size */
  height: auto;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid #ccc; /* light grey line */
  width: 60%;                 /* line width */
  margin: 10px auto;           /* vertical spacing and centered */
}

aside.sidebar h1 { font-size: 1.9em; margin-bottom: 0.5em; }
aside.sidebar img.sidebar-img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1em auto;
}

aside.sidebar nav a {
  display:block;
  text-align: center;
  margin-bottom:0.8em;
  text-decoration:none;
  font-size: 1.2em;
  color:#007acc;
  font-weight:600;
}
aside.sidebar nav a.active,
aside.sidebar nav a:hover { text-decoration:underline; }

aside.sidebar .sidebar-profiles {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 2em;
}
aside.sidebar .profile-logo {
  width: 56px;
  height: auto;
  transition: transform 0.2s;
}
aside.sidebar .profile-logo:hover {
  transform: scale(1.2);
}
.sidebar-header {
  text-align: center;
  margin-bottom: 1em;
}
.sidebar-header h1 {
  margin-top: 0.5em;
  font-size: 1.8em;
}


/* Main content */
main.content {
  flex: 1;
  margin-left: 400px;  /* same as sidebar width + padding */
  padding: 100px;
  max-width: 900px;
  color: #444;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.2em;
  overflow: auto;
}

/* Footer */
footer {
  border-top:1px solid #ddd;
  padding: 1em;
  text-align: center;
  font-size: 0.9em;
  color: #555;
}

/* Blog post styling */
.blog-post-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}
.blog-thumb {
  width: 190px;
  /*height: 190px;*/
  margin: 0 auto;       /* horizontal centering */


  border-radius: 5px;
  margin-top: 1.8em;
}
.blog-text {
  flex: 1;
}
.blog-post {
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
  margin-bottom: 15px;
}
.blog-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.blog-post .tags {
  margin-top: 0.5em;
  font-size: 0.85em;
  color: #666;
}
.blog-post .tag {
  background: #e0e7ff;
  color: #0047b3;
  border-radius: 3px;
  padding: 0 6px;
  margin-right: 5px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
}
.blog-post .tag:hover {
  background: #c4d2ff;
}
#blog-search {
  width: 80%;
  padding: 8px 16px;
  font-size: 1.1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1.5em;
}

/* Responsive */
@media(max-width: 900px) {
  .page-wrapper {
    flex-direction: column;
  }
  aside.sidebar {
    position: relative;
    width: 100%;
    border-left: none;
    border-bottom: 1px solid #ddd;
    height: auto;
  }
  main.content {
    margin-left: 0;
    max-width: 100%;
    padding: 20px;
  }
}

/* For blog post code boxes */
/* Code blocks in main content */
main.content pre {
  background-color: #f5f5f5;  /* light grey background */
  color: red;                  /* code text color */
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 16px;
  overflow-x: auto;            /* horizontal scroll if needed */
  white-space: pre;            /* preserve spaces & line breaks, no wrapping */
  margin: 1em 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  line-height: 1.4;
  width: calc(100% + 200px);
  /*margin-left: -100px;*/
  margin-right: -100px;
}

main.content pre code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95em;
  color: red;                  /* code text color */
  white-space: pre;            /* prevent wrapping for horizontal scroll */
  line-height: 1.4em;
}

/* Images in main content (e.g., after code) */
main.content img {
  display: block;
  margin: 1em auto;
  max-width: 100%;
  border-radius: 6px;
}


.code-container {
  position: relative;
  margin: 1em 0;
}

.code-container pre {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  line-height: 1.4;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: -80px;
  padding: 4px 10px;
  background-color: #007acc;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background-color: #005fa3;
}



