/* Override LaTeX.css to enable sidebar layout */
body {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  background-color: #1d1e26;
  color: #ffffff;
}

.page-wrapper {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  gap: 3rem;
  padding: 2rem;
}

/* Floating Sidebar - RIGHT NEXT TO CONTENT */
.sidebar {
  position: sticky;
  top: 2rem;
  width: 280px;
  height: fit-content;
  background: transparent;
  padding: 0;
  padding-top: 4rem;  /* Add initial gap from top */
  text-align: center;
  align-self: flex-start;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar .avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
  display: block;
}

.sidebar-content h1 {
  font-size: 1.5rem;
  margin: 0.5rem 0;
  color: #ffffff;
  font-weight: 600;
}

.sidebar .position {
  font-size: 1rem;
  font-style: italic;
  margin: 0.25rem 0;
  color: #ffffff;
}

.sidebar .email {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  margin: 0.75rem 0;
  color: #ffffff;
}

.sidebar p {
  margin: 0.5rem 0;
  line-height: 1.4;
  color: #ffffff;
}

.sidebar a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px dotted #ffffff;
}

.sidebar a:hover {
  border-bottom: 1px solid #ffffff;
}

.social-icons {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.social-icons a {
  font-size: 1.6rem;
  color: #ffffff;
  transition: all 0.2s ease;
  display: inline-block;
  border: none !important;
}

.social-icons a:hover {
  transform: scale(1.15);
  opacity: 0.7;
}

/* Main Content - NARROW, CENTERED */
.main-content {
  width: 700px;
  max-width: 40vw;
  min-width: 600px;
  padding: 0;
  min-height: 100vh;
}

/* Override LaTeX.css article styling for white text */
.latex-content {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff;
}

.latex-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.latex-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #ffffff;
}

.latex-content section {
  margin-bottom: 2rem;
}

.latex-content p,
.latex-content li {
  color: #ffffff;
}

.latex-content a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px dotted #ffffff;
}

.latex-content a:hover {
  border-bottom: 1px solid #ffffff;
}

.latex-content strong {
  color: #ffffff;
  font-weight: 600;
}

.latex-content em {
  color: #ffffff;
  font-style: italic;
}

.latex-content ol,
.latex-content ul {
  color: #ffffff;
}

/* Publications styling - with left venue sidebar */
.publications {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.publication-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.pub-venue {
  flex-shrink: 0;
  width: 100px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  text-align: right;
  padding-top: 0.2rem;
}

.pub-details {
  flex: 1;
}

.pub-details p {
  margin: 0;
  line-height: 1.6;
}

/* Map styling */
#map {
  height: 400px;
  width: 100%;
  margin: 1rem 0;
}

.leaflet-container {
  background: #1d1e26;
  font-family: inherit;
}

.leaflet-control-zoom a {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #cccccc !important;
}

.leaflet-control-zoom a:hover {
  background-color: #f4f4f4 !important;
}

.leaflet-control-attribution {
  background-color: rgba(255, 255, 255, 0.8) !important;
  color: #000000 !important;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #3a3b45;
  color: #ffffff;
}

footer a {
  color: #ffffff;
  border-bottom: 1px dotted #ffffff;
}

footer a:hover {
  border-bottom: 1px solid #ffffff;
}

footer small {
  color: #ffffff;
}

/* Responsive - mobile */
@media (max-width: 1200px) {
  .page-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
    padding-top: 0;  /* Remove top padding on mobile */
  }

  .main-content {
    width: 90%;
    max-width: 600px;
    min-width: 0;
  }
}

/* Responsive - stack publications on mobile */
@media (max-width: 768px) {
  .publication-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pub-venue {
    text-align: left;
    width: auto;
  }
}
