/* ===================================
   Simple, Clean Design
   =================================== */

:root {
  /* Light Mode */
  --color-primary: #0066cc;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-border: #ddd;
}

[data-theme="dark"] {
  --color-primary: #4da3ff;
  --color-text: #e0e0e0;
  --color-text-light: #999;
  --color-bg: #1a1a1a;
  --color-border: #444;
}

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.main-nav {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  background-color: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-primary);
  font-weight: 500;
}

.nav-toggle {
  display: none;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-text);
  font-size: 0.9rem;
}

.theme-toggle:hover {
  border-color: var(--color-primary);
}

/* Main Content */
.main-content {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* Profile Picture */
.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: block;
  border: 2px solid var(--color-border);
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-subtitle {
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-bio {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--color-primary);
  text-decoration: none;
}

/* Contact Section */
.contact-section {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.social-icon {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.social-link:hover .social-icon {
  opacity: 1;
}

/* Projects */
.projects-grid {
  margin: 2rem 0;
}

.project-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.project-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 4px;
  margin: 0 auto 1rem;
  display: block;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* Patents */
.patents-section {
  margin-top: 3rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.publication-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  transition: all 0.2s;
  text-decoration: none;
  color: var(--color-text);
  flex: 1;
  min-width: 280px;
}

.publication-link:hover {
  border-color: var(--color-primary);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.publication-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Chart Styles */
.chart-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 8px;
}

.chart-title {
  margin: 0 0 1rem;
  color: var(--color-text);
  font-size: 1.1rem;
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.legend-color-patents {
  background: #17a2b8;
}

.legend-color-citations {
  background: #ffc107;
}

.combo-chart {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  height: auto;
  min-height: 300px;
}

/* Resume - Vertical Timeline */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.resume-section {
  margin-bottom: 3rem;
}

.timeline-vertical {
  position: relative;
  padding-left: 120px;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 40px;
  bottom: 40px;
  width: 4px;
  background: var(--color-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  height: 130px;
}

.timeline-left {
  position: absolute;
  left: -120px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
}

.timeline-dot {
  width: 80px;
  height: 80px;
  background: var(--color-bg);
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
  position: relative;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-primary);
}

.timeline-dot:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  border-width: 5px;
}

.timeline-icon {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 50%;
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  position: absolute;
  left: 85px;
  top: -25px;
}

.timeline-details {
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  min-width: 400px;
  margin-left: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.timeline-item:hover .timeline-details {
  opacity: 1;
  pointer-events: auto;
}

.timeline-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.detail-company {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}

.detail-date {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.timeline-details ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: normal;
}

.timeline-details li {
  margin-bottom: 0.5rem;
}

/* Skills */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-tag {
  padding: 0.4rem 0.8rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Updates */
.updates-section,
.talks-section {
  margin-bottom: 3rem;
}

.updates-list,
.talks-list {
  margin-top: 1.5rem;
}

.update-item,
.talk-item {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.update-item:hover,
.talk-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.update-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--color-text);
}

.update-link:hover {
  text-decoration: none;
}

.link-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.update-item h3,
.talk-item h3 {
  font-size: 1rem;
  margin: 0;
}

.update-link h3 {
  color: var(--color-text);
  transition: color 0.2s;
}

.update-link:hover h3 {
  color: var(--color-primary);
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-right {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
}
