/* Custom styles for the personal website */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Dark mode styles */
.dark body {
    background-color: #121212;
    color: #e5e5e5;
}

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

/* Header styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dark header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom-color: #333;
}

/* Navigation */
nav a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: #3b82f6;
}

.dark nav a {
    color: #ccc;
}

.dark nav a:hover,
.dark nav a.active {
    color: #60a5fa;
}

/* Hero section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.dark .hero p {
    color: #ccc;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

.dark .btn-secondary:hover {
    background: #334155;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .card {
    background: #1e1e1e;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Blog posts */
.blog-post {
    border-bottom: 1px solid #e5e5e5;
    padding: 2rem 0;
}

.dark .blog-post {
    border-bottom-color: #333;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-post .meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.dark .blog-post .meta {
    color: #ccc;
}

/* Footer styling is now handled by Tailwind classes in components.js */

/* Funky Animations & Effects */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.floating-shape:nth-child(odd) {
    animation-direction: reverse;
    animation-duration: 8s;
}

/* Hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-glow:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .animate-slide-up {
        animation-duration: 0.6s;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.py-8 { padding: 2rem 0; }
.px-4 { padding: 0 1rem; }

/* Backdrop blur effect */
.backdrop-blur-md {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Responsive grid for about section */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-image {
    order: -1;
    margin-bottom: 2rem;
  }
}

/* Blog post cards */
.blog-post-card {
  transition: all 0.3s ease;
}

.blog-post-card:hover {
  transform: translateY(-5px);
}

/* Publications page styles */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.publication-card {
  background: var(--card-bg, white);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.publication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
}

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

.publication-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color, #1e293b);
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.publication-year {
  background: #6366f1;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.publication-authors {
  color: var(--text-color, #64748b);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.publication-venue {
  color: #6366f1;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.publication-abstract {
  color: var(--text-color, #64748b);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.publication-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.link-indicator {
  background: var(--card-bg, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-color, #64748b);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Publication modal styles */
.publication-details {
  padding: 1rem 0;
}

.publication-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.publication-meta .authors {
  font-weight: 600;
  color: var(--text-color, #1e293b);
}

.publication-meta .venue {
  color: #6366f1;
  font-weight: 500;
}

.publication-meta .year {
  color: var(--text-color, #64748b);
  font-weight: 500;
}

.abstract {
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--text-color, #374151);
}

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

.publication-links .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.publication-links .btn-primary {
  background: #6366f1;
  color: white;
}

.publication-links .btn-primary:hover {
  background: #5855eb;
  transform: translateY(-1px);
}

.publication-links .btn-secondary {
  background: var(--card-bg, #f8fafc);
  color: var(--text-color, #64748b);
  border: 1px solid var(--border-color, #e2e8f0);
}

.publication-links .btn-secondary:hover {
  background: var(--border-color, #e2e8f0);
  transform: translateY(-1px);
}

/* Responsive adjustments for publications */
@media (max-width: 768px) {
  .publications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .publication-card {
    padding: 1.25rem;
  }
  
  .publication-header {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .publication-year {
    align-self: flex-start;
  }
  
  .publication-links {
    gap: 0.5rem;
  }
  
  .publication-links .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Photo gallery items */
.gallery-item {
  transition: all 0.5s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
}

/* Publication Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.dark .modal-header {
    border-bottom-color: #333;
}

#modalTitle {
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.dark .close {
    color: #ccc;
}

.dark .close:hover,
.dark .close:focus {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

/* Modal styles */
.modal-content {
  max-height: 80vh;
  overflow-y: auto;
}

/* Footer styling is now handled by Tailwind classes in components.js */
