:root {
  /* Light Theme Variables */
  --bg-color: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent-color: #2563eb; /* Modern Blue */
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --code-bg: #f3f4f6;
  
  /* Spacing */
  --container-width: 1024px;
  --header-height: 70px;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
}

[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-color: #111827;
  --bg-secondary: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent-color: #60a5fa;
  --accent-hover: #93c5fd;
  --border-color: #374151;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(17, 24, 39, 0.8);
  --code-bg: #374151;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.hero-image-container {
  position: relative;
}

.hero-image {
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
  box-shadow: var(--card-shadow);
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin: 0 auto;
}

.hero-text h1 {
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

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

.social-link {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.social-link:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Cards (News, etc.) */
.card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

/* News List */
.news-list {
  list-style: none;
}

.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
}

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

.news-date {
  font-weight: 600;
  color: var(--accent-color);
  min-width: 100px;
}

/* Publications */
.pub-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pub-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.pub-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-right: 1px solid var(--border-color);
}

.pub-content {
  padding: 1.5rem;
}

.pub-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.pub-authors {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.pub-venue {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background-color: var(--bg-color);
  transition: all 0.2s;
}

.btn-sm:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: var(--bg-secondary);
}

@media (max-width: 768px) {
  .pub-item {
    grid-template-columns: 1fr;
  }
  
  .pub-image {
    height: 150px;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

/* Footer */
footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
