html { scroll-behavior: smooth; }
.project-card { will-change: transform, box-shadow; }
.projects-section, .contact-section, .stats-section { max-width: 1200px; margin: 0 auto; }
@media (min-width: 1200px) {
  .projects-grid { gap: 40px; }
  .project-info p, .contact-section, .stat { max-width: 700px; margin-left: auto; margin-right: auto; }
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: #111;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  /* Optimize rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}



.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 40px);
  z-index: 0;
  animation: overlayMove 10s linear infinite;
}

@keyframes overlayMove {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

header {
  text-align: center;
  padding: 60px 20px 30px 20px;
  position: relative;
  z-index: 1;
}
.logo {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: 0 4px 32px #000, 0 1px 0 #fff2;
  animation: fadeInDown 1.2s cubic-bezier(.77,0,.18,1) 0.2s both;
}
.subtitle {
  font-size: 1.3rem;
  color: #bbb;
  margin-top: 10px;
  letter-spacing: 0.1em;
  animation: fadeInDown 1.2s cubic-bezier(.77,0,.18,1) 0.5s both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

.projects-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 0 20px;
  position: relative;
  z-index: 1;
}
.projects-section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: 0.1em;
  color: #fff;
  animation: fadeIn 1.2s 0.7s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}
.project-card {
  background: #181818cc;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px #000a, 0 1.5px 0 #fff1;
  transition: transform 0.4s cubic-bezier(.77,0,.18,1), box-shadow 0.4s;
  cursor: pointer;
  position: relative;
  animation: cardAppear 1.2s cubic-bezier(.77,0,.18,1) both;
}
.project-card:hover {
  transform: translateY(-12px) scale(1.03) rotate(-1deg);
  box-shadow: 0 16px 48px #000c, 0 2px 0 #fff2;
}
@keyframes cardAppear {
  from { opacity: 0; transform: scale(0.95) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.5s, transform 0.5s;
}
.project-card img:hover {
  filter: grayscale(0.2) contrast(1.2) brightness(1.1);
  transform: scale(1.08);
}
.project-info {
  padding: 22px 18px 18px 18px;
}
.project-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}
.project-info p {
  margin: 0;
  color: #bbb;
  font-size: 1rem;
}
.project-info a {
  text-decoration: none;
  color: inherit;
}
.project-info a:hover h3 {
  text-decoration: underline;
}
.order-btn {
  max-width: 340px;
  width: 100%;
  min-width: 180px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 60px auto;
  padding: 18px 48px;
  background: linear-gradient(90deg, #4FC3F7 0%, #1976D2 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  border-radius: 32px;
  text-decoration: none;
  box-shadow: 0 4px 32px #0005;
  letter-spacing: 0.1em;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.2s 1.2s both;
  overflow: hidden;
}

.order-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}
.order-btn:hover {
  background: linear-gradient(90deg, #1976D2 0%, #0D47A1 100%);
  color: #fff;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 40px rgba(25, 118, 210, 0.3), 0 8px 32px #000a;
  letter-spacing: 0.15em;
}

.order-btn:hover::before {
  left: 100%;
}

.order-btn:active {
  transform: scale(1.02) translateY(0);
  box-shadow: 0 6px 24px rgba(25, 118, 210, 0.2), 0 4px 16px #0008;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
footer {
  text-align: center;
  color: #888;
  font-size: 1rem;
  padding: 30px 10px 20px 10px;
  letter-spacing: 0.05em;
  z-index: 1;
  position: relative;
  animation: fadeIn 1.2s 1.5s both;
}

/* Спецэффекты: мерцание, шум */
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 9999;
  opacity: 0.07;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  mix-blend-mode: screen;
  animation: noiseMove 2s steps(2) infinite;
}
@keyframes noiseMove {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* --- СТАТИСТИКА ПОД HEADER --- */
.stats-section {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin: 0 auto 32px auto;
  padding: 24px 0 0 0;
  max-width: 900px;
  z-index: 1;
  position: relative;
}
.stat {
  background: #181818cc;
  border-radius: 16px;
  box-shadow: 0 4px 24px #0006;
  padding: 24px 36px 18px 36px;
  text-align: center;
  min-width: 140px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 8px 32px #000a;
}
.stat-title {
  font-size: 1.1rem;
  color: #bbb;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px #0007;
}
@media (max-width: 700px) {
  .stats-section {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .stat {
    min-width: 0;
    width: 90%;
    padding: 18px 0 12px 0;
  }
}

/* --- КРАТКАЯ ИНФА О ПРОЕКТЕ ПРИ ХОВЕРЕ НА КАРТОЧКУ --- */
.project-image-wrapper {
  position: relative;
}
.project-hint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(24,24,24,0.82);
  color: #fff;
  padding: 7px 18px 7px 14px;
  border-radius: 10px 18px 18px 10px;
  font-size: 1rem;
  box-shadow: 0 2px 12px #0007;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
  z-index: 2;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(10px);
}
.project-card:hover .project-hint {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.project-card {
  /* position: relative; */
}

.projects-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-btn {
  background: #f4f4f4;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
  background: #222;
  color: #fff;
}

/* --- КОНТАКТНАЯ ФОРМА --- */
.contact-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px 60px 20px;
  position: relative;
  z-index: 1;
  animation: fadeIn 1.2s 1.8s both;
}

.contact-section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.1em;
  color: #fff;
}

.contact-subtitle {
  text-align: center;
  color: #bbb;
  font-size: 1.1rem;
  margin-bottom: 48px;
  letter-spacing: 0.05em;
}

.contact-form {
  background: #181818cc;
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px #000a, 0 1.5px 0 #fff1;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  position: relative;
  margin-bottom: 32px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px 20px;
  background: #222;
  border: 2px solid #333;
  border-radius: 16px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-sizing: border-box;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.form-group label {
  position: absolute;
  left: 20px;
  top: 18px;
  color: #888;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  background: #222;
  padding: 0 8px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4FC3F7;
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.1);
  background: #1a1a1a;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 16px;
  font-size: 0.85rem;
  color: #4FC3F7;
  background: #181818cc;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: transparent;
}

.submit-btn {
  width: 100%;
  padding: 18px 48px;
  background: linear-gradient(90deg, #4FC3F7 0%, #1976D2 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.submit-btn:hover {
  background: linear-gradient(90deg, #1976D2 0%, #0D47A1 100%);
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 40px rgba(25, 118, 210, 0.3), 0 8px 32px #000a;
  letter-spacing: 0.15em;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: scale(1.01) translateY(0);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.submit-btn.loading {
  pointer-events: none;
}

.submit-btn.loading span {
  opacity: 0;
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.submit-btn.loading .btn-loader {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Адаптивность для формы */
@media (max-width: 768px) {
  .contact-section {
    padding: 60px 20px 40px 20px;
  }
  
  .contact-form {
    padding: 32px 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 16px 18px;
  }
  
  .form-group label {
    left: 18px;
    top: 16px;
  }
  
  .form-group input:focus + label,
  .form-group textarea:focus + label,
  .form-group input:not(:placeholder-shown) + label,
  .form-group textarea:not(:placeholder-shown) + label {
    left: 14px;
  }
}

/* --- УВЕДОМЛЕНИЯ --- */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #181818cc;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 32px #000a, 0 1.5px 0 #fff1;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.notification-message {
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  flex: 1;
  margin-right: 12px;
}

.notification-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.notification-close:hover {
  color: #fff;
}

.notification-success {
  border-left: 4px solid #4CAF50;
}

.notification-error {
  border-left: 4px solid #f44336;
}

.notification-info {
  border-left: 4px solid #2196F3;
}

@media (max-width: 768px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .notification.show {
    transform: translateY(0);
  }
} 