/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* shadcn-inspired dark theme colors */
  --background: #09090b;
  --foreground: #fafafa;
  --card: #18181b;
  --card-foreground: #fafafa;
  --primary: #3b82f6;
  --primary-foreground: #fafafa;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #6366f1;
  --accent-foreground: #fafafa;
  --border: #27272a;
  --ring: #3b82f6;

  /* Spacing */
  --container-padding: 2rem;
  --section-padding: 6rem 0;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  --font-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
}

/* --- GLOBAL LAYOUT & SCROLL FIXES --- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevents horizontal scrolling */
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden; /* Prevents horizontal scrolling */
  width: 100%;
  position: relative;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* --- NAVIGATION (Fixed + Glass Effect) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  
  /* Initial State: Transparent */
  background-color: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  padding: 1rem 0; 
}

/* Scrolled State (Added by JS) */
.nav.scrolled {
  background-color: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.3s ease;
}

.nav.scrolled .nav-content {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger Button (Hidden on Desktop) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--section-padding);
  padding-top: 100px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-greeting {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--foreground) 0%, var(--muted-foreground) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* Long name fix for mobile */
  word-break: break-word;
  hyphens: auto;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.8;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* Sections */
.section {
  padding: var(--section-padding);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--primary);
}

.coming-soon-text {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.github-link {
  color: var(--primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.github-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.github-link .arrow {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.github-link:hover .arrow {
  transform: translateX(4px);
}

/* --- PROJECTS SECTION --- */
.projects-grid {
  display: flex;
  flex-direction: row;    
  flex-wrap: wrap;        
  justify-content: center; 
  gap: 1.5rem;
}

.project-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 280px;
  flex-grow: 0;
  flex-shrink: 0;
  position: relative;
}

.project-card-blurred {
  filter: blur(4px); 
  pointer-events: none; 
  opacity: 0.7;
  user-select: none;
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.project-card-blurred:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 160px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.25rem;
  text-align: left;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.project-description {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.5;
}

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

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--secondary);
  color: var(--muted-foreground);
  border-radius: 0.25rem;
}

/* --- SKILLS SECTION --- */
.skills-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

.skill-category {
  background-color: transparent;
  border: none;
  padding: 0;
  text-align: left;
  width: 100%; 
  max-width: 800px; 
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box; 
}

.skill-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%; 
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background-color: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  white-space: nowrap; 
}

.skill-tag:hover {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Contact Section */
.contact-content {
  max-width: 600px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-text {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--muted-foreground);
  transition: all 0.3s ease;
  display: inline-flex;
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-4px);
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease-out;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* --- RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 768px) {
  :root {
    --container-padding: 1.25rem; 
    --section-padding: 4rem 0;
  }

  /* --- HAMBURGER MENU FIX START --- */
  
  /* 1. Button stays ON TOP of the overlay */
  .mobile-menu-btn {
    display: flex;
    position: relative;
    z-index: 2002; /* High priority */
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* 2. Full Screen Overlay for Menu */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Covers whole screen */
    background-color: #09090b; /* Solid background */
    
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
    
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2001; /* Below button, above everything else */
    
    overflow-y: auto; /* Allows scrolling if menu is tall */
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-link {
      font-size: 1.5rem; /* Bigger text for mobile */
  }
  
  /* --- HAMBURGER MENU FIX END --- */

  /* Mobile Layout Adjustments */
  .projects-grid {
    flex-direction: column; 
    align-items: center;    
  }

  .project-card {
    width: 100%;          
    max-width: 400px;     
  }

  .section-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
  }
  
  .github-link {
      margin-left: 3.5rem; 
  }
  
  /* Layout safety for Skills */
  .skill-category, .skill-tags {
      width: 100% !important;
      max-width: 100% !important;
  }
  
  .skill-tag {
      font-size: 0.8rem;
      padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
}