/* Markdown */
:root{
--maincolor: #dc2626;
--bordercl: #d4d4d8;
--callouctcolor: #2563eb;
--hovercolor: #fecaca;
--darkMaincolor: #f87171;
--textcolor: #1c1917;
--mutedtext: #57534e;
--codebg: #f5f5f4;
--surfacebg: #fafaf9;
}
html {
  color: var(--textcolor);
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
}
body{
  display: block;
  margin: 0;
  padding: 0;
}
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

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

p {
  font-family: 'Fira Sans', sans-serif;
  line-height: 1.65;
}

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

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

a {
  border-bottom: 2px solid var(--maincolor);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
a:hover {
    background-color: var(--hovercolor);
    color: var(--textcolor);
}
a:focus-visible {
    outline: 2px solid var(--maincolor);
    outline-offset: 2px;
}

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

/* Images */
img {
  border: 3px solid var(--bordercl);
  max-width: 100%;
}

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

figure img {
  max-height: 500px;
}

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

figure h4 {
  font-size: 1rem;
  margin: 0;
  margin-bottom: 1em;
}
figure h4::before {
  content: '↳ ';
}

/* Code blocks */
code {
  background-color: var(--codebg);
  padding: .1em .2em;
}

pre {
  background-color: var(--codebg);
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
}

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

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

/* Containers */
.content {
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 1rem 1.5rem;
  word-wrap: break-word;
}

/* 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, h2, h3, h4, h5, h6 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}
h1 { font-size: clamp(1.5rem, 2vw + 1rem, 1.8rem); }
h2 { font-size: clamp(1.3rem, 1.5vw + 0.8rem, 1.5rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.95rem; }

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

.meta {
  color: var(--mutedtext);
  letter-spacing: -0.5px;
}

.post-container {
  align-items: flex-start;
  display: flex;
  gap: 2rem;
}

.post-content {
  flex: 3;
  min-width: 0;
}

.toc {
  background-color: var(--surfacebg);
  border-radius: 5px;
  color: var(--textcolor);
  flex: 0 0 auto;
  height: auto;
  margin-left: 20px;
  max-width: 300px;
  overflow-y: auto;
  padding: 10px;
  position: sticky;
  top: 20px;
}

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 2px solid var(--bordercl);
  padding: 2.5rem 0;
  margin-top: 3rem;
  gap: 0.75rem;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.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: var(--mutedtext);
}

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


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

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

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

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

.callout-alert {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: #ff6347;
}

.callout-custom {
  color: #000000;
}

.callout-tip {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: dodgerblue;
}

.callout-warning {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: #ffd700;
}

.site-description {
display: flex;
justify-content: space-between;
}
.tags li::before{
  content: "🏷 ";
}
.tags a{
  border-bottom: 2px solid var(--maincolor);
}
.tags a:hover{
  color:white;
  background-color: var(--hovercolor); 
}
svg{
  max-height: 15px;
}
.soc:hover{
  color: white;
}
.draft-label{
    color: var(--maincolor);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 6px;
    background-color: var(--surfacebg);
}
.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: blue;
color: yellow ;
}
.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;
}

.feather {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.profile-image {
    max-width: 90%;
    height: auto;
    margin: 2rem 0 2rem auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 991px) {
    .profile-image {
        max-width: 60%;
        margin: 2rem auto;
    }
}

.project-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.5rem;
  color: var(--maincolor);
  margin-bottom: 1rem;
  border-bottom: none;
}

.project-title::before {
  content: none;
}

.project-title a {
  border-bottom: 2px solid var(--maincolor);
  text-decoration: none;
}

.project-title a:hover {
  background-color: var(--hovercolor);
  color: #fff;
}

blockquote {
  background-color: var(--surfacebg);
  border-left: 3px solid var(--maincolor);
  margin: 1.5em 0;
  padding: 1em;
  font-family: 'Fira Sans', sans-serif;
  font-style: italic;
}

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

/* Ensure image container behaves properly */
.col-lg-6 img {
  max-width: 100%;  /* Constrain image to column width */
  height: auto;     /* Maintain aspect ratio */
  display: block;   /* Remove extra space below image */
  margin: 0 auto;   /* Center image horizontally */
}

/* Optional: Add flex alignment for vertical centering */
.row {
  align-items: center;
}

/* Optional: Control image size */
.profile-image {
  max-width: 600px;  /* Adjust maximum image width */
  width: 100%;       /* Make responsive */
}

.container-fluid .row {
  display: flex;
  gap: 2rem; /* Space between columns */
}

/* Timeline Styles */
.timeline {
  margin: 2em 0;
  padding: 0;
  position: relative;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2em;
}
.timeline-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  margin-right: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surfacebg);
  border-radius: 50%;
  border: 2px solid var(--bordercl);
}
.timeline-content {
  flex: 1;
  background: var(--surfacebg);
  border-radius: 8px;
  padding: 0.5em 1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Purple Dots Separator */
.purple-dots-separator {
  width: 100%;
  height: 16px;
  margin: 2.5em 0 2em 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.purple-dots-separator::before {
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  background: repeating-radial-gradient(circle at 0 50%, rebeccapurple 0 3px, transparent 3px 16px);
  border-radius: 3px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline-logo {
    margin-bottom: 0.5em;
    margin-right: 0;
  }
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  margin: 2em 0;
  overflow: hidden;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 1.5em;
}

.carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  gap: 1.5em;
}

.carousel-item {
  flex: 0 0 280px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.carousel-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: rgba(220, 38, 38, 0.08); /* faint red */
}

.carousel-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  transition: transform 0.3s ease;
}

