/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
} 

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f9f9f9;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* change color on hover */
h1:hover, h2:hover, h3:hover, li:hover {
  color: #00b7ff;
  transition: color 0.25s ease;
}






/* 1. Make html and body take full height */
html, body {
  height: 100%;
  margin: 0;
}

/* 2. Make body a flex container in column direction */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* full viewport height */
}

/* 3. Main content grows to fill remaining space */
main {
  flex: 1;
}


/* Header / Navbar */
header {
  width: 100%;
  background-color: #1f3d7a; /* navbar blue */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

.navbar {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.navbar ul li a {
  position: relative;
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar ul li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -4px;
  background-color: #ffd700; /* gold underline */
  transition: width 0.3s ease;
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
  width: 100%;
}

.navbar ul li a:hover,
.navbar ul li a.active {
  color: #ffd700;
}

.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

.profile-pic {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}


.centered-quote {
  display: block;       /* makes <em> behave like a block element */
  text-align: center;   /* centers the text */
  font-style: italic;   /* optional, <em> already italicizes */
  font-size: 1.1rem;    /* optional, adjust size */
  margin: 20px 0;       /* optional spacing above and below */
  letter-spacing: 0.3px;

}



h2 {
  text-align: center;
}

h3 {
  text-align: center;
}

/* Theme Toggle */
.theme-toggle-container button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-toggle-container button:hover {
  transform: rotate(20deg);
}


/* Responsive Navbar */
@media (max-width: 768px) {
  .navbar ul {
    display: none;
    flex-direction: column;
    background-color: #1f3d7a;
    position: absolute;
    top: 70px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  }

  .navbar ul.active {
    display: flex;
  }

  .menu-icon {
    display: block;
  }

  .accordion {
    padding: 10px;
    font-size: 16px;
  }
  .panel {
    padding: 0 10px;
  }

    .btn {
    font-size: 0.95rem;
    padding: 10px 18px;
  }
}

/* Sections */
section {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1f3d7a;
}

section p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}

section ul {
  margin: 15px 0 15px 20px;
  list-style-type: disc;
}


/* Boxed Section Style */
section {
  max-width: 1100px;
  margin: 60px auto;
  padding: 40px 30px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Light hover lift for interactivity */
section:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Adjust text colors inside */
section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1f3d7a;
}

section p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}


/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: #1f3d7a;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 15px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  white-space: normal;       /* allow wrapping */
  word-wrap: break-word;     /* handle long text gracefully */
  line-height: 1.4;
}

.btn:hover {
  background-color: #163060;
  transform: translateY(-2px);
}

/* Centers button nicely */
.btn-center {
  display: flex;             /* centers text inside */
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  text-align: center;
  padding: 12px 20px;
  max-width: 90%;            /* prevents overflowing on mobile */
  width: fit-content;        /* button size adjusts to content */
}



/* Project Cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.card {
  background-color: white;
  color: #222;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border: 2px solid transparent;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #1f3d7a;
}

.card p {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border-color: #1f3d7a;
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px 20px;  /* compact height old 40px 20px */
  background-color: #f4f4f4;
  color: #222;
  margin-top: 50px;
  border-top: 2px solid #1f3d7a;
  font-size: 15px;
}

.footer p {
  margin: 8px 0;
  color: #333;
}

.footer .copyright {
  font-size: 13px;
  color: #666;
}

.social-links {
  margin: 15px 0;
}

.social-links a {
  font-size: 24px;
  color: #1f3d7a;
  margin: 0 8px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
  color: #163060;
  transform: translateY(-2px);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Dark Mode */
body.dark {
  background-color: #1e1e1e;
  color: #eaeaea;
}

body.dark header, body.dark footer {
  background-color: #121212;
}

body.dark section {
  color: #e0e0e0;
}

body.dark .card {
  background-color: #2a2a2a;
  color: #eaeaea;
  border: 2px solid transparent;
}

body.dark .card h3 {
  color: #9cc2ff;
}

body.dark .card p {
  color: #ddd;
}

body.dark .card:hover {
  border-color: #9cc2ff;
  box-shadow: 0 10px 20px rgba(156, 194, 255, 0.2);
}

body.dark .social-links a {
  color: #9cc2ff;
}

body.dark .social-links a:hover {
  color: #6fa3ff;
  transform: translateY(-2px);
}

body.dark .btn {
  background-color: #9cc2ff;
  color: #121212;
}

body.dark .btn:hover {
  background-color: #6fa3ff;
}

body.dark section p {
  color: #e0e0e0;
}

body.dark section h2 {
  color: #7ea9ff;
}

body.dark .footer p {
  color: #e0e0e0;
}

body.dark .footer blockquote {
  color: #e0e0e0;
}

body.dark .footer .quote-author {
  color: #e0e0e0;
}


/* --- Gradient text effect for <strong> --- */
strong {
  background: linear-gradient(90deg, #004080 0%, #007acc 50%, #00bfff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* --- Golden ring around profile pic --- */
.profile-pic {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #ffd700; /* golden ring */
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.4); /* subtle glow */
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.08); /* gentle zoom */
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6); /* slightly brighter glow */
}



