@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

/*****************************************
       Global Styles
******************************************/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Base Reset */
body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  transition: background 0.3s, color 0.3s;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

h1 {
  text-align: center;
}

h1,
h2,
h3 {
  color: #2a7ae2;
}

a:hover {
  text-decoration: underline;
}

.left-column {
  width: 25%;
  background-color: #2c3e50;
  color: white;
  padding: 20px 10px;
  overflow-y: auto;
  position: fixed;
  height: 100vh;
}

.right-column {
  margin-left: 25%;
  width: 75%;
  padding: 20px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: auto;
}

.left-column h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.menu-icon {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000; /* Keep it high */
  cursor: pointer;
}

.menu-icon img {
  width: 40px;
  height: 40px;
}

/****************************************
Theme Variables
*************************************/

.theme-switcher {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1005;
}

#theme-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
}

#theme-selector {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  padding: 5px;
  z-index: 1006;
}

/* Tomorrow Night Blue Theme */
.theme-tomorrow {
  --bg-color: #002451;
  --text-color: #c5c8c6;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.theme-tomorrow .topics-list li a:hover {
  cursor: pointer;
  color: #3498db; /* Blue on hover */
}

.theme-tomorrow .topics-list li {
  list-style-type: none; /* Remove default list styling */
}

/* Light theme */
.theme-light {
  --bg-color: #ffffff;
  --text-color: #000000;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.theme-light .topics-list li a {
  color: #000000;
}
.theme-light .topics-list li a:hover {
  cursor: pointer;
  color: #3498db; /* Blue on hover */
}

.theme-light .topics-list li {
  list-style-type: none; /* Remove default list styling */
}

/* Dark theme */
.theme-dark {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.theme-dark #theme-icon,
.theme-slate #theme-icon {
  filter: invert(1);
}

.theme-dark .topics-list li a:hover {
  cursor: pointer;
  color: #3498db; /* Blue on hover */
}

.theme-dark .topics-list li {
  list-style-type: none; /* Remove default list styling */
}

/* Slate theme */
.theme-slate {
  --bg-color: #2e3b4e;
  --text-color: #d1dbe8;
  background-color: var(--bg-color);
  color: var(--text-color);
}
.theme-slate .topics-list li a:hover {
  cursor: pointer;
  color: #3498db; /* Blue on hover */
}

.theme-slate .topics-list li {
  list-style-type: none; /* Remove default list styling */
}

/****************************************
      Responsive Design 
********************************************/

/* Mobile View */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .left-column {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .left-column.active {
    transform: translateX(250px);
  }

  .right-column {
    margin-left: 0;
    width: 100%;
  }

  .menu-icon {
    display: block;
  }

  .book-navigation button {
    font-size: 0.85rem;
    padding: 8px 12px;
    margin: 6px;
  }

  .book-navigation .icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 600px) {
  .copy-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .book-navigation button {
    font-size: 0.85rem;
    padding: 8px 12px;
    margin: 6px;
  }

  .book-navigation .icon {
    width: 14px;
    height: 14px;
  }
}

/*****************************************
       Main Page
******************************************/

.portfolio {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  justify-content: flex-start; /* Align items to the top */
  position: relative;
}

.portfolio .profile-pic {
  position: relative;
  top: 0; /* Reset top positioning */
  transform: translateY(0); /* Ensure no vertical translation */
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 15px; /* Add spacing below the profile picture */
}

.portfolio h1 {
  font-size: 1.5rem;
  margin: 10px 0;
  text-align: center; /* Center-align text */
}

.portfolio p {
  font-size: 1rem;
  text-align: center;
  color: #ffffff;
}

.portfolio img {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
}

.skills {
  list-style-type: none;
  padding: 0;
}

.skills li {
  background: #e2e2e2;
  margin: 5px 0;
  padding: 10px;
  border-radius: 5px;
}

.topic:hover {
  background: #d1d1d1;
}

.page-transition {
  transition: transform 0.5s ease;
}

.hidden {
  display: none;
}

/****************************************************************
                          Books Sections

******************************************************************/

.home-button {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  margin-bottom: 15px; /* Add spacing below the button */
  text-align: center; /* Center the button horizontally */
}

.home-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 2px;
}

