/* ===== VARIABLES ===== */
:root {
  /* Academic Color scheme - Clean, professional */
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --primary-light: #f7fafc;
  --secondary: #2c5282;
  --dark: #1a202c;
  --light: #ffffff;
  --accent: #2b6cb0;
  --success: #276749;
  --warning: #c05621;
  --danger: #c53030;
  --border: #e2e8f0;
  --text-dark: #2d3748;
  --text-light: #4a5568;
  --text-white: #ffffff;
  --card-bg: #ffffff;

  /* Minimal shadows for academic look */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

  /* Transitions - subtle */
  --transition-fast: all 0.1s ease;
  --transition: all 0.15s ease;
  --transition-slow: all 0.2s ease;

  /* No fancy gradients - solid backgrounds */
  --bg-gradient: none;
  --primary-gradient: #1a365d;
  --dark-gradient: #1a202c;

  /* Spacing */
  --section-padding: 60px 0;
  --section-padding-mobile: 40px 0;
  --border-radius: 4px;
}

/* === ACCESSIBILITY & UTILITIES ADDED === */
.skip-link:focus {
  position: absolute !important;
  left: 12px !important;
  top: 12px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* Reduce motion for users preferring it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles to keep CV/download sections readable */
@media print {
  #preloader, .theme-toggle, .back-to-top, .nav-links, #menu-toggle, .scroll-progress { display: none !important; }
  #header { position: static; box-shadow: none; background: #fff !important; }
  body { background: #fff; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* Utility classes */
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0 0 0 0) !important; white-space:nowrap !important; border:0 !important; }

/* Light performance tweak for images */
img[loading="lazy"] { filter: blur(2px); transition: filter .4s ease; }
img[loading="lazy"].loaded { filter: blur(0); }

/* Dark mode variables - Academic dark theme */
[data-theme="dark"] {
  --primary: #90cdf4;
  --primary-dark: #63b3ed;
  --primary-light: #1a202c;
  --dark: #e2e8f0;
  --light: #171923;
  --text-dark: #e2e8f0;
  --text-light: #a0aec0;
  --border: #2d3748;
  --card-bg: #1a202c;
  --bg-gradient: none;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Crimson Pro", "Georgia", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--light);
  overflow-x: hidden;
  transition: var(--transition);
}

/* Accessible focus styles */
a:focus-visible,
button:focus-visible,
.filter-btn:focus-visible,
.theme-toggle:focus-visible,
.back-to-top:focus-visible,
.project-link:focus-visible,
.cert-link:focus-visible,
.publication-link:focus-visible,
.download-btn:focus-visible,
.footer-download:focus-visible,
.social-icon:focus-visible,
.social-icon-contact:focus-visible,
.footer-social a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 95, 109, 0.35);
  border-radius: 12px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Crimson Pro", "Georgia", serif;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Ambient spotlight overlay - disabled for academic style */
#ambient-spotlight {
  display: none;
}

button {
  cursor: pointer;
  font-family: "Crimson Pro", "Georgia", serif;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
  position: relative;
}

.section-light {
  background-color: var(--light);
}

.section-dark {
  background-color: var(--primary-light);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  color: var(--dark);
  font-weight: 600;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 2px;
  background: var(--primary);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* === Open Source list styling (horizontal cards) === */
.contrib-list {
  margin: 14px 0 0 0;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.contrib-list li {
  list-style: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  color: var(--text-dark);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.contrib-list li:hover { transform: translateY(-2px); box-shadow: var(--hover-shadow); }
.contrib-list li strong { display: block; margin-bottom: 6px; color: var(--dark); }
.contrib-list a { text-decoration: underline; }

@media (max-width: 420px) {
  .contrib-list { grid-template-columns: 1fr; }
}

/* Badges & icons within contribution cards */
.contrib-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.contrib-icon {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
}
.status-badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); background: #ecfdf5; color: #065f46; }
.status-badge i { margin-right: 4px; }
.status-badge.open { background: #fff7ed; color: #9a3412; }
.status-badge.merged { background: #ecfdf5; color: #065f46; }

/* 3-per-row on large screens */
@media (min-width: 1200px) {
  .contrib-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}

/* Override for Open Source when using Experience layout: keep ticks, remove dots and card grid */
.experience-details.contrib-list { display: block; grid-template-columns: none; gap: 0; padding-left: 0; list-style: none; }
.experience-details.contrib-list li { list-style: none; background: transparent; border: 0; box-shadow: none; padding: 0 0 0 25px; margin-bottom: 10px; }
.experience-details.contrib-list li:hover { transform: none; box-shadow: none; }
.experience-details.contrib-list li::marker { content: ""; }

/* ===== PRELOADER - simplified ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: var(--transition);
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader span {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  margin: 0 4px;
  animation: preloader 1s infinite ease-in-out;
}

.loader span:nth-child(2) {
  animation-delay: 0.15s;
  background-color: var(--secondary);
}

.loader span:nth-child(3) {
  animation-delay: 0.3s;
  background-color: var(--accent);
}

@keyframes preloader {
  0%,
  100% {
    transform: scale(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
  background-color: var(--primary-dark);
  transform: none;
  box-shadow: var(--hover-shadow);
}

.theme-toggle i {
  font-size: 18px;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: none;
  box-shadow: var(--hover-shadow);
}

.back-to-top i {
  font-size: 18px;
}

/* Scroll progress bar - simplified */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--primary);
  box-shadow: none;
  z-index: 1100;
  transition: transform 0.15s ease-out, opacity 0.2s ease;
  opacity: 0;
}

/* ===== HEADER ===== */
#header {
  background: var(--light);
  color: var(--dark);
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="dark"] #header {
  background: var(--card-bg);
  border-bottom-color: var(--border);
}

