* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  background: black;
  color: white;
  font-family: 'Ascii8x16', 'Courier New', Courier, monospace;
}

#bgVideo {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
  background-color: black;
}

#content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-top: 10px;
  padding-left: 3ch;  /* ~2 tab stops */
  padding-right: 3ch;
}

#logo {
  font-family: monospace;
  color: white;
  white-space: pre;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
  padding: 0;
  line-height: 1.2;
  max-width: 100vw;
  overflow-x: auto;
  font-size: 1.3rem; /* Increased from 1rem to 1.3rem for bigger logo text */
}

.fade-in-logo {
  opacity: 0;
  transition: opacity 2s ease-in;
}

.fade-in-logo.show {
  opacity: 1;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 12px 20px;  /* Increased padding */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
}

nav.scrolled {
  background-color: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;  /* Increased gap between items */
}

nav ul li {
  margin: 0;
  padding: 0;
}

nav ul li a {
  font-size: 1.2rem;  /* Increased font size */
  letter-spacing: 1px;
  text-decoration: none;
  color: #FFFFFF;
  padding: 5px 0;  /* Add some padding */
}

nav ul li a:hover {
  color: #00FF00;
  text-decoration: none;
}

/* Terminal shell styles */
.terminal-container {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #FFFFFF;
  border-radius: 0;
  width: 90%;
  max-width: 900px;
  height: 300px;
  margin: 20px auto;
  padding: 5px;
  overflow: hidden;
  display: none; /* Initially hidden */
  flex-direction: column;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.terminal-output {
  flex-grow: 1;
  overflow-y: auto;
  padding: 5px;
  font-family: 'Courier New', monospace;
  color: #FFFFFF;
  line-height: 1.3;
}

.terminal-input-line {
  display: flex;
  padding: 3px 5px;
  align-items: center;
}

.prompt {
  color: #FFFFFF;
  margin-right: 6px;
  user-select: none;
  white-space: nowrap;
}

.terminal-input {
  background: transparent;
  border: none;
  color: white;
  font-family: 'Courier New', monospace;
  flex-grow: 1;
  font-size: 0.9rem;
  outline: none;
  padding: 0;
  caret-color: #FFFFFF;
}

.spawn-button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.spawn-button:hover {
  background-color: rgba(0, 255, 0, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.spawn-button:active {
  transform: scale(0.98);
}

/* Fixed terminal line styling */
.terminal-line {
  margin: 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Command not found styling */
.error-message {
  color: #ff6b6b;
}

/* Success command styling */
.success-message {
  color: #00FF00;
}

/* Terminal scrollbar customization */
.terminal-output::-webkit-scrollbar {
  width: 5px;
}

.terminal-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
}

.terminal-output::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Terminal animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-appear {
  animation: fadeIn 0.8s ease-in-out;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: #00FF00;
  margin-left: 2px;
  animation: blink 1s infinite;
}

.typing {
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #00FF00;
  animation: typing 2s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

#terminal-background {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 20px;
  overflow-y: auto;
  white-space: pre-wrap;
}

#terminal-text {
  line-height: 1.4;
  font-size: 1rem;
  color: white;
  width: 100%;
  padding-left: 3ch;
  padding-right: 3ch;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
}

#social-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  z-index: 100;
  width: 100%;
  padding-right: 50px;
}

.social-btn {
  display: inline-block;
  padding: 8px 16px;
  background: transparent;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}

.social-btn:hover {
  color: #00FF00;
  text-decoration: none;
}

/* 3D Cube */
.cube-container {
  position: fixed;
  width: 40px;
  height: 40px;
  perspective: 600px;
  z-index: 50;
  /* Position is set via JavaScript */
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.05s ease;
}

.cube-face {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  backface-visibility: visible;
}

.cube-face.front {
  transform: translateZ(20px);
}

.cube-face.back {
  transform: rotateY(180deg) translateZ(20px);
}

.cube-face.right {
  transform: rotateY(90deg) translateZ(20px);
}

.cube-face.left {
  transform: rotateY(-90deg) translateZ(20px);
}

.cube-face.top {
  transform: rotateX(90deg) translateZ(20px);
}

.cube-face.bottom {
  transform: rotateX(-90deg) translateZ(20px);
}

@keyframes rotateCube {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

/* Comprehensive mobile responsiveness improvements */
@media (max-width: 768px) {
  /* Adjust content spacing for mobile */
  #content {
    padding-top: 60px; /* Space for fixed navigation */
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Better nav display on mobile */
  nav {
    padding: 10px 5px;
  }
  
  nav ul {
    gap: 15px;
    width: 100%;
    justify-content: center;
  }
  
  nav ul li a {
    font-size: 1rem;
    padding: 5px;
  }
  
  /* Adjust terminal container for mobile */
  .terminal-container {
    width: 95%;
    height: 250px;
    margin: 10px auto;
  }
  
  /* Better terminal input experience on mobile */
  .terminal-input {
    font-size: 16px;
  }
  
  .prompt {
    font-size: 16px;
  }
  
  /* Fix spawn button size */
  .spawn-button {
    font-size: 1rem;
    padding: 8px 15px;
    margin: 15px auto;
  }
  
  /* Social buttons adjustment */
  #social-buttons {
    bottom: 10px;
    left: 0;
    right: 0;
    padding-right: 10px;
    justify-content: center;
  }
  
  .social-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  /* Terminal background text */
  #terminal-text {
    font-size: 0.9rem;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Specifically for very small screens */
@media (max-width: 480px) {
  /* Make logo fit small screens better */
  #logo {
    font-size: 0.45rem; /* Increased from 0.35rem to 0.45rem for small screens */
    transform: scale(0.75);
    transform-origin: left top;
    margin: 5px 0;
    width: 100%;
    overflow-x: scroll; /* Allow horizontal scrolling just for the logo if needed */
    -ms-overflow-style: none; /* Hide scrollbar on IE/Edge */
    scrollbar-width: none; /* Hide scrollbar on Firefox */
  }
  
  #logo::-webkit-scrollbar {
    display: none; /* Hide scrollbar on Chrome/Safari/Opera */
  }
  
  /* Compact navigation for very small screens */
  nav ul {
    gap: 10px;
  }
  
  nav ul li a {
    font-size: 0.9rem;
    letter-spacing: 0;
  }
  
  /* Make terminal even more compact */
  .terminal-container {
    height: 200px;
  }
  
  /* Prevent text from wrapping in terminal lines that should stay on one line */
  .terminal-line {
    white-space: pre;
    overflow-x: auto;
  }
  
  /* Ensure loading screen elements are properly centered and sized */
  .loading-content {
    width: 90%;
    padding: 15px;
  }
  
  .loading-progress-container {
    width: 90%;
  }
}

