/* style.css */
/* For small devices (phones) */
@media (max-width: 600px) {
  body {
    font-size: 15px;
    padding: 0;
    line-height: 1.7;
  }
}

/* For medium devices (tablets) */
@media (min-width: 601px) and (max-width: 1024px) {
  body {
    font-size: 17px;
    padding: 0;
    line-height: 1.7;
  }
}

/* For large devices (laptops/desktops) */
@media (min-width: 1025px) {
  body {
    font-size: 19px;
    padding: 0;
    line-height: 1.7;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: 'IBM Plex Mono', monospace;
  color: #33ff33;
  background-color: #000;
  /* Pure black */
  background-size: cover;
}

.overlay {
  /* background-color removed for pure black look */
  min-height: 100vh;
  padding: 1rem;
  /* Reduced from 2rem */
}

nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
  /* Reduced to 0.5rem */
  border-bottom: 1px solid #33ff33;
}

#blog {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

nav ul li a {
  color: #33ff33;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a:hover {
  color: #66ff66;
  text-shadow: 0 0 8px rgba(51, 255, 51, 0.6);
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: #33ff33;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Vertically center the contact tab content */
#contact-me {
  position: relative;
  min-height: 80vh;
}

#contact-me.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #000;
}

/* Canvas backgrounds for all sections */
#matrix-canvas,
#blog-canvas,
#projects-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  display: none;
  background-color: #000;
}

#contact-me.active #matrix-canvas,
#blog.active #blog-canvas,
#projects.active #projects-canvas {
  display: block;
}

/* Blog and Projects section styling */
#blog,
#projects {
  position: relative;
  min-height: 80vh;
}

/* Vertically center the projects tab content */
#projects.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #000;
}

h1 {
  border-bottom: 1px solid #33ff33;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.cursor {
  display: inline-block;
  margin-left: 0.4em;
  color: #33ff33;
  animation: blink 1s step-start infinite;
  font-weight: bold;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

a {
  color: #33ffdd;
}

/* BANNER SECTION */

.banner-container {
  position: relative;
  width: 100%;
  /* Full viewport width */
  margin: 0 auto 20px auto;
  overflow: hidden;
  padding: 0 1rem 2rem 1rem;
}



.banner-image {
  display: block;
  width: 100%;
  /* Force full width */
  max-width: 100%;
  height: 350px;
  /* Consistent height */
  object-fit: cover;
  /* Fill and crop to fit container */
  border-radius: 0;
  /* Set to 0 if you want edge-to-edge banners */
  background-color: #111;
}

.banner-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  object-fit: fill;
  /* Use 'contain' instead of 'cover' if you want to avoid cropping */
  background-color: #000;
}

/* Text overlay */
.banner-content {
  position: absolute;
  bottom: 20px;
  left: 40px;
  color: #33ffdd;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Paragraph alignment and spacing */
#bio p,
#articles p,
#projects p,
#github p,
#linkedin p {
  text-align: justify;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

#bio p:last-child {
  margin-bottom: 0;
}

#chatbot-icon {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #0f0;
  color: #000;
  font-size: 24px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 0 10px #0f0;
}

/* #chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 300px;
  max-height: 400px;
  background-color: #000;
  color: #0f0;
  border: 2px solid #0f0;
  padding: 10px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  font-family: monospace;
}

#chatbox {
  height: 250px;
  overflow-y: auto;
  margin-bottom: 10px;
  background-color: #111;
  padding: 5px;
}

#chat-input {
  width: calc(100% - 60px);
  background-color: #222;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 5px;
}

#chatbot-window button {
  width: 50px;
  background: #0f0;
  color: #000;
  border: none;
  cursor: pointer;
} */
#chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 400px;
  /* Increased width */
  max-height: 550px;
  /* Increased height */
  background-color: #000;
  color: #0f0;
  border: 2px solid #0f0;
  padding: 15px;
  /* More padding */
  display: none;
  flex-direction: column;
  z-index: 1000;
  font-family: monospace;
  font-size: 1.1rem;
  /* Bigger text */
}

#chatbox {
  height: 350px;
  /* Taller message area */
  overflow-y: auto;
  margin-bottom: 10px;
  background-color: #111;
  padding: 10px;
  /* More padding around messages */
  font-size: 1.1rem;
  /* Bigger chat text */
  line-height: 1.5;
}

