/* Basic Setup */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    padding: 2rem;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    gap: 2rem;
}

/* This rule locks the sidebar to the screen */
.sidebar {
    position: fixed; /* This is the key property! */
    width: 280px;
    height: 100%;
}

/* This rule pushes the main content to the right so it isn't hidden by the sidebar */
.content {
    margin-left: 280px;
    padding: 3rem 4rem;
}

/* Sidebar Styling */
.sidebar h1 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #000;
}

.profile-pic {
    width: 100%;
    max-width: 180px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.sidebar nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.sidebar nav li {
    margin-bottom: 0.5rem;
}

.sidebar nav a {
    font-size: 1.1rem;
    color: #007bff;
}

.sidebar nav a.active {
    font-weight: bold;
    color: #000;
}

.contact-info p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
    color: #555;
}

/* Content Styling */
.content section {
    margin-bottom: 2.5rem;
}

.content h2 {
    font-size: 1.6rem;
    color: #000;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.content h3 {
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.project-item {
    margin-bottom: 1.5rem;
}

.project-item p:last-child {
    margin-bottom: 0;
}

.publication-list {
    padding-left: 20px;
}

.publication-list li {
    margin-bottom: 0.75rem;
}

.button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.button:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: #fff;
}



/*
=================================
Iframe Container for Embedded Pages
=================================
*/
.iframe-container {
    position: relative;
    width: 100%;
    height: 75vh; /* 75% of the viewport height - adjust as needed */
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden; /* Ensures the border radius is applied to the iframe */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Removes default iframe border */
}

.no-margin {
  margin-top: 0;
  margin-bottom: 0;
}

.image-gallery {
  display: flex; /* Or grid */
  flex-wrap: wrap; 
  gap: 1rem;
}

.image-container {
  width: 300px; /* Or any width you want */
}

.image-container img {
  /* Set the desired height and make the width responsive */
  height: 200px;
  width: 100%;

  /* This is the key property */
  object-fit: cover; /* This will crop the image to fit, without stretching */

  /* Optional: Controls the focus of the crop */
  /* object-position: center;  (Default) */
  /* object-position: top center;  (Focus on the top) */
}

/* --- MOBILE STYLES (screens 768px or smaller) --- */
@media (max-width: 768px) {

  /* 1. Stack the layout vertically */
  .container {
    flex-direction: column;
  }

  /* 2. Un-fix the sidebar and make it behave like a normal div */
  .sidebar {
    position: static;   /* This is the key! It removes the "fixed" behavior. */
    width: 100%;        /* Make it take the full width of the screen */
    height: auto;       /* Let its height be determined by its content */
    overflow-y: visible; /* Reset the scrolling behavior */
  }

  /* 3. IMPORTANT: Remove the margin from the content area */
  .content {
    margin-left: 0;     /* Without this, your content will have a huge empty space on the left */
  }
}