/* Ensure terminal text doesn't overflow its container on any screen */
.terminal-line {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Prevent zoom on mobile and fix text input */
input, button, select, textarea {
  font-size: 16px; /* Prevent zoom on iOS */
}

/* Fix interaction issues on mobile devices */
@media (hover: none) {
  /* Make buttons more touch-friendly */
  nav ul li a, .spawn-button, .social-btn {
    padding: 8px 12px;
  }
  
  /* Ensure adequate touch target size */
  .spawn-button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  /* Better layout in landscape mode on mobile */
  #logo {
    margin-top: 60px; /* Give more space for the fixed nav */
  }
  
  .terminal-container {
    height: 180px; /* Smaller height in landscape to avoid overflow */
  }
  
  #social-buttons {
    padding-right: 20px;
    justify-content: flex-end; /* Move back to right side in landscape */
  }
}

/* Always show aka: amabbadi on a new line and not clipped */
#logo {
  position: relative;
}
#logo::after {
  content: "aka: amabbadi";
  display: block;
  color: #fff;
  font-size: 1em;
  text-align: right;
  margin-top: 2px;
  margin-right: 4px;
  font-family: inherit;
  /* Hide the duplicate if already present in the ASCII art */
  visibility: hidden;
}

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  overflow: hidden;
}