#header.scrolled {
  padding: 10px 0;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
}

.header-left {
  padding-left: 20px;
}

#header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

#header nav {
  padding-right: 20px;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 20px;
  position: relative;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  font-size: 15px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Nav underline element - simplified for academic style */
.nav-underline {
  position: absolute;
  bottom: -2px;
  height: 2px;
  width: 0;
  left: 0;
  background: var(--primary);
  border-radius: 0;
  transition: left 150ms ease, width 150ms ease;
  opacity: 1;
  pointer-events: none;
}

/* Reduced motion: disable underline transitions */
@media (prefers-reduced-motion: reduce) {
  .nav-underline { transition: none !important; }
}

.menu-toggle {
  display: none;
  background-color: transparent;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  margin-right: 20px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--dark);
  margin: 6px auto;
  transition: var(--transition);
}

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

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

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

/* ===== HOME SECTION ===== */
#home {
  padding-top: 140px;
  padding-bottom: 60px;
  background: var(--light);
  min-height: auto;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Hero background - simplified for academic style */
#home::before {
  display: none;
}

.home-content {
  width: 100%;
}

.intro-card {
  display: flex;
  align-items: flex-start;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
  border: 1px solid var(--border);
}

.intro-card::before,
.intro-card::after {
  display: none;
}

.profile-container {
  position: relative;
  z-index: 1;
}

.profile-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="dark"] .profile-wrapper {
  border-color: var(--border);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.profile-wrapper:hover .profile-photo {
  transform: none;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px; /* Reduced from 15px */
  margin-top: 20px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.social-icon::before {
  display: none;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.social-icon:hover::before {
  display: none;
}

/* Dark mode support */
[data-theme="dark"] .social-icon {
  background: var(--card-bg);
  color: var(--primary);
  border-color: var(--border);
}

[data-theme="dark"] .social-icon:hover {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
}

.intro-text {
  margin-left: 50px;
  position: relative;
  z-index: 1;
}

.greeting {
  display: block;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 400;
}

.name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}

.typing-container {
  margin-bottom: 20px;
  height: auto;
}

.profession {
  font-size: 1.1rem;
  color: var(--text-light);
  position: relative;
  font-style: italic;
}

.profession::after {
  display: none;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.cta-buttons {
  display: flex;
  gap: 10px; /* Reduced from 15px */
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  gap: 8px;
}

.btn i {
  font-size: 16px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: none;
  box-shadow: var(--hover-shadow);
  color: white;
  text-decoration: none;
}

/* Simple click feedback */
:where(.btn,
  .filter-btn,
  .project-link,
  .cert-link,
  .publication-link,
  .download-btn,
  .footer-download,
  .submit-btn,
  .theme-toggle,
  .back-to-top):active {
  opacity: 0.9;
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
  text-decoration: none;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

[data-theme="dark"] .about-content {
  background-color: var(--card-bg);
}

.about-content p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-content strong {
  color: var(--primary);
  font-weight: 600;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.contact-link:hover {
  background: var(--primary);
  color: white;
}

.resume-download {
  text-align: center;
  margin-top: 25px;
}

.download-btn {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: none;
}

.download-btn:hover {
  background: var(--primary-dark);
  transform: none;
  box-shadow: var(--hover-shadow);
}

/* ===== EDUCATION SECTION ===== */
.education-list {
  max-width: 900px;
  margin: 0 auto;
}

.education-item {
  display: flex;
  background-color: var(--card-bg);
  padding: 25px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  position: relative;
  transition: var(--transition-fast);
  border: 1px solid var(--border);
}

.education-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.edu-icon {
  background: var(--primary-light);
  color: var(--primary);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 25px;
  flex-shrink: 0;
}

.edu-icon i {
  font-size: 30px;
}

.edu-content {
  flex-grow: 1;
}

.education-item h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.education-location,
.education-degree,
.education-period {
  margin-bottom: 5px;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PUBLICATIONS SECTION ===== */
.publication-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 25px;
  font-size: 14px;
  font-weight: 500;
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 4px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: none;
  border: 1px solid var(--border);
}

.publications-list {
  max-width: 900px;
  margin: 0 auto;
}

.publication-item {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}

[data-theme="dark"] .publication-item {
  background-color: var(--card-bg);
  border-color: var(--border);
  border-left-color: var(--primary);
}

.publication-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.pub-label {
  position: absolute;
  top: -10px;
  left: 25px;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: none;
}

.publication-item h3 {
  font-size: 20px;
  margin-bottom: 15px;
  margin-top: 10px;
  color: var(--primary);
}

.publication-item p {
  margin-bottom: 15px;
  line-height: 1.7;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  transition: var(--transition);
  font-weight: 500;
  gap: 8px;
  border: 1px solid var(--border);
}

[data-theme="dark"] .publication-link {
  background-color: var(--card-bg);
}

.publication-link:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

/* Improve the spacing and appearance of publication metrics */
.publication-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Increased gap between items */
  margin-top: 20px;
  margin-bottom: 20px;
  justify-content: flex-start; /* Changed from center to flex-start for better alignment */
}

.publication-metrics span {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.publication-metrics span:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.publication-metrics span i {
  font-size: 14px;
}

[data-theme="dark"] .publication-metrics span {
  background-color: #334155;
}

/* ===== EXPERIENCE SECTION ===== */
.experiences-list {
  max-width: 900px;
  margin: 0 auto;
}

.experience-item {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

[data-theme="dark"] .experience-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.experience-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.experience-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.experience-item h3 {
  font-size: 22px;
  margin-bottom: 5px;
  color: var(--primary);
}

.company-name {
  font-weight: 500;
  color: var(--secondary);
}

.company-name a {
  color: var(--primary);
  transition: var(--transition);
}

.company-name a:hover {
  color: var(--primary-dark);
}

.experience-period,
.location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text-light);
  font-size: 15px;
}

.experience-details {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
}

.experience-details li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.experience-details li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Enhanced Tech Stack styles for experience items */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tech-tag:hover {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.tech-tag::before {
  display: none;
}

.tech-tag:hover::before {
  display: none;
}

[data-theme="dark"] .tech-tag {
  background: var(--card-bg);
  color: var(--primary);
  border-color: var(--border);
}

[data-theme="dark"] .tech-tag:hover {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
}

/* Remove stagger animation for tech tags */
.experience-item .tech-tag {
  animation: none;
  opacity: 1;
  transform: none;
}

.experience-item .tech-tag:nth-child(1) {
  animation-delay: 0.1s;
}
.experience-item .tech-tag:nth-child(2) {
  animation-delay: 0.2s;
}
.experience-item .tech-tag:nth-child(3) {
  animation-delay: 0.3s;
}
.experience-item .tech-tag:nth-child(4) {
  animation-delay: 0.4s;
}
.experience-item .tech-tag:nth-child(5) {
  animation-delay: 0.5s;
}
.experience-item .tech-tag:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== PROJECTS SECTION ===== */
.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 6px 16px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-dark);
  transition: var(--transition);
  cursor: pointer;
}

[data-theme="dark"] .filter-btn {
  background-color: var(--card-bg);
  color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: none;
  box-shadow: none;
}

.projects-container,
.skills-list,
.certification-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

.project-item {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  position: relative;
  border: 1px solid var(--border);
}

[data-theme="dark"] .project-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.project-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

/* Disable tilt effects for academic style */
.project-item,
.skill-category,
.certification-item,
.award-item {
  will-change: auto;
  transform-style: flat;
}

.tilt-active {
  box-shadow: var(--hover-shadow) !important;
}

/* Improved spacing for project content components */
.project-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.project-content p {
  margin-bottom: 20px;
  line-height: 1.7;
  flex-grow: 0; /* Don't let paragraph grow and push other elements */
}

/* Fix tech stack positioning in projects */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0; /* Remove top margin */
  margin-bottom: 20px; /* Add bottom margin for separation */
}

/* Fix project links positioning */
.project-links {
  display: flex;
  justify-content: flex-start;
  gap: 8px; /* Reduced from 10px */
  margin-top: auto; /* Push links to bottom */
}

.project-icon-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 18px;
  box-shadow: none;
}

.project-item h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary);
  padding-right: 50px;
}

