* {
  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(auto-fit, minmax(260px, 1fr));
  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);
}

@media (min-width: 980px) {
  .n-gpt-output-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}


.n-gpt-page .project-hero {
  margin-bottom: 20px;
}

.n-gpt-page .n-gpt-block + .n-gpt-block {
  margin-top: 28px;
}

.n-gpt-hero {
  max-width: 100%;
  margin-bottom: 28px;
}

.n-gpt-hero .project-lead {
  max-width: 100%;
}

.n-gpt-stack > * + * {
  margin-top: 26px;
}

.n-gpt-panel {
  border-radius: 22px;
}

.n-gpt-chat-shell {
  border-radius: 24px;
  padding: 18px;
}

.n-gpt-loader {
  height: 2px;
  width: 100%;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #111 45%, transparent 100%);
  background-size: 200% 100%;
}

.n-gpt-loader.is-active {
  animation: ngptLoading 1s linear infinite;
}

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

.n-gpt-answer-chat {
  min-height: 220px;
  padding: 14px 12px 22px;
  white-space: pre-wrap;
  color: #222;
  line-height: 1.7;
  font-size: 17px;
}

.n-gpt-cursor {
  display: inline-block;
  animation: ngptBlink 1s step-end infinite;
}

@keyframes ngptBlink {
  50% { opacity: 0; }
}

.n-gpt-composer {
  margin-top: 8px;
}

.n-gpt-limit-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f0efe9;
  color: #333;
}

.n-gpt-composer-box {
  border: 1px solid #d8d8d2;
  border-radius: 22px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.03);
}

.n-gpt-input-wrap {
  position: relative;
}

#n-gpt-query {
  width: 100%;
  min-height: 28px;
  max-height: 240px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  line-height: 1.55;
  padding: 6px 8px 30px 8px;
}

#n-gpt-query:disabled,
#n-gpt-captcha-answer:disabled {
  color: #777;
  cursor: not-allowed;
}

.n-gpt-char-count {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 12px;
  color: #777;
}

.n-gpt-composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #edede7;
}

.n-gpt-captcha-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.n-gpt-captcha-label {
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}

#n-gpt-captcha-answer {
  width: 88px;
  padding: 10px 12px;
  border: 1px solid #d8d8d2;
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.n-gpt-send-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.n-gpt-send-btn:hover {
  transform: translateY(-1px);
}

.n-gpt-send-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.n-gpt-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.n-gpt-status {
  text-align: right;
}

.n-gpt-accordion {
  margin-top: 18px;
  border-top: 1px solid #e7e7e1;
  padding-top: 14px;
}

.n-gpt-accordion summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #333;
}

.n-gpt-accordion summary::-webkit-details-marker {
  display: none;
}

.n-gpt-accordion summary::after {
  content: "▾";
  float: right;
  color: #777;
}

.n-gpt-accordion[open] summary::after {
  content: "▴";
}

.n-gpt-logs-box {
  min-height: 220px;
  max-height: 420px;
  margin: 14px 0 0;
  padding: 18px 20px;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 16px;
  background: #0d1117;
  border: 1px solid #1f2937;
  color: #b7f7b7;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .n-gpt-composer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .n-gpt-captcha-inline {
    width: 100%;
  }

  .n-gpt-send-btn {
    align-self: flex-end;
  }

  .n-gpt-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .n-gpt-status {
    text-align: left;
  }

  .n-gpt-answer-chat {
    min-height: 180px;
    font-size: 15px;
  }
}