/* Loading video background styling */
#loadingBgVideo {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
  background-color: black;
  animation: pulse 4s ease-in-out infinite;
}

/* Enhanced loading content styles */
.loading-line {
  margin: 20px 0;
  text-align: center;
  color: rgba(0, 255, 0, 0.9); /* Matrix green color */
  font-size: 1.2rem;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.7); /* Glow effect */
  font-family: monospace;
  letter-spacing: 1px;
  animation: textPulse 1.5s infinite alternate;
}

@keyframes textPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.loading-progress-container {
  width: 80%;
  background: rgba(0, 0, 0, 0.7);
  height: 20px;
  margin-top: 20px;
  position: relative;
  border: 1px solid rgba(0, 255, 0, 0.5);
}

.loading-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 80%;
  max-width: 600px;
  position: relative;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 4px;
}

.loading-progress-bar {
  height: 100%;
  background-color: rgba(0, 255, 0, 0.7); /* Matrix green */
  width: 0%;
  animation: progressAnimation 4s ease-in-out forwards;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); /* Add glow effect */
  position: relative;
  overflow: hidden;
}

/* Add scanline effect to loading bar */
.loading-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  animation: scanline 1.5s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(-2px); }
  50% { transform: translateY(20px); }
  100% { transform: translateY(-2px); }
}

@keyframes progressAnimation {
  0% { width: 0%; }
  20% { width: 20%; }
  50% { width: 60%; }
  75% { width: 85%; }
  100% { width: 100%; }
}

/* ASCII Rain Effect */
#rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.5;
}

.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

/* Add additional rule to ensure it's removed */
#loading-screen.hidden {
  display: none !important;
}

/* Ensure About Me Section is visible only on home page */
.hide-about-section #about-me-section {
  display: none;
}

/* Global glitch effect styles */
#global-glitch-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Allow clicks to pass through */
  z-index: 500; /* Over most content but under modal elements */
  overflow: hidden;
}

.glitch-char {
  position: absolute;
  color: #00FF00; /* Matrix green */
  font-family: monospace;
  user-select: none;
  pointer-events: none;
  z-index: 501; /* Above the container */
  text-shadow: 0 0 2px #00FF00;
}

/* Restore terminal container to original state */
@media (min-width: 769px) {
  .terminal-container {
    width: 90%; /* Restore original width */
    margin: 20px auto; /* Restore original margin */
    max-width: 900px;
  }
}

/* About Me Section Styling - Fixed visibility */
#about-me-section {
  position: fixed;
  top: 60px;
  right: 0;
  width: 450px;
  height: auto; /* Changed from 75vh to auto */
  max-height: 70vh; /* Optional: add a max height with scrolling */
  background-color: rgba(0, 0, 0, 0.7);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: none;
  padding: 20px 25px;
  overflow-y: auto;
  z-index: 50;
  font-family: 'Courier New', monospace;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  display: block;
  visibility: visible;
}

/* Dashed border at the bottom */
#about-me-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.3) 50%, transparent 50%);
  background-size: 20px 1px;
  background-repeat: repeat-x;
}

.section-title {
  color: #FFFFFF;
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
}

.section-content {
  color: #CCCCCC;
  font-size: 0.9rem;
  line-height: 1.6;
  display: block;
}

.section-content p {
  margin-bottom: 15px;
}

.section-content ul {
  list-style-type: none;
  padding-left: 15px;
  margin-bottom: 15px;
}

.section-content li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 5px;
}

.section-content li:before {
  content: ">";
  position: absolute;
  left: 0;
  color: #FFFFFF;
}