.project-item p {
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-links {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  transition: var(--transition);
  font-size: 14px;
  gap: 6px;
  border: 1px solid var(--border);
}

[data-theme="dark"] .project-link {
  background-color: var(--card-bg);
}

.project-link:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.project-item.hidden {
  display: none;
}

.project-item.filtered-out {
  display: none;
}

/* Add spacing for the See More Projects button container */
.see-more-btn-container {
  margin-top: 40px;
  text-align: center;
}

/* Enhance the load more button with subtle animation */
#load-more-projects {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

#load-more-projects:hover {
  transform: translateY(-3px);
}

/* ===== SKILLS SECTION ===== */
.skill-category {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

[data-theme="dark"] .skill-category {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.skill-category:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.skill-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.skill-icon i {
  font-size: 25px;
}

.skill-category h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
  position: relative;
}

.skill-category p {
  color: var(--text-dark);
  line-height: 1.7;
}

.skills-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 25px 0;
  justify-content: center;
}

.skill-pill {
  display: flex;
  align-items: center;
  background-color: var(--primary-light);
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: var(--transition);
  box-shadow: none;
  border: 1px solid var(--border);
}

.skill-pill:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.skill-pill i {
  margin-right: 8px;
  font-size: 16px;
}

/* Enhanced styling for skill tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(
    135deg,
    rgba(255, 95, 109, 0.12) 0%,
    rgba(34, 211, 238, 0.18) 100%
  );
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 95, 109, 0.12);
  backdrop-filter: blur(4px);
}

.skill-tag:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.25);
  border-color: rgba(255, 95, 109, 0.5);
}

.skill-tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.6s ease;
}

.skill-tag:hover::before {
  left: 100%;
}

/* Animation for skill tags on page load */
.skill-category .skill-tag {
  animation: skillTagFadeIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(8px);
}

.skill-category .skill-tag:nth-child(1) {
  animation-delay: 0.05s;
}
.skill-category .skill-tag:nth-child(2) {
  animation-delay: 0.1s;
}
.skill-category .skill-tag:nth-child(3) {
  animation-delay: 0.15s;
}
.skill-category .skill-tag:nth-child(4) {
  animation-delay: 0.2s;
}
.skill-category .skill-tag:nth-child(5) {
  animation-delay: 0.25s;
}
.skill-category .skill-tag:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes skillTagFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode support */
[data-theme="dark"] .skill-tag {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.28) 0%,
    rgba(34, 211, 238, 0.25) 100%
  );
  color: #fecdd3;
  border-color: rgba(255, 122, 168, 0.3);
}

