/* Base Styles */
:root {
  --color-bg: #0f172a;
  --color-text: #e2e8f0;
  --color-green: #22c55e;
  --color-blue: #3b82f6;
  --color-purple: #a855f7;
  --color-yellow: #eab308;
  --color-red: #ef4444;
  --color-orange: #f97316;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(circle at 25px 25px, rgba(34, 197, 94, 0.15) 2px, transparent 0),
    radial-gradient(circle at 75px 75px, rgba(34, 197, 94, 0.1) 2px, transparent 0);
  background-size: 100px 100px;
  font-family: 'Courier New', monospace;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-x-6 > * + * {
  margin-left: 1.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.h-3 {
  height: 0.75rem;
}

.w-3 {
  width: 0.75rem;
}

.h-48 {
  height: 12rem;
}

.h-64 {
  height: 16rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.border {
  border-width: 1px;
  border-style: solid;
}

.border-2 {
  border-width: 2px;
  border-style: solid;
}

.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}

.border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.border-green-500-30 {
  border-color: rgba(34, 197, 94, 0.3);
}

.border-gray-600-50 {
  border-color: rgba(75, 85, 99, 0.5);
}

.border-gray-700 {
  border-color: var(--color-gray-700);
}

.border-white-20 {
  border-color: rgba(255, 255, 255, 0.2);
}

.bg-red-500 {
  background-color: var(--color-red);
}

.bg-yellow-500 {
  background-color: var(--color-yellow);
}

.bg-green-500 {
  background-color: var(--color-green);
}

.bg-gray-700-80 {
  background-color: rgba(51, 65, 85, 0.8);
}

.bg-gray-800-60 {
  background-color: rgba(30, 41, 59, 0.6);
}

.bg-gray-800-80 {
  background-color: rgba(30, 41, 59, 0.8);
}

.bg-gray-800-90 {
  background-color: rgba(30, 41, 59, 0.9);
}

.bg-gray-900 {
  background-color: var(--color-gray-900);
}

.bg-gray-900-80 {
  background-color: rgba(15, 23, 42, 0.8);
}

.bg-white-10 {
  background-color: rgba(255, 255, 255, 0.1);
}

.text-green-400, .text-green-500 {
  color: var(--color-green);
}

.text-blue-300, .text-blue-400, .text-blue-500, .text-blue-600 {
  color: var(--color-blue);
}

.text-purple-400, .text-purple-500 {
  color: var(--color-purple);
}

.text-yellow-400, .text-yellow-500 {
  color: var(--color-yellow);
}

.text-orange-500, .text-orange-600 {
  color: var(--color-orange);
}

.text-gray-300, .text-gray-400, .text-gray-500 {
  color: #9ca3af;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.5rem; /* Smaller on mobile */
}

.text-4xl {
  font-size: 1.75rem; /* Smaller on mobile */
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-4 {
  margin-right: 1rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.md-mb-0 {
  margin-bottom: 0;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1rem; /* Smaller on mobile */
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-10 {
  padding-top: 2rem; /* Smaller on mobile */
  padding-bottom: 2rem; /* Smaller on mobile */
}

.py-20 {
  padding-top: 3rem; /* Smaller on mobile */
  padding-bottom: 3rem; /* Smaller on mobile */
}

.pl-4 {
  padding-left: 1rem;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-flex {
  display: inline-flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-wrap {
  flex-wrap: wrap;
}

.overflow-hidden {
  overflow: hidden;
}

.relative {
  position: relative;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 {
  top: 0;
}

.z-0 {
  z-index: 0;
}

.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.object-cover {
  object-fit: cover;
}

.text-center {
  text-align: center;
}

.min-h-screen {
  min-height: 100vh;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

/* Terminal Button */
.terminal-button {
  background-color: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terminal-button:hover {
  background-color: rgba(30, 41, 59, 0.8);
  border-color: rgba(34, 197, 94, 0.5);
}

.terminal-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

/* Terminal Menu */
.terminal-menu {
  background-color: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: 'Courier New', monospace;
}

.terminal-list {
  list-style: none;
}

.terminal-item {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.2);
}

.terminal-item:last-child {
  border-bottom: none;
}

.terminal-link {
  text-decoration: none;
  margin-left: 0.75rem;
  transition: all 0.2s ease;
}

.terminal-link:hover span {
  color: var(--color-green);
  text-decoration: underline;
}

/* Terminal Window Styling */
.terminal-window {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 90%;
  margin: 0 auto;
}

.terminal-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Linux Window Styling */
.linux-window {
  background-color: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 90%;
  margin: 0 auto;
}

.linux-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.7);
}

.window-header {
  background-color: rgba(51, 65, 85, 0.8);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(75, 85, 99, 0.5);
}

.window-buttons {
  display: flex;
  margin-right: 1rem;
}

.window-buttons > * + * {
  margin-left: 0.5rem;
}

.window-button {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
}

.window-title {
  flex: 1 1 0%;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  display: flex;
  align-items: center;
}

.window-actions {
  display: flex;
}

.window-actions > * + * {
  margin-left: 1rem;
}

.window-content {
  padding: 1.5rem;
}

/* Glass Button */
.glass-button {
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.875rem; /* Smaller on mobile */
}

.glass-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

/* Tech Cards */
.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  border: 1px solid rgba(75, 85, 99, 0.5);
  transition: all 0.3s ease;
}

.tech-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background-color: rgba(30, 41, 59, 0.9);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.tech-card i {
  margin-bottom: 0.5rem;
}

/* Project Cards */
.project-card {
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  border: 1px solid rgba(75, 85, 99, 0.5);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.project-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.project-header {
  background-color: rgba(51, 65, 85, 0.8);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(75, 85, 99, 0.5);
}

.project-body {
  padding: 1rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.25rem 0.5rem;
  background-color: rgba(51, 65, 85, 0.8);
  font-size: 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(75, 85, 99, 0.5);
}

.project-links {
  display: flex;
}

.project-links > * + * {
  margin-left: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--color-green);
}

/* Social Links */
.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  border: 1px solid rgba(75, 85, 99, 0.5);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--color-text);
}

.social-link:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background-color: rgba(30, 41, 59, 0.9);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
  color: var(--color-green);
}

/* Form Styling */
.form-input {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 0.375rem;
  border: 1px solid rgba(75, 85, 99, 0.5);
  color: white;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(30, 41, 59, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--color-green);
  margin-bottom: 0.5rem;
}

/* Typing Animation */
.typing-text {
  border-right: 2px solid var(--color-green);
  animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
  white-space: nowrap;
  overflow: hidden;
}

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

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-green) }
}