/* Responsive adjustments for about me section */
@media (max-width: 1024px) {
  #about-me-section {
    width: 350px; /* Slightly narrower on medium screens */
  }
}

@media (max-width: 768px) {
  #about-me-section {
    position: static; /* Not fixed on small screens */
    width: 100%;
    height: auto;
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Ensure the spawn button appears below the about section on mobile */
  #spawn-button {
    margin-top: 30px;
  }
}

/* Adjust terminal position to not overlap with the about section */
@media (min-width: 769px) {
  .terminal-container {
    width: calc(90% - 470px); /* Adjust width to account for about section */
    margin-left: 20px;
    margin-right: auto;
  }
}

/* NEW RESPONSIVE ADJUSTMENTS FOR SUB-2K RESOLUTIONS */

/* Resolutions between 1440px and 1920px (below 2K) */
@media (min-width: 1440px) and (max-width: 1920px) {
  #about-me-section {
    width: 400px;
    top: 80px; /* Lowered to avoid overlap with nav and logo */
    max-height: 65vh;
  }
  
  #logo {
    margin-right: 410px; /* Give space for about section */
    max-width: calc(100% - 420px);
  }
  
  .terminal-container {
    width: calc(100% - 450px);
    max-width: 900px;
    margin-left: 30px;
  }
  
  #terminal-background {
    max-width: calc(100% - 420px);
  }
}

/* Resolutions between 1024px and 1440px */
@media (min-width: 1025px) and (max-width: 1439px) {
  #about-me-section {
    width: 350px;
    top: 100px; /* Even lower to avoid overlap */
    max-height: 60vh;
    right: 20px;
  }
  
  #logo {
    margin-right: 360px;
    max-width: calc(100% - 380px);
    font-size: 1rem; /* Increased from 0.8rem to 1rem */
  }
  
  .terminal-container {
    width: calc(100% - 380px);
    margin-left: 20px;
  }
  
  #terminal-background {
    max-width: calc(100% - 360px);
    padding-left: 20px;
  }
  
  /* Adjust navigation for this resolution */
  nav ul {
    gap: 25px;
  }
}

/* Specific adjustment to prevent logo and about section overlap */
@media (max-width: 1600px) {
  #logo {
    transform-origin: left top;
    transform: scale(0.85);
    margin-top: 30px;
    font-size: 1.2rem; /* Added font size specifically for this breakpoint */
  }
}

/* Make sure terminal text stays readable */
@media (min-width: 769px) and (max-width: 1440px) {
  #terminal-text {
    font-size: 0.9rem;
    padding-left: 15px;
  }
  
  .terminal-container {
    font-size: 0.85rem;
  }
}

/* Improvements for smaller but not mobile screens */
@media (min-width: 769px) and (max-width: 1024px) {
  #about-me-section {
    top: 120px;
    width: 320px;
    max-height: 55vh;
    font-size: 0.9em;
    right: 10px;
  }
  
  #logo {
    margin-right: 330px;
    max-width: calc(100% - 340px);
    transform: scale(0.75);
    margin-top: 40px;
  }
  
  .terminal-container {
    width: calc(100% - 350px);
    margin-left: 15px;
  }
  
  /* Adjust spacing for content */
  #content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Page transition effects */
