/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #111827;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;

  --dark-bg-primary: #111827;
  --dark-bg-secondary: #1f2937;
  --dark-text-primary: #f9fafb;
  --dark-text-secondary: #d1d5db;
  --dark-border-color: #1f2937;

  /* Fixed CSS comment syntax from HTML to CSS */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Merriweather", Georgia, serif;
  --max-width: 64rem;
  --spacing-unit: 1rem;
}

html,
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: var(--dark-bg-primary);
  color: var(--dark-text-primary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

body.dark-mode .header {
  background-color: var(--dark-bg-primary);
  border-bottom-color: var(--dark-border-color);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

body.dark-mode .logo {
  color: var(--dark-text-primary);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Desktop Navigation */
.nav-desktop {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-blue);
}

body.dark-mode .nav-link {
  color: var(--dark-text-secondary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

body.dark-mode .mobile-menu-btn {
  background-color: #1f2937;
}

.mobile-menu-btn:hover {
  background-color: #e5e7eb;
}

body.dark-mode .mobile-menu-btn:hover {
  background-color: #111827;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.hamburger {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  left: 0;
  transition: transform 0.2s ease;
}

body.dark-mode .hamburger::before,
body.dark-mode .hamburger::after {
  background-color: var(--dark-text-primary);
}

.hamburger::before {
  top: 0.3rem;
}

.hamburger::after {
  bottom: 0.3rem;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.25);
  z-index: 40;
}

.mobile-nav-overlay.active {
  display: flex;
}

.mobile-nav-drawer {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 16rem;
  background-color: var(--bg-primary);
  box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 50;
  animation: slideIn 0.3s ease;
}

body.dark-mode .mobile-nav-drawer {
  background-color: var(--dark-bg-primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

body.dark-mode .close-btn {
  color: var(--dark-text-primary);
}

.mobile-nav-link {
  color: var(--text-secondary);
  font-size: 1.125rem;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
}

body.dark-mode .mobile-nav-link {
  color: var(--dark-text-secondary);
}

body.dark-mode .mobile-nav-link:hover {
  color: var(--dark-text-primary);
}

/* Hero Section */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  background-color: var(--bg-primary);
}

body.dark-mode .hero {
  background-color: var(--dark-bg-primary);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    gap: 3rem;
  }
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-description {
  color: var(--text-secondary);
  line-height: 1.625;
}

body.dark-mode .hero-description {
  color: var(--dark-text-secondary);
}

.text-link {
  color: var(--accent-blue);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--accent-blue-hover);
}

body.dark-mode .text-link {
  color: #60a5fa;
}

body.dark-mode .text-link:hover {
  color: #93c5fd;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  /* padding-top: 0.5rem; */
}

.social-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent-blue);
}

body.dark-mode .social-link {
  color: var(--dark-text-secondary);
}

body.dark-mode .social-link:hover {
  color: #60a5fa;
}

.hero-image {
  flex-shrink: 0;
  width: 12rem;
  height: 12rem;
}

@media (min-width: 768px) {
  .hero-image {
    width: 16rem;
    height: 16rem;
  }
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-primary);
}

body.dark-mode .section {
  background-color: var(--dark-bg-primary);
  border-top-color: var(--dark-border-color);
}

.section-title {
  margin-bottom: 2rem;
  color: var(--text-primary);
}

body.dark-mode .section-title {
  color: var(--dark-text-primary);
}

/* Updates List */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.update-item {
  color: var(--text-secondary);
}

body.dark-mode .update-item {
  color: var(--dark-text-secondary);
}

.update-date {
  color: var(--accent-blue);
  font-weight: 500;
  margin-right: 0.25rem;
}

body.dark-mode .update-date {
  color: #60a5fa;
}

/* Toggle Button */
.toggle-btn {
  padding: 0.5rem 1rem;
  background-color: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle-btn:hover {
  background-color: var(--accent-blue-hover);
}

body.dark-mode .toggle-btn {
  background-color: #1e40af;
}

body.dark-mode .toggle-btn:hover {
  background-color: #1e3a8a;
}

/* Research List */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.research-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .research-item {
    flex-direction: row;
    gap: 2rem;
  }
}

.research-image {
  flex-shrink: 0;
  width: 100%;
  height: 10rem;
}

@media (min-width: 768px) {
  .research-image {
    width: 10rem;
    height: 10rem;
  }
}

.research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.375rem;
  background-color: #e5e7eb;
}

body.dark-mode .research-image img {
  background-color: #1f2937;
}

.research-content {
  flex: 1;
}

.research-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

body.dark-mode .research-title {
  color: var(--dark-text-primary);
}

.research-authors {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

body.dark-mode .research-authors {
  color: var(--dark-text-secondary);
}

.research-status {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

body.dark-mode .research-status {
  color: var(--dark-text-secondary);
}

.research-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

body.dark-mode .research-description {
  color: var(--dark-text-secondary);
}

/* Projects List */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .project-item {
    flex-direction: row;
    gap: 2rem;
  }
}

.project-image {
  flex-shrink: 0;
  width: 100%;
  height: 10rem;
}

@media (min-width: 768px) {
  .project-image {
    width: 10rem;
    height: 10rem;
  }
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: fit;
  border-radius: 0.375rem;
  background-color: #e5e7eb;
}

body.dark-mode .project-image img {
  background-color: #1f2937;
}

.project-content {
  flex: 1;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

body.dark-mode .project-title {
  color: var(--dark-text-primary);
}

.project-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.more-projects{
  margin-top: 1rem;
  font-size: small;
  color: var(--text-secondary);
}

.more-projects a{
  color: var(--accent-blue);
  text-decoration: underline;
}
body.dark-mode .project-meta {
  color: var(--dark-text-secondary);
}

.project-link {
  display: inline-block;
  color: var(--accent-blue);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

body.dark-mode .project-link {
  color: #60a5fa;
}

body.dark-mode .project-link:hover {
  color: #93c5fd;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

body.dark-mode .project-description {
  color: var(--dark-text-secondary);
}

/* Footer */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: #6b7280;
}

body.dark-mode .footer {
  background-color: var(--dark-bg-primary);
  border-top-color: var(--dark-border-color);
  color: #6b7280;
}

.footer-text {
  margin: 0;
  font-size: 0.875rem;
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  padding: 0.75rem;
  background-color: #111827;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 30;
}

.scroll-top-btn.visible {
  display: flex;
}

.scroll-top-btn:hover {
  background-color: #1f2937;
}

body.dark-mode .scroll-top-btn {
  background-color: #f9fafb;
  color: #111827;
}

body.dark-mode .scroll-top-btn:hover {
  background-color: #e5e7eb;
}

.scroll-top-btn svg {
  width: 100%;
  height: 100%;
}