/* Special styling for book covers to show full cover without cropping */
.carousel-item .carousel-image img[src*="books/"] {
  object-fit: contain;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
}

/* Ensure book carousel items have consistent height */
.carousel-item .carousel-image[src*="books/"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Special styling for movie posters to fit properly within frame */
.carousel-item .carousel-image img[src*="movies/"] {
  object-fit: contain;
  background: #000;
  padding: 4px;
}

/* Special styling for music album covers to fit properly within frame */
.carousel-item .carousel-image img[src*="music/"] {
  object-fit: contain;
  background: #f8f9fa;
  padding: 6px;
  border-radius: 4px;
}

.carousel-image img:not([src]), 
.carousel-image img[src=""],
.carousel-image img[src*="placeholder"] {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  text-align: center;
  padding: 1em;
}

.carousel-item:hover .carousel-image img {
  transform: scale(1.05);
}

.carousel-content {
  padding: 1em;
}

.carousel-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  margin: 0 0 0.5em 0;
  color: var(--maincolor);
  line-height: 1.3;
}

.carousel-title::before {
  content: none;
}

.carousel-description {
  font-family: 'Fira Sans', sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 1em;
  z-index: 10;
  left: 0;
  right: 0;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 11;
  position: relative;
}

.carousel-btn:hover:not(:disabled) {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.7);
}

.carousel-btn svg {
  color: var(--maincolor);
  stroke-width: 2.5;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin-top: 1em;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot:hover {
  background: var(--maincolor);
}

.carousel-dot.active {
  background: var(--maincolor);
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 240px;
  }
  
  .carousel-image {
    height: 160px;
  }
  
  .carousel-controls {
    padding: 0 0.5em;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-btn svg {
    stroke-width: 2;
  }
}

@media (max-width: 480px) {
  .carousel-item {
    flex: 0 0 200px;
  }
  
  .carousel-image {
    height: 140px;
  }
  
  .carousel-content {
    padding: 0.75em;
  }
  
  .carousel-title {
    font-size: 0.9rem;
  }
  
  .carousel-description {
    font-size: 0.8rem;
  }
  
  .carousel-controls {
    padding: 0 0.25em;
  }
  
  .carousel-btn {
    width: 38px;
    height: 38px;
  }
}

/* Special styling for movie images to ensure consistent display */
.carousel-item .carousel-image img[src*="movies/"] {
  object-fit: cover;
  background: var(--surfacebg);
  padding: 0;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

/* Blog list post separation */
.posts .post {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--bordercl);
}
.posts .post:last-child {
  border-bottom: none;
}