/* ===================== */
/* General Styles        */
/* ===================== */

[x-cloak] {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size for rem units */
}

body {
  font-family: "IBM Plex Mono", monospace;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

[x-data] {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem; /* 10px / 16px = 0.625rem */
  padding: 0.625rem 0; /* Add consistent padding top and bottom */
}

/* ===================== */
/* Shared Section Styles */
/* ===================== */
header,
nav,
main,
footer {
  width: 90%;
  max-width: 50rem; /* 800px / 16px = 50rem */
  padding: 1.25rem; /* 20px / 16px = 1.25rem */
  border: 0.125rem solid #fff; /* 2px / 16px = 0.125rem */
  background-color: #111;
}


/* ===================== */
/* Header                */
/* ===================== */
header {
  text-align: center;
  background-color: #222;
}

header h1 {
  font-size: 2.5rem; /* 2.5em * 16px = 40px */
  color: #fff;
  text-shadow: 0.125rem 0.125rem #000; /* 2px / 16px = 0.125rem */
}

header p {
  font-size: 1.2rem; /* 1.2em * 16px = 19.2px */
  color: #ccc;
  margin: 0;
}

/* ===================== */
/* Navigation            */
/* ===================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background-color: #222;
  position: relative;
}

/* Hamburger Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Page Title */
.mobile-page-title {
  display: none; /* Hidden by default */
  font-size: 1.2rem;
  color: #fff;
  font-weight: bold;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex: 1;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.nav-links a:hover {
  color: #ccc;
}

.background-toggle-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 1.5rem;
}

.background-toggle-button:hover {
  color: #ccc;
}

/* Mobile Styles */
@media (max-width: 48rem) { /* 768px */
  .hamburger {
    display: block;
    order: 2;
  }

  .mobile-page-title {
    display: block;
    order: 1;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #333;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
  }

  .nav-links.active li {
    margin: 0;
    text-align: center;
    padding: 1rem;
    border-bottom: 0.0625rem solid #444; /* 1px */
  }
}

/* ===================== */
/* Main Content          */
/* ===================== */

main h2 {
  color: #fff;
  text-shadow: 0.0625rem 0.0625rem #000; /* 1px */
  margin-bottom: 1rem;
}

main ul {
  list-style-type: square;
  padding-left: 1.25rem; /* 20px */
  margin-bottom: 1rem;
}

main a {
  color: #fff;
  text-decoration: none;
}

main a:hover {
  color: #ccc;
}

/* ===================== */
/* Home Section - Dynamic Typing */
/* ===================== */
#home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

.dynamic-text-container {
  font-size: 2.5rem;
  color: #0f0;
  text-align: center;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

@media (max-width: 48rem) { /* 768px */
  .dynamic-text-container {
    font-size: 1.5rem;
  }
}

@media (max-width: 30rem) { /* 480px */
  .dynamic-text-container {
    font-size: 1.2rem;
  }
}

#typed-text {
  display: inline-block;
}

.blink {
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to {
    border-right-color: transparent;
  }
  50% {
    border-right-color: #0f0;
  }
}

/* ===================== */
/* About Me Section      */
/* ===================== */
.about-description {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 2rem;
  text-align: center;
}

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===================== */
/* Skills & Projects Grid      */
/* ===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr)); /* 250px */
  gap: 1.5rem;
}

.skill-category {
  background-color: #222;
  padding: 1.5rem;
  border: 0.0625rem solid #444; /* 1px */
  border-radius: 0.5rem; /* 8px */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-0.3125rem); /* 5px */
  box-shadow: 0 0.25rem 0.5rem rgba(0, 255, 0, 0.2); /* 4px 8px */
}

.skill-category h3 {
  font-size: 1.25rem;
  color: #0f0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3 i {
  font-size: 1.5rem;
}

.skill-category ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.skill-category ul li {
  font-size: 1rem;
  color: #ccc;
  padding: 0.5rem 0;
  border-bottom: 0.0625rem solid #444; /* 1px */
}

.skill-category ul li:last-child {
  border-bottom: none;
}

/* ===================== */
/* Projects Section Specifics  */
/* ===================== */
.project-description {
  font-size: 1rem;
  color: #0f0;
  margin-bottom: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.0625rem; /* 1px */
  opacity: 0.9;
}

