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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #f5f5f5;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2c3e50;
  color: #fff;
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.affiliation {
  font-size: 0.75rem;
  opacity: 0.8;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.1);
}

.header-links {
  display: flex;
  gap: 1rem;
}

.header-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.8;
}

.header-links a:hover {
  opacity: 1;
}

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.article-list {
  list-style: none;
}

.article-item {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-date {
  font-size: 0.85rem;
  color: #666;
}

.article-item h2 {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.article-item h2 a {
  color: #2c3e50;
  text-decoration: none;
}

.article-item h2 a:hover {
  color: #3498db;
}

.article-excerpt {
  color: #666;
  font-size: 0.95rem;
}

.article-meta {
  color: #666;
  margin-bottom: 1rem;
}

.article-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-footer {
  margin-top: 2rem;
}

.back-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #3498db;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.back-btn:hover {
  background: #2980b9;
}

h1, .main-content > h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.main-content > h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.main-content > ol, .main-content > ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.main-content > ol li, .main-content > ul li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.main-content .venue {
  color: #666;
  font-style: italic;
}

.main-content .status {
  color: #e67e22;
  font-weight: 500;
}

h1 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #34495e;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: #3498db;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.article-content th, .article-content td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.article-content th {
  background: #f5f5f5;
  font-weight: 600;
}

.article-content blockquote {
  border-left: 4px solid #3498db;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
  font-style: italic;
}

.article-content code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Fira Code", "SF Mono", Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #282c34;
  color: #abb2bf;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.article-content hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

.figure-placeholder {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  color: #888;
  margin: 1rem 0;
  border-radius: 4px;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.theme-toggle:hover {
  opacity: 1;
}

/* Night Mode (default) */
body[data-theme="night"] {
  background: #1a1a2e;
  color: #e0e0e0;
}

body[data-theme="night"] .header {
  background: #16213e;
}

body[data-theme="night"] .article-item {
  background: #16213e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body[data-theme="night"] .article-item h2 a {
  color: #e0e0e0;
}

body[data-theme="night"] .article-item h2 a:hover {
  color: #64b5f6;
}

body[data-theme="night"] .article-date,
body[data-theme="night"] .article-excerpt {
  color: #a0a0a0;
}

body[data-theme="night"] .article-content {
  background: #16213e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body[data-theme="night"] h1,
body[data-theme="night"] .article-content h2 {
  color: #e0e0e0;
}

body[data-theme="night"] .article-content h3 {
  color: #c0c0c0;
}

body[data-theme="night"] .article-content a {
  color: #64b5f6;
}

body[data-theme="night"] .article-content th,
body[data-theme="night"] .article-content td {
  border-color: #333;
}

body[data-theme="night"] .article-content th {
  background: #1a1a2e;
}

body[data-theme="night"] .article-content blockquote {
  color: #a0a0a0;
  border-color: #64b5f6;
}

body[data-theme="night"] .article-content code {
  background: #1a1a2e;
}

body[data-theme="night"] .article-content hr {
  border-color: #333;
}

body[data-theme="night"] .figure-placeholder {
  background: #16213e;
  border-color: #444;
  color: #888;
}

body[data-theme="night"] .main-content > h2 {
  color: #e0e0e0;
}

body[data-theme="night"] .main-content .venue {
  color: #a0a0a0;
}

/* Day Mode */
body[data-theme="day"] {
  background: #f5f5f5;
  color: #333;
}

body[data-theme="day"] .header {
  background: #2c3e50;
}

body[data-theme="day"] .article-item {
  background: #fff;
}

body[data-theme="day"] .article-content {
  background: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  .header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  
  .header-left {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .author-name {
    font-size: 1rem;
  }
  
  .affiliation {
    display: none;
  }
  
  .header-nav {
    gap: 0.75rem;
  }
  
  .header-nav a {
    font-size: 0.9rem;
  }
  
  .header-links {
    gap: 0.5rem;
  }
  
  .main-content {
    padding: 0.75rem;
  }
  
  .article-content {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .article-content h2 {
    font-size: 1.2rem;
  }
  
  .article-content h3 {
    font-size: 1.1rem;
  }
  
  .article-content p {
    font-size: 1rem;
  }
  
  .article-content pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
  
  .article-content code {
    font-size: 0.8rem;
  }
  
  .article-content table {
    font-size: 0.8rem;
  }
  
  .article-item {
    padding: 1rem;
  }
  
  .article-item h2 {
    font-size: 1.1rem;
  }
  
  .article-item p {
    font-size: 0.95rem;
  }
  
  .back-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}