.page-content {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.page-content.visible {
  opacity: 1;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.fade-in {
  animation: fadeIn 1.5s ease-in-out forwards;
}

.fade-out {
  animation: fadeOut 1s ease-in-out forwards;
}

/* Staggered fade in for different sections */
.fade-in-delay-1 {
  animation: fadeIn 1.5s ease-in-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 1.5s ease-in-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 1.5s ease-in-out 0.6s forwards;
  opacity: 0;
}

.fade-in-delay-4 {
  animation: fadeIn 1.5s ease-in-out 0.8s forwards;
  opacity: 0;
}

/* Add custom ASCII font */
@font-face {
  font-family: 'Ascii8x16';
  src: url('./fonts/8x16-ascii.otf') format('opentype');
  font-display: swap;
}

/* Ensure monospace elements also use the custom font */
#logo,
.terminal-output,
.terminal-input,
.prompt,
.section-title,
.section-content,
pre,
code {
  font-family: 'Ascii8x16', 'Courier New', Courier, monospace !important;
}

/* Styles for content sections (Projects, About, Contact) */
.content-section {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 1200px;
  margin: 100px auto 50px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Project Card Styles */
.project-card {
  margin-bottom: 40px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(0, 255, 0, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.project-card h3 {
  color: #FFFFFF;
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.project-card p {
  color: #CCCCCC;
  margin-bottom: 15px;
}

.project-card ul {
  list-style-type: none;
  padding-left: 15px;
  margin-bottom: 20px;
}

.project-card li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
  color: #AAAAAA;
}

.project-card li:before {
  content: ">";
  position: absolute;
  left: 0;
  color: #00FF00;
}

.project-card strong {
  color: #FFFFFF;
}

.project-links {
  margin-top: 15px;
}

.project-links a {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.project-links a:hover {
  background-color: rgba(0, 255, 0, 0.2);
  border-color: rgba(0, 255, 0, 0.5);
  color: #00FF00;
}

/* About Page Styles */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-column {
  padding: 15px;
}

.about-column h3 {
  color: #00FF00;
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-family: monospace;
}

.skill-section h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 10px;
  border-left: 3px solid rgba(0, 255, 0, 0.7);
  padding-left: 10px;
}

.timeline {
  position: relative;
  margin: 20px 0 40px;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 25px;
}

.timeline-date {
  font-weight: bold;
  color: #00FF00;
  margin-bottom: 5px;
}

.timeline-content h4 {
  color: #FFFFFF;
  margin: 0 0 5px 0;
}

.timeline-content p {
  color: #AAAAAA;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -5px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: #00FF00;
  border-radius: 50%;
  z-index: 2;
}

blockquote {
  font-style: italic;
  border-left: 3px solid #00FF00;
  padding-left: 15px;
  margin: 20px 0;
  color: #CCCCCC;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.terminal-form {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #00FF00;
  margin-bottom: 8px;
  font-family: monospace;
  font-weight: bold;
}

.terminal-form .terminal-input {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 10px;
  font-family: 'Courier New', monospace;
}

.terminal-form .terminal-input:focus {
  outline: none;
  border-color: #00FF00;
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-textarea {
  resize: vertical;
  min-height: 120px;
}

.terminal-button {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terminal-button:hover {
  background-color: rgba(0, 255, 0, 0.2);
  color: #00FF00;
  border-color: rgba(0, 255, 0, 0.5);
}

.terminal-response {
  margin-top: 20px;
  padding: 10px;
  min-height: 20px;
}

.contact-info {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
}

.contact-method {
  margin-bottom: 15px;
}

.contact-method h4 {
  color: #00FF00;
  margin-bottom: 5px;
}

.contact-method a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-method a:hover {
  color: #00FF00;
  text-decoration: underline;
}

.contact-note {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.contact-note pre {
  font-size: 0.7rem;
  line-height: 1;
  margin-bottom: 15px;
  color: #00FF00;
}

/* Responsive Adjustments for Project, About, Contact */
@media (max-width: 1024px) {
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content-section {
    width: 95%;
    padding: 20px 15px;
    margin-top: 80px;
  }
  
  .about-column, .contact-form-container, .contact-links-container {
    padding: 10px 5px;
  }
  
  .timeline:before {
    left: 5px;
  }
  
  .timeline-item {
    padding-left: 25px;
  }
  
  .timeline-item:before {
    left: 0;
  }
}

@media (max-width: 480px) {
  .content-section {
    padding: 15px 10px;
  }
  
  .project-card, .terminal-form, .contact-info {
    padding: 15px 10px;
  }
  
  .project-card h3, .about-column h3, .contact-links-container h3 {
    font-size: 1.1rem;
  }
}

/* Loading animations */
@keyframes pulse {
  0% { opacity: 0.15; }
  50% { opacity: 0.25; }
  100% { opacity: 0.15; }
}

#loadingBgVideo {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
  background-color: black;
  animation: pulse 4s ease-in-out infinite;
}

/* Loading content layout */
.loading-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 80%;
  max-width: 600px;
  position: relative;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 4px;
}

.loading-line {
  margin: 20px 0;
  text-align: center;
  color: rgba(0, 255, 0, 0.9); /* Matrix green color */
  font-size: 1.2rem;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.7); /* Glow effect */
  font-family: monospace;
  letter-spacing: 1px;
  animation: textPulse 1.5s infinite alternate;
}

@keyframes textPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.loading-progress-container {
  width: 80%;
  background: rgba(0, 0, 0, 0.7);
  height: 20px;
  margin-top: 20px;
  position: relative;
  border: 1px solid rgba(0, 255, 0, 0.5);
}

/* Loading progress bar styling */
.loading-progress-bar {
  height: 100%;
  background-color: rgba(0, 255, 0, 0.7); /* Matrix green */
  width: 0%;
  animation: progressAnimation 4s ease-in-out forwards;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); /* Add glow effect */
  position: relative;
  overflow: hidden;
}

/* Add scanline effect to loading bar */
.loading-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  animation: scanline 1.5s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(-2px); }
  50% { transform: translateY(20px); }
  100% { transform: translateY(-2px); }
}

@keyframes progressAnimation {
  0% { width: 0%; }
  20% { width: 20%; }
  50% { width: 60%; }
  75% { width: 85%; }
  100% { width: 100%; }
}

/* ASCII Rain Effect */
#rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.5;
}

.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

/* Add additional rule to ensure it's removed */
#loading-screen.hidden {
  display: none !important;
}

