:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
}

[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e0;
  --text-tertiary: #a0aec0;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --border: #2d3748;
  --shadow: rgba(0, 0, 0, 0.3);
  --card-bg: #1a1a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  position: relative;
}

/* Abstract Background */
.abstract-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
}

/* Grid Pattern */
.abstract-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

/* Geometric Shapes */
.abstract-shape {
  position: absolute;
  border: 2px solid var(--border);
  opacity: 0.2;
}

.shape-1 {
  width: 200px;
  height: 200px;
  border: 2px solid var(--accent);
  top: 10%;
  left: 5%;
  transform: rotate(45deg);
  animation: rotate 20s linear infinite;
}

.shape-1::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent);
}

.shape-2 {
  width: 150px;
  height: 150px;
  border: 2px solid var(--accent);
  top: 60%;
  right: 10%;
  transform: rotate(15deg);
  animation: rotate 25s linear infinite reverse;
}

.shape-2::before,
.shape-2::after {
  content: '';
  position: absolute;
  border: 1px solid var(--accent);
}

.shape-2::before {
  top: -10px;
  left: -10px;
  width: 50px;
  height: 50px;
}

.shape-2::after {
  bottom: -10px;
  right: -10px;
  width: 50px;
  height: 50px;
}

.shape-3 {
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent);
  bottom: 15%;
  left: 15%;
  transform: rotate(-30deg);
  animation: rotate 30s linear infinite;
}

.shape-3::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 60px;
  height: 60px;
  border: 1px solid var(--accent);
}


/* Diagonal Lines */
.abstract-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      var(--border) 2px,
      var(--border) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      var(--border) 2px,
      var(--border) 4px
    );
  opacity: 0.1;
}

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

/* Dark mode abstract background */
[data-theme="dark"] .abstract-background {
  opacity: 0.3;
}

[data-theme="dark"] .abstract-background::before {
  opacity: 0.2;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
}

[data-theme="dark"] .abstract-shape {
  opacity: 0.25;
  border-color: var(--accent);
}

[data-theme="dark"] .abstract-background::after {
  opacity: 0.15;
}

/* Ensure content is above background */
nav,
section,
footer {
  position: relative;
  z-index: 1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="dark"] nav {
  background: rgba(10, 10, 10, 0.95);
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.theme-toggle:hover::before {
  width: 100%;
  height: 100%;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: rotate(15deg) scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.theme-toggle i {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.theme-toggle:hover i {
  color: var(--accent);
  transform: scale(1.1);
}

/* Dark mode specific styling */
[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border-color: #3a3a3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
  background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-toggle i {
  color: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.5));
}

[data-theme="dark"] .theme-toggle:hover i {
  color: #fcd34d;
  filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.8));
  transform: scale(1.15) rotate(15deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
  z-index: 1;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  z-index: 0;
}

.code-line {
  position: absolute;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100vw);
  }
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  text-align: left;
  position: relative;
  z-index: 1;
  padding-left: 2rem;
}

