* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #e8ecf4;
  --secondary-color: #8d8f8f;
  --gradient-color:  #e0e5e7;
  --primary-dark: #1e40af;
  --text-primary: #5d6063;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-hover-secondary: #f2f4f7;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --link-color: #1e40af;
  --link-hover-color: #0d2b7c;
}

.dark-theme {
  --primary-color: #111827;
  --secondary-color: #3a4242;
  --gradient-color:  #1c202a;
  --text-primary: #b9b9bd;
  --text-secondary: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --border-color: #374151;
  --bg-hover-secondary: #2f3d51;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --link-color: #60a5fa;
  --link-hover-color: #93c5fd;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dark-theme input,
.dark-theme textarea,
.dark-theme select {
  background-color: #1f2937;
  color: #f3f4f6;
  border: 1px solid #374151;
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder,
.dark-theme select::placeholder {
  color: #9ca6b5;
}

/* Scrollbar styling for dark theme */
.dark-theme::-webkit-scrollbar,
.dark-theme .tasks-list::-webkit-scrollbar,
.dark-theme .autocomplete-list::-webkit-scrollbar {
  width: 12px;
}

.dark-theme::-webkit-scrollbar-track,
.dark-theme .tasks-list::-webkit-scrollbar-track,
.dark-theme .autocomplete-list::-webkit-scrollbar-track {
  background: #1f2937;
}

.dark-theme::-webkit-scrollbar-thumb,
.dark-theme .tasks-list::-webkit-scrollbar-thumb,
.dark-theme .autocomplete-list::-webkit-scrollbar-thumb {
  background-color: #4b5563;
  border-radius: 6px;
  border: 3px solid #1f2937;
}

.dark-theme::-webkit-scrollbar-thumb:hover,
.dark-theme .tasks-list::-webkit-scrollbar-thumb:hover,
.dark-theme .autocomplete-list::-webkit-scrollbar-thumb:hover {
  background-color: #6b7280;
}

.theme-toggle {
  background: rgba(49, 48, 48, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 16px;
  float: right;
}

.theme-toggle:hover {
  background: rgba(160, 158, 158, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: white;
}

.dark-theme .theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dark-theme .theme-toggle svg {
  color: #f3f4f6;
}

body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

.contacts {
  margin: 24px 0 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.contacts p {
  margin: 8px 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.contacts a {
  color: var(--link-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contacts a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

.dark-theme .contacts {
  background: rgba(31, 41, 55, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .contacts a {
  color: #60a5fa;
}

.dark-theme .contacts a:hover {
  color: #93c5fd;
}

@media (max-width: 768px) {
  .contacts {
    padding: 16px 12px;
    margin: 16px 0 30px;
  }
  
  .contacts p {
    font-size: 0.9rem;
    margin: 6px 0;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--gradient-color) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
  animation: fadeInDown 0.6s ease-out;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.profile-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.6s ease-out 0.2s backwards;
}

.profile-info {
  flex: 1;
  min-width: 250px;
}

.name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.title {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 400;
}

.profile-actions {
  color: var(--text-secondary);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 20px;
  background: rgba(145, 143, 143, 0.15);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.github-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.github-icon {
  width: 20px;
  height: 20px;
}

.section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: backwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.tasks-list {
  list-style: none;
  display: grid;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.task-item {
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.task-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-sm);
  background: var(--bg-hover-secondary);
}

.search-container {
  position: relative;
  margin-bottom: 35px;
}

.search-input-wrapper {
  position: relative;
  width: 40%;
}

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search:hover {
  background: #f0f0f0;
  color: #666;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #007acc;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
}

.dark-theme .autocomplete-list {
  background: #1f2937;
  border: 1px solid #374151;
}

.dark-theme .autocomplete-item {
  border-bottom: 1px solid #374151;
}

.dark-theme .autocomplete-item:last-child {
  border-bottom: none;
}

.dark-theme .autocomplete-item:hover,
.dark-theme .autocomplete-item.highlight {
  background-color: #2f3d51;
}

.dark-theme .highlight-match {
  color: #60a5fa;
}

.autocomplete-list.show {
  display: block;
}

.goto-project-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 12px 0;
  display: inline-block;
}

.goto-project-btn:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Project details expand functionality */
.expand-details-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 12px 0;
  display: inline-block;
}

.expand-details-btn:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-details {
  margin-top: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
}

.project-details.expanded {
  padding: 16px;
  max-height: none;
}

.project-details h2,
.project-details h3 {
  color: var(--text-primary);
  margin: 16px 0 8px 0;
}

.project-details ul {
  padding-left: 20px;
  margin: 8px 0;
}

.project-details li {
  margin: 8px 0;
  line-height: 1.5;
}

.project-details p {
  margin: 8px 0;
  line-height: 1.6;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f5;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlight {
  background-color: #f0f8ff;
}

.highlight-match {
  font-weight: bold;
  color: #007acc;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.skill-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  cursor: pointer;
}

.skill-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.expand-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.expand-btn:hover {
  transform: scale(1.1);
}

.expand-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.skill-card.expanded .expand-icon {
  transform: rotate(180deg);
}

.skill-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.skill-card.expanded .skill-details {
  max-height: 500px;
  opacity: 1;
  margin-top: 16px;
}

.skill-description {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-item {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.project-item > i {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  font-size: 4rem;
}

.project-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.project-image {
  width: 300px;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-item:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 24px;
  flex: 1;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.project-link:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 32px;
}

.timeline-marker {
  position: absolute;
  left: -44px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 4px var(--border-color);
}

.timeline-item.education .timeline-marker {
  background: var(--secondary-color);
}

.timeline-date {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-company {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .project-item {
    flex-direction: column;
  }
  
  .project-image {
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px 4px;
  }
  .hero {
    padding: 24px 8px;
    margin-bottom: 24px;
    flex-direction: column;
  }
  .profile-section {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .profile-image {
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
  }
  .profile-info {
    min-width: 0;
    width: 100%;
  }
  .theme-toggle {
    margin-left: 0;
    float: none;
    align-self: flex-start;
  }
  .section {
    padding: 18px 6px;
    margin-bottom: 18px;
  }
  .section-title {
    font-size: 1.3rem;
    margin-bottom: 18px;
    padding-bottom: 8px;
  }
  .tasks-list {
    max-height: 260px;
    padding-right: 0;
    gap: 20px;
  }
  .task-item {
    font-size: 1rem;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
  }
  .search-input-wrapper {
    width: 100%;
    min-width: 0;
  }
  .search-input {
    font-size: 15px;
    padding: 10px 12px;
  }
  .autocomplete-list {
    font-size: 0.95rem;
    left: 0;
    right: 0;
    min-width: 0;
  }
  .portfolio-list {
    gap: 18px;
  }
  .project-item {
    flex-direction: column;
    min-width: 0;
    align-items: stretch;
    padding: 0;
  }
  .project-item > i {
    min-width: 0;
    font-size: 2.2rem;
    padding: 12px 0 0 0;
    align-self: flex-start;
  }  
  .project-content {
    padding: 10px 6px 12px 6px;
  }
  .project-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .project-description {
    font-size: 0.98rem;
    margin-bottom: 8px;
  }
  .expand-details-btn,
  .goto-project-btn {
    font-size: 0.95rem;
    padding: 7px 12px;
    margin: 8px 0;
  }
  .project-details {
    padding: 0 4px;
    font-size: 0.97rem;
  }
}
.container {
  padding: 24px 16px;
}

.hero {
  padding: 32px 24px;
}

.name {
  font-size: 2rem;
}

.title {
  font-size: 1.25rem;
}

.section-title {
  font-size: 1.5rem;
}

.skills-grid,
.portfolio-grid {
  grid-template-columns: 1fr;
}

.timeline {
  padding-left: 24px;
}

.timeline-item {
  padding-left: 20px;
}

.timeline-marker {
  left: -32px;
}

.project-image {
  width: 100%;
  height: 220px;
}