[data-theme="dark"] .skill-tag:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.9) 0%,
    rgba(249, 115, 22, 0.9) 45%,
    rgba(34, 211, 238, 0.9) 100%
  );
  color: white;
  border-color: rgba(255, 122, 168, 0.45);
}

/* ===== AWARDS SECTION ===== */
.awards-list {
  max-width: 900px;
  margin: 0 auto;
}

.award-item {
  display: flex;
  background-color: var(--card-bg);
  padding: 25px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

[data-theme="dark"] .award-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.award-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.award-icon {
  background: var(--primary-light);
  color: var(--primary);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 25px;
  flex-shrink: 0;
}

.award-icon i {
  font-size: 30px;
}

.award-content {
  flex-grow: 1;
}

.award-item h3 {
  font-size: 22px;
  margin-bottom: 5px;
  color: var(--primary);
}

.award-org,
.award-date,
.award-desc {
  margin-bottom: 5px;
}

.award-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 15px;
}

/* Award metrics styling to match publication metrics */
.award-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 10px;
  justify-content: flex-start;
}

.award-badge {
  background: linear-gradient(
    135deg,
    rgba(255, 95, 109, 0.14) 0%,
    rgba(34, 211, 238, 0.18) 100%
  );
  color: var(--primary);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(255, 95, 109, 0.15);
  transition: var(--transition);
  border: 1px solid rgba(255, 95, 109, 0.18);
  position: relative;
  overflow: hidden;
}

.award-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.6s ease;
}

.award-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(255, 95, 109, 0.25);
  background: linear-gradient(135deg, var(--primary) 0%, #f97316 45%, var(--accent) 100%);
  color: white;
}

.award-badge:hover::before {
  left: 100%;
}

.award-badge i {
  font-size: 14px;
}

/* Dark mode support */
[data-theme="dark"] .award-badge {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.28) 0%,
    rgba(34, 211, 238, 0.25) 100%
  );
  color: #fecdd3;
  border-color: rgba(255, 122, 168, 0.3);
}

[data-theme="dark"] .award-badge:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.9) 0%,
    rgba(249, 115, 22, 0.9) 45%,
    rgba(34, 211, 238, 0.9) 100%
  );
  color: white;
  border-color: rgba(255, 122, 168, 0.45);
}

/* Animation for award badges on page load */
.award-item .award-badge {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

.award-item .award-badge:nth-child(1) {
  animation-delay: 0.2s;
}
.award-item .award-badge:nth-child(2) {
  animation-delay: 0.3s;
}
.award-item .award-badge:nth-child(3) {
  animation-delay: 0.4s;
}

/* ===== CERTIFICATIONS SECTION ===== */
.certification-item {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  max-width: 400px;
  width: 100%;
  border: 1px solid var(--border);
}

[data-theme="dark"] .certification-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.certification-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.cert-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
}

.cert-icon i {
  font-size: 25px;
}

.certification-item h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
}

.cert-org,
.cert-date {
  margin-bottom: 15px;
}

.cert-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 15px;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  margin-top: auto;
  transition: var(--transition);
  font-size: 14px;
  align-self: center;
  gap: 6px;
  border: 1px solid var(--border);
}

[data-theme="dark"] .cert-link {
  background-color: var(--card-bg);
}

.cert-link:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

/* Membership description styling */
.membership-description {
  text-align: center;
  margin-top: 15px;
}

.membership-description p {
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

[data-theme="dark"] .membership-description p {
  color: var(--text-light);
}

/* Special styling for single membership items */
#memberships .certification-list {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 25px;
}

/* ===== RESUME SECTION ===== */
.resume-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  max-width: 900px;
  margin: 0 auto 30px;
  position: relative;
  height: 0;
  padding-bottom: 140%;
  border: 1px solid var(--border);
}

[data-theme="dark"] .resume-container {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.resume-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.resume-mobile-notice {
  display: none;
  text-align: center;
  margin: 20px auto;
  padding: 15px;
  background-color: rgba(255, 95, 109, 0.1);
  border-radius: 10px;
  max-width: 500px;
  color: var(--text-dark);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px; /* Reduced from 15px */
  margin-top: 20px;
}

/* Mobile styles for resume section */
@media (max-width: 992px) {
  .resume-container {
    padding-bottom: 160%; /* Increase aspect ratio for tablets */
  }

  .resume-mobile-notice {
    display: block;
  }
}

@media (max-width: 768px) {
  .resume-container {
    padding-bottom: 180%; /* More height on mobile phones */
  }
}

@media (max-width: 576px) {
  .resume-container {
    padding-bottom: 200%; /* Even more height on smaller screens */
  }
}

/* ===== CONTACT SECTION ===== */
.contact-container {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-item {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  flex: 1;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border);
}

[data-theme="dark"] .contact-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.contact-item:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.contact-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.contact-icon i {
  font-size: 25px;
}

.contact-item h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
}

.contact-item p {
  margin-bottom: 0;
}

.social-links-bottom {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.social-icon-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

[data-theme="dark"] .social-icon-bottom {
  background-color: var(--card-bg);
}

.social-icon-bottom:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

/* Enhanced Contact Section Styling */
.contact-container {
  display: flex;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Contact Card Shared Styling */
.contact-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 30px;
  flex: 1;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

[data-theme="dark"] .contact-card {
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  border-color: var(--border);
}

.contact-card:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

[data-theme="dark"] .contact-card:hover {
  box-shadow: var(--hover-shadow);
}

.contact-card-header {
  margin-bottom: 30px;
  position: relative;
}

.contact-card-header::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.contact-card-header h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--primary);
}