/* Chat message styling */
.chat-message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 85%;
  word-wrap: break-word;
}

/* User messages - cyan/blue aligned right */
.user-message {
  background-color: rgba(0, 200, 255, 0.15);
  border-left: 3px solid #00c8ff;
  color: #00c8ff;
  margin-left: auto;
  text-align: right;
}

/* Bot messages - green aligned left */
.bot-message {
  background-color: rgba(51, 255, 51, 0.15);
  border-left: 3px solid #0f0;
  color: #0f0;
  margin-right: auto;
  text-align: left;
}

#chat-input {
  width: calc(100% - 70px);
  /* Adjusted for bigger button */
  background-color: #222;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 10px;
  /* Bigger input padding */
  font-size: 1.05rem;
  /* Bigger input text */
}

#chatbot-window button {
  width: 60px;
  /* Bigger button */
  height: 40px;
  /* Taller button */
  background: #0f0;
  color: #000;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  /* Bigger button text */
  font-weight: bold;
}

#world-clocks {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: #33ff33;
  opacity: 0.7;
  background-color: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(51, 255, 51, 0.3);
  border-bottom: 1px solid rgba(51, 255, 51, 0.3);
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}

#world-clocks:hover {
  opacity: 1;
}

#world-clocks div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#close-chat,
#close-contact-form {
  background: #ff3333;
  color: white;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.2s ease;
}

#close-chat:hover,
#close-contact-form:hover {
  background: #ff5555;
}

/* Contact Box */
.contact-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: rgba(0, 0, 0, 0.9);
  border: 2px solid #0f0;
  padding: 1.5rem;
  border-radius: 10px;
  max-width: 500px;
  margin: 1.5rem auto;
  box-shadow: 0 0 15px #0f0;
}

.contact-box .form-group {
  display: flex;
  flex-direction: column;
}

.contact-box label {
  font-weight: bold;
  color: #33ff33;
  margin-bottom: 0.3rem;
}

.contact-box input,
.contact-box textarea {
  background-color: #111;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  border-radius: 5px;
}

.contact-box textarea {
  resize: none;
}

/* .contact-box button {
  background: #0f0;
  color: #000;
  border: none;
  padding: 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 5px;
  box-shadow: 0 0 10px #0f0;
  transition: background 0.2s ease-in-out;
} */
/* Contact form styling */
.contact-box {
  flex-direction: column;
  gap: 1rem;
  padding: 20px;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #0f0;
  box-shadow: 0 0 15px #0f0;
  color: #0f0;
  font-family: 'IBM Plex Mono', monospace;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease-out;
  position: relative;
  z-index: 1;
}

.contact-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* Form fields */
.contact-box input,
.contact-box textarea {
  width: 100%;
  background: #111;
  border: 1px solid #0f0;
  color: #0f0;
  padding: 8px;
  font-size: 1rem;
}

.contact-box button {
  background: #0f0;
  color: #000;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 10px #0f0;
}

.contact-box button:hover {
  background: #33ff33;
}

/* Character counter */
#charCount {
  font-size: 0.8rem;
  color: #33ff33;
  text-align: right;
}

.contact-box button:hover {
  background: #33ff33;
}

#charCount {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #33ff33;
  text-align: right;
}

.contact-toggle-btn {
  background: #0f0;
  color: #000;
  border: none;
  padding: 12px 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 5px;
  box-shadow: 0 0 10px #0f0;
  margin-bottom: 1rem;
}

.contact-toggle-btn:hover {
  background: #33ff33;
}

/* ------------------------------ */
/* Mobile refinements (extra tweaks) */
/* ------------------------------ */
@media (max-width: 600px) {

  /* Make navigation vertical for small screens */
  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: none;
    align-items: flex-start;
  }

  /* Banner text smaller + closer to edges */
  .banner-content {
    left: 10px;
    bottom: 10px;
    font-size: 0.9rem;
  }

  /* Chatbot window should fit smaller screens */
  #chatbot-window {
    width: 90%;
    /* Almost full width */
    right: 5%;
    /* Center horizontally */
    max-height: 70vh;
    /* Fit within screen */
    font-size: 1rem;
    /* Slightly smaller text */
  }

  /* World clocks stack vertically instead of side-by-side */
  #world-clocks {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 1rem;
  }

  /* Contact box fills screen width on mobile */
  .contact-box {
    width: 95%;
    margin: 1rem auto;
    padding: 1rem;
  }
}