.hero-greeting {
  font-size: clamp(1.5rem, 1.3vw, 1.1rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 400;
  animation: fadeInUp 0.8s ease;
}

.hero-greeting span {
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2.2rem, 6.5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title .title-part-1 {
  color: var(--accent);
  font-size: 1em;
  display: block;
  font-weight: 800;
}

.hero-title .title-part-2 {
  font-size: 0.45em;
  color: var(--text-secondary);
  display: block;
  font-weight: 500;
  margin-top: 0.25rem;
}

.hero-description {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero .summary_mobile {
  display: none;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary-dark {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 2px solid var(--text-primary);
}

.btn-primary-dark:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-secondary-light {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary-light:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

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

/* Section Styles */
section:not(.hero) {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 80px;
  min-height: auto;
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Reduce spacing for specific sections */
#projects,
#publications,
#blog {
  padding-bottom: 3rem;
  min-height: auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 2px;
}

/* About Section */
#about {
  padding: 10rem 2rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  text-align: center;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 10px 30px var(--shadow);
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.about-text {
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Experience Section */
.experience-timeline {
  position: relative;
  padding-left: 2rem;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.experience-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 3rem;
}

.experience-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent);
}

.experience-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.experience-card:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 30px var(--shadow);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.experience-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.experience-company {
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

.experience-duration {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.project-item {
  margin-bottom: 2rem;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.company-logo-small {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.8;
  vertical-align: middle;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.achievements-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.achievements-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
}

.achievements-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Awards Section in Experience */
.awards-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.awards-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.awards-title i {
  color: var(--accent);
}

.award-item {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.award-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.award-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.project-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.wip-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent-hover);
  transform: translateX(5px);
}

/* Skills Section */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.skill-item {
  background: var(--card-bg);
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px var(--shadow);
}

.skill-item:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
  border-color: var(--accent);
}

.skill-item i {
  font-size: 1.1rem;
}

/* Education, Awards, Publications */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
}

.info-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.info-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.info-card-subtitle {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-card-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.info-card-link:hover {
  color: var(--accent-hover);
}

/* Blog Section */
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.blog-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 0;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.blog-card p {
  margin: 0;
  max-width: 600px;
}

.blog-card .btn {
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

/* Contact Section */
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.contact-items-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.contact-item:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.contact-item i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.contact-item:hover i {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.contact-item span {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-word;
}

.contact-info .social-icons {
  justify-content: center;
  margin-top: 0.5rem;
  gap: 0.75rem;
}


/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  animation: bounce 2s infinite;
}

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

.scroll-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.scroll-to-top i {
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

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

  .experience-timeline {
    padding-left: 1rem;
  }

  .experience-item {
    padding-left: 2rem;
  }

  /* Font size adjustments for mobile */
  body {
    font-size: 0.9rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .hero .role {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  }

  .hero .summary, .hero .summary_mobile {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 2rem;
  }

  .about-text p {
    font-size: 0.95rem;
  }

  .experience-title {
    font-size: 1.2rem;
  }

  .experience-company {
    font-size: 0.95rem;
  }

  .experience-duration {
    font-size: 0.85rem;
  }

  .project-name {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.9rem;
  }

  .achievements-list li {
    font-size: 0.9rem;
  }

  .skill-item {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  .info-card-title {
    font-size: 1.1rem;
  }

  .info-card-subtitle {
    font-size: 0.95rem;
  }

  .info-card-text {
    font-size: 0.9rem;
  }

  .blog-icon {
    font-size: 2.5rem;
  }

  .contact-item {
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .footer-tagline {
    font-size: 1rem;
  }

  .footer-copyright {
    font-size: 0.85rem;
  }

  section:not(.hero) {
    padding: 2rem 1rem;
    padding-bottom: 3rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  /* Reduce spacing for specific sections on mobile */
  #projects,
  #publications,
  #blog {
    padding-bottom: 2rem;
    min-height: auto;
  }

  #about {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .hero {
    min-height: 100vh;
    padding: 4.5rem 1rem 2rem;
    max-height: 100vh;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    padding: 0 1rem;
    padding-left: 1.5rem;
  }

  .hero-greeting {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    margin-bottom: 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.6rem, 6.5vw, 2.8rem);
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .hero-description {
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    margin-bottom: 1.5rem;
    max-width: 100%;
  }

  .hero-buttons {
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }

  .about-content {
    gap: 1.5rem;
  }

  .profile-img {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }

  .social-icons {
    gap: 0.75rem;
  }

  .social-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .experience-item {
    margin-bottom: 1.5rem;
  }

  .experience-card {
    padding: 1.25rem;
  }

  .experience-header {
    margin-bottom: 0.75rem;
  }

  .project-item {
    margin-bottom: 1.25rem;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .company-logo-small {
    width: 48px;
    height: 48px;
  }

  .project-description {
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .achievements-list {
    margin-top: 0;
    padding-left: 0;
  }

  .achievements-list li {
    padding: 0.4rem 0;
    padding-left: 1.75rem;
    line-height: 1.5;
    margin-left: 0;
  }

  .achievements-list li::before {
    left: 0.25rem;
  }

  .awards-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .awards-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .award-item {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
  }

  .award-name {
    font-size: 0.95rem;
  }

  .award-description {
    font-size: 0.85rem;
  }

  .projects-grid {
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.25rem;
  }

  .project-header {
    margin-bottom: 0.75rem;
  }

  .tech-stack {
    gap: 0.4rem;
    margin: 0.75rem 0;
  }

  .tech-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .project-links {
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  .skills-container {
    gap: 0.75rem;
  }

  .info-cards {
    gap: 1.25rem;
  }

  .info-card {
    padding: 1.25rem;
  }

  .info-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }

  .blog-card {
    padding: 1.5rem;
    gap: 0.75rem;
  }

  .blog-card h3 {
    font-size: 1.1rem;
  }

  .blog-icon {
    font-size: 2.5rem;
    margin-bottom: 0;
  }

  .blog-card .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
  }

  .contact-container {
    gap: 1.5rem;
  }

  .contact-info {
    gap: 1.5rem;
    flex-direction: column;
  }

  .contact-item {
    gap: 0.75rem;
  }

  .contact-item:hover {
    transform: translateX(3px);
  }

  .contact-item i {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .contact-item span {
    font-size: 0.85rem;
  }

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

  .form-group textarea {
    min-height: 100px;
  }

  footer {
    padding: 2rem 1rem;
  }

  .footer-tagline {
    margin-bottom: 0.75rem;
  }

  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .scroll-to-top i {
    font-size: 1rem;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children animations */
.fade-in.visible .skill-item,
.fade-in.visible .project-card,
.fade-in.visible .info-card,
.fade-in.visible .experience-item {
  opacity: 0;
  animation: staggerFadeUp 0.5s ease forwards;
}

.fade-in.visible .skill-item { animation-delay: calc(var(--i, 0) * 0.04s); }
.fade-in.visible .project-card { animation-delay: calc(var(--i, 0) * 0.12s); }
.fade-in.visible .info-card { animation-delay: calc(var(--i, 0) * 0.12s); }
.fade-in.visible .experience-item { animation-delay: calc(var(--i, 0) * 0.15s); }

@keyframes staggerFadeUp {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Skill item magnetic hover */
.skill-item {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-item:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
  border-color: var(--accent);
}

/* Project card enhanced hover */
.project-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px var(--shadow);
}

/* Experience card slide animation */
.experience-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.experience-card:hover {
  transform: translateX(10px);
  box-shadow: 0 15px 40px var(--shadow);
  border-color: var(--accent);
}

/* Profile image pulse glow */
.profile-img {
  transition: all 0.4s ease;
  animation: subtlePulse 3s ease-in-out infinite;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4), 0 10px 30px var(--shadow);
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2), 0 10px 30px var(--shadow); }
  50% { box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.15), 0 10px 30px var(--shadow); }
}

/* Section title reveal */
.fade-in.visible .section-title {
  animation: titleReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: -0.05em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: normal;
  }
}

/* Social icon bounce on hover */
.social-icon {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.1);
}

/* Blog card float */
.blog-card {
  transition: all 0.4s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px var(--shadow);
  border-color: var(--accent);
}

/* Nav link active indicator animation */
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  width: 100%;
}

/* Smooth text gradient animation for hero title */
.hero-title .title-part-1 {
  background: linear-gradient(135deg, var(--accent), #8b5cf6, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Contact item hover ripple */
.contact-item {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-item:hover {
  transform: translateX(5px);
}

/* Info card tilt on hover */
.info-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent);
}