.contact-card-header p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
}

/* Contact Info Styling */
.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-info-items {
  flex-grow: 1;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 20px;
  position: relative;
}

.contact-icon {
  width: 45px;
  height: 45px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.contact-item:hover .contact-icon {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.contact-detail {
  flex-grow: 1;
}

.contact-detail h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--primary);
}

.contact-detail p {
  margin-bottom: 0;
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.5;
}

[data-theme="dark"] .contact-detail p {
  color: #e2e8f0;
}

.contact-detail p a {
  color: var(--primary);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.contact-detail p a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.contact-detail p a:hover::after {
  width: 100%;
}

/* Social Links in Contact */
.social-links-contact {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
}

.social-icon-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.social-icon-contact::before {
  display: none;
}

.social-icon-contact:hover {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.social-icon-contact:hover::before {
  display: none;
}

/* Dark mode support */
[data-theme="dark"] .social-icon-contact {
  background: var(--card-bg);
  color: var(--primary);
  border-color: var(--border);
}

[data-theme="dark"] .social-icon-contact:hover {
  background: var(--primary);
  color: var(--dark);
}

/* Availability Indicator */
.contact-availability {
  margin-top: auto;
  margin-bottom: 10px;
}

.availability-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: 30px;
  width: fit-content;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.status-text {
  color: #10b981;
  font-size: 14px;
  font-weight: 600;
}

/* Contact Form Styling */
.contact-form {
  width: 100%;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

[data-theme="dark"] .form-group label {
  color: #e2e8f0;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 15px;
  color: #94a3b8;
  font-size: 16px;
  transition: all 0.3s ease;
}

.input-with-icon input,
.input-with-icon textarea {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  color: var(--text-dark);
  background-color: #f8fafc;
}

[data-theme="dark"] .input-with-icon input,
[data-theme="dark"] .input-with-icon textarea {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

.input-with-icon input:focus,
.input-with-icon textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 95, 109, 0.1);
  outline: none;
}

.input-with-icon input:focus + i,
.input-with-icon textarea:focus + i {
  color: var(--primary);
}

.textarea-icon i {
  top: 15px;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  border-radius: 4px;
  transition: var(--transition);
  font-size: 15px;
  font-weight: 500;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.submit-btn::before {
  display: none;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: none;
  box-shadow: var(--hover-shadow);
}

.submit-btn:hover::before {
  display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .projects-container,
  .skills-list,
  .certification-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .intro-card {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }

  .intro-text {
    margin-left: 0;
    margin-top: 30px;
  }

  .profile-wrapper {
    margin: 0 auto 20px;
  }

  .cta-buttons {
    justify-content: center;
  }

  .contact-container {
    flex-direction: column;
  }

  section {
    padding: var(--section-padding-mobile);
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  #home {
    padding-top: 120px;
  }

  #header {
    padding: 15px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 260px;
    height: 100vh;
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
    flex-direction: column;
    padding: 100px 30px 30px;
    gap: 20px;
    transition: 0.4s;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  [data-theme="dark"] .nav-links {
  background-color: rgba(2, 6, 23, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    display: block;
    padding: 8px 0;
    font-size: 16px;
  }
  .nav-underline { display: none; }

  .name {
    font-size: 36px;
  }

  .profession {
    font-size: 18px;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 10px; /* Reduced from 15px */
  }

  .projects-container,
  .skills-list,
  .certification-list {
    grid-template-columns: 1fr;
  }

  .project-item,
  .certification-item {
    max-width: 400px;
  }

  .education-item,
  .award-item {
    flex-direction: column;
  }

  .edu-icon,
  .award-icon {
    margin: 0 auto 20px;
  }

  .edu-content,
  .award-content {
    text-align: center;
  }

  .experience-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .education-location,
  .education-degree,
  .education-period,
  .experience-period,
  .location,
  .award-date {
    justify-content: center;
    align-items: center;
  }

  .projects-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 14px;
  }

  .download-btn {
    width: auto;
  }

  .skills-summary {
    gap: 8px;
  }

  .skill-pill {
    padding: 6px 12px;
    font-size: 14px;
  }

  .see-more-btn-container {
    margin-top: 30px;
  }

  .social-icon-contact {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Custom scrollbar */
html {
  scrollbar-color: #94a3b8 transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8, #64748b);
   border-radius: 8px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .scroll-progress {
    transition: none;
  }
  #ambient-spotlight {
    display: none;
  }
}

@media (max-width: 576px) {
  .intro-card {
    padding: 25px 15px;
  }

  .profile-wrapper {
    width: 200px;
    height: 200px;
  }

  .name {
    font-size: 30px;
  }

  .profession {
    font-size: 16px;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-content,
  .education-item,
  .publication-item,
  .experience-item,
  .project-content,
  .skill-category,
  .certification-item,
  .award-item,
  .contact-item {
    padding: 25px 20px;
  }
}

/* Section backgrounds - clean academic style */
.section-light::before,
.section-dark::before {
  display: none;
}

.section-dark {
  background-color: var(--primary-light);
}

/* Add a specific media query for slightly larger mobile screens */
@media (min-width: 577px) and (max-width: 768px) {
  .contact-item {
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }
  
  .contact-detail {
    text-align: left;
  }
}

/* ===== FOOTER SECTION ===== */
.footer {
  position: relative;
  background: var(--card-bg);
  color: var(--text-dark);
  padding: 50px 0 30px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  box-shadow: none;
}

[data-theme="dark"] .footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
}

/* Update the wave fill color to match the theme */
.footer-wave svg {
  width: 100%;
  height: 100px;
  fill: var(--light); /* Use light background color for wave */
}

[data-theme="dark"] .footer-wave svg {
  fill: var(--light); /* Use light background color for wave in dark mode */
}

/* Update footer text colors */
.footer-brand p {
  color: var(--text-light);
}

.footer-nav a,
.footer-contact p,
.footer-bottom {
  color: var(--text-light);
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: hidden;
  transform: translateY(-99%);
}

.footer-wave svg {
  width: 100%;
  height: 100px;
  fill: var(--dark);
}

[data-theme="dark"] .footer-wave svg {
  fill: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-brand h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--primary);
  display: inline-block;
}

.footer-brand p {
  color: #94a3b8;
  margin-bottom: 20px;
  font-size: 15px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.footer-social a::before {
  display: none;
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.footer-social a:hover::before {
  display: none;
}

/* Dark mode support for footer social icons */
[data-theme="dark"] .footer-social a {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.28) 0%,
    rgba(34, 211, 238, 0.25) 100%
  );
  color: #fecdd3;
  border-color: rgba(255, 122, 168, 0.32);
}

[data-theme="dark"] .footer-social a:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 122, 168, 0.9) 0%,
    rgba(249, 115, 22, 0.9) 45%,
    rgba(34, 211, 238, 0.9) 100%
  );
  color: white;
}