/* Ensure About Me Section is visible only on home page */
.hide-about-section #about-me-section {
  display: none;
}

/* Global glitch effect styles */
#global-glitch-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Allow clicks to pass through */
  z-index: 500; /* Over most content but under modal elements */
  overflow: hidden;
}

.glitch-char {
  position: absolute;
  color: #00FF00; /* Matrix green */
  font-family: monospace;
  user-select: none;
  pointer-events: none;
  z-index: 501; /* Above the container */
  text-shadow: 0 0 2px #00FF00;
}

/* Restore terminal container to original state */
@media (min-width: 769px) {
  .terminal-container {
    width: 90%; /* Restore original width */
    margin: 20px auto; /* Restore original margin */
    max-width: 900px;
  }
}

/* About Me Section Styling - Fixed visibility */
#about-me-section {
  position: fixed;
  top: 60px;
  right: 0;
  width: 450px;
  height: auto; /* Changed from 75vh to auto */
  max-height: 70vh; /* Optional: add a max height with scrolling */
  background-color: rgba(0, 0, 0, 0.7);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: none;
  padding: 20px 25px;
  overflow-y: auto;
  z-index: 50;
  font-family: 'Courier New', monospace;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  display: block;
  visibility: visible;
}

/* Dashed border at the bottom */
#about-me-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.3) 50%, transparent 50%);
  background-size: 20px 1px;
  background-repeat: repeat-x;
}

.section-title {
  color: #FFFFFF;
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
}

.section-content {
  color: #CCCCCC;
  font-size: 0.9rem;
  line-height: 1.6;
  display: block;
}

.section-content p {
  margin-bottom: 15px;
}

.section-content ul {
  list-style-type: none;
  padding-left: 15px;
  margin-bottom: 15px;
}

.section-content li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 5px;
}

.section-content li:before {
  content: ">";
  position: absolute;
  left: 0;
  color: #FFFFFF;
}

/* Responsive adjustments for about me section */
@media (max-width: 1024px) {
  #about-me-section {
    width: 350px; /* Slightly narrower on medium screens */
  }
}

