body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f7;
  margin: 0;
  padding: 0;
  color: #1d1d1f;
  line-height: 1.47;
  letter-spacing: 0;
}

html.dark body {
  background: #000;
  color: #f5f5f7;
}

.container {
  max-width: 880px;
  margin: 60px auto;
  padding: 0 32px;
}

.markdown-section {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 48px 56px;
}

html.dark .markdown-section {
  background: #1a1a1a;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.markdown-section::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #0071e3, #00c7be, #34c759);
  border-radius: 2px;
  margin: -48px -56px 32px;
}

html.dark .markdown-section::before {
  background: linear-gradient(90deg, #0a84ff, #64d2ff, #30d158);
}

.markdown-section h3 {
  font-weight: 600;
  font-size: 1.5em;
  color: #1d1d1f;
  margin-top: 2.5em;
  margin-bottom: 1em;
  letter-spacing: -0.025em;
}

html.dark .markdown-section h3 {
  color: #f5f5f7;
}

.markdown-section h3:first-of-type {
  margin-top: 0;
  font-size: 1.75em;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.markdown-section h4 {
  font-weight: 600;
  font-size: 1.2em;
  color: #1d1d1f;
  margin-top: 1.5em;
  margin-bottom: 0.25em;
  letter-spacing: -0.01em;
}

html.dark .markdown-section h4 {
  color: #f5f5f7;
}

.markdown-section p {
  line-height: 1.47;
  margin-bottom: 1em;
  color: #1d1d1f;
}

html.dark .markdown-section p {
  color: #f5f5f7;
}

.markdown-section em,
.markdown-section i {
  color: #86868b;
  font-style: italic;
}

html.dark .markdown-section em,
html.dark .markdown-section i {
  color: #a1a1a6;
}

.markdown-section a {
  color: #0071e3;
  text-decoration: none;
  transition: color 0.2s ease;
}

html.dark .markdown-section a {
  color: #0a84ff;
}

.markdown-section a:hover {
  text-decoration: underline;
}

.markdown-section ul {
  list-style: none;
  padding-left: 0;
  line-height: 1.6;
}

.markdown-section ul li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.5em;
}

.markdown-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  background: #0071e3;
  border-radius: 50%;
}

html.dark .markdown-section ul li::before {
  background: #0a84ff;
}

.markdown-section hr {
  border: none;
  height: 1px;
  background: #e5e5e5;
  margin: 2em 0;
}

html.dark .markdown-section hr {
  background: #333;
}

.markdown-section strong {
  font-weight: 600;
}

#intro-section {
  position: relative;
  padding-right: 180px;
  min-height: 200px;
}

#profile-photo {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 200px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  object-fit: cover;
}

#theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 14px;
  color: #86868b;
  background: rgba(0,0,0,0.05);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s ease;
  z-index: 10;
}

#theme-toggle:hover {
  background: rgba(0,0,0,0.1);
  color: #1d1d1f;
}

html.dark #theme-toggle {
  color: #a1a1a6;
  background: rgba(255,255,255,0.08);
}

html.dark #theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #f5f5f7;
}

#edit-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  opacity: 0.15;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  z-index: 1000;
  transition: opacity 0.3s;
  background: rgba(128,128,128,0.1);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

#edit-btn:hover {
  opacity: 0.9;
}

#clustrmaps-container {
  border-top: 1px solid #e5e5e5;
}

html.dark #clustrmaps-container {
  border-top-color: #333;
}

.paper {
  margin-bottom: 2.5em;
  padding-left: 16px;
  border-left: 3px solid rgba(0,113,227,0.25);
}

html.dark .paper {
  border-left-color: rgba(10,132,255,0.3);
}

.paper h4 {
  font-size: 1.15em;
  font-weight: 600;
  margin: 0 0 0.3em 0;
  letter-spacing: -0.01em;
  color: #1d1d1f;
}

html.dark .paper h4 {
  color: #f5f5f7;
}

.paper .authors {
  font-size: 0.95em;
  line-height: 1.35;
  margin-bottom: 0.25em;
  color: #333;
}

html.dark .paper .authors {
  color: #e5e5e5;
}

.paper .venue {
  font-size: 0.9em;
  font-style: italic;
  color: #86868b;
  margin-bottom: 0.5em;
}

html.dark .paper .venue {
  color: #a1a1a6;
}

.paper .links {
  margin-top: 0.5em;
  margin-bottom: 0;
}

.paper-links a {
  display: inline-block;
  padding: 4px 12px;
  margin: 4px 4px 4px 0;
  background: rgba(0,113,227,0.08);
  border-radius: 6px;
  font-size: 0.85em;
  transition: background 0.2s ease;
}

html.dark .paper-links a {
  background: rgba(10,132,255,0.15);
}

.paper-links a:hover {
  background: rgba(0,113,227,0.15);
  text-decoration: none;
}

html.dark .paper-links a:hover {
  background: rgba(10,132,255,0.25);
}

@media (max-width: 600px) {
  #profile-photo {
    display: none;
  }
  
  #intro-section {
    padding-right: 0;
  }
  
  .container {
    max-width: 100%;
    padding: 0 20px;
    margin: 40px auto;
  }
  
  .markdown-section {
    padding: 32px 28px;
  }
  
  .markdown-section::before {
    margin: -32px -28px 24px;
  }
  
  .markdown-section h3:first-of-type {
    font-size: 1.6em;
  }
  
  .markdown-section h3 {
    font-size: 1.4em;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .container {
    margin: 20px auto;
    padding: 0 16px;
  }
  
  .markdown-section {
    padding: 24px 20px;
    border-radius: 12px;
  }
  
  .markdown-section::before {
    margin: -24px -20px 20px;
  }
  
  .markdown-section h3:first-of-type {
    font-size: 1.4em;
  }
  
  .markdown-section h3 {
    font-size: 1.25em;
  }
  
  .markdown-section h4 {
    font-size: 1.1em;
  }
  
  .paper-links a {
    display: block;
    margin: 4px 0;
    text-align: center;
  }
  
  #edit-btn {
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
  }
}

.sidebar,
.sidebar-toggle {
  display: none !important;
}
