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

:root {
  --bg: #fefdfb;
  --text: #2a2a2a;
  --accent: #ff6b35;
  --secondary: #4a90e2;
  --border: #d0d0d0;
  --hover: #f5f5f5;
  --dark-bg: #1a1a1a;
  --dark-text: #e0e0e0;
  --dark-border: #404040;
  --dark-hover: #2a2a2a;
}

body {
  font-family: 'Crimson Text', serif;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
  position: relative;
  min-height: 100vh;
}

body.dark-mode {
  --bg: var(--dark-bg);
  --text: var(--dark-text);
  --border: var(--dark-border);
  --hover: var(--dark-hover);
  background: var(--dark-bg);
  color: var(--dark-text);
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 100px,
    rgba(255, 107, 53, 0.02) 100px,
    rgba(255, 107, 53, 0.02) 101px
  );
  pointer-events: none;
  z-index: 1;
}

body.dark-mode::before {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 100px,
    rgba(255, 107, 53, 0.05) 100px,
    rgba(255, 107, 53, 0.05) 101px
  );
}

.wrapper {
  max-width: 850px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
  z-index: 2;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 80px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.header-left { flex: 1; }

.site-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 10px;
  letter-spacing: -1px;
  position: relative;
  display: inline-block;
}

.site-title::after {
  content: '◆';
  position: absolute;
  right: -30px;
  top: 0;
  color: var(--accent);
  font-size: 1rem;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mode-toggle {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mode-toggle:hover {
  border-color: var(--accent);
  transform: scale(0.95);
}

.mode-toggle i {
  font-size: 16px;
  color: var(--text);
  z-index: 2;
}

/* Bio */
.bio-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  margin-bottom: 80px;
  align-items: start;
}

.bio-image { position: static; top: 60px; }

.bio-image img {
  width: 100%;
  transition: filter 0.5s ease;
  border: 1px solid var(--border);
}

.bio-image img:hover { filter: contrast(1.1); }

.bio-content { padding-top: 20px; }

.bio-content p { margin-bottom: 1.2rem; }

.bio-content a {
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--secondary);
  transition: all 0.2s ease;
}

.bio-content a:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* Contact links */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 30px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 0;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.contact-links a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
}

.contact-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.contact-links a:hover {
  padding-left: 20px;
  color: var(--accent);
}

.contact-links i { width: 20px; font-size: 16px; }

/* Sections */
.section { margin-bottom: 60px; position: relative; counter-increment: section; }

.section-header {
  font-size: 1.8rem;
  margin-bottom: 30px;
  font-weight: 400;
  display: flex; align-items: center; gap: 20px;
}

.section-header::before {
  content: counter(section, decimal-leading-zero);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--accent);
}

.section-header::after {
  content: '';
  flex: 1; height: 1px; background: var(--border);
}

/* Updates */
.updates-list { list-style: none; position: relative; padding-left: 30px; }

.updates-list::before {
  content: '';
  position: absolute; left: 8px; top: 10px; bottom: 10px;
  width: 1px; background: var(--border);
}

.updates-list li {
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.updates-list li::before {
  content: '';
  position: absolute; left: -26px; top: 8px;
  width: 8px; height: 8px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.updates-list li:hover { padding-left: 10px; }

.updates-list li:hover::before { background: var(--accent); }

.updates-list li.hidden { display: none; }

.show-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  padding: 10px 0;
  transition: all 0.2s ease;
  text-decoration: underline;
}

.show-more-btn:hover { color: var(--secondary); }

/* Research */
.research-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px dashed var(--border);
}

.research-item:last-child { border-bottom: none; }

.research-item img {
  width: 100%; height: 100px; object-fit: cover;
  filter: contrast(1.1);
  transition: all 0.3s ease;
}

.research-item:hover img { transform: scale(1.05); }

.research-details { padding-top: 5px; }

.research-title { font-size: 1.3rem; margin-bottom: 5px; color: var(--text); }

.research-meta { font-size: 16px; color: var(--text); opacity: 0.8; margin-bottom: 10px; }

.research-meta a { color: var(--secondary); text-decoration: none; }

.research-links { font-family: 'IBM Plex Mono', monospace; font-size: 14px; margin: 10px 0; }

.research-links a { color: var(--accent); text-decoration: none; }

.research-links a:hover { text-decoration: underline; }

.research-summary { font-style: italic; font-size: 17px; opacity: 0.9; margin-top: 10px; }

/* Experience */
.experience-list { list-style: none; }

.experience-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  transition: all 0.3s ease;
  position: relative;
}

.experience-list li:hover { padding-left: 15px; }

.experience-list li::before {
  content: '○';
  position: absolute; left: -20px;
  color: var(--accent);
  transition: all 0.3s ease;
}

.experience-list li:hover::before { content: '●'; }

.experience-list a { color: var(--secondary); text-decoration: none; font-weight: 500; }

.experience-list a:hover { text-decoration: underline; }

/* Hobbies */
.hobbies-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }

.hobby-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 25px;
  padding: 20px;
  background: var(--hover);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hobby-item::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  transform: translateX(-3px);
  transition: transform 0.3s ease;
}

.hobby-item:hover::before { transform: translateX(0); }

.hobby-item:hover {
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}

.hobby-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; }

.hobby-content strong { display: block; font-size: 1.1rem; margin-bottom: 8px; }

.hobby-content a { color: var(--accent); text-decoration: none; }

.hobby-content a:hover { text-decoration: underline; }

/* Extra */
.extra-content {
  background: var(--hover);
  padding: 25px;
  font-size: 17px;
  line-height: 1.8;
  border-left: 3px solid var(--accent);
}

.extra-content a {
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--secondary);
}

.extra-content a:hover { border-bottom-style: solid; }

/* Footer */
.footer {
  margin-top: 100px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  opacity: 0.7;
}

.footer a { color: var(--accent); text-decoration: none; }

.author-list sup {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 2px;
}

.research-meta .affiliations {
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  opacity: 0.8;
  margin-top: 6px;
}

.research-meta .affiliations sup {
  margin-right: 3px;
}


/* Responsive */
@media (max-width: 768px) {
  .wrapper { padding: 40px 20px; }
  .bio-section { grid-template-columns: 1fr; gap: 30px; }
  .bio-image { position: static; max-width: 200px; margin: 0 auto; }
  .research-item { grid-template-columns: 1fr; gap: 20px; }
  .hobby-item { grid-template-columns: 1fr; text-align: center; }
  .hobby-item img { margin: 0 auto; }
  .site-title { font-size: 2rem; }
  body { font-size: 17px; }
}

