/* Research Portfolio Styles - Enhanced UI/UX */

/* Reset and 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: #1a1a1a;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  margin: 0;
  transition: color 0.3s ease;
}

.header-name:hover {
  color: #764ba2;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

nav a.active {
  font-weight: bold;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

nav a:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 2rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
  border-radius: 20px;
  z-index: -1;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #667eea;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 700;
}

.tagline {
  font-size: 1.5rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 1rem;
}

.identity {
  font-size: 1.2rem;
  color: #666;
  max-width: 500px;
  text-align: justify;
  line-height: 1.8;
}

/* Sections */
section {
  margin-bottom: 3rem;
  padding: 1rem 0;
}

.intro p {
  max-width: 600px;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.8;
}

.collaboration {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  line-height: 1.8;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #333;
  position: relative;
  font-weight: 600;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #444;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Focus Areas */
.focus-areas ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  list-style: none;
}

.focus-areas li {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-areas li:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Links */
.links ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.links a {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Diagrams */
.diagram {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  transition: transform 0.3s ease;
}

.diagram:hover {
  transform: scale(1.02);
}

/* Projects */
.project {
  margin-bottom: 4rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 15px;
  border-left: 5px solid #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.project:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project h1 {
  color: #333;
  margin-bottom: 1rem;
  font-weight: 700;
}

.project h3 {
  color: #667eea;
  margin-top: 1.5rem;
  font-weight: 600;
}

/* Service and Awards */
.service-item, .award-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover, .award-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-item h3, .award-item h3 {
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.service-item p, .award-item p {
  margin-bottom: 0.5rem;
}

.note {
  font-style: italic;
  color: #666;
  text-align: center;
  margin-top: 2rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .links ul {
    justify-content: center;
  }

  .focus-areas ul {
    grid-template-columns: 1fr;
  }

  main {
    padding: 1rem;
  }
}

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

  .tagline {
    font-size: 1.3rem;
  }

  .identity {
    font-size: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Styles */
.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

.dark-mode header {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode main {
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
}

.dark-mode .project,
.dark-mode .service-item,
.dark-mode .award-item,
.dark-mode .focus-areas li {
  background: rgba(30, 41, 59, 0.8);
  border-left-color: #60a5fa;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .project:hover,
.dark-mode .service-item:hover,
.dark-mode .award-item:hover,
.dark-mode .focus-areas li:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
  color: #f1f5f9;
}

.dark-mode footer {
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Loading Animation */
body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}

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

section {
  animation: fadeInUp 0.6s ease-out;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }

/* Print Styles */
@media print {
  body {
    background: white;
  }

  nav, footer, .theme-toggle {
    display: none;
  }

  main {
    box-shadow: none;
    background: white;
  }
}
