/* CV Page Styles */

/* Main content layout to accommodate left navigation */
body.cv-page {
  /* Create space for the left navigation */
  --nav-width: 200px; /* Width of the navigation panel */
  --content-margin: 30px; /* Reduced margin to fix alignment issues */
}

/* Main content area that needs offset from the left nav */
body.cv-page .page-content .wrapper {
  max-width: 800px; /* Set a fixed max-width for the content */
  padding-left: var(--content-margin); /* Add padding to make room for nav */
  box-sizing: border-box; /* Include padding in width calculation */
  margin: 0 auto;
}

/* Content alignment with header title */
body.cv-page .site-title {
  /* Remove the margin-left that was pushing the title to the right */
}

body.cv-page .post-content {
  padding-left: 0; /* Remove any additional padding */
}

/* Navigation styling */
.cv-nav-wrapper {
  position: fixed;
  top: 0; /* Changed from 100px to 0 to extend all the way to the top */
  left: 0;
  width: var(--nav-width);
  background: #f8f8f8;
  border-right: 1px solid #ddd;
  z-index: 1; /* Changed from 1000 to 1 as requested */
  height: calc(100vh - var(--footer-height)); /* Removed 100px offset to extend fully */
  overflow-y: auto; /* Allow scrolling if nav is taller than viewport */
  padding-top: var(--header-height); /* Use the header height variable */
}

.cv-nav {
  display: flex;
  flex-direction: column; /* Stack links vertically */
  padding: 20px;
  gap: 15px;
  box-sizing: border-box;
}

/* Title styling in the navigation */
.cv-nav .nav-title {
  font-size: 1rem;
  margin: 0;
  padding: 0;
  color: #333;
  font-weight: 600;
}

/* No need for sticky behavior anymore as the nav is fixed */
.sticky-active {
  position: fixed;
}

.cv-nav .nav-link {
  text-decoration: none;
  color: #666;
  padding: 5px 0;
  transition: color 0.2s;
  position: relative;
  display: block;
}

.cv-nav .nav-link:hover {
  color: #333;
}

.cv-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #333;
  transform: scaleX(0);
  transition: transform 0.2s;
}

.cv-nav .nav-link:hover::after {
  transform: scaleX(1);
}

/* Add some padding to the first section */
#experience {
  padding-top: 20px;
}

h1.page-title {
  margin-top: 20px;  /* Reduced since we don't need as much space at the top */
}

.home {
  margin-top: 20px;
}

.post-header {
  margin-top: 20px;
}

.post-title {
  margin-top: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  /* On mobile, move nav to the top instead of the side */
  body.cv-page {
    --nav-width: 100%; /* Full width on mobile */
    --content-margin: 0; /* No side margin needed */
  }
  
  body.cv-page .page-content .wrapper {
    padding-left: 20px; /* Reset to normal padding */
    max-width: 800px; /* Reset max-width */
  }

  .cv-nav-wrapper {
    position: sticky; /* Use sticky on mobile for better UX */
    top: 0;
    width: 100%;
    height: auto; /* On mobile, height is auto since it's not fixed positioned */
    border-right: none;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
  }
  
  .cv-nav {
    flex-direction: row; /* Horizontal on mobile */
    overflow-x: auto;
    padding: 15px;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
    align-items: center;
  }
  
  .cv-nav .nav-title {
    margin: 0 15px 0 0;
    padding: 0;
    font-size: 1rem;
    white-space: nowrap;
  }
  
  .cv-nav a {
    white-space: nowrap;
    font-size: 0.9em;
  }
}

/* Publication and patent items */
.publication-item, .patent-item {
  position: relative;
  cursor: default;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.publication-item:hover, .patent-item:hover {
  background-color: #f0f0f0;
}

.publication-item::after, .patent-item::after {
  display: none; /* Remove the pseudo-element */
}

/* Print-only header that appears when printing */
@media print {
  .print-header {
    display: block !important;
    margin-bottom: 20px;
    text-align: center;
  }
  
  .print-name {
    font-weight: bold;
  }
  
  /* Hide navigation when printing */
  .cv-nav-wrapper {
    display: none;
  }
  
  /* Reset padding for printing */
  body.cv-page .page-content .wrapper {
    padding-left: 0;
    max-width: 100%;
  }
}

/* Content heading styles */
.post-content h2 {
  font-size: 24px;
  font-weight: 600;
} 