:root {
  --primary: #1f7093;
  --secondary: #0f445b;
  --accent: #e98e29;
  --text: #7eb6cf;
  --text-secondary: #59abcf;
  --light: #eff6ff;
  --dark: #0d350a62;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Calibre', 'Inter', sans-serif;
}

body {
  background-color: var(--primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Анимация фона */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: var(--secondary);
  animation: float 15s infinite ease-in-out;
}

.circle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 20%;
  left: 10%;
}

.circle:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: 15%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Навигация */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  background-color: var(--primary);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  z-index: 1002;
}

#theme-toggle {
  box-sizing: border-box;
  padding: 0.6vh;
  border-radius: 8px;
  border: 1 solid;
  background: rgba(131, 255, 100, 0.001);
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 18px;
}

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

.main {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.main h4 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 20px;
}

.main h1 {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 700;
  margin-bottom: 10px;
}

.main h3 {
  font-size: clamp(20px, 4vw, 40px);
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.main p {
  max-width: 600px;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s;
  cursor: pointer;
}

.btn:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Проекты */
.projects {
  padding: 100px 0;
}

.projects h2 {
  font-size: 32px;
  margin-bottom: 50px;
  position: relative;
}

.projects h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--secondary);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-img {
  height: 200px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-bottom: 10px;
  color: var(--light);
}

.project-info p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tech-list span {
  font-size: 14px;
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-links a {
  color: var(--light);
  font-size: 20px;
  transition: color 0.3s;
}

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

/* Обо мне */
.about {
  padding: 100px 0;
  background: var(--secondary);
}

.about h2 {
  font-size: 32px;
  margin-bottom: 50px;
  position: relative;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--accent);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 20px;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  list-style-type: none;
}

.skills-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
}

.skills-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-img {
  flex: 1;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Контакты */
.contact {
  padding: 100px 0;
}

.contact h2 {
  font-size: 32px;
  margin-bottom: 50px;
  position: relative;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--text);
}

.contact-info i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-links a {
  color: var(--text);
  font-size: 24px;
  transition: color 0.3s;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  background: var(--secondary);
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Футер */
footer {
  padding: 20px 0;
  background: var(--secondary);
  text-align: center;
}

footer p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Adapt */
@media (max-width: 768px) {
  .menu {
      position: fixed;
      top: 80px;
      left: 0;
      width: 100%;
      background: var(--primary);
      flex-direction: column;
      align-items: center;
      padding: 20px 0;
      gap: 20px;
      transform: translateY(-150%);
      transition: transform 0.3s ease;
  }

  .menu.active {
      transform: translateY(0);
  }

  .hamburger {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 30px;
      height: 30px;
      cursor: pointer;
      z-index: 1001;
      border: 0;
      background-color: rgba(131, 255, 100, 0.01);
  }

  .hamburger .bar {
      width: 100%;
      height: 10px;
      background: var(--text);
      margin: 3px 0;
      transition: all 0.3s;
  }

  .hamburger.active .bar:nth-child(1) {
      transform: translateY(5px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
      opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
      transform: translateY(-5px) rotate(-45deg);
  }

  .about-content {
      flex-direction: column;
  }

  .about-img {
      order: -1;
  }

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

/* Тёмная/светлая тема */
body.light-mode {
  --primary: #f8f9fa;
  --secondary: #e9ecef;
  --accent: #0077b6;
  --text: #212529;
  --text-secondary: #495057;
  --light: #343a40;
  --dark: #dee2e6;
}