@media (max-width: 768px) {
  #about-me-section {
    position: static; /* Not fixed on small screens */
    width: 100%;
    height: auto;
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Ensure the spawn button appears below the about section on mobile */
  #spawn-button {
    margin-top: 30px;
  }
}

/* Adjust terminal position to not overlap with the about section */
@media (min-width: 769px) {
  .terminal-container {
    width: calc(90% - 470px); /* Adjust width to account for about section */
    margin-left: 20px;
    margin-right: auto;
  }
}

/* NEW RESPONSIVE ADJUSTMENTS FOR SUB-2K RESOLUTIONS */

/* Resolutions between 1440px and 1920px (below 2K) */
@media (min-width: 1440px) and (max-width: 1920px) {
  #about-me-section {
    width: 400px;
    top: 80px; /* Lowered to avoid overlap with nav and logo */
    max-height: 65vh;
  }
  
  #logo {
    margin-right: 410px; /* Give space for about section */
    max-width: calc(100% - 420px);
  }
  
  .terminal-container {
    width: calc(100% - 450px);
    max-width: 900px;
    margin-left: 30px;
  }
  
  #terminal-background {
    max-width: calc(100% - 420px);
  }
}

/* Resolutions between 1024px and 1440px */
@media (min-width: 1025px) and (max-width: 1439px) {
  #about-me-section {
    width: 350px;
    top: 100px; /* Even lower to avoid overlap */
    max-height: 60vh;
    right: 20px;
  }
  
  #logo {
    margin-right: 360px;
    max-width: calc(100% - 380px);
    font-size: 1rem; /* Increased from 0.8rem to 1rem */
  }
  
  .terminal-container {
    width: calc(100% - 380px);
    margin-left: 20px;
  }
  
  #terminal-background {
    max-width: calc(100% - 360px);
    padding-left: 20px;
  }
  
  /* Adjust navigation for this resolution */
  nav ul {
    gap: 25px;
  }
}

/* Specific adjustment to prevent logo and about section overlap */
@media (max-width: 1600px) {
  #logo {
    transform-origin: left top;
    transform: scale(0.85);
    margin-top: 30px;
    font-size: 1.2rem; /* Added font size specifically for this breakpoint */
  }
}

/* Make sure terminal text stays readable */
@media (min-width: 769px) and (max-width: 1440px) {
  #terminal-text {
    font-size: 0.9rem;
    padding-left: 15px;
  }
  
  .terminal-container {
    font-size: 0.85rem;
  }
}

/* Improvements for smaller but not mobile screens */
@media (min-width: 769px) and (max-width: 1024px) {
  #about-me-section {
    top: 120px;
    width: 320px;
    max-height: 55vh;
    font-size: 0.9em;
    right: 10px;
  }
  
  #logo {
    margin-right: 330px;
    max-width: calc(100% - 340px);
    transform: scale(0.75);
    margin-top: 40px;
  }
  
  .terminal-container {
    width: calc(100% - 350px);
    margin-left: 15px;
  }
  
  /* Adjust spacing for content */
  #content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Page transition effects */
