body {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.header {
  grid-area: header;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  grid-column: 1;
  font-size: 1.5rem;
  font-weight: bold;
}

.logo span {
  color: #007bff;
}

.hamburger {
  grid-column: 3;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 3px;
}

.nav-links {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  justify-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #007bff;
}

main {
  grid-area: main;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero {
  background-color: #f8f9fa;
  padding: 4rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.highlight {
  color: #007bff;
}

.hero-text p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-group {
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-outline {
  border: 2px solid #007bff;
  color: #007bff;
}

.btn-outline:hover {
  background-color: #007bff;
  color: white;
}

.college-badge {
  font-size: 0.9rem;
  color: #666;
}

.hero-avatar {
  display: grid;
  justify-content: center;
}

.avatar-placeholder {
  width: 200px;
  height: 200px;
  background-color: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

section {
  padding: 4rem 0;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

#about p,
#education div {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

#education div {
  margin-bottom: 1rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
}

@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form button {
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form button:hover {
  background-color: #0056b3;
}

.social-links {
  display: grid;
  gap: 1rem;
}

.social-links a {
  display: block;
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
}

footer {
  grid-area: footer;
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1.5rem 0;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hamburger {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-avatar {
    justify-content: center;
  }
}

.skills {
  background-color: #f8f9fa;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skills-category h3 {
  margin-bottom: 1.5rem;
  color: #007bff;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-item span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

progress {
  width: 100%;
  height: 12px;
  border: none;
  border-radius: 6px;
  background-color: #e9ecef;
}

progress::-webkit-progress-bar {
  background-color: #e9ecef;
  border-radius: 6px;
}

progress::-webkit-progress-value {
  background-color: #007bff;
  border-radius: 6px;
}

progress::-moz-progress-bar {
  background-color: #007bff;
  border-radius: 6px;
}

.skill-item small {
  display: block;
  text-align: right;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.9rem;
}

/* Проекты */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  color: #007bff;
  margin-bottom: 0.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Образование */
.timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  background-color: #007bff;
  border-radius: 50%;
}

/* Достижения */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.achievement-card h3 {
  color: #007bff;
  margin-bottom: 1rem;
}

/* Тёмная тема */
body.dark-theme {
  color: #e9ecef;
  background-color: #1a1a1a;
}

body.dark-theme .header {
  background-color: #2d2d2d;
  color: #e9ecef;
}

body.dark-theme .hero {
  background-color: #2d2d2d;
}

body.dark-theme .nav-links a {
  color: #e9ecef;
}

body.dark-theme .nav-links a:hover {
  color: #4da6ff;
}

body.dark-theme .btn-outline {
  border: 2px solid #4da6ff;
  color: #4da6ff;
}

body.dark-theme .btn-outline:hover {
  background-color: #4da6ff;
  color: #1a1a1a;
}

body.dark-theme footer {
  background-color: #0d0d0d;
}

body.dark-theme .project-card {
  background: #2d2d2d;
  color: #e9ecef;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
  background-color: #404040;
  color: #e9ecef;
  border: 1px solid #555;
}

/* Кнопки */
.btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #0056b3;
}

/* Тема и резюме */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
}

#downloadResume {
  padding: 0.5rem 1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-content {
    gap: 2rem;
  }
}

.project-card__image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}