.home-icon:hover {
  transform: scale(1.1);
}

.topics-list {
  padding: 10px;
  margin: 5px 0;
  list-style: none;
  font-size: large;
}

.topics-list li {
  font-size: 1rem;
  margin: 10px 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.topics-list li:hover {
  color: #3498db;
}

.topics-list li a {
  color: #ffff;
  text-decoration: none;
}

.career-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.career-table th,
.career-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.career-table th {
  background-color: #34495e;
  color: white;
  font-size: 18px;
}

.career-table tr:hover {
  background-color: #f0f8ff;
}

.career-table ul {
  padding-left: 20px;
  margin: 0;
}

.career-table li {
  margin-bottom: 6px;
}

section {
  margin-bottom: 30px;
}
.note {
  color: red;
  font-weight: bold;
}

/********************************
  Code snippets 
  ***************************************/

.code-block {
  position: relative;
  background-color: #1e1e1e;
  color: #dcdcdc;
  padding: 1rem;
  border-radius: 1px;
  font-family: "Fira Code", monospace;
  margin: 1.5rem 0;
  overflow-x: auto; /* enables horizontal scroll */
  box-sizing: border-box;
}

.code-block pre {
  margin: 0;
  padding: 0;
}

.code-block pre code {
  white-space: pre; /* allows wrapping for long lines */
  text-align: left !important; /* aligns text to the left */
}

/* Copy Button Styling */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #3c3c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

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

/**************************************************

Bottom Navigation

******************************************************/

.page {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: right center; /* Set the origin for the folding effect */
  transform: rotateY(0deg);
  transition: transform 0.6s ease-in-out;
  backface-visibility: hidden; /* Hide the back of the page during the fold */
}

.page.fold-next {
  transform: rotateY(-180deg); /* Fold to the Next */
}

.page.fold-prev {
  transform: rotateY(180deg); /* Fold to the previous */
}

.book-navigation {
  display: flex;
  justify-content: space-between; /* Space out the buttons */
  align-items: center;
  margin-top: 20px;
}

/* Default styles for nav buttons and font */
.book-navigation button {
  font-size: 1rem;
  padding: 10px 16px;
  margin: 10px;
  border: none;
  border-radius: 6px;
  background-color: #1a73e8;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.book-navigation button:hover {
  background-color: #155ab6;
}

.book-navigation .icon {
  width: 20px;
  height: 20px;
}

.book-navigation .prev-page {
  justify-content: flex-start; /* Align to the left */
}

.book-navigation .prev-page img {
  width: 24px; /* Smaller size */
  height: 24px; /* Maintain aspect ratio */
}

.book-navigation .next-page {
  justify-content: flex-end; /* Align to the right */
}

.book-navigation .next-page img {
  width: 24px; /* Smaller size */
  height: 24px; /* Maintain aspect ratio */
}

.book-navigation .top-page {
  margin: 0 auto; /* Center the "Top" button */
  background-color: #2ecc71;
}

.book-navigation .top-page img {
  width: 24px; /* Smaller size */
  height: 24px; /* Maintain aspect ratio */
  transition: transform 0.3s ease; /* Smooth animation */
  pointer-events: none; /* Allow clicks to pass through to the parent button */
}

.book-navigation .top-page:hover {
  background-color: #27ae60;
  transform: scale(1.2); /* Slightly enlarge on hover */
}

/********************************************
  Book Page Flip Animation
  *********************************************/

/* Flip Forward (Next) */
@keyframes flipForward {
  0% {
    transform: rotateY(0);
    opacity: 1;
  }
  100% {
    transform: rotateY(-90deg);
    opacity: 0;
  }
}

.page.flip-forward {
  /* class dynamically added by javascript at runtime */
  animation: flipForward 0.6s ease forwards;
  transform-origin: left;
  perspective: 1000px;
}

/* Flip Backward (Prev) */
@keyframes flipBackward {
  0% {
    transform: rotateY(0);
    opacity: 1;
  }
  100% {
    transform: rotateY(90deg);
    opacity: 0;
  }
}

.page.flip-backward {
  /* class dynamically added by javascript at runtime */
  animation: flipBackward 0.6s ease forwards;
  transform-origin: right;
  perspective: 1000px;
}
