/* Layout CSS - Grid, Flexbox, Spacing and Positioning */

/* Base Layout */
body {
  display: block; /* Changed from grid to block for mobile */
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography base styles */
h1 {
  font-size: 2rem;
  margin-block: 0.67em;
}

.main-content {
  width: 100%;
  max-width: 1200px; /* Max width for smaller screens */
  margin: 0 auto; /* Center on smaller screens */
  padding: 20px;
}

/* Sidebar */
.sidebar {
  display: none; /* Hidden on mobile by default */
  background-color: var(--card);
}

/* Section Spacing */
.section {
  margin-bottom: 3rem;
  padding: 1rem;
  width: 100%;
}

/* Content Width */
.about-content, 
.resume-content, 
.portfolio-grid,
.honors-content,
.contact-content {
  width: 100%;
}

/* Tab Navigation */
.tab-navigation {
  display: none; /* Hidden by default on mobile */
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  width: 100%;
}

.tab-btn {
  font-family: 'Fira Code', monospace;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.75rem 1.5rem;
  margin: 0 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  transition: var(--transition-normal);
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
}

/* Tab Content */
.tab-content {
  position: relative;
  min-height: 50vh;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease-out;
  width: 100%;
}

.tab-pane.active {
  display: block;
  width: 100%;
}

/* Grid Layouts */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}

/* Contact Layout */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

/* Flexbox Layouts */
.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
}

.mobile-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Navigation */
.nav-links {
  display: none; /* Hidden by default on mobile */
}

.nav-links.show {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  background-color: var(--card);
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease-out;
}

.nav-links.show a {
  padding: 0.75rem 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  width: 100%;
}

/* Resume Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  width: 100%;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  width: 100%;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  transform: translateX(-50%);
}

/* Interests Grid */
.interests-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 column mobile */
  gap: 1.5rem;
  width: 100%;
  margin-top: 1.5rem; /* Space below subsection titles */
}

/* Homelab Showcase Layout */
.homelab-content {
  display: grid;
  grid-template-columns: 1fr; /* 1 column mobile */
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: start; /* Align items at the start */
}

/* Tablet Breakpoint (768px) */
@media screen and (min-width: 768px) {
  .services-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .tab-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    margin: 0 0.5rem;
  }
  .interests-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns tablet */
  }
  .tab-navigation {
    display: flex; /* Show tab navigation on tablet and up */
  }
}

/* Desktop Breakpoint (1024px) */
@media screen and (min-width: 1024px) {
  body {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
  }
  
  .sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    z-index: 10;
    grid-column: 1;
    grid-row: 1 / -1;
  }
  
  .main-content {
    grid-column: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
  }

  .footer {
    grid-column: 2;
    width: 100%;
    margin-top: 2rem;
  }
  
  .mobile-header {
    display: none;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tab-btn {
    font-size: 1.2rem;
  }
  .interests-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns desktop */
  }
  .homelab-content {
    grid-template-columns: 1fr 1fr; /* 2 columns desktop */
    gap: 3rem;
  }
}

/* Large Desktop Breakpoint (1280px) */
@media screen and (min-width: 1280px) {
  .main-content {
    padding: 3rem; /* Example: Increase padding on very large screens */
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .homelab-content {
    gap: 4rem;
  }
}

/* Layout CSS - Add styles for Mobile Menu Overlay */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%; /* Adjust width as needed */
    max-width: 300px;
    height: 100%;
    background-color: var(--card); /* Use card background color */
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.mobile-menu-overlay.show .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mobile-nav-links {
    margin-top: 2rem; /* Space below close button */
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease-out;
}

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

.mobile-menu-divider {
    border: none;
    height: 1px;
    background-color: var(--border);
    margin: 1.5rem 0;
}

.mobile-contact-info {
    /* Styles for contact info within mobile menu */
    margin-top: 1.5rem;
}

.mobile-contact-info .info-item {
    /* Use existing info-item styles, maybe adjust spacing */
    margin-bottom: 1rem;
}

/* Adjustments for Desktop Breakpoint */
@media screen and (min-width: 1024px) {
    /* Hide mobile menu elements on desktop */
    .mobile-header .menu-toggle,
    .mobile-menu-overlay {
        display: none;
    }
    
    /* Ensure main tab navigation is visible on desktop */
    .tab-navigation {
        display: flex; 
    }

    /* ... rest of desktop styles ... */
} 