:root {
  --primary-color: #223969;
  --text-color: #333;
  --text-light: #666;
  --background-color: #fff;
  --border-color: #e0e0e0;
  --focus-color: #0066cc;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --border-radius: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  font-size: 1rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-weight: bold;
}

.skip-link:focus {
  top: 6px;
}

*:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-lg) 0;
}

.profile-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(34, 57, 105, 0.3);
}

.contact-info h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.social-links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: var(--spacing-xs);
  padding: 0;
  margin: 0;
  align-items: center;
}

.social-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: block;
  padding: var(--spacing-xs) 0;
}

.social-links a:hover,
.social-links a:focus {
  color: var(--text-color);
  text-decoration: underline;
}

.social-links a:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Social links alignment fix */
.link-container {
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-link-item {
  margin-bottom: 8px;
}

.icon-link-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
}
.main {
  padding: var(--spacing-xl) 0;
}

.about-section,
.projects-section {
  margin-bottom: var(--spacing-xl);
}

.about-section h2,
.projects-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.about-section p {
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-light);
}

.projects-list {
  list-style: none;
  margin-top: var(--spacing-lg);
}

.projects-list li {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.projects-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.projects-list h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.projects-list p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }

  .profile-section {
    grid-template-columns: auto 1fr;
    gap: var(--spacing-xl);
  }

  .avatar {
    width: 150px;
    height: 150px;
  }

  .avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 57, 105, 0.4);
  }

  .contact-info h1 {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .about-section p {
    font-size: 1.2rem;
  }
}

@media (max-width: 767px) {
  .profile-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-md);
  }

  .avatar {
    width: 100px;
    height: 100px;
    justify-self: center;
  }

  .contact-info h1 {
    font-size: 2rem;
  }

  .social-links ul {
    justify-content: center;
  }
}

@media (prefers-contrast: high) {
  :root {
    --text-color: #000;
    --text-light: #333;
    --border-color: #000;
  }

  .social-links a {
    font-weight: bold;
  }
}

@media (min-resolution: 2dppx) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --border-color: #404040;
  }
}

.language-switcher {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
}

.lang-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.lang-btn:hover,
.lang-btn:focus {
  background: var(--text-color);
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .language-switcher {
    position: static;
    text-align: center;
    margin-top: var(--spacing-sm);
  }
}