/* Particles Container */
#particles-container {
  pointer-events: none;
}

/* Terminal Output */
.terminal-output {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* Mobile Menu */
#mobile-menu-button {
  display: block;
}

#mobile-menu {
  width: 100%;
}

nav.hidden {
  display: none;
}

/* Fix for mobile overflow */
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.7rem;
}

/* Responsive adjustments */
.social-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* Media Queries */
@media (min-width: 768px) {
  .md-block {
    display: block;
  }
  
  .md-hidden {
    display: none;
  }
  
  .md-flex-row {
    flex-direction: row;
  }
  
  .md-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .md-w-1-3 {
    width: 33.333333%;
  }
  
  .md-w-2-3 {
    width: 66.666667%;
  }
  
  .md-w-1-4 {
    width: 25%;
  }
  
  .md-w-3-4 {
    width: 75%;
  }
  
  .md-h-auto {
    height: auto;
  }
  
  .md-text-sm {
    font-size: 0.875rem;
  }
  
  .text-3xl {
    font-size: 1.875rem; /* Larger on desktop */
  }
  
  .text-4xl {
    font-size: 2.25rem; /* Larger on desktop */
  }
  
  .p-6 {
    padding: 1.5rem; /* Larger on desktop */
  }
  
  .py-10 {
    padding-top: 2.5rem; /* Larger on desktop */
    padding-bottom: 2.5rem; /* Larger on desktop */
  }
  
  .py-20 {
    padding-top: 5rem; /* Larger on desktop */
    padding-bottom: 5rem; /* Larger on desktop */
  }
  
  .glass-button {
    font-size: 1rem; /* Larger on desktop */
  }
  
  pre {
    font-size: 0.875rem;
  }
  
  .terminal-window, .linux-window {
    width: 100%;
  }
  
  .social-links {
    display: flex;
    flex-wrap: wrap;
  }
  
  #mobile-menu-button {
    display: none;
  }
  
  nav.hidden {
    display: block;
  }
}

/* Fix for mobile grid */
@media (max-width: 767px) {
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .flex {
    flex-direction: column;
  }
  
  .flex.items-center {
    flex-direction: row;
  }
  
  .space-x-4 > * + * {
    margin-left: 0;
    margin-top: 1rem;
  }
  
  .space-x-6 > * + * {
    margin-left: 0;
    margin-top: 1.5rem;
  }
  
  .window-content .flex {
    gap: 1rem;
  }
  
  /* Fix for hero buttons */
  .terminal-content .flex.flex-wrap {
    flex-direction: row;
    gap: 0.75rem 1rem; /* vertical and horizontal gap */
  }
  
  .terminal-content .space-x-4 > * + * {
    margin-left: 0;
    margin-top: 0;
  }
  
  /* Fix for navbar */
  header .container .flex {
    flex-direction: row;
  }
  
  /* Fix for footer */
  footer .flex {
    flex-direction: column;
    text-align: center;
  }
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

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

/* Hover Effects */
.hover-text-green-400:hover {
  color: var(--color-green);
}

.transition-colors {
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Focus Styles */
.focus-outline-none:focus {
  outline: none;
}

/* Navigation */
.nav-link {
  color: var(--color-text);
  text-decoration: none;
}

/* Fix for project images on mobile */
.project-image img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

/* Fix for tech stack grid on mobile */
@media (max-width: 767px) {
  .grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
