/* ===== ULTRA-FANCY ACADEMIC PORTFOLIO - MOEIN HEIDARI ===== */

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

:root {
  --primary: #5b8def;
  --primary-dark: #4a7cd6;
  --primary-light: #7ba3f0;
  --accent: #10b981;
  --accent-dark: #059669;
  --text-dark: #1a202c;
  --text-gray: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #1a202c;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-gray);
  background: var(--bg-white);
  overflow-x: hidden;
  cursor: none;
}

/* ===== Custom Cursor ===== */
.cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: all 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-follower {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: all 0.15s ease;
}

.cursor.hover {
  width: 40px;
  height: 40px;
  background: rgba(91, 141, 239, 0.1);
  border-color: var(--primary);
}

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

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.98);
}

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

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-menu a {
  color: var(--text-gray);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
  border-radius: 2px;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 30%, #fef3c7 70%, #f0f9ff 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.floating-blob {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.blob-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  background: var(--gradient-secondary);
  animation-delay: 2s;
}

.blob-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 60%;
  background: var(--gradient-accent);
  animation-delay: 4s;
}

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

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: rgba(91, 141, 239, 0.1);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease-out;
  border: 1px solid rgba(91, 141, 239, 0.2);
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
  font-weight: 400;
  animation: fadeIn 0.6s ease-out 0.4s both;
}

.typed-text {
  color: var(--primary);
  font-weight: 600;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  animation: fadeIn 0.6s ease-out 0.6s both;
}

.stat {
  text-align: center;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(91, 141, 239, 0.1), transparent);
  transition: left 0.5s ease;
}

.stat:hover::before {
  left: 100%;
}

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

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  animation: fadeIn 0.6s ease-out 0.8s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow);
}

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

.btn-outline {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-download {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow);
}

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

.hero-image {
  position: relative;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.image-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.image-wrapper:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  animation: pulse 2s infinite;
}

.status-badge i {
  font-size: 0.6rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition);
}

.scroll-arrow:hover {
  background: var(--primary);
  color: white;
}

/* ===== Sections ===== */
.section {
  padding: 6rem 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-light);
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-main {
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 1.2rem;
  color: var(--text-gray);
}

.lead {
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about-main strong {
  color: var(--text-dark);
  font-weight: 600;
}

.about-main em {
  color: var(--primary);
  font-style: normal;
  font-weight: 600;
}

.link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(91, 141, 239, 0.3);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.link:hover {
  text-decoration-color: var(--primary);
}

.research-areas {
  margin-top: 3rem;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.research-areas h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.research-tag {
  padding: 0.5rem 1rem;
  background: rgba(91, 141, 239, 0.1);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.research-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.about-side {
  position: sticky;
  top: 100px;
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  transition: var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.card-header i {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 700;
}

.education-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.education-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.edu-degree {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.edu-school {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.edu-date {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

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

.highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.highlights-list li:last-child {
  border-bottom: none;
}

.highlights-list i {
  color: var(--accent);
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.highlights-list span {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cv-download {
  text-align: center;
  margin-top: 2rem;
}

/* ===== News Section ===== */
.news-timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.news-timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  padding-left: 5rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInRight 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

.timeline-marker {
  position: absolute;
  left: 1.2rem;
  top: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow);
}

.timeline-marker.success {
  background: var(--accent);
}

.timeline-marker.info {
  background: var(--primary);
}

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

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

.timeline-date {
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 0.8rem;
}

.timeline-content p {
  display: inline;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-gray);
}

.timeline-content strong {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Publications Section ===== */
.pubs-container {
  max-width: 1200px;
  margin: 0 auto;
}

.pub {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease;
}

.pub.visible {
  opacity: 1;
  transform: translateY(0);
}

.pub:hover {
  padding-left: 1rem;
}

.pub:last-child {
  border-bottom: none;
}

.pub.featured {
  background: rgba(91, 141, 239, 0.03);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(91, 141, 239, 0.1);
  position: relative;
}

.pub.featured::before {
  content: 'Featured';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pub-img {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pub-img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

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

.pub-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.pub-authors strong {
  color: var(--text-dark);
  font-weight: 700;
}

.pub-venue {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.pub-venue strong {
  color: var(--primary);
  font-weight: 700;
}

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

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: white;
  color: var(--primary);
  border: 1px solid rgba(91, 141, 239, 0.2);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.pub-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 141, 239, 0.3);
}

/* ===== Experience Section ===== */
.experience-tabs {
  max-width: 1000px;
  margin: 0 auto;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 1rem 2rem;
  background: white;
  color: var(--text-gray);
  border: 2px solid rgba(91, 141, 239, 0.2);
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tab-content {
  position: relative;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.tab-panel.active {
  display: block;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.exp-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.exp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.exp-card:hover::before {
  transform: scaleX(1);
}

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

.exp-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.exp-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

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

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

.exp-content p {
  color: var(--text-gray);
  line-height: 1.6;
}

/* ===== Contact Section ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-details h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.contact-details p {
  color: var(--text-gray);
  margin-bottom: 0.3rem;
}

.contact-details a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--primary-dark);
}

.social-section {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  height: fit-content;
}

.social-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  color: var(--text-gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

.social-links i {
  font-size: 1.2rem;
  width: 20px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-content p:last-child {
  margin-bottom: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===== Scroll Reveal ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-image {
    max-width: 400px;
    margin: 0 auto;
  }

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

  .about-side {
    position: static;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pub-img {
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: 1.5rem 2rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: var(--transition);
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hero {
    padding: 6rem 0 3rem;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat {
    flex: 1;
    min-width: 120px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .section {
    padding: 4rem 0;
  }

  .container, .container-wide {
    padding: 0 1.5rem;
  }

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

  .tab-buttons {
    flex-direction: column;
    align-items: center;
  }

  .timeline-item {
    padding-left: 3rem;
  }

  .news-timeline::before {
    left: 1rem;
  }

  .timeline-marker {
    left: 0.2rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
  }

  .stat {
    width: 100%;
  }

  .research-tags {
    justify-content: center;
  }

  .pub-links {
    justify-content: center;
  }
}