/* Ensure proper border-box model for footer elements */
.footer * {
  box-sizing: border-box;
}

.footer-nav h4,
.footer-contact h4 {
  color: var(--dark); /* Change from hardcoded white to theme variable */
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-nav h4::after,
.footer-contact h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.footer-nav ul {
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 12px;
}

.footer-nav a {
  color: #94a3b8;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
  display: inline-block;
}

.footer-nav a::before {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary);
  transition: all 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-nav a:hover::before {
  width: 100%;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  margin-bottom: 15px;
  font-size: 15px;
}

.footer-contact i {
  color: var(--primary);
}

.footer-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  transition: var(--transition);
  font-size: 14px;
  border: 1px solid var(--border);
}

.footer-download:hover {
  background-color: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
}

.footer-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  color: #94a3b8;
  font-size: 14px;
}

.footer-credit {
  font-style: italic;
  opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .footer {
    padding: 50px 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* === Enhanced Mobile UX Improvements === */
@media (max-width: 768px) {
  #header h1 { font-size: 20px; }
  .intro-card { padding: 24px 22px; box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
  .profile-wrapper { width: 180px; height: 180px; }
  .name { font-size: 32px; }
  .profession { font-size: 17px; }
  .hero-intro { font-size: 15px !important; }
  .section-title { font-size: 1.75rem; margin-bottom: 2rem; }
  .experience-item, .publication-item, .project-item, .education-item, .award-item, .certification-item { padding: 22px; }
  .experience-details li { padding-left: 20px; font-size: 15px; }
  .tech-tag { padding: 5px 12px; font-size: 12px; }
  .projects-filter { display: flex; flex-wrap: wrap; justify-content: center; }
  .filter-btn { flex: 0 1 auto; }
  iframe { max-height: 500px; }
  .resume-container iframe { height: 600px !important; }
  .contact-card { padding: 22px; }
  .footer-grid { gap: 40px; }
  .scroll-progress { height: 3px; }
}

@media (max-width: 576px) {
  body { font-size: 15px; }
  #home { padding-top: 120px; padding-bottom: 60px; }
  .intro-card { padding: 22px 18px; }
  .profile-wrapper { width: 160px; height: 160px; }
  .name { font-size: 30px; }
  .cta-buttons { width: 100%; }
  .cta-buttons .btn { width: 100%; }
  .skills-summary { display: flex; flex-wrap: wrap; justify-content: center; }
  .skill-pill { font-size: 13px; padding: 6px 10px; }
  .publication-item h3, .project-item h3 { font-size: 18px; }
  .project-content p, .publication-item p { font-size: 14.5px; }
  .experience-details li { font-size: 14.5px; }
  .contact-info-items { gap: 14px; }
  .projects-filter { gap: 6px; }
  .filter-btn { padding: 6px 12px; font-size: 13px; }
  .footer-credit { font-size: 13px; }
}

/* Reduce heavy shadows on very small screens for performance */
@media (max-width: 576px) {
  .intro-card, .experience-item, .publication-item, .project-item, .education-item, .award-item, .certification-item, .contact-item { box-shadow: 0 3px 6px rgba(0,0,0,0.08); }
}

/* Improve tap targets & spacing */
@media (max-width: 768px) {
  .nav-link { padding: 10px 0; line-height: 1.3; }
  .menu-toggle { width: 44px; height: 44px; }
  .menu-toggle span { height: 3px; }
}

/* Smooth container edge breathing room */
@media (max-width: 576px) {
  .container { padding: 0 16px; }
}

/* ===== ANIMATIONS ===== */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
  .projects-container,
  .skills-list,
  .certification-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .intro-card {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }

  .intro-text {
    margin-left: 0;
    margin-top: 30px;
  }

  .profile-wrapper {
    margin: 0 auto 20px;
  }

  .cta-buttons {
    justify-content: center;
  }

  .contact-container {
    flex-direction: column;
  }

  section {
    padding: var(--section-padding-mobile);
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  #home {
    padding-top: 120px;
  }

  #header {
    padding: 15px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 260px;
    height: 100vh;
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
    flex-direction: column;
    padding: 100px 30px 30px;
    gap: 20px;
    transition: 0.4s;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  [data-theme="dark"] .nav-links {
  background-color: rgba(2, 6, 23, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    display: block;
    padding: 8px 0;
    font-size: 16px;
  }
  .nav-underline { display: none; }

  .name {
    font-size: 36px;
  }

  .profession {
    font-size: 18px;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 10px; /* Reduced from 15px */
  }

  .projects-container,
  .skills-list,
  .certification-list {
    grid-template-columns: 1fr;
  }

  .project-item,
  .certification-item {
    max-width: 400px;
  }

  .education-item,
  .award-item {
    flex-direction: column;
  }

  .edu-icon,
  .award-icon {
    margin: 0 auto 20px;
  }

  .edu-content,
  .award-content {
    text-align: center;
  }

  .experience-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .education-location,
  .education-degree,
  .education-period,
  .experience-period,
  .location,
  .award-date {
    justify-content: center;
    align-items: center;
  }

  .projects-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 14px;
  }

  .download-btn {
    width: auto;
  }

  .skills-summary {
    gap: 8px;
  }

  .skill-pill {
    padding: 6px 12px;
    font-size: 14px;
  }

  .see-more-btn-container {
    margin-top: 30px;
  }

  .social-icon-contact {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Button effects - disabled for academic style */
.btn-primary, .btn-outline, .download-btn { position: relative; overflow: hidden; }
.btn-ripple {
  display: none;
}

[data-theme="dark"] .btn-ripple {
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 35%, transparent), transparent 70%);
}
@keyframes ripple-settle {
  from { transform: scale(0.65); opacity: 0.35; }
  to { transform: scale(1.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-ripple { display: none; }
}

/* ===== Blog & Longform Pages ===== */
body.blog-page,
body.blog-article,
body.longform-page {
  background: var(--light);
  color: var(--text-dark);
}

body.blog-page main,
body.blog-article main,
body.longform-page main {
  padding: 140px 0 90px;
}

body.blog-page .container,
body.blog-article .container,
body.longform-page .container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.page-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.page-intro .page-kicker,
.article-hero .article-kicker {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
}

.page-intro .page-lede {
  color: var(--text-light);
  font-size: 1.05rem;
}

.blog-hero {
  padding: 60px 0 40px;
}

.blog-listing {
  padding: 60px 0;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--hover-shadow);
  transform: none;
}

.blog-card .blog-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-card time {
  font-weight: 600;
  color: var(--secondary);
}

.blog-card h3 {
  font-size: 1.45rem;
  margin: 0;
}

.blog-card p {
  margin: 0;
  color: var(--text-dark);
}

.blog-card .blog-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
}

.blog-card .blog-link::after {
  content: "→";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.blog-card .blog-link:hover::after {
  transform: translateX(4px);
}

.blog-entry {
  max-width: 1024px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  border: 1px solid var(--border);
}

.article-hero {
  max-width: 100%;
  overflow: hidden;
}

.article-hero h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  line-height: 1.2;
}

.article-hero .article-lede {
  font-size: 1.05rem;
  color: var(--text-dark);
  max-width: 720px;
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-light);
}

.article-meta time {
  font-weight: 600;
  color: var(--secondary);
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article-body nav.toc {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 95, 109, 0.12), rgba(34, 211, 238, 0.14)),
    linear-gradient(145deg, #fff9f4 0%, #f3f7ff 100%);
  box-shadow: var(--card-shadow);
  max-width: 320px;
}

.article-body nav.toc h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
}

