/* Base styles with responsive design */
:root {
    --primary-bg: rgba(0, 0, 0, 0.75);
    --text-color: white;
    --link-color: #0077cc;
    --card-border-radius: 8px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
  }
  .fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
      linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.1)),
      url("pic2.png") center center / cover no-repeat;
    background-color: #000000;
  }

  html, body {
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    min-height: 100vh;
    background: transparent; /* Remove the background from body */
}
  
  body {
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }
  
  /* Container for all content */
  .section {
    background: var(--primary-bg);
    display: none;
    padding: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
    min-height: 80vh;
  }
  
  /* Show Home section by default */
  #home {
    display: block;
  }
  
  /* Navigation styles */
  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 0;
    height: auto;
  }
  
  .nav-container {
    display: flex;
    flex-grow: 1;
  }
  
  .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1em;
    padding: 15px 10px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
  }
  
  .nav-item:hover {
    transform: scale(1.1);
    background: black;
  }
  
  .nav-item.active {
    background-color: #2d2d2d;
  }
  
  .name-item {
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5em;
    white-space: nowrap;
  }
  
  .spacer {
    flex-grow: 0;
  }
  
  /* Typography */
  h1, h2 {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5em;
  }
  
  .horizontal-spacer {
    margin-top: 20px;
  }
  
  .intro-text {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1em;
    line-height: 1.6;
  }
  
  .text-center {
    text-align: center;
  }
  
  /* Links */
  a {
    color: var(--link-color);
    text-decoration: none;
    cursor: pointer;
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  /* About section */
  .about-top {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
  }
  
  .about-text {
    flex: 1;
    font-size: 1.1em;
    line-height: 1.6;
  }
  
  .about-photo {
    margin-top: 25px;
    max-width: 45%;
  }
  
  .about-photo img {
    max-width: 100%;
    border-radius: var(--card-border-radius);
    display: block;
  }
  
  /* Skills and abilities */
  .skills-and-abilities {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    justify-content: center;
  }
  
  .skills-section,
  .abilities-section {
    flex: 1 1 300px;
    border-radius: var(--card-border-radius);
    padding: var(--spacing-md);
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    min-width: 0;
  }
  
  .skills-section h2,
  .abilities-section h2 {
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
  }
  
  .skill-list,
  .ability-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
  }
  
  .skill-ability-card {
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 0.9em;
    display: inline-block;
  }
  
  /* Campus activity and experience sections */
  .campus-activity {
    border-radius: var(--card-border-radius);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
  }
  
  .campus-activity h3 {
    text-transform: uppercase;
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 15px;
  }
  
  .campus-activity h4 {
    margin-top: 0;
    font-size: 1.1em;
    margin-bottom: 8px;
  }
  
  .campus-activity h5 {
    font-style: italic;
    font-size: 0.9em;
    margin-top: 0.5em;
    margin-bottom: 1em;
  }
  
  .campus-activity h6 {
    margin-top: 0;
    font-size: 0.95em;
    margin-bottom: 0;
  }
  
  .experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: 15px;
  }
  
  .tag {
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.9em;
    display: inline-block;
    white-space: nowrap;
  }
  
  .campus-activity p {
    margin: 0.5em 0;
    line-height: 1.6;
  }
  
  .experience-bullets {
    padding-left: 20px;
    margin: 0;
  }
  
  .experience-bullets li {
    margin-bottom: 8px;
    line-height: 1.6;
  }
  
  /* Image gallery */
  .image-gallery,
  .image-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    justify-content: center;
  }
  
  .gallery-img,
  .image-row img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
  }
  
  .gallery-img:hover,
  .image-row img:hover {
    transform: scale(1.05);
  }
  
  .image-row img {
    width: 150px;
    height: auto;
  }
  
  .clickable {
    cursor: pointer;
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
  }
  
  .modal-content {
    max-width: 90%;
    max-height: 90%;
    animation: zoom 0.6s;
  }
  
  @keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
  }
  
  .close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
  }
  
  .close:hover {
    color: #bbb;
  }
  
  /* University and degree styles */
  .university-banner {
    display: flex;
    align-items: center;
    margin-bottom: 1em;
  }
  
  .university-logo {
    max-height: 40px;
    margin-right: 20px;
    display: inline-block;
  }
  
  .university-text {
    margin: 0;
    display: inline-block;
    font-size: 1.2em;
    font-weight: bold;
  }
  
  .degree-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .degree-text,
  .gpa-text {
    margin: 0;
    font-size: 1em;
  }
  
  /* Contact section */
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Change to exactly 2 columns */
    grid-template-rows: repeat(2, auto); /* Add 2 rows */
    gap: var(--spacing-md);
    justify-items: center;
    margin: 0 auto;
    max-width: 700px; /* Add max-width for better control */
  }
  
  .contact-card {
    border-radius: var(--card-border-radius);
    width: 100%;
    max-width: 300px;
    padding: var(--spacing-md);
    text-align: center;
  }
  
  .contact-card h3 {
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: bold;
  }
  
  .contact-card p {
    margin: 0;
    font-size: 1em;
  }
  
  /* Hamburger menu styles - moved from JS to CSS */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
    margin-right: 15px;
  }
  
  .hamburger span {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  .hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    html {
      background-attachment: fixed !important;
      height: 100%;
    }

    nav {
      height: auto;
      min-height: 50px;
      flex-wrap: nowrap; /* Changed from wrap to nowrap */
      position: fixed;
      width: 100%;
      top: 0;
      justify-content: space-between; /* Ensure space between name and hamburger */
    }
    
    .name-item {
      font-size: 1.2em;
      padding: 5px 10px;
      order: 1; /* Place name at the left */
      margin-right: auto; /* Push to the left */
    }
    
    .hamburger {
      display: flex;
      order: 3; /* Place hamburger at the right */
      margin-left: auto; /* Push to the right */
    }
    
  .section {
      padding: 15px;
      margin-top: 60px;
      overflow-x: hidden;
      width: calc(100% - 30px);
      position: relative; /* Add this */
      z-index: 1; /* Add this */
      background: var(--primary-bg); /* Reinforce this */
  }
    
    .nav-container {
      position: absolute;
      top: 100%;
      left: 0;
      flex-direction: column;
      background: var(--primary-bg);
      width: 100%;
      display: none;
      z-index: 110;
    }
    
    .nav-container.active {
      display: flex;
    }
    
    .nav-item {
      padding: 12px 15px;
      text-align: center;
      width: 100%; /* Ensure full width */
      box-sizing: border-box;
    }
    
    .nav-item:hover {
      transform: none;
    }
    
    .about-top {
      flex-direction: column;
      align-items: center; /* Center items in column layout */
    }
    
    .about-photo {
      text-align: center;
      max-width: 100%;
      order: -1; /* Explicitly move photo above text */
      margin-bottom: 20px;
    }
    
    .about-photo img {
      max-width: 70%;
      margin: 0 auto;
    }
    
    .about-text {
      width: 100%;
      text-align: center; /* Center text below image */
    }
    
    .skills-section,
    .abilities-section {
      flex-basis: 100%;
    }
    
    /* Professional page - two columns for sample work on mobile */
    .image-row {
      display: grid;
      grid-template-columns: repeat(2, 1fr); /* Two columns */
      gap: 10px;
      justify-items: center;
      width: 100%;
    }
    
    .image-row img {
      width: 100%;
      max-width: none;
      margin: 0;
    }
    
    /* Make sure text doesn't overflow on small screens */
    .campus-activity, 
    .about-text,
    .intro-text {
      max-width: 100%;
      word-wrap: break-word;
    }
  }
  
  @media (max-width: 480px) {
    .gallery-img {
      max-width: 80%;
      width: 80%;
      margin: 0 auto 10px;
    }
    
    /* Keep two columns for professional work samples */
    .image-row {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
      max-width: 95%;
    }
    
    .contact-grid {
      grid-template-columns: 1fr;
    }
    
    .degree-row {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .gpa-text {
      margin-top: 5px;
    }
    
    .university-banner {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .university-logo {
      margin-bottom: 10px;
    }
    
    /* Further improve professional page layout */
    .experience-tags {
      justify-content: center;
    }
    
    .tag {
      margin-bottom: 5px;
    }
  }