:root {
  --primary-color: #5e3ccf;
  --primary-dark: #4a2fa3;
  --primary-light: #7c5fdb;
  --secondary-color: #00d4ff;
  --accent-color: #ff6b6b;
  --dark-bg: #0f1419;
  --light-bg: #ffffff;
  --card-bg: #f8f9fa;
  --text-dark: #1a1a1a;
  --text-light: #f5f5f5;
  --text-muted: #666666;
  --border-color: #e0e0e0;
  --success: #51cf66;
  --warning: #ffa94d;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
  transition: var(--transition);
}

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

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

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 100;
  transition: var(--transition);
}

body.dark-mode .navbar {
  background: rgba(15, 20, 25, 0.98);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.nav-brand {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

body.dark-mode .nav-menu a {
  color: var(--text-light);
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

.dark-mode-toggle {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border: none;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.dark-mode-toggle:hover {
  transform: scale(1.1) rotate(20deg);
  box-shadow: 0 0 20px rgba(94, 60, 207, 0.4);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: slideInLeft 0.8s ease-out;
}

.hero-content .tagline {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #00d4ff, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInLeft 0.8s ease-out 0.1s both;
}

.hero-content .subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-links {
  display: flex;
  gap: 1rem;
  animation: slideInLeft 0.8s ease-out 0.3s both;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #ff6b6b);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.hero-image {
  animation: slideInRight 0.8s ease-out;
}

.profile-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.profile-photo:hover {
  transform: scale(1.05) rotate(2deg);
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Sections */
.section {
  padding: 80px 20px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

body.dark-mode .section-subtitle {
  color: #aaa;
}

/* About Section */
.about-section {
  background: linear-gradient(135deg, rgba(94, 60, 207, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
}

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

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-muted);
}

body.dark-mode .about-content p {
  color: #aaa;
}

.interest-block {
  margin-top: 1.5rem;
}

.interest-block h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.interest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
}

.interest-list li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.interest-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
}

body.dark-mode .interest-list li {
  color: #aaa;
}

@media (max-width: 768px) {
  .interest-list {
    grid-template-columns: 1fr;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

body.dark-mode .stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.stat h3 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat p {
  color: var(--text-muted);
  font-weight: 500;
}

body.dark-mode .stat p {
  color: #aaa;
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: auto;
  width: calc(50% - 30px);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  margin-right: 0;
  width: calc(50% - 30px);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 0 0 4px var(--primary-color);
  z-index: 1;
}

body.dark-mode .timeline-marker {
  border-color: var(--dark-bg);
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

body.dark-mode .timeline-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content .institution {
  color: var(--text-muted);
  font-weight: 600;
}

body.dark-mode .timeline-content .institution {
  color: #aaa;
}

.timeline-content .date {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.timeline-content .description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.dark-mode .timeline-content .description {
  color: #aaa;
}

.experience-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.experience-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.dark-mode .experience-list li {
  color: #aaa;
}

.experience-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Publications */
.pub-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.outreach-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.outreach-item {
  background: white;
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary-color);
  transition: var(--transition);
}

body.dark-mode .outreach-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.7);
}

.outreach-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.outreach-item p {
  color: var(--text-muted);
  line-height: 1.8;
}

body.dark-mode .outreach-item p {
  color: #aaa;
}

.filter-btn {
  background: white;
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

body.dark-mode .filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border-color: transparent;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.publication-item {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

body.dark-mode .publication-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--secondary-color);
}

.publication-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg);
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.pub-header h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  flex: 1;
}

.pub-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.pub-badge.journal {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
}

.pub-badge.conference {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.authors {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.75rem 0;
  font-style: italic;
}

body.dark-mode .authors {
  color: #aaa;
}

.publication-details {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.pub-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background: rgba(94, 60, 207, 0.1);
  transition: var(--transition);
}

body.dark-mode .pub-link {
  background: rgba(94, 60, 207, 0.2);
}

.pub-link:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  transform: translateX(5px);
}

/* Projects Gallery */
.projects-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--primary-color);
}

body.dark-mode .project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--secondary-color);
}

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

.project-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.project-type {
  display: inline-block;
  background: rgba(94, 60, 207, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

body.dark-mode .project-type {
  background: rgba(94, 60, 207, 0.2);
}

.project-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

body.dark-mode .project-desc {
  color: #aaa;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags span {
  background: linear-gradient(135deg, rgba(94, 60, 207, 0.15), rgba(0, 212, 255, 0.15));
  color: var(--primary-color);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

body.dark-mode .project-tags span {
  color: var(--secondary-color);
  background: rgba(0, 212, 255, 0.1);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-box {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

body.dark-mode .skill-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-box h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Awards Section */
.awards-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.award-item {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: var(--transition);
}

body.dark-mode .award-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.award-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.award-item i {
  font-size: 1.8rem;
  color: var(--primary-color);
  min-width: 50px;
  text-align: center;
}

.award-item h4 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

body.dark-mode .award-item h4 {
  color: var(--text-light);
}

.award-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

body.dark-mode .award-item p {
  color: #aaa;
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, rgba(94, 60, 207, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  text-align: center;
  border-bottom: 3px solid transparent;
}

body.dark-mode .contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--primary-color);
}

.contact-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-card h4 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

body.dark-mode .contact-card h4 {
  color: var(--text-light);
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.dark-mode .contact-card p {
  color: #aaa;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--text-light);
  text-align: center;
  padding: 2rem 20px;
  border-top: 1px solid var(--border-color);
}

body.dark-mode .footer {
  background: rgba(0, 0, 0, 0.3);
}

.footer p {
  margin: 0.5rem 0;
}

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

.footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content .tagline {
    font-size: 1.3rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
    margin-right: 0 !important;
  }

  .timeline-marker {
    left: 20px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .nav-menu {
    gap: 0.5rem;
  }

  .section {
    padding: 50px 15px;
  }

  .pub-header {
    flex-direction: column;
  }
}