.article-body nav.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.article-body nav.toc li {
  margin: 0;
}

.article-body nav.toc a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.article-body nav.toc a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Dark mode TOC styles */
[data-theme="dark"] .article-body nav.toc {
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.14), rgba(34, 211, 238, 0.16)),
    linear-gradient(145deg, #0b1324 0%, #0f172a 100%);
  border-color: rgba(34, 211, 238, 0.26);
}

[data-theme="dark"] .article-body nav.toc h2 {
  color: var(--text-dark);
}

[data-theme="dark"] .article-body nav.toc a {
  color: #7dd3fc;
}

[data-theme="dark"] .article-body nav.toc a:hover {
  color: #bae6fd;
}

.blog-entry section {
  margin: 0;
  display: grid;
  gap: 16px;
}

.blog-entry section:not(:first-of-type) {
  padding-top: 16px;
}

.blog-entry h2 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--dark);
}

.blog-entry h3 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--dark);
}

.blog-entry p,
.blog-entry li {
  font-size: 1.05rem;
  color: var(--text-dark);
}

.blog-entry ul,
.blog-entry ol {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.blog-entry code,
.blog-entry pre,
.blog-entry kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.blog-entry pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px 20px;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid #0b1220;
}

.blog-entry pre code {
  background: transparent;
  padding: 0;
}

.blog-entry .note {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, rgba(255, 95, 109, 0.1), rgba(34, 211, 238, 0.08));
  border-radius: 10px;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.blog-entry .muted {
  color: var(--text-light);
}

.blog-entry .mermaid {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-bg);
}

.blog-entry .article-footer {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--text-light);
  font-size: 0.95rem;
}

body.longform-page {
  background: var(--bg-gradient);
}

.longform-page .article-hero {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px 44px;
}

.longform-page .article-body {
  gap: 28px;
}

.longform-page .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.longform-page .breadcrumb a {
  color: var(--primary);
}

.longform-page .card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 28px 32px;
  display: grid;
  gap: 16px;
}

.longform-page .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.longform-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.longform-page th,
.longform-page td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.longform-page th {
  background: var(--primary-light);
  color: var(--dark);
}

