/* styles.css */

/* Base and layout */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header {
  background: #BF5700; /* ut-austin color */
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align items to the left */
  position: relative; /* Needed for positioning the absolute nav on mobile */
  z-index: 1000; /* Ensures header is on top of other content */
}

/* Specific styling for the H1 in the header */
header h1 {
  margin: 0 0 0 60px; /* Add left margin to align with profile image */
  font-size: 2rem;
  color: #fff;
  /* Flex-grow to push nav to the right on desktop if it's there */
  flex-grow: 0;
  text-align: left; /* Align name to left on mobile */
}

nav {
  margin-left: auto; /* Push nav to the right */
}

/* --- Hamburger Menu Toggle Button (Desktop: Hidden, Mobile: Visible) --- */
.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem; /* Size of the hamburger icon */
  cursor: pointer;
  display: none; /* Hidden by default on desktop */
  padding: 5px; /* Add some padding around the button */
  order: 1; /* NEW: Forces the button to be the first item in the header's flex layout */
}

/* Optional: Rotate icon when active (Font Awesome specific) */
.menu-toggle.active i.fas.fa-bars {
  transform: rotate(90deg); /* Example: rotate when active */
  transition: transform 0.3s ease;
}


/* --- Navigation Styles (Desktop First) --- */
nav {
  /* On desktop, nav is normally displayed as a flex item */
  order: 2; /* NEW: Forces nav to be the second item in header's flex layout */
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex; /* Display horizontally on desktop */
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

nav ul li a:hover {
  text-decoration: underline;
}

nav ul li a.active {
  background: #fff;
  color: #BF5700 !important;
  border-radius: 6px;
  font-weight: bold;
  padding: 5px 14px;
}


/* --- Mobile-Specific Styles (Media Query) --- */
@media (max-width: 768px) { /* These styles apply only on screens 768px wide or smaller */

  header {
    /* On mobile, align header items to left. Nav will be positioned absolutely. */
    justify-content: flex-start; /* Align header items to start */
  }

  header h1 {
    margin-left: 20px; /* Less margin on mobile */
  }

  .menu-toggle {
    display: block; /* Show the hamburger button on small screens */
  }

  nav {
    /* Hide navigation by default on mobile */
    display: none;
    flex-direction: column; /* Stack nav items vertically */
    width: 100%; /* Take full width */
    position: absolute; /* Position relative to the header */
    top: 100%; /* Place right below the header */
    left: 0;
    background: #BF5700; /* Match header background */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Add shadow for depth */
    /* Smooth transition for opening/closing */
    transition: all 0.3s ease-in-out;
  }

  /* When 'active' class is added by JS, show the nav */
  nav.active {
    display: flex; /* Or 'block', depending on desired layout for the nav container */
  }

  nav ul {
    flex-direction: column; /* Stack links vertically */
    width: 100%;
    padding: 10px 0; /* Add vertical padding for the list */
  }

  nav ul li {
    margin-left: 0; /* Remove desktop horizontal margin */
    text-align: center; /* Center the text for mobile menu items */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Optional separator */
  }

  nav ul li:last-child {
    border-bottom: none; /* No border for the last item */
  }

  nav ul li a {
    padding: 15px; /* Increase padding for better touch targets on mobile */
  }
}

/* --- Rest of your existing styles (no changes needed below this line) --- */

.container {
  max-width: 960px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Profile section */
.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.profile-pic-block {
  text-align: center;
}

.profile-pic-block img {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.social-links {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.social-links a {
  margin: 0 8px;
  text-decoration: none;
  color: #0066cc;
  font-size: 0.9rem;
}

.profile-info {
  flex: 1;
}

/* Sections and typography */
section {
  margin-bottom: 40px;
}

h2 {
  color: #b30000;
  margin-bottom: 10px;
}

ul.news {
  padding-left: 20px;
}

ul.news li {
  margin-bottom: 8px;
}

.education-logo {
  width: 110px;         /* whatever uniform width you want */
  height: 110px;        /* same for height */
  object-fit: contain; /* or cover, depending on whether you want letter-boxing or cropping */
  /* optional centering */
  display: block;
  margin: 0 auto;
}

/* Career section styles moved from career.html */
.career-list { list-style: none; padding: 0; }
.career-item { display: flex; align-items: flex-start; margin-bottom: 20px; }
.career-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-right: 18px;
  flex-shrink: 0;
}
.career-details { flex: 1; }
.career-details strong { display: block; }
.career-details em { font-style: italic; color: #555; }

/* Others section styles moved from others.html */
.others-section { margin-bottom: 40px; }
.others-section h2 { color: #b30000; margin-bottom: 10px; }
.others-section ul { list-style: disc inside; padding-left: 0; }
.others-section ul li { margin-bottom: 8px; }
.others-website-list li { margin-bottom: 15px; }
.others-website-list a { color: #0066cc; text-decoration: none; }
.others-website-list a:hover { text-decoration: underline; }

.education-entry {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}
.education-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  flex-shrink: 0;
}
.education-entry .education-logo[src*="ut-austin-logo-round.png"] {
  width: 140px;
  height: 140px;
}
.education-details {
  flex: 1;
}

/* Image loading effect */
.blur-up {
  filter: blur(8px);
  transition: filter 0.5s;
}
.blur-up[src] {
  filter: blur(0);
}

/* --- New styles for highlighting conference names --- */
.conf-short-name {
  /*color: #8e24aa; /* Deep purple */
  color: #de0e0e; /* Dark red */
  font-weight: bold;
  letter-spacing: 0.5px;
}

.conf-short-name-brown {
  color: #8d5524; /* Rich brown */
  font-weight: bold;
  letter-spacing: 0.5px;
}

.conf-short-name-darkred {
  color: #b30000; /* Dark red */
  font-weight: bold;
  letter-spacing: 0.5px;
}


/* Base style for all links */
a {
  text-decoration: none; /* Removes the default underline from all links */
}

/* Styles for unvisited links */
a:link {
  color: rgb(27, 27, 208) /* #1069c9;*/
}

/* Styles for when the mouse hovers over a link */
a:hover {
  text-decoration: underline; /* Adds an underline specifically on hover */
}

/* Styles for when the link is actively being clicked */
a:active {
  color: #34373b; /* A slightly darker blue when clicked */
}
