/* ===== Design Tokens ===== */
:root {
  /* Colors */
  --color-bg: #0a0a0f;
  --color-bg-elevated: #12121a;
  --color-bg-card: #16161f;
  --color-border: rgba(255, 255, 255, 0.08);
  
  --color-text-primary: #f0f0f5;
  --color-text-secondary: rgba(240, 240, 245, 0.7);
  --color-text-muted: rgba(240, 240, 245, 0.5);
  
  --color-accent: #6366f1;
  --color-accent-light: #818cf8;
  --color-accent-glow: rgba(99, 102, 241, 0.15);
  
  --gradient-subtle: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-bg: radial-gradient(ellipse at top, #1a1a2e 0%, #0a0a0f 50%);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Sizing */
  --max-width: 1100px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  background-image: var(--gradient-bg);
  min-height: 100vh;
}

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

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

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-2xl) 0;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--space-xl) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  border: 3px solid var(--color-border);
  object-fit: cover;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-xs);
}

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

.hero-description {
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-size: 1.1rem;
}

.hero-links {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.hero-links a:hover {
  background: var(--color-bg-card);
  border-color: var(--color-accent);
  color: var(--color-text-primary);
  transform: translateY(-2px);
}

.hero-links img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-xs);
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Research Interests ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.research-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.research-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px var(--color-accent-glow);
}

.research-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.research-card .icon {
  font-size: 1.5rem;
}

.research-card p {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

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

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--color-accent-glow);
  color: var(--color-accent-light);
  border-radius: 20px;
  font-weight: 500;
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.project-card-content {
  padding: var(--space-md);
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.project-card p {
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
}

.project-links a {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ===== Experience Section ===== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

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

.experience-meta {
  text-align: right;
}

.experience-meta .date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.experience-meta .company {
  font-weight: 600;
  color: var(--color-text-primary);
}

.experience-content h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.experience-content p {
  font-size: 0.95rem;
}

.experience-content ul {
  list-style: none;
  margin-top: var(--space-sm);
}

.experience-content li {
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.experience-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ===== Background Section ===== */
.background-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

.background-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-md);
}

.background-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-accent-light);
}

.background-card ul {
  list-style: none;
}

.background-card li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 0;
}

/* ===== Footer ===== */
footer {
  padding: var(--space-xl) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

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

.footer-links img {
  width: 28px;
  height: 28px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-links a:hover img {
  opacity: 1;
}

.footer-email {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.footer-copyright {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

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

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  section {
    padding: var(--space-xl) 0;
  }
  
  .experience-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  .experience-meta {
    text-align: left;
    display: flex;
    gap: var(--space-sm);
    align-items: baseline;
  }
  
  .hero-links {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-links a {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .research-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .background-grid {
    grid-template-columns: 1fr;
  }
}
