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

:root {
  --bg-primary: #0a192f;
  --bg-secondary: #112240;
  --bg-tertiary: #1a2f4a;
  --text-primary: #ccd6f6;
  --text-secondary: #8892b0;
  --accent-primary: #00d9ff;
  --accent-secondary: #00ff88;
  --border-color: #233554;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Added particles background styling */
.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}

/* Ensure content appears above particles */
.language-switcher,
.sidebar,
.main-content {
  position: relative;
  z-index: 10;
}

/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  min-height: 44px;
  min-width: 44px;
}

.lang-btn:hover {
  color: var(--accent-primary);
}

.lang-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 3rem 2rem;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.profile {
  text-align: center;
}

.profile-image {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  color: var(--accent-primary);
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.title {
  font-size: 1.125rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Navigation */
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent-primary);
  transition: var(--transition);
  border-radius: 0 3px 3px 0;
}

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

.nav-link.active::before {
  height: 100%;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none; /* Added for ul/li semantic elements */
}

.social-links li {
  /* Added for ul/li semantic elements */
  display: flex;
  align-items: center;
}

.social-link {
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex; /* Added for better alignment with icons */
  align-items: center; /* Added for better alignment with icons */
  justify-content: center; /* Added for better alignment with icons */
}

.social-link:hover {
  color: var(--accent-primary);
  transform: translateY(-3px);
}

/* Main Content */
.main-content {
  margin-left: 320px;
  padding: 4rem 6rem;
  max-width: 1400px;
}

.section {
  margin-bottom: 8rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.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:nth-child(5) {
  animation-delay: 0.5s;
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-number {
  font-size: 1.25rem;
  color: var(--accent-primary);
  font-weight: 600;
  font-family: "Courier New", monospace;
}

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

/* About Section */
.about-content {
  max-width: 900px;
}

.lead {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.interests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.interest-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.interest-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

.interest-icon {
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.interest-card h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.interest-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.skill-category h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none; /* Added for ul/li semantic elements */
}

.skill-tag {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-tag:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

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

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

.timeline-date {
  color: var(--accent-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-family: "Courier New", monospace;
}

.timeline-content h3 {
  color: var(--text-primary);
  font-size: 1.375rem;
  margin-bottom: 0.25rem;
}

.company {
  color: var(--accent-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

.project-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 40px rgba(0, 217, 255, 0.15);
}

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

.project-icon {
  color: var(--accent-primary);
}

.project-link {
  color: var(--text-secondary);
  transition: var(--transition);
}

.project-link:hover {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.project-card h3 {
  color: var(--text-primary);
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

/* Added certifications grid styling */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

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

.cert-header h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 0;
}

.cert-issuer {
  background: var(--bg-tertiary);
  color: var(--accent-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.cert-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Contact Section */
.contact-content {
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
}

.contact-text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-button {
  display: inline-block;
  background: transparent;
  color: var(--accent-primary);
  padding: 1.25rem 2.5rem;
  border: 2px solid var(--accent-primary);
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  margin-bottom: 3rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-button:hover {
  background: rgba(0, 217, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.contact-item svg {
  color: var(--accent-primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-year {
  margin-top: 0.5rem;
  color: var(--accent-primary);
}

/* Added services link styling in footer */
.services-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
  width: 24px;
  height: 24px;
  border-radius: 0.375rem;
  border: 1px solid transparent;
}

.services-link:hover {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--accent-primary);
  transform: rotate(90deg);
}

.services-link svg {
  width: 100%;
  height: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 280px;
  }

  .main-content {
    margin-left: 280px;
    padding: 3rem 4rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
  }

  .main-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }

  .language-switcher {
    top: 1rem;
    right: 1rem;
  }

  .section {
    margin-bottom: 5rem;
  }

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

  .lead {
    font-size: 1.25rem;
  }

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

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

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

  /* Improved timeline for mobile - smaller circles and adjusted spacing */
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline::before {
    left: -0.25rem;
    width: 1.5px;
  }

  .timeline-item {
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .timeline-item::before {
    left: -1.75rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--border-color);
  }

  .timeline-date {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
  }

  .company {
    font-size: 0.95rem;
  }

  .timeline-content p {
    font-size: 0.95rem;
  }

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

  .cert-header {
    flex-direction: column;
  }

  .cert-issuer {
    align-self: flex-start;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Added sr-only class for screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Improved focus states for keyboard navigation */
.lang-btn:focus-visible,
.nav-link:focus-visible,
.social-link:focus-visible,
.contact-button:focus-visible,
.project-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: prefer-reduced-motion) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Improved performance with will-change */
.nav-link,
.skill-tag,
.project-card,
.interest-card {
  will-change: transform;
}

/* Added print styles */
@media print {
  .language-switcher,
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }

  a {
    text-decoration: underline;
  }
}