/* --- Dark mode for boxed section --- */
/* Dark Mode Section Boxes */
body.dark section {
  background-color: #2a2a2a;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

body.dark section:hover {
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.08);
}



/* Full-page subtle matrix background */
#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* behind all content */
  pointer-events: none; /* clicks go through */
}


/* accordion for research interests */
.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion {
  background-color: #f2f2f2;
  color: #333;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: background-color 0.3s ease;
  font-weight: bold;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion:hover {
  background-color: #e0e0e0;
}

.arrow {
  transition: transform 0.3s ease;
}

.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  background-color: #fff;
  border-left: 2px solid #f2f2f2;
  border-right: 2px solid #f2f2f2;
  border-bottom: 2px solid #f2f2f2;
  border-radius: 0 0 4px 4px;
  padding: 0 12px;
}

.panel.open {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background-color: #f9f9f9;
}

.panel ul {
  margin: 12px 0;
  padding-left: 20px;
}


/* Thumbnail styling */
.card-thumbnail {
  margin-top: 16px;
  text-align: center;
}

.card-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-thumbnail img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}


.quote-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px 16px;
  text-align: center;
  font-style: italic;
  color: #555;
  border-left: 4px solid #0077cc;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}


.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

.footer blockquote {
  font-style: italic;
  margin: 0;
  color: #555;
}

.footer .quote-author {
  font-weight: bold;
  margin: 5px 0 10px 0;
  color: #333;
}

.footer p {
  margin: 5px 0;  /* keeps spacing tight and neat */
}



/* Pendulum */

/* Pendulum Container */
.pendulum {
  position: relative;   /* Changed from absolute to relative */
  max-width: 100%;
  width: 220px;
  height: 180px;
  background-color: #fafbff;
  border-radius: 5%;
  align-items: center;
  border-top: 20px solid #fafbff;
  margin: 30px auto; /* Center horizontally and add vertical margin */
  padding-top: 80px; /* Add some padding to the top */
  display: flex;
  justify-content: center; /* Center the pendulum balls horizontally */
}



/* Pendulum Box that holds the balls */
.pendulum_box {
  display: flex;
  justify-content: space-between; /* Evenly space the balls */
  align-items: center;            /* Vertically align the balls */
  padding: 0 10px;                /* Adjust spacing around the balls */
  position: relative;             /* Allows absolute positioning for pendulum balls */
  width: 100%;                    /* Make sure it stretches across the pendulum container */
  box-sizing: border-box; /* Prevent padding from adding to the total width */

}



/* Ball Style */
.ball {
  height: 40px;       /* Set equal height */
  width: 40px;        /* Set equal width */
  border-radius: 50%; /* Make them round */
  background-color: #1f3d7a;
  position: relative;
  transform-origin: 50% -300%; /* Create pivot point for the rotation */
}

/* Line attached to each ball */
.ball::before {
  content: '';
  width: 2px;
  height: 120px;
  background-color: #929292;
  left: 18px;
  top: -120px;
  position: absolute;
}

/* Animation for the first ball */
.ball.first {
  animation: firstball 0.9s alternate ease-in infinite;
}

@keyframes firstball {
  0% {
    transform: rotate(35deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

/* Animation for the last ball */
.ball.last {
  animation: lastball 0.9s alternate ease-out infinite;
}

@keyframes lastball {
  50% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-35deg);
  }
}




/* === CARD ANIMATION WIDGET === */

.card-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  width: 100%;
  height: 100%;
  overflow: visible;

}


/* Board container */
.card-animation .board {
  /* old value: --card-width: min(200px, 20vmin); */
  --card-width: min(100px, 10vmin); /* reduced from 200px: 140px, 14vmin */
  display: flex;
  align-items: center;
  width: calc(5 * var(--card-width));
  box-sizing: content-box;
  aspect-ratio: 16/9;
  transform: rotateX(60deg);
  border: 4px solid black;
  border-radius: 16px;
  padding: 1rem 3rem;
  background: hsl(201deg, 100%, 32%);
  transform-style: preserve-3d;

}



