/* Markdown */
:root{
--maincolor: rgb(48, 192, 0);
--hashcolor: rgb(56, 105, 0);
--bordercl:rebeccapurple;
--callouctcolor:dodgerblue;
--hovercolor:navy;
--darkMaincolor: #50fa7b; 
--darkhashcolor: #2e9748; 
/* #50fa7b */
}
html, body {
  height: 100%;
  margin: 0;
}

html {
  color: #232333;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  line-height: 1.6em;
}

body {
  display: block;
  margin: 0;
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Responsive containers */
.content {
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  width: 100%;           /* Allow shrinking below max-width */
  padding: 0 1ch;
  word-wrap: break-word;
  box-sizing: border-box; /* Ensure padding doesn’t cause overflow */
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* Optional: adjust base font size on small screens */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }
}


::selection {
  background: var(--maincolor);
  color: #fff;
}

p {
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
}

hr {
  border: 0;
  border-top: 3px dotted var(--bordercl);
  margin: 1em 0;
}

blockquote {
  border-left: 3px solid var(--bordercl);
  color: #737373;
  margin: 0;
  padding-left: 1em;
}

li a {
    display: inline !important; 
}

.post a{
  display: inline !important;

}

.tags a{
  display: inline !important;

}

a {
  border-bottom: 1px solid var(--maincolor);
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
a:hover {
    background-color: var(--hovercolor);
    color: #fff;
}

ul {
  list-style: none;
  padding-left: 2ch;
}
ul li {
  text-indent: -2ch;
}
ul > li::before {
  content: '* ';
  font-weight: bold;
}

/* Images */
img {
  border: 3px solid #ececec;
  max-width: 100%;
  border-radius: 0.8rem 0.8rem 0.8rem 0.8rem;
}

figure {
  box-sizing: border-box;
  display: inline-block;
  margin: 0;
  max-width: 100%;
}

@media screen and (min-width: 600px) {
  figure {
    padding: 0 10px;
  }
}

figure h4 {
  font-size: 1rem;
  font-weight: normal !important;
  margin: 0;
  margin-bottom: 1em;
  text-align: center;
  color: #595959;
}
figure h4::before {
  content: '↳ ';
}

/* Code blocks */
code {
  font-family: "Source Code Pro", monospace;
  background-color: #f1f1f1;
  padding: .1em .2em;
}

pre {
  background-color: #ececec;
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
  border-radius: 0.8rem 0.8rem 0.8rem 0.8rem;
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 85%;
  padding: 0;
}

.aboutme {
  display: flex;
  align-items: center;
}
.aboutme figure{
  margin-right: 20px;
}

.aboutme p{
  max-width: 500px;
  text-align: justify !important;
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 1em 0;
  line-height: 2.5em;
}

header .main {
  font-size: 1.5rem;
}
h1 {
  font-size: 1.5rem;
  margin-top: 2em;
}
h2 {
  font-size: 1.2rem;
  margin-top: 2em;
}
h3, h4, h5, h6 {
  font-size: 1rem;
  margin-top: 2em;
}

h1::before { color: var(--hashcolor); content: ''; }
h2::before { color: var(--hashcolor); content: '> '; }
h3::before { color: var(--hashcolor); content: '* '; }
h4::before { color: var(--hashcolor); content: '** '; }
h5::before { color: var(--hashcolor); content: '##'; }
h6::before { color: var(--hashcolor); content: '## '; }

.meta {
  color: #595959;
  letter-spacing: -0.5px;
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Optional: space items apart */
  border-top: 0.4rem dotted var(--bordercl);
  padding: 2rem 0rem;
  margin-top: 2rem;
  flex-wrap: wrap; /* Ensure wrapping if content is too wide */
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  footer {
    flex-direction: column;
    align-items: flex-start; /* or center, depending on design */
    text-align: center; /* optional */
  }

  footer > * {
    margin-bottom: 1rem; /* optional spacing between items */
  }
}

.soc {
  display: flex;
  align-items: center;
  border-bottom: none;
}
.border {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  border: 1px solid;
}
.footer-info {
  padding: var(--footer-padding);
}

/* Common */
.title h1 {
  margin-bottom: 0;
}

time {
  color: grey;
}

/* Posts */
article .title {
  margin-bottom: 1em;
}


/* Callout */
.callout {
  background-color: var(--callouctcolor);
  color: #fff;
  padding: 1em;
}

.callout p {
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
}

.callout a {
  border-bottom: 3px solid #fff;
}

.callout a:hover {
  background-color: #fff;
  color: var(--callouctcolor);
}

.site-description {
display: flex;
justify-content: space-between;
}
.tags li::before{
  content: "🏷 ";
}
.tags a{
  border-bottom: 3px solid var(--maincolor); 
}
.tags a:hover{
  color:white;
  background-color: var(--hovercolor); 
}
svg{
  max-height: 15px;
}
.soc:hover{
  color: white;
}
.draft-label{ 
    color: var(--bordercl);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 6px;
    background-color: #f9f2f4;
}
.highlight {
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"] {
  -webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"]::before {
  background: black;
  border-radius: 0 0 0.25rem 0.25rem;
  color: white;
  font-size: 12px;
  letter-spacing: 0.025rem;
  padding: 0.1rem 0.5rem;
  position: absolute;
  right: 1rem;
  text-align: right;
  text-transform: uppercase;
  top: 0;
}

.highlight pre code[class=language-javaScript]::before,
.highlight pre code[class="language-js"]::before {
content: "js";
background: #f7df1e;
color: black;
}
.highlight pre code[class*='language-yml']::before,
.highlight pre code[class*='language-yaml']::before {
content: 'yaml';
background: #f71e6a;
color: white;
}
.highlight pre code[class*='language-shell']::before,
.highlight pre code[class*='language-bash']::before,
.highlight pre code[class*='language-sh']::before {
content: 'shell';
background: green;
color:white
}
.highlight pre code[class*='language-json']::before{
content: 'json';
background: dodgerblue;
 color: #000000 
}
.highlight pre code[class*='language-python']::before,
.highlight pre code[class*='language-py']::before {
content: 'py';
background: rgb(151, 200, 4);
color: rgb(0, 0, 24) ;
}
.highlight pre code[class*='language-css']::before{
content: 'css';
background: cyan;
color: black ;
}
.highlight pre code[class*='language-go']::before{
content: 'Go';
background: cyan;
color: royalblue ;
}
.highlight pre code[class*='language-md']::before,
.highlight pre code[class*='language-md']::before{
content: 'Markdown';
background: royalblue;
color: whitesmoke ;
}

/* table */
table {
  border-spacing: 0;
  border-collapse: collapse;
}

table th{
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
  font-size: large;
}

table td{
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}


/* Post Navigation Styling */
.post-navigation {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid #eaeaea;
}

.navigation-heading {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-previous, .nav-next {
  flex: 1;
  min-width: 240px;
}

.nav-button {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid #eaeaea;
  height: 100%;
}

.nav-button:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-previous .nav-content {
  margin-left: 0.75rem;
}

.nav-next .nav-content {
  margin-right: 0.75rem;
  text-align: right;
}

.nav-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.nav-title {
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
      flex-direction: column;
  }
  
  .nav-previous, .nav-next {
      width: 100%;
  }
}

/* Button styling */
#backToTop {
  position: fixed;
  bottom: 50px;
  right: 200px; /* Default for large screens */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #d9ecff;
  color: rgb(66, 66, 66);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(161, 161, 161, 0.3);
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateY(20px);
  z-index: 1000;
}

#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
}

#backToTop:hover {
  background-color: #0055aa;
  color: rgb(255, 255, 255);
}

#backToTop svg {
  width: 24px;
  height: 24px;
}

/* ✅ Mobile-friendly adjustment */
@media (max-width: 768px) {
  #backToTop {
    right: 20px; /* bring closer to the edge */
    bottom: 20px; /* optional: move slightly up on smaller screens */
    width: 45px;  /* optional: slightly smaller button */
    height: 45px;
  }
}

@media (max-width: 480px) {
  #backToTop {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
  }

  #backToTop svg {
    width: 20px;
    height: 20px;
  }
}