/* RETRO BANNER STYLES */
.retro-banner {
  position: relative;
  width: 100%;
  height: 350px;
  background-color: #000;
  overflow: hidden;
  border-bottom: 2px solid #33ff33;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated Grid Background */
.retro-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(transparent 95%, rgba(51, 255, 51, 0.3) 95%),
    linear-gradient(90deg, transparent 95%, rgba(51, 255, 51, 0.3) 95%);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
  animation: grid-move 20s linear infinite;
  opacity: 0.6;
}

@keyframes grid-move {
  0% {
    transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
  }

  100% {
    transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px);
  }
}

/* Scanline Overlay */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.2));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
}

/* Content inside the banner */
.retro-content {
  position: relative;
  z-index: 20;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px 40px;
  border: 1px solid #33ff33;
  box-shadow: 0 0 15px rgba(51, 255, 51, 0.5);
}

.retro-content h1 {
  margin: 0;
  font-size: 3rem;
  color: #33ff33;
  text-shadow: 2px 2px 0px #000, 0 0 10px #33ff33;
  letter-spacing: 2px;
  border-bottom: none;
  /* Override default h1 border */
  padding-bottom: 0;
}

/* Optional: Glitch effect on hover for title */
.retro-content h1:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
  color: #fff;
}

@keyframes glitch {
  0% {
    transform: translate(0)
  }

  20% {
    transform: translate(-2px, 2px)
  }

  40% {
    transform: translate(-2px, -2px)
  }

  60% {
    transform: translate(2px, 2px)
  }

  80% {
    transform: translate(2px, -2px)
  }

  100% {
    transform: translate(0)
  }
}

/* CRT MONITOR EFFECTS REMOVED FOR CLEAN NEON */

/* Dark background for the "room" */
body {
  background-color: #000;
}

/* Ensure all text inherits the glow and color */
body {
  color: #33ff33;
  font-family: 'IBM Plex Mono', monospace;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #33ff33;
  border: 2px solid #000;
}

/* CONTACT GRID LAYOUT */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.retro-card {
  background-color: #000;
  border: 2px solid #33ff33;
  padding: 1.5rem;
  /* Reduced padding */
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(51, 255, 51, 0.2);
}

.retro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(51, 255, 51, 0.6);
  background-color: #0a0a0a;
}

.card-icon {
  font-size: 2.5rem;
  /* Reduced icon size */
  margin-bottom: 0.75rem;
  color: #33ff33;
  font-weight: bold;
}

.retro-card h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
  /* Reduced title size */
  color: #33ff33;
}

.retro-card p {
  margin: 0;
  color: #33ff33;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* BLOG / SYSTEM LOGS STYLES */
.blog-list {
  padding: 5rem 1rem 2rem 1rem;
  /* Added top padding as requested */
  max-width: 800px;
  margin: 0 auto;
}

.blog-entry {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px dashed #33ff33;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-entry:hover {
  background-color: rgba(51, 255, 51, 0.1);
  padding-left: 2rem;
  /* Slide effect */
}

.blog-date {
  font-family: 'IBM Plex Mono', monospace;
  color: #33ff33;
  opacity: 0.7;
  font-size: 0.9rem;
  min-width: 120px;
}

.blog-content {
  flex-grow: 1;
  padding: 0 1.5rem;
}

.blog-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #33ff33;
  text-transform: uppercase;
}

.blog-summary {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
  color: #33ff33;
}

.blog-tags {
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  background-color: rgba(51, 255, 51, 0.2);
  padding: 2px 6px;
  margin-right: 5px;
  border-radius: 2px;
}

.blog-action {
  font-family: 'IBM Plex Mono', monospace;
  color: #33ff33;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Disintegration Effect */
.dust-container {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  overflow: visible;
}

.dust-particle {
  position: absolute;
  background-repeat: no-repeat;
  opacity: 1;
  transition: transform 1s ease-out, opacity 1s ease-out;
}

@keyframes disperse {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0);
    opacity: 0;
  }
}

.blog-entry:hover .blog-action {
  opacity: 1;
}

@media (max-width: 768px) {
  .blog-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-date {
    margin-bottom: 0.5rem;
  }

  .blog-content {
    padding: 0;
    margin-bottom: 1rem;
  }

  .blog-action {
    align-self: flex-end;
    opacity: 1;
    /* Always visible on mobile */
  }
}