.project-link {
  color: #0f0;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}

.project-link:hover {
  color: #ccc;
}


/* ===================== */
/* Slider Styles         */
/* ===================== */
.slider-container {
  position: relative;
  padding-bottom: 3.5rem; /* Make space for buttons */
}

.experience-item {
  min-height: 9.375rem; /* 150px */
}

.slider-buttons {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}

.slider-buttons button {
  background-color: rgba(255, 255, 255, 0.1);
  border: 0.0625rem solid #fff; /* 1px */
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 1.25rem; /* 20px */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  transition: background-color 0.2s ease;
}

.slider-buttons button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.slider-buttons button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===================== */
/* Contact Section       */
/* ===================== */
#contact {
  text-align: center;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.contact-list a {
  color: #0f0;
  text-decoration: none;
}

.contact-list a:hover {
  color: #ccc;
}

/* ===================== */
/* Footer                */
/* ===================== */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
  background-color: #222;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  color: #ccc;
}


/* =========================================== */
/* STYLES FOR NOTES PAGE (1412.html)           */
/* =========================================== */

/* Navbar layout for Notes page */
.navbar .nav-left {
  display: flex;
  justify-content: flex-start;
  flex-grow: 1;
}

.navbar .nav-center {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

.navbar .nav-right {
  display: flex;
  justify-content: flex-end;
  flex-grow: 1;
}

/* Article-Specific Styling Enhancements */
#article-content .post {
  background-color: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid #0f0;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
  padding: 2rem;
  margin-top: 1rem; /* Add some space from the nav */
}

#article-content h2 {
  color: #0f0;
  text-shadow: 0 0 5px #0f0;
  border-bottom: 2px solid #0f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

#article-content p {
  color: #ccc;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

#article-content blockquote {
  font-family: 'Georgia', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: #0ff;
  border-left: 5px solid #0ff;
  padding: 1rem 1.5rem;
  margin: 2rem 1rem;
  background-color: rgba(0, 255, 255, 0.05);
  position: relative;
  text-shadow: 0 0 3px #0ff;
}

#article-content blockquote::before {
  content: '\201C';
  font-size: 4rem;
  color: rgba(0, 255, 255, 0.2);
  position: absolute;
  left: -10px;
  top: -10px;
  line-height: 1;
}

#article-content ul {
  list-style-type: disc;
  color: #ccc;
  padding-left: 20px;
  margin-top: 1rem;
}

#article-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

#article-content h3 {
  color: #0f0;
  font-size: 1.5em;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed #0f0;
  padding-bottom: 0.5rem;
  text-align: left;
}

/* Table of Contents Styling */
.toc {
  background-color: rgba(20, 20, 20, 0.9);
  border: 1px solid #0f0;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
}

.toc h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.toc ol {
  list-style-position: inside;
  padding-left: 0;
}

.toc li {
  color: #ccc;
  padding: 0.25rem 0;
  cursor: pointer;
  transition: color 0.2s ease;
  border-bottom: 1px solid #333;
  font-size: 0.9rem;
}

.toc li:hover {
  color: #0ff;
}

.toc li.active {
    color: #0f0;
    font-weight: bold;
}


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

@media (max-width: 48rem) { /* 768px */
  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 0.9rem;
  }

  .contact-list li {
    font-size: 0.8rem;
    flex-direction: column;
    gap: 0.2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-category {
    padding: 0.9rem;
  }

  .skill-category h3 {
    font-size: 1rem;
  }

  .skill-category ul li {
    font-size: 0.8rem;
  }
  
  /* Responsive adjustments for the article content */
  #article-content .post {
    padding: 1rem;
  }

  #article-content h2 {
    font-size: 1.3rem;
  }

  #article-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  #article-content blockquote {
    font-size: 1rem;
    padding: 0.7rem 1rem;
    margin: 1rem 0.3rem;
  }
}

@media (min-width: 48rem) { /* 768px */
  header,
  nav,
  main,
  footer {
    width: 70%;
  }
}

@media (min-width: 64rem) { /* 1024px */
  header,
  nav,
  main,
  footer {
    width: 50%;
  }
}

/* NOTE: The Microblog styles were removed as per the commented-out HTML in index.html, to keep the CSS lean. */
/* If you re-enable the microblog, you can add these styles back. */
/*
#microblog { ... }
.microblog-posts { ... }
.post { ... }
.post:hover { ... }
.post-content { ... }
.post-date { ... }
.pagination-controls { ... }
*/