/* Base Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; }
    body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    display: flex; 
    height: 100vh; 
    background-color: #343541; 
    color: #ececf1; 
}

/* Dark Theme Sidebar */
#sidebar {
    width: 260px;
    background-color: #202123;
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    border-right: 1px solid #4d4d4f; 
}
.nav-btn {
    background: transparent;
    color: #ececf1;
    border: none;
    text-align: left;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease;
}
.nav-btn:hover, .nav-btn.active { 
    background-color: #2a2b32; 
}

/* Main Chat Area */
#main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
}

/* Agent Response Styling */
.message-container {
    max-width: 750px;
    margin: 0 auto;
    width: 100%;
    margin-top: 5vh; 
}

/* Wrapper for Profile Pic and Greeting */
#greeting-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    min-height: 36px;
}

/* Profile Picture */
#profile-pic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    display: none; /* Hidden by default, toggled in JS */
    border: 2px solid #565869;
}

.agent-intro {
    line-height: 1.6;
}

/* The hidden content that fades in after typing */
.actual-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: none;
}
.actual-content.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Suggestion Panels (The "Prompt" Cards) */
.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.suggestion-card {
    background-color: #444654;
    border: 1px solid #565869;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-align: left;
    color: #ececf1;
}
.suggestion-card:hover { background-color: #565869; }
.suggestion-card:active { transform: scale(0.98); }
.suggestion-title { font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.suggestion-sub { font-size: 0.85rem; color: #c5c5d2; }

/* Research Page Overview */
.research-overview {
  margin-bottom: 30px;
}
.research-overview p {
  line-height: 1.6;
  color: #d1d5db;
  font-size: 1.05rem;
}

/* Project Cards (Left Image, Right Text) */
.project-card {
  display: flex;
  gap: 20px;
  align-items: flex-start; /* Aligns content to the top */
  border: 1px solid #565869;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #444654;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  border-color: #10a37f; /* Subtle green glow on hover */
}

/* Project Thumbnail */
.project-thumb {
  flex-shrink: 0; /* Prevents the image container from shrinking */
  width: 200px;
}
.project-thumb img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #202123;
  object-fit: cover;
}

/* Project Info Text */
.project-info {
  flex: 1; /* Takes up the remaining space */
  display: flex;
  flex-direction: column;
}
.project-info h3 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 1.2rem;
}
.project-info p {
  color: #d1d5db;
  line-height: 1.5;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* Project Links Row */
.project-links {
  margin-top: auto; /* Pushes the links to the bottom if text is short */
  display: flex;
  gap: 15px;
}
.project-links a {
  font-family: monospace; /* Gives a nice "code" feel to the brackets */
  font-size: 0.9rem;
}

/* Mobile Responsiveness for Research Cards */
@media (max-width: 768px) {
  .project-card {
    flex-direction: column; /* Stacks image on top of text on small screens */
  }
  .project-thumb {
    width: 100%;
  }
  .project-thumb img {
    max-height: 200px; /* Prevents massive images on mobile */
  }
}

/* Blinking cursor effect */
.cursor::after {
    content: '▋';
    animation: blink 1s step-start infinite;
    color: #ececf1;
}
@keyframes blink { 50% { opacity: 0; } }

/* Global Link Styling */
a {
  color: #10a37f; /* Classic AI agent accent color */
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}
a:hover {
  color: #1a7f64;
  text-decoration: underline;
}

/* About Me Page Layout */
.about-container {
  display: flex;
  gap: 40px;
  align-items: flex-start; /* Aligns both text and image to the top */
}

.about-text {
  flex: 1; /* Takes up the remaining space on the left */
}

/* Clean up the paragraph spacing */
.about-text p {
  margin-bottom: 16px;
  line-height: 1.6;
  color: #d1d5db;
}

.about-image img {
  width: 250px; /* Adjust size as needed */
  border-radius: 8px; /* Soft corners to match the theme */
  border: 1px solid #565869; /* Subtle border so it doesn't float in space */
  object-fit: cover;
}

/* Mobile Responsiveness: Stacks the image on small screens */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column-reverse; /* Puts the text on top, image below */
  }
  .about-image img {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
  }
}

/* Reusable Utility Classes */
.text-accent {
  color: #10a37f; /* Matches your link hover color */
  font-weight: 500;
}

/* Specific spacing for publication venues */
.venue-text {
  font-size: 1.0rem;
  margin-top: -8px; /* Pulls it slightly closer to the title */
  margin-bottom: 8px;
}

/* Specific spacing for publication authors */
.author-text {
  font-size: 0.9rem;
  margin-top: -5px; /* Pulls it slightly closer to the title */
  margin-bottom: 6px;
}

/* Social Links Layout */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.social-links a i {
  font-size: 24px;
  color: #d1d5db;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover i {
  color: #10a37f;
  transform: translateY(-2px); 
}

/* Experience Lists */
.experience-list {
  list-style-type: none;
  padding: 0;
  margin-top: 10px;
}

.experience-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: #ececf1;
  line-height: 1.5;
}

/* Status Icons */
.status-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 4px;
  margin-right: 12px;
}

.completed-check {
  color: #10a37f;
}

.loading-spin {
  color: #d1d5db;
}

/* Keyframes for the loading wheel */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ensure the experience cards sit nicely below the intro */
.experience-section {
  margin-top: 40px;
  width: 100%;
}

/* Contact Page Layout */
.contact-links-vertical {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.05rem;
  color: #ececf1; /* Makes the text soft white by default */
  text-decoration: none; /* Keeps it clean without an underline */
  transition: color 0.2s ease;
}

.contact-row i {
  font-size: 1.4rem;
  width: 25px; 
  text-align: center;
  color: #ececf1; /* Makes the icon soft white by default */
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover effects */
.contact-row:hover {
  color: #10a37f; /* Turns the text green on hover */
}

/* --- Mobile Sidebar & Header Setup --- */

/* Hide mobile elements on desktop */
.mobile-header { display: none; }
#mobile-overlay { display: none; }

@media (max-width: 768px) {
  
  /* 1. Show and style the top sticky header */
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #343541;
    border-bottom: 1px solid #4d4d4f;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .hamburger-btn {
    background: transparent;
    border: none;
    color: #ececf1;
    font-size: 1.4rem;
    cursor: pointer;
  }
  
  .mobile-title {
    font-weight: 600;
    font-size: 1.1rem;
  }

  /* 2. Adjust Main View padding for small screens */
  #main-view {
    padding: 0; 
  }
  .message-container {
    padding: 20px;
    margin-top: 2vh;
  }

  /* 3. Turn the Sidebar into an off-canvas menu */
  #sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* Hide it off screen to the left */
    height: 100vh;
    z-index: 999;
    transition: left 0.3s ease; /* Smooth sliding animation */
    box-shadow: 2px 0 10px rgba(0,0,0,0.5); /* Adds a shadow over the content */
  }
  
  /* When this class is added via JS, the sidebar slides in */
  #sidebar.open {
    left: 0;
  }

  /* 4. The darkened background overlay */
  #mobile-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998; /* Sits right underneath the sidebar */
  }
}

