/* -----------------------------
   GLOBAL STYLES
------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f5f5f8;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -----------------------------
   SIDEBAR NAVIGATION
------------------------------ */

nav {
  width: 260px;
  background-color: #A2A2E7;
  color: #ffffff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 0 12px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

nav .headshot {
  text-align: center;
  margin-bottom: 25px;
}

nav .headshot img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  object-fit: cover;
}

nav .headshot h2 {
  margin: 10px 0 0;
  font-weight: 600;
  font-size: 20px;
  color: #ffffff;
}

nav ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

nav ul li {
  margin: 15px 0;
}

nav ul li a {
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  background: #8e8ed8;
}

/* -----------------------------
   MAIN CONTENT AREA
------------------------------ */

.content {
  margin-left: 280px;
  padding: 40px;
  width: calc(100% - 280px);
  max-width: none;
  flex: 1;
}

section {
  background: #ffffff;
  padding: 30px 30px 30px 40px; /* Extra left padding for colored line */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  margin-bottom: 50px;
  max-width: none;
  width: 100%;
  position: relative;
  overflow: hidden; /* Ensure colored line doesn't overflow */
}

/* Add colored line to all sections */
section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background-color: #A2A2E7;
  border-radius: 4px 0 0 4px;
}

h1 {
  margin-top: 0;
  font-size: 28px;
  font-weight: 600;
  border-bottom: 3px solid #e0e0e0;
  padding-bottom: 10px;
  margin-left: -10px; /* Align with colored line */
}

h2 {
  margin-top: 25px;
  font-size: 22px;
  font-weight: 600;
  margin-left: -10px; /* Align with colored line */
}

.subsection {
  border-left: 4px solid #A2A2E7;
  padding-left: 18px;
  margin-top: 18px;
  margin-bottom: 25px;
  margin-left: -10px; /* Align with colored line */
}

/* Style for lists in all sections */
section ul {
  padding-left: 10px;
  margin-left: 0;
}

section ul li {
  margin-bottom: 12px;
  line-height: 1.6;
  padding-left: 15px;
  position: relative;
}

/* Add colored bullet to list items in main sections */
#activities ul li::before,
#publications ul li::before,
#projects ul li::before,
#teaching .subsection ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: #A2A2E7;
  border-radius: 50%;
}

/* Specific styling for publications list items */
#publications ul li {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  padding-left: 20px;
}

#publications ul li::before {
  width: 8px;
  height: 8px;
  top: 12px;
  background-color: #A2A2E7;
}

#publications ul li:last-child {
  border-bottom: none;
}

/* Teaching section specific styling */
#teaching .subsection {
  margin-left: -10px;
}

#teaching .subsection ul {
  padding-left: 10px;
}

#teaching .subsection ul li {
  padding-left: 20px;
}

/* Projects section */
#projects ul li {
  padding-left: 20px;
  font-style: italic;
  color: #666;
}

/* -----------------------------
   CONTACT ICONS
------------------------------ */

.contact-icons {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  margin-top: 20px;
  align-items: center;
  margin-left: -10px;
}

.contact-icons img {
  width: 28px;
  height: 28px;
  transition: 0.2s;
}

.contact-icons img:hover {
  transform: scale(1.15);
}

.separator {
  font-weight: bold;
  opacity: 0.7;
}

/* -----------------------------
   FOOTER
------------------------------ */

footer {
  text-align: left;
  margin-left: 280px;
  padding: 20px 40px;
  color: #777;
  font-size: 14px;
  width: calc(100% - 280px);
  background-color: #f5f5f8;
}

/* -----------------------------
   SKIP LINK
------------------------------ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #A2A2E7;
  color: white;
  padding: 8px;
  z-index: 1001;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* -----------------------------
   RESPONSIVE DESIGN
------------------------------ */

@media (max-width: 900px) {
  nav {
    position: relative;
    width: 100%;
    height: auto;
    box-shadow: none;
    padding: 20px;
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }

  section {
    padding: 25px 25px 25px 30px; /* Adjust padding for mobile */
  }

  footer {
    margin-left: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
  }

  h1, h2 {
    margin-left: -5px;
  }

  .subsection {
    margin-left: -5px;
  }

  .contact-icons {
    margin-left: -5px;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 15px;
  }
  
  section {
    padding: 20px 20px 20px 25px;
    margin-bottom: 30px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  section::before {
    width: 6px;
  }
}

@media (max-width: 480px) {
  nav .headshot img {
    width: 100px;
    height: 100px;
  }
  
  nav .headshot h2 {
    font-size: 18px;
  }
  
  .content {
    padding: 10px;
  }
  
  section {
    padding: 15px 15px 15px 20px;
  }
  
  section::before {
    width: 5px;
  }
  
  h1, h2 {
    margin-left: -3px;
  }
  
  .subsection {
    margin-left: -3px;
  }
  
  section ul li {
    padding-left: 12px;
  }
  
  #activities ul li::before,
  #publications ul li::before,
  #projects ul li::before,
  #teaching .subsection ul li::before {
    width: 4px;
    height: 4px;
    top: 8px;
  }
}