.page-content {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.page-content.visible {
  opacity: 1;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.fade-in {
  animation: fadeIn 1.5s ease-in-out forwards;
}

.fade-out {
  animation: fadeOut 1s ease-in-out forwards;
}

/* Staggered fade in for different sections */
.fade-in-delay-1 {
  animation: fadeIn 1.5s ease-in-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 1.5s ease-in-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 1.5s ease-in-out 0.6s forwards;
  opacity: 0;
}

.fade-in-delay-4 {
  animation: fadeIn 1.5s ease-in-out 0.8s forwards;
  opacity: 0;
}

/* Add custom ASCII font */
@font-face {
  font-family: 'Ascii8x16';
  src: url('./fonts/8x16-ascii.otf') format('opentype');
  font-display: swap;
}

/* Ensure monospace elements also use the custom font */
#logo,
.terminal-output,
.terminal-input,
.prompt,
.section-title,
.section-content,
pre,
code {
  font-family: 'Ascii8x16', 'Courier New', Courier, monospace !important;
}

/* Styles for content sections (Projects, About, Contact) */
.content-section {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 1200px;
  margin: 100px auto 50px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Project Card Styles */
.project-card {
  margin-bottom: 40px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(0, 255, 0, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.project-card h3 {
  color: #FFFFFF;
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.project-card p {
  color: #CCCCCC;
  margin-bottom: 15px;
}

.project-card ul {
  list-style-type: none;
  padding-left: 15px;
  margin-bottom: 20px;
}

.project-card li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
  color: #AAAAAA;
}

.project-card li:before {
  content: ">";
  position: absolute;
  left: 0;
  color: #00FF00;
}

.project-card strong {
  color: #FFFFFF;
}

.project-links {
  margin-top: 15px;
}

.project-links a {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.project-links a:hover {
  background-color: rgba(0, 255, 0, 0.2);
  border-color: rgba(0, 255, 0, 0.5);
  color: #00FF00;
}

/* About Page Styles */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-column {
  padding: 15px;
}

.about-column h3 {
  color: #00FF00;
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-family: monospace;
}

.skill-section h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 10px;
  border-left: 3px solid rgba(0, 255, 0, 0.7);
  padding-left: 10px;
}

.timeline {
  position: relative;
  margin: 20px 0 40px;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 25px;
}

.timeline-date {
  font-weight: bold;
  color: #00FF00;
  margin-bottom: 5px;
}

.timeline-content h4 {
  color: #FFFFFF;
  margin: 0 0 5px 0;
}

.timeline-content p {
  color: #AAAAAA;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -5px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: #00FF00;
  border-radius: 50%;
  z-index: 2;
}

blockquote {
  font-style: italic;
  border-left: 3px solid #00FF00;
  padding-left: 15px;
  margin: 20px 0;
  color: #CCCCCC;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.terminal-form {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #00FF00;
  margin-bottom: 8px;
  font-family: monospace;
  font-weight: bold;
}

.terminal-form .terminal-input {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 10px;
  font-family: 'Courier New', monospace;
}

.terminal-form .terminal-input:focus {
  outline: none;
  border-color: #00FF00;
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-textarea {
  resize: vertical;
  min-height: 120px;
}

.terminal-button {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terminal-button:hover {
  background-color: rgba(0, 255, 0, 0.2);
  color: #00FF00;
  border-color: rgba(0, 255, 0, 0.5);
}

.terminal-response {
  margin-top: 20px;
  padding: 10px;
  min-height: 20px;
}

.contact-info {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
}

.contact-method {
  margin-bottom: 15px;
}

.contact-method h4 {
  color: #00FF00;
  margin-bottom: 5px;
}

.contact-method a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-method a:hover {
  color: #00FF00;
  text-decoration: underline;
}

.contact-note {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.contact-note pre {
  font-size: 0.7rem;
  line-height: 1;
  margin-bottom: 15px;
  color: #00FF00;
}

/* Responsive Adjustments for Project, About, Contact */
@media (max-width: 1024px) {
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content-section {
    width: 95%;
    padding: 20px 15px;
    margin-top: 80px;
  }
  
  .about-column, .contact-form-container, .contact-links-container {
    padding: 10px 5px;
  }
  
  .timeline:before {
    left: 5px;
  }
  
  .timeline-item {
    padding-left: 25px;
  }
  
  .timeline-item:before {
    left: 0;
  }
}

@media (max-width: 480px) {
  .content-section {
    padding: 15px 10px;
  }
  
  .project-card, .terminal-form, .contact-info {
    padding: 15px 10px;
  }
  
  .project-card h3, .about-column h3, .contact-links-container h3 {
    font-size: 1.1rem;
  }
}
