/* ===== База ===== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #232834;
  color: #e9e7e0;
  font-family: 'Golos Text', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #f0b478;
  text-decoration: none;
}

a:hover {
  color: #f6c896;
}

::selection {
  background: #f0b478;
  color: #241d12;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #f0b478;
  outline-offset: 3px;
  border-radius: 6px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fc9a4;
}

/* ===== Header ===== */
.site-header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #9ba3b4;
}

.logo-brand {
  color: #f0b478;
}

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-nav a {
  color: #9ba3b4;
  transition: color .15s;
}

.site-nav a:hover {
  color: #f0b478;
}

/* ===== Hero ===== */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px clamp(56px, 8vw, 96px);
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 480px;
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #8fc9a9;
  border: 1px solid #3a4152;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  animation: fadeUp .5s ease both;
}

.hero-kicker {
  margin: 24px 0 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: #f0b478;
  letter-spacing: .06em;
  animation: fadeUp .5s ease .08s both;
}

.hero-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  animation: fadeUp .5s ease .14s both;
}

.hero-lead {
  margin: 20px 0 0;
  max-width: 620px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.65;
  color: #c3c8d4;
  text-wrap: pretty;
  animation: fadeUp .5s ease .2s both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  animation: fadeUp .5s ease .26s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 15px;
}

.btn-primary {
  background: #f0b478;
  color: #241d12;
  font-weight: 600;
  transition: background .15s, transform .15s;
}

.btn-primary:hover {
  background: #f6c896;
  color: #241d12;
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid #4a5266;
  color: #e9e7e0;
  font-weight: 500;
  transition: border-color .15s, transform .15s;
}

.btn-outline:hover {
  border-color: #f0b478;
  color: #e9e7e0;
  transform: translateY(-2px);
}

.hero-photo {
  flex: 0 0 auto;
  animation: fadeUp .5s ease .2s both;
}

.photo-frame {
  width: clamp(180px, 22vw, 240px);
  height: clamp(180px, 22vw, 240px);
  border-radius: 24px;
  border: 1px solid #3a4152;
  padding: 6px;
  background: #2b3140;
  box-sizing: border-box;
}

.photo,
.photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #232834;
  color: #6b7284;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  box-sizing: border-box;
}

/* ===== Секции ===== */
.section {
  border-top: 1px solid #313849;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
}

.section-label {
  margin: 0 0 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #9ba3b4;
  letter-spacing: .08em;
}

.section-title {
  margin: 0 0 24px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3.5vw, 32px);
}

/* ===== Обо мне ===== */
.about-text {
  margin: 0;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: #c3c8d4;
  text-wrap: pretty;
}

.stack {
  margin-top: 40px;
  display: grid;
  gap: 14px;
  max-width: 680px;
}

.stack-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: baseline;
}

.stack-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #8fc9a9;
  min-width: 170px;
}

.stack-value {
  font-size: 15px;
  color: #e9e7e0;
}

/* ===== Проект ===== */
.project-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.project-heading .section-title {
  margin: 0;
}

.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.chip-amber {
  color: #f0b478;
  border: 1px solid #4a5266;
}

.chip-green {
  color: #8fc9a9;
  border: 1px solid #7fc9a4;
}

.project-lead {
  margin: 0 0 36px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: #c3c8d4;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.fact-card {
  background: #2b3140;
  border: 1px solid #3a4152;
  border-radius: 14px;
  padding: 22px;
}

.fact-value {
  font-family: 'Unbounded', sans-serif;
  font-size: 26px;
  color: #f0b478;
}

.fact-caption {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #c3c8d4;
}

.pipeline-panel {
  background: #2b3140;
  border: 1px solid #3a4152;
  border-radius: 14px;
  padding: clamp(20px, 4vw, 32px);
}

.pipeline-label {
  margin-bottom: 20px;
}

.pipeline-tracks {
  display: grid;
  gap: 22px;
}

.track-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #8fc9a9;
  margin-bottom: 10px;
}

.track-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.node {
  background: #232834;
  border: 1px solid #3a4152;
  border-radius: 8px;
  padding: 8px 13px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.node-note {
  color: #9ba3b4;
}

.node-green {
  border-color: #7fc9a4;
  color: #8fc9a9;
}

.node-muted {
  color: #9ba3b4;
}

.arrow {
  color: #f0b478;
}

.sep {
  color: #9ba3b4;
}

/* ===== Дайджест ===== */
.digest-title {
  margin-bottom: 12px;
}

.digest-sub {
  margin: 0 0 32px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.7;
  color: #9ba3b4;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.post-card {
  background: #2b3140;
  border: 1px solid #3a4152;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: #5a6378;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.post-date {
  color: #9ba3b4;
  white-space: nowrap;
}

.post-tags {
  color: #8fc9a9;
  white-space: nowrap;
}

.post-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  text-wrap: pretty;
}

.post-excerpt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #c3c8d4;
  flex: 1;
}

.post-read {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: #f0b478;
  font-family: 'Golos Text', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid #313849;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 72px) 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 15px;
}

.footer-links a {
  color: #e9e7e0;
}

.footer-links a:hover {
  color: #f0b478;
}

.footer-made {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #9ba3b4;
  line-height: 1.7;
}

.footer-made .dot {
  margin-right: 8px;
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: #6b7284;
}

/* ===== Модалка ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 19, 26, .72);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeUp .2s ease both;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: #2b3140;
  border: 1px solid #4a5266;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 82vh;
  overflow: auto;
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  box-sizing: border-box;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: #232834;
  border: 1px solid #4a5266;
  color: #e9e7e0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.modal-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.modal-date {
  color: #9ba3b4;
}

.modal-tags {
  color: #8fc9a9;
}

.modal-title {
  margin: 0 0 18px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: clamp(19px, 3vw, 24px);
  line-height: 1.35;
  text-wrap: pretty;
}

.modal-body p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.75;
  color: #c3c8d4;
  text-wrap: pretty;
}