/* Ensure 3D behavior inside nested elements */
.card-animation .card,
.card-animation .wrapper,
.card-animation .content {
  transform-style: preserve-3d;
}

/* Each card setup */
.card-animation .card {
  --duration: 1200ms;
  position: absolute;
  width: var(--card-width);
  aspect-ratio: 20/29;
  outline: none;
  border: none;
  cursor: pointer;
  padding: 0;
  background-color: transparent;
  transition: all 200ms;
  pointer-events: none;
}

/* Card positioning in Z-space */
.card-animation .card:nth-child(1) { transform: translateZ(3px); }
.card-animation .card:nth-child(2) { transform: translateZ(6px); }
.card-animation .card:nth-child(3) { transform: translateZ(9px); }
.card-animation .card:nth-child(4) { transform: translateZ(12px); }

.card-animation .wrapper {
  pointer-events: initial;
  display: block;
  position: relative;
  height: 100%;
  transition: all var(--duration) ease-out;
  transform-origin: 200% 50%;
}

.card-animation .content {
  display: block;
  height: 100%;
  transition: all var(--duration);
}

/* Card faces */
.card-animation .face {
  transition: transform calc(var(--duration) * 3 / 4);
  transition-delay: calc(var(--duration) / 6);
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: calc(var(--card-width) / 20);
  background-size: cover;
  background-position: center;
  background-color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Front faces */
.card-animation .front {
  transform: rotateZ(0.5turn) rotateY(-0.5turn);
  border-width: 1px 0px;
  border-color: black;
  border-style: solid;
}

/* Card images */
.card-animation .card:nth-of-type(1) .front {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/1/19/English_pattern_ace_of_spades.svg");
}
.card-animation .card:nth-of-type(2) .front {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/5/5f/English_pattern_ace_of_clubs.svg");
}
.card-animation .card:nth-of-type(3) .front {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/4/4d/English_pattern_8_of_spades.svg");
}
.card-animation .card:nth-of-type(4) .front {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/f/f0/English_pattern_8_of_clubs.svg");
}

/* Card backs */
.card-animation .back {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/4/4f/Bicyclebackside.jpg");
  border: 1px solid black;
}

/* Flipped state */
.card-animation .card.flipped:nth-child(1) { transform: translateZ(12px); }
.card-animation .card.flipped:nth-child(2) { transform: translateZ(9px); }
.card-animation .card.flipped:nth-child(3) { transform: translateZ(6px); }
.card-animation .card.flipped:nth-child(4) { transform: translateZ(3px); }

.card-animation .card.flipped .wrapper {
  transform: rotateY(0.5turn);
}

.card-animation .card.flipped .content {
  transform: rotateX(-0.5turn) rotateY(1.5turn);
}




/* === LAB VISUALS LAYOUT === */
.lab-visuals {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;                /* space between pendulum and cards */
  flex-wrap: nowrap;        /* keep them on the same row */
  overflow: hidden;         /* hide overflow edges */
  margin-top: 2rem;
}



/* Make pendulum share horizontal space */
.lab-visuals .pendulum {
  flex: 0 1 40%;            /* take about 40% of section width */
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 400px;
  scale: 0.9;               /* slightly scale down if needed */
  margin-top: 4rem; /* you can add space on top of the pendulum */

}

/* Card animation area */
.lab-visuals .card-animation {
  flex: 0 1 45%;            /* take about 45% of section width */
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  max-width: 450px;         /* limit card board width */
  transform: scale(0.85);   /* scale down overall board */
   margin-top: 4rem; /* you can add space on top of the cards */

}



/* Responsive fallback — stack vertically on small screens */
@media (max-width: 900px) {
  .lab-visuals {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
  }

  .lab-visuals .pendulum,
  .lab-visuals .card-animation {
    flex: 1 1 100%;
    max-width: none;
    transform: scale(0.9);
  }
}


/* Blog nav bar */
nav a i {
  margin-right: 0.3rem; /* space between icon and text */
  vertical-align: middle; /* align with text */
}


/* Blog grid in default.html */

/* =========================
   Blog Container & Grid
========================= */
.blog-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.posts, .blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

/* =========================
   Blog Cards / Post Cards
========================= */
.post-card, .blog-card {
  background-color: #f4f4f4;
  border-radius: 8px;
  overflow: hidden;
  width: calc(33% - 1.33rem);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card img, .blog-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.post-card:hover, .blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.post-card:hover img, .blog-card:hover img {
  transform: scale(1.05);
}

.post-card h2, .blog-card h2 {
  margin: 0 0 0.5rem 0;
}

/* added this to make title fit in each blog post featured card on one line */
.blog-card h2 {
  font-size: clamp(1rem, 2vw, 1.2rem); /* min 1rem, max 1.2rem, scales with viewport */
  white-space: nowrap;       /* keep on one line */
          /*  overflow: hidden;  hide overflow */
    /*  text-overflow: ellipsis; fallback if really long */
}

.blog-card h2 i {
  margin-right: 0.5rem;
  color: #007acc;
  transition: transform 0.3s ease;
}
.blog-card:hover h2 i {
  transform: rotate(-10deg) scale(1.1);
}

.post-card p, .blog-card p {
  font-size: 0.9rem;
  line-height: 1.4rem;
  max-height: 4.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}


.blog-card a {
  text-decoration: none; /* remove underline */
  color: inherit;        /* inherit color from parent */
}



/* =========================
   Search Bar
========================= */
#searchBar {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  margin: 1rem auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* =========================
   Filter Buttons
========================= */
.blog-filters {
  margin-bottom: 1rem;
  text-align: center;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  margin: 0 0.3rem 0.3rem 0;
  cursor: pointer;
  background: #eee;
  transition: background 0.3s, color 0.3s;
}

.filter-btn.active {
  background: #007acc;
  color: #fff;
}

/* =========================
   Pagination
========================= */
.pagination {
  margin-top: 2rem;
  text-align: center;
}

.pagination a, .pagination span {
  margin: 0 0.3rem;
  padding: 0.6rem 1rem;
  border-radius: 30px;
  background: #e9f3ff;
  border: 1px solid #cfe3ff;
  text-decoration: none;
  color: #007acc;
}

.pagination span {
  background: #007acc;
  color: #fff;
}

/* =========================
   Subscribe Form
========================= */
.subscribe-container {
  background-color: #f4f4f4;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
  text-align: center;
}

body.dark .subscribe-container {
  background-color: #1a1a1a;
  color: #eee;
}

.subscribe-container h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.subscribe-button {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background-color: #e25555;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.subscribe-button:hover {
  background-color: #c04040;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subscribe-form input[type="email"] {
  padding: 0.5rem;
  width: 100%;
  max-width: 300px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.subscribe-form button {
  padding: 0.5rem 1rem;
  background-color: #0077cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.subscribe-form button:hover {
  background-color: #005fa3;
}

/* =========================
   Code Blocks
========================= */
pre {
  background: #1e1e1e;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

pre code {
  background: none;
  color: inherit;
}

/* =========================
   Dark Mode
========================= */
body.dark .post-card, body.dark .blog-card {
  background-color: #1a1a1a;
  color: #eee;
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

body.dark .post-card:hover, body.dark .blog-card:hover {
  box-shadow: 0 6px 20px rgba(255,255,255,0.08);
}

body.dark #searchBar {
  background: #222;
  color: #fff;
}

/* =========================
   Responsive Layout
========================= */
@media (max-width: 992px) {
  .post-card, .blog-card {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 600px) {
  .post-card, .blog-card {
    width: 100%;
    padding: 0.8rem;
  }
  .blog-container {
    padding: 1rem;
  }
  .post-card h2, .blog-card h2 {
    font-size: 1.1rem;
  }
  .post-card p, .blog-card p {
    font-size: 0.85rem;
  }
}


/* =========================
   Post Layout
========================= */
.post-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.post-featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.post-content {
  line-height: 1.6rem;
  font-size: 1rem;
}

.post-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1rem 0;
}

.post-content pre {
  background: #1e1e1e;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

.post-tags {
  margin-top: 2rem;
}

.post-tags .tag {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: #eee;
  border-radius: 20px;
  font-size: 0.85rem;
}

.back-to-blog {
  margin-top: 3rem;
}

.back-to-blog a {
  text-decoration: none;
  color: #007acc;
  font-weight: bold;
}

.back-to-blog a i {
  margin-right: 0.3rem;
  transition: transform 0.3s;
}

.back-to-blog a:hover i {
  transform: translateX(-3px);
}

/* Dark Mode */
body.dark .post-container {
  color: #eee;
}

body.dark .post-content pre {
  background: #2a2a2a;
}

body.dark .post-tags .tag {
  background: #333;
  color: #eee;
}

body.dark .back-to-blog a {
  color: #4da3ff;
}



/* =========================
   Post Social Share Bar
========================= */

.share-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
  background: #f4f4f4;
  border-radius: 8px;
}

.share-bar span {
  font-weight: bold;
  color: #555;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.share-btn.linkedin { background: #0077b5; }
.share-btn.twitter  { background: #1da1f2; }
.share-btn.email    { background: #e25555; }
.share-btn.copy     { background: #666; color: #fff; }

/* Dark mode compatibility */
body.dark .share-bar {
  background: #1d1d1d;
}

body.dark .share-bar span {
  color: #ddd;
}


/* =========================
   Floating Share Bar
========================= */
.floating-share {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 999;
}

.floating-share .share-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-share .share-btn:hover {
  transform: scale(1.12);
  opacity: 0.9;
}

/* Button colors */
.floating-share .linkedin { background: #0077b5; }
.floating-share .twitter  { background: #1da1f2; }
.floating-share .email    { background: #e25555; }
.floating-share .copy     { background: #555; }

/* Dark mode */
body.dark .floating-share .copy {
  background: #777;
}

/* Responsive: hide floating bar on phones */
@media (max-width: 900px) {
  .floating-share {
    display: none;
  }
}


/**********************
Arrow Floating
***********************/

/* Floating Scroll Arrow */
#scroll-arrow {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #007acc;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  animation: float 2s infinite ease-in-out;
  z-index: 999;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#scroll-arrow:hover {
  transform: scale(1.12);
}

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
  100% { transform: translateY(0px); }
}

/* Hide when not needed */
#scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Dark mode compatibility */
body.dark #scroll-arrow {
  background: #00aaff;
  color: #111;
}


/* Style for snackbar in post.html */

#snackbar {
  visibility: hidden; /* Hidden by default */
  min-width: 260px;
  background-color: #323232;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 14px 20px;
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 9999;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.4s ease, bottom 0.4s ease;
}

/* Visible state */
#snackbar.show {
  visibility: visible;
  opacity: 1;
  bottom: 60px;
}

/* Dark mode */
body.dark #snackbar {
  background-color: #1f7aff;
}





/***************
Mascot animation
*******************/

.ascii::after {
  content: "(^_^)";
  display: inline-block;
  font-size: 20px; /* adjust size */
  transition: transform 0.2s ease, content 0.2s ease;
  /* cursor: pointer; */ /* optional: shows hover */


    /* Fix shifting */
  transform-origin: center; /* grow from center */
  width: 1.3em; /* reserve enough width for the bigger face */
  text-align: center;

   /* Default color (for blue background) */
  color: #1f3d7a;
  margin-right: 0.3em; /* <- adds space after mascot */
  margin-left: 0.5em; /* <- adds space before mascot */
  vertical-align: 1px;  /* raise it a bit */




}

/* On hover: change face and scale */
.ascii:hover::after {
  content: "(*_*)"; /* (◕_◕) */
  /*transform: scale(1.5);*/ /* grow mascot */
 /*  color: yellow; optional: change color on hover */
}
/* Dark Mode Support */

body.dark .ascii {
  color: #9cc2ff;
 }


/* Dark mode support */
/*
@media (prefers-color-scheme: dark) {
  .ascii::after {
    color: yellow; /* visible on dark mode */
  }

*/

/****************** Tools ***************
****************************************/

/* =========================
   Tools Page Styles
========================= */

.tools-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: #666;
  margin-bottom: 2rem;
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.tool-card {
  background-color: #f4f4f4;
  border-radius: 8px;
  padding: 1.5rem;
  width: calc(33% - 1.33rem);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.tool-card h3 {
  margin-top: 0;
}

.tool-card p {
  font-size: 0.9rem;
  margin: 1rem 0;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.tool-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #007acc;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
}

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

/* Dark Mode Support */
body.dark .tool-card {
  background-color: #1a1a1a;
  color: #eee;
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

body.dark .tool-card:hover {
  box-shadow: 0 6px 20px rgba(255,255,255,0.08);
}

body.dark .tool-btn {
  background-color: #3399ff;
}

body.dark .tool-btn:hover {
  background-color: #1a75ff;
}

/* Responsive */
@media (max-width: 992px) {
  .tool-card {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 600px) {
  .tool-card {
    width: 100%;
  }
}




/* Tools in tools/index.html */

/* =========================
  Tools Container & Grid
========================= */
.tools-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.tool-card, .tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.tool-card:hover i {
  transform: rotate(-10deg) scale(1.1);
}

.tool-card i {
  margin-right: 2px;
}

