/* strelko.pro — личный сайт.
   Дизайн-система повторяет cv.strelko.pro: GitHub-подобная палитра,
   светлая/тёмная тема, Inter + JetBrains Mono, карточки 12px. */

:root,
:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f3f5;
  --border: #e3e6ea;
  --text: #1a1d21;
  --text-muted: #5b6470;
  --text-faint: #8a93a0;
  --accent: #2563eb;
  --accent-weak: #dbe7ff;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-subtle: #1c2230;
  --border: #2a313c;
  --text: #e6edf3;
  --text-muted: #9aa6b2;
  --text-faint: #6b7480;
  --accent: #58a6ff;
  --accent-weak: #13283f;
  --btn-text: #0d1117;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 650;
  letter-spacing: -.01em;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

h3 { font-size: 1.05rem; margin-bottom: .5rem; }

p { margin: 0 0 .8rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono, .chip {
  font-family: "JetBrains Mono", "Fira Code", SF Mono, Consolas, monospace;
}

/* --- шапка --- */

.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; gap: .6rem; }

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-weak);
  color: var(--accent);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: -.02em;
}

.header-name { font-weight: 650; }

.site-header nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }

.site-header nav a { color: var(--text-muted); font-size: .92rem; font-weight: 500; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

.theme-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .2rem;
  gap: .15rem;
}

.theme-toggle button {
  font: inherit;
  font-size: .9rem;
  padding: .3em .65em;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* --- hero --- */

.hero { padding: 4.5rem 0 3rem; }

.hero-eyebrow { color: var(--text-faint); font-size: .82rem; margin: 0 0 .8rem; }

.hero-name { margin: 0 0 .6rem; font-size: clamp(1.9rem, 5vw, 2.8rem); }

.hero-summary { color: var(--text-muted); max-width: 42rem; margin-bottom: 1.2rem; }

.hero-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.6rem; }

/* --- секции --- */

section { padding: 2.5rem 0; }

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

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.card:hover { border-color: var(--accent); }

.card h3 { margin-bottom: .5rem; }

.card p { color: var(--text-muted); font-size: .95rem; }

/* --- чипы --- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.chip {
  font-size: .82rem;
  padding: .3em .7em;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* --- кнопки --- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .55rem 1.1rem;
  font-size: .95rem;
  font-weight: 550;
  cursor: pointer;
  transition: filter .15s ease;
}

.btn:hover { filter: brightness(1.1); text-decoration: none; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

.btn.is-copied { color: var(--btn-text); }

/* --- homelab --- */

.homelab-card p:last-of-type { margin-bottom: 1rem; }

/* --- проекты --- */

.project-card { display: flex; flex-direction: column; }

.project-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: .8rem;
}

.project-head h3 { margin: 0; }

.project-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex: none;
  box-shadow: var(--shadow);
}

.project-icon-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 1.4rem;
}

.project-tagline { margin: 0; font-size: .88rem; color: var(--text-faint); }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-card .chips { margin-bottom: 1rem; }

/* --- контакты --- */

.contacts-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .9rem; }

.fine-note { font-size: .85rem; color: var(--text-faint); margin: 0; }

/* --- подвал --- */

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 2rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .92rem;
}

.footer-row a { color: var(--text-muted); }
.footer-row a:hover { color: var(--accent); }

/* --- страница политики --- */

.policy {
  max-width: 46rem;
  padding: 3rem 0 2rem;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--accent); }

.policy h1 { font-size: 1.6rem; margin-bottom: .4rem; }

.policy-date { color: var(--text-faint); margin: 0 0 2rem; }

.policy h2 { font-size: 1.15rem; margin: 2rem 0 .6rem; }

.policy ul { margin: .6rem 0; padding-left: 1.3rem; }
.policy li { margin: .3rem 0; }

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: .75rem; }
  .site-header nav { order: 3; width: 100%; margin-left: 0; gap: .9rem; }
  .theme-toggle { margin-left: auto; }
  .hero { padding: 3rem 0 2rem; }
  .footer-row { flex-direction: column; }
}
