/* ==========================================================================
   Academic Portfolio Stylesheet
   Responsive, Mobile-First, Clean Layout with Optimal Line Lengths
   ========================================================================== */

:root {
  --text-main: #2b2b2b;
  --text-gray: #555555;
  --link-color: #0056b3;
  --link-hover: #003d82;
  --bg-color: #ffffff;
  --border-color: #e5e5e5;
  --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px; /* Constrained width to prevent ultra-wide layout spreading */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

.mt-15 { margin-top: 15px; }
.mt-10 { margin-top: 10px; }

/* --- Top Navbar --- */
.navbar {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px 30px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #333;
  text-transform: uppercase;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-end;
}

.nav-links a {
  color: #555;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #111;
}

/* --- Main Layout --- */
.container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 30px;
  gap: 50px;
  align-items: flex-start;
}

/* --- Left Sidebar --- */
.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: #111;
  line-height: 1.2;
}

.sidebar-quote {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 20px;
  line-height: 1.5;
}

.sidebar-education {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
}

.contact-list {
  list-style: none;
  font-size: 0.9rem;
  color: #444;
}

.contact-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  word-break: break-all;
}

.contact-list i {
  color: #888;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Main Content --- */
.content {
  flex: 1 1 0;
  min-width: 0; 
}

.content-section {
  margin-bottom: 45px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #111;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.experience-block, .project-block {
  margin-bottom: 25px;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 15px;
  margin-bottom: 30px;
}

.bullet-list {
  list-style-type: disc;
  margin-left: 20px;
  margin-top: 8px;
}

.bullet-list li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Publications & Links --- */
.publication-item {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.publication-item em {
  color: var(--text-gray);
}

.paper-link {
  font-weight: 600;
  font-size: 0.85rem;
  margin-right: 15px;
  color: #a00000;
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
}

.paper-link:hover {
  color: #600000;
}

.paper-link i {
  margin-right: 5px;
}

/* --- References --- */
.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.ref-card {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Responsive Design --- */
@media (max-width: 850px) {
  .container {
    flex-direction: column;
    gap: 40px;
    padding: 20px;
  }
  
  .sidebar {
    width: 100%;
    text-align: center;
  }
  
  .profile-photo {
    margin: 0 auto 15px;
  }
  
  .contact-list li {
    justify-content: center;
    word-break: normal;
  }

  .nav-container {
    flex-direction: column;
    padding: 15px 20px;
    gap: 15px;
  }
  
  .nav-brand {
    margin: 0 auto;
  }
  
  .nav-links {
    justify-content: center;
    gap: 15px;
  }
}