.longform-page .small {
  font-size: 0.9rem;
  color: var(--text-light);
}

.longform-page .kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.longform-page .kpi div {
  background: var(--primary-light);
  border: 1px dashed rgba(34, 211, 238, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--dark);
}

.longform-page .flow {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  padding: 10px;
  overflow: auto;
}

.longform-page figure {
  display: grid;
  gap: 12px;
}

.longform-page figure img {
  width: 100%;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.longform-page pre {
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.longform-page .caption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
}

@media (max-width: 960px) {
  .blog-entry {
    padding: 40px 36px;
  }
}

@media (max-width: 600px) {
  body.blog-page main,
  body.blog-article main,
  body.longform-page main {
    padding: 120px 0 70px;
  }

  .blog-entry {
    padding: 32px 22px;
  }

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

  .article-body nav.toc {
    padding: 20px;
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .blog-card {
    padding: 24px;
  }

  .longform-page .article-hero {
    padding: 32px 24px;
  }

  .longform-page .card {
    padding: 24px;
  }
}

/* ===== SEO Enhancements ===== */
/* Breadcrumb Navigation */
nav.breadcrumb {
  max-width: 1024px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

nav.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 12px 20px;
  margin: 0;
  font-size: 0.9rem;
  background: rgba(255, 95, 109, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 95, 109, 0.1);
}

[data-theme="dark"] nav.breadcrumb ol {
  background: rgba(255, 122, 168, 0.14);
  border-color: rgba(34, 211, 238, 0.18);
}

nav.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav.breadcrumb li:not(:last-child)::after {
  content: "›";
  color: var(--text-light);
  font-weight: 400;
  font-size: 1.1rem;
}

nav.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

nav.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

nav.breadcrumb li:last-child span {
  color: var(--text-dark);
  font-weight: 400;
}

[data-theme="dark"] nav.breadcrumb li:last-child span {
  color: var(--text-light);
}

/* Article Tags */
.article-tags {
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-tags strong {
  display: block;
  margin-bottom: 12px;
  color: var(--dark);
  font-size: 1.1rem;
}

.article-tags a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  margin: 4px 6px 4px 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255, 95, 109, 0.15) 100%);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255, 95, 109, 0.2);
}

.article-tags a:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 95, 109, 0.3);
}

[data-theme="dark"] .article-tags a {
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.28) 0%, rgba(34, 211, 238, 0.25) 100%);
  color: #fecdd3;
  border-color: rgba(255, 122, 168, 0.3);
}

[data-theme="dark"] .article-tags a:hover {
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.9) 0%, rgba(249, 115, 22, 0.9) 45%, rgba(34, 211, 238, 0.9) 100%);
  color: white;
}

/* Article Share */
.article-share {
  margin: 24px 0;
  padding: 20px 0;
}

.article-share strong {
  display: block;
  margin-bottom: 12px;
  color: var(--dark);
  font-size: 1.1rem;
}

.article-share a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  margin-right: 12px;
  margin-bottom: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-share a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

.article-share a i {
  font-size: 1.1rem;
}

/* Twitter */
.article-share a[href*="twitter"]:hover {
  background: #1DA1F2;
  color: white;
  border-color: #1DA1F2;
}

/* LinkedIn */
.article-share a[href*="linkedin"]:hover {
  background: #0077B5;
  color: white;
  border-color: #0077B5;
}

/* Facebook */
.article-share a[href*="facebook"]:hover {
  background: #1877F2;
  color: white;
  border-color: #1877F2;
}

/* Hacker News */
.article-share a[href*="news.ycombinator"]:hover {
  background: #FF6600;
  color: white;
  border-color: #FF6600;
}

/* Related Articles */
.related-articles {
  margin: 32px 0;
  padding: 24px;
  background: rgba(255, 95, 109, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.related-articles h3 {
  margin: 0 0 16px 0;
  color: var(--primary);
  font-size: 1.3rem;
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-articles li {
  padding-left: 0;
}

.related-articles a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.related-articles a::before {
  content: "→";
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.related-articles a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.related-articles a:hover::before {
  transform: translateX(4px);
}

[data-theme="dark"] .related-articles {
  background: rgba(255, 122, 168, 0.14);
  border-color: rgba(34, 211, 238, 0.2);
}

/* FAQ Section Styling */
#faq h3 {
  color: var(--primary);
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

#faq h3:first-of-type {
  margin-top: 0;
}

#faq p, #faq ul {
  margin-bottom: 16px;
}

/* Improve code block readability */
.blog-entry pre code {
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Responsive improvements for SEO elements */
@media (max-width: 768px) {
  nav.breadcrumb {
    margin-bottom: 20px;
    padding: 0 16px;
  }
  
  nav.breadcrumb ol {
    font-size: 0.85rem;
    padding: 10px 16px;
  }
  
  nav.breadcrumb li:not(:last-child)::after {
    font-size: 1rem;
  }
  
  .article-tags,
  .article-share {
    padding: 16px 0;
  }
  
  .article-share a {
    padding: 8px 14px;
    font-size: 0.9rem;
    margin-right: 8px;
  }
  
  .related-articles {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  nav.breadcrumb {
    padding: 0 8px;
  }
  
  nav.breadcrumb ol {
    padding: 8px 12px;
  }
  
  nav.breadcrumb li:last-child span {
    font-size: 0.8rem;
  }
  
  .article-share a {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-right: 0;
  }
  
  .article-tags a {
    font-size: 0.85rem;
    padding: 5px 12px;
  }
}
