/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --accent-color: #3b82f6;
}

/* Hide dark mode checkbox */
.dark-mode-checkbox {
  display: none;
}

/* Dark mode colors - activated when checkbox is checked */
.dark-mode-checkbox:checked ~ nav,
.dark-mode-checkbox:checked ~ main {
  --primary-color: #60a5fa;
  --secondary-color: #93c5fd;
  --text-dark: #f3f4f6;
  --text-light: #d1d5db;
  --bg-light: #1f2937;
  --bg-white: #111827;
  --border-color: #374151;
  --accent-color: #60a5fa;
}

/* Dark mode adjustments for box shadows */
.dark-mode-checkbox:checked ~ nav .navbar {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark-mode-checkbox:checked ~ main .experience-item,
.dark-mode-checkbox:checked ~ main .education-item,
.dark-mode-checkbox:checked ~ main .publication-item,
.dark-mode-checkbox:checked ~ main .skill-category,
.dark-mode-checkbox:checked ~ main .blog-post-preview {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark-mode-checkbox:checked ~ main .experience-item:hover,
.dark-mode-checkbox:checked ~ main .education-item:hover,
.dark-mode-checkbox:checked ~ main .publication-item:hover,
.dark-mode-checkbox:checked ~ main .blog-post-preview:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Apply dark mode background to body when checkbox is checked */
.dark-mode-checkbox:checked ~ nav,
.dark-mode-checkbox:checked ~ main,
body:has(.dark-mode-checkbox:checked) {
  background-color: #111827;
  color: #f3f4f6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  background-color: var(--bg-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Dark mode toggle - disabled */
.dark-mode-toggle {
  display: none;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Hero section - hidden but preserves space */
.hero-hidden {
  opacity: 0;
  pointer-events: none;
  padding: 2rem 0;
  text-align: center;
}

.hero-hidden h1 {
  font-size: 3rem;
  font-weight: 700;
}

/* Sections */
section {
  padding: 4rem 0;
}

section:nth-child(even) {
  background-color: var(--bg-light);
}

section h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 0.5rem;
}

section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

/* About section */
.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.about a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.about a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Experience and Education items */
.experience-item,
.education-item,
.publication-item {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

section:nth-child(even) .experience-item,
section:nth-child(even) .education-item,
section:nth-child(even) .publication-item {
  background-color: var(--bg-white);
}

.experience-item:hover,
.education-item:hover,
.publication-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.experience-item h3,
.education-item h3,
.publication-item h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.meta {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.location {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.experience-item p:last-child,
.education-item p:last-child,
.publication-item p:last-child {
  color: var(--text-light);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.experience-item a,
.education-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.experience-item a:hover,
.education-item a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.publication-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.publication-item a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Skills section */
.skills {
  display: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.skills:nth-child(even) .skill-category {
  background-color: var(--bg-white);
}

.skill-category h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.skill-category p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.skill-category p strong {
  color: var(--text-dark);
}

/* Footer */
footer {
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p {
  opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero-hidden h1 {
    font-size: 2rem;
  }

  section {
    padding: 3rem 0;
  }

  section h2 {
    font-size: 1.6rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .navbar-right {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Blog styles */
.blog-section {
  min-height: 60vh;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.blog-description {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.blog-post-preview {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

.blog-post-preview:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-preview-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.post-preview-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-preview-title a:hover {
  color: var(--primary-color);
}

.post-preview-meta {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-author {
  font-style: italic;
}

.post-preview-excerpt {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
}

.no-posts {
  color: var(--text-light);
  font-size: 1.1rem;
  text-align: center;
  padding: 3rem 0;
}

/* Individual blog post */
.blog-post {
  padding: 3rem 0;
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-meta {
  color: var(--text-light);
  font-size: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.post-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.post-content h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.post-content h2::after {
  display: none;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.post-content p {
  margin-bottom: 1.25rem;
  color: var(--text-light);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 2rem;
  color: var(--text-light);
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

.post-content code {
  background-color: var(--bg-light);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--secondary-color);
}

.post-content pre {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.95rem;
}

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

.post-footer {
  max-width: 800px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.back-to-blog {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-to-blog:hover {
  color: var(--secondary-color);
}

@media (max-width: 768px) {
  .post-title {
    font-size: 2rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-content h1 {
    font-size: 1.7rem;
  }

  .post-content h2 {
    font-size: 1.4rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}