* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #111;
  background: #f7f7f5;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 247, 245, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e5e0;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  flex: 0 0 auto;
}

.nav-brand a {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

.nav-brand span {
  font-weight: 400;
  color: #666;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: #444;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #000;
}

main {
  width: 100%;
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 56px;
  align-items: start;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 16px;
  color: #666;
}

.hero-content h1 {
  margin: 0;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 14px 0 28px;
  font-size: 22px;
  color: #333;
  font-weight: 600;
}

.description p {
  margin: 0 0 16px;
  font-size: 17px;
  color: #222;
}

.description ul {
  margin: 0 0 18px 20px;
  padding: 0;
}

.description li {
  margin-bottom: 10px;
  font-size: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 24px;
}

.social-links a,
.articles-more a {
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 10px 14px;
  border: 1px solid #d8d8d2;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.social-links a:hover {
  transform: translateY(-1px);
  border-color: #999;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}

.stack-icons img {
  width: 28px;
  height: 28px;
  opacity: 0.95;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-note {
  margin: -4px 0 24px;
  color: #555;
  font-size: 16px;
}

.card {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 20px;
  padding: 24px 26px;
}

.card p {
  margin: 0 0 12px;
}

.card p:last-child {
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 260px));
  gap: 24px;
}

.project-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

.project-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.project-card-content {
  padding: 18px 18px 22px;
}

.project-card-content h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.project-card-content p {
  margin: 0;
  color: #555;
  font-size: 15px;
}

.article-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.articles-more {
  margin-top: 22px;
}

.articles-more a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #d8d8d2;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.articles-more a:hover {
  transform: translateY(-1px);
  border-color: #999;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 16px;
  padding: 18px 20px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.article-item:hover {
  transform: translateX(3px);
  border-color: #bbb;
}

.article-title {
  font-size: 17px;
}

.article-arrow {
  font-size: 20px;
  color: #777;
}

.site-footer {
  width: 100%;
  margin-top: 24px;
  padding: 36px 24px 44px;
  border-top: 1px solid #ddd;
  background: transparent;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-inner p {
  margin: 0 0 10px;
  color: #444;
}

.footer-inner a {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }

  .hero-photo {
    max-width: 460px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .subtitle {
    font-size: 20px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 16px 22px;
  }

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

@media (max-width: 640px) {
  .hero,
  .section,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .description p,
  .description li {
    font-size: 15px;
  }

  .section h2 {
    font-size: 24px;
  }
}

.articles-page h1,
.article-header h1,
.project-hero-content h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.article-page {
  padding: 40px 24px 48px;
}

.article-container {
  max-width: 820px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: #555;
  font-size: 14px;
}

.back-link:hover {
  color: #111;
}

.article-header {
  margin-bottom: 32px;
}

.article-lead,
.project-lead {
  margin: 0 0 10px;
  font-size: 18px;
  color: #444;
}

.article-date {
  margin: 0;
  font-size: 14px;
  color: #777;
}

.article-content {
  font-size: 17px;
  color: #222;
}

.article-content h2 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1.2;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px 22px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content pre {
  margin: 20px 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: #111;
  color: #f4f4f4;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.article-content code {
  font-family: Consolas, Monaco, monospace;
}

.article-bottom-nav {
  margin-top: 36px;
}

.article-bottom-nav a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #d8d8d2;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
}

.project-page {
  padding-top: 40px;
}

.project-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 32px;
}

.project-hero-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

.project-details h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
}

.project-details h2:not(:first-child) {
  margin-top: 28px;
}

@media (max-width: 980px) {
  .project-hero {
    grid-template-columns: 1fr;
  }

  .articles-page h1,
  .article-header h1,
  .project-hero-content h1 {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .article-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .article-content {
    font-size: 15px;
  }

  .article-content h2 {
    font-size: 24px;
  }
}

.social-links a,
.articles-more a {
  position: relative;
  overflow: hidden;
}

/* блик кнопок, 3s это скорость блика*/
.social-links a::after,
.articles-more a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 50%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.0) 20%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.0) 80%,
    transparent 100%
  ); 
  transform: skewX(-20deg);
  animation: socialShine 3s ease-in-out infinite;
}

.social-links a:hover::after,
.articles-more a:hover::after {
  animation-duration: 1.6s;
}

/* скорость бегунка по кнопкам */
@keyframes socialShine {
  0% {
    left: -140%;
  }
  70% {
    left: 140%;
  }
  100% {
    left: 140%;
  }
}

/* усиление при наведении */
.social-links a:hover::after,
.articles-more a:hover::after {
  animation-duration: 1.2s;
  opacity: 0.6;
}

.social-links a,
.articles-more a {
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.social-links a:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}