:root {
  /* Modern Color Palette */
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --primary-color: #38bdf8;
  --secondary-color: #818cf8;
  --accent-color: #f472b6;

  /* Glassmorphism Variables */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  --nav-bg: rgba(15, 23, 42, 0.8);
  --card-bg: rgba(30, 41, 59, 0.4);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --primary-color: #0284c7;
  --secondary-color: #4f46e5;
  --accent-color: #db2777;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);

  --nav-bg: rgba(255, 255, 255, 0.8);
  --card-bg: rgba(255, 255, 255, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Gradient Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.15), transparent 25%);
  z-index: -2;
  pointer-events: none;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Navigation */
nav {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  padding: 1.2rem 2.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

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

nav a:not(.name):hover::after {
  width: 100%;
}

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

.name {
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1001;
}

/* Social Icons in Nav */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-left: 2rem;
  margin-right: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-icons a:hover {
  transform: translateY(-2px);
  background: var(--glass-bg);
}

.social-icons img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--glass-border);
  border: none;
  color: var(--text-color);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--glass-bg);
  transform: rotate(15deg);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Content */
main {
  width: 100%;
  max-width: 900px;
  margin: 140px auto 40px;
  padding: 0 20px;
}

section {
  margin-bottom: 4rem;
}

h1,
h2,
h3 {
  color: var(--text-color);
  margin-top: 0;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
  border-radius: 2px;
}

/* Profile Section */
.profile-section {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 4rem;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  flex-shrink: 0;
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-text {
  flex: 1;
}

.intro-text p {
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.9;
}

/* Cards (Experience, Education, Projects) */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

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

.card-meta {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1rem;
  display: block;
}

/* Conference/Academic Service Lists */
.conference-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.conference-list li {
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(56, 189, 248, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.conference-list li:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateX(5px);
}

.conference-list strong {
  color: var(--text-color);
  display: block;
  margin-bottom: 0.5rem;
}

.conference-years {
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: italic;
  display: block;
  margin-bottom: 0.5rem;
}

.conference-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.conference-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.conference-link:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Achievement Lists */
.achievement-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.achievement-list li {
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent-color);
  padding-left: 1rem;
  transition: all 0.2s ease;
}

.achievement-list li:hover {
  border-left-color: var(--primary-color);
  transform: translateX(5px);
}

.project-achievements {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(244, 114, 182, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.project-achievements ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

.project-achievements li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Media & Press Section */
.media-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(56, 189, 248, 0.05) 100%);
}

.media-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.media-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.media-info {
  flex: 1;
}

.media-info h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.interview-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary-color);
  background: rgba(56, 189, 248, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-color);
  opacity: 0.9;
}

.media-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.media-links .publication-link {
  flex: 1;
  min-width: 200px;
}

/* Shark Canvas */
.shark-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 2rem 0;
  text-align: center;
}

#shark-canvas,
#whale-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.shark-attribution {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: auto;
  max-width: 300px;
  text-align: right;
  font-size: 0.7rem;
  opacity: 0.4;
  z-index: 5;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

/* Publications */
.publication-card {
  display: flex;
  gap: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.publication-img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  opacity: 1;
}

.publication-content {
  flex: 1;
}

.publication-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.publication-meta {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1rem;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: gap 0.2s ease;
}

.publication-link:hover {
  gap: 0.8rem;
}

/* Contact Form */
.contact-form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-color);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
}

.btn-submit {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  width: 100%;
}

.btn-submit:hover {
  opacity: 0.9;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  margin-top: auto;
  color: var(--text-color);
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav {
    width: 95%;
    padding: 0.75rem 1rem;
    flex-direction: row;
    justify-content: space-between;
    top: 10px;
  }

  nav ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 0;
    margin-left: 0;
    z-index: 999;
  }

  nav ul.active {
    transform: translateX(0);
  }

  nav a {
    font-size: 1.2rem;
  }

  .name {
    font-size: 1rem;
  }

  .social-icons {
    margin: 0 1rem 0 auto;
    width: auto;
    gap: 1.5rem;
  }

  .social-icons a {
    width: 32px;
    height: 32px;
  }

  .social-icons img {
    width: 18px;
    height: 18px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  /* Compact header for mobile */
  main {
    margin-top: 100px;
  }

  .profile-section {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .publication-card {
    flex-direction: column;
    gap: 1rem;
  }

  .publication-img {
    width: 100%;
    height: 200px;
  }

  /* Ensure footer stays at bottom and doesn't overlap */
  footer {
    position: relative;
    z-index: 10;
    margin-top: 3rem;
    padding: 1.5rem 1rem;
  }

  /* Fix attribution on mobile */
  .shark-attribution {
    font-size: 0.65rem;
    max-width: 200px;
    padding: 4px 8px;
    bottom: 60px;
  }
}

/* Loading States & Animations */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form Status Messages */
.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.form-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button Loading State */
.btn-submit {
  position: relative;
  transition: all 0.3s ease;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: inline-block;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--glass-border) 25%, var(--glass-bg) 50%, var(--glass-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 2rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-img {
  height: 200px;
  width: 100%;
}

/* Smooth Image Loading */
img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

/* Lazy Load Blur Effect */
img[loading="lazy"] {
  filter: blur(10px);
  transition: filter 0.3s ease, opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  filter: blur(0);
}

/* Contact Cards */
.contact-info {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

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

.contact-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-color: var(--primary-color);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: var(--primary-color);
}

.contact-card p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
}


