/* Системные шрифты: максимально быстро и нативно */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --accent: #000000;
  --radius: 12px;
  --maxw: 1080px;
}

html, body { height: 100%; }
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px; }

/* Шапка */
header { position: sticky; top: 0; backdrop-filter: saturate(1.2) blur(6px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--border); z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 20px; max-width: var(--maxw); margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.logo img { width: 80px; height: 80px; display: block; }
nav a { padding: 10px 12px; border-radius: 8px; }
nav a:hover { background: #f5f5f5; text-decoration: none; }

/* Герой */
.hero { padding: 40px 0 20px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.hero p { margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 18px); }

/* Секции */
section { padding: 36px 0; }
section:not(.hero) { border-top: 1px solid var(--border); }
h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 20px; }
.muted { color: var(--muted); }

/* Портфолио */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { grid-column: span 12; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; }
.thumb { aspect-ratio: 16 / 9; background: #fafafa; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 18px; }
.card-title { font-weight: 600; margin: 0 0 8px; font-size: 16px; }
.card-text { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag { display: inline-block; padding: 4px 8px; background: #f5f5f5; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--fg); }

@media (min-width: 720px) {
  .card { grid-column: span 4; }
}

/* Аккредитация */
.accreditation-card { display: flex; align-items: center; gap: 20px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #fafafa; transition: all 0.2s ease; margin-top: 16px; }
.accreditation-card:hover { background: #f5f5f5; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.accreditation-icons { display: flex; gap: 16px; flex-shrink: 0; }
.icon-container { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-decoration: none; transition: all 0.2s ease; }
.icon-container:hover { background: #f5f5f5; border-color: var(--accent); text-decoration: none; }
.icon-container img { width: 32px; height: 32px; object-fit: contain; }
.accreditation-content { flex: 1; }
.accreditation-content p { margin: 0; font-size: 16px; line-height: 1.5; }
.accreditation-actions { display: flex; gap: 12px; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 8px; font-weight: 500; text-decoration: none; transition: all 0.2s ease; font-size: 14px; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-outline { border: 1px solid var(--border); background: #fff; color: var(--fg); }
.btn-outline:hover { background: #f5f5f5; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: #333; border-color: #333; text-decoration: none; }

/* Контакты */
.contacts { display: grid; gap: 16px; grid-template-columns: 1fr; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fafafa; transition: background 0.2s ease; }
.contact-item:hover { background: #f0f0f0; }
.contact-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.contact-item a { font-weight: 500; }
.download { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fafafa; font-weight: 600; transition: background 0.2s ease; }
.download:hover { background: #f0f0f0; }

@media (min-width: 720px) {
  .contacts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 719px) {
  .nav { padding: 4px 16px; }
  .logo img { width: 60px; height: 60px; }
  .accreditation-card { flex-direction: column; align-items: stretch; gap: 20px; }
  .accreditation-icons { justify-content: center; }
  .accreditation-actions { flex-direction: column; }
  .btn { justify-content: center; }
}

/* Подвал */
footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { padding: 16px 20px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border: 1px solid var(--fg); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--fg); transition: all 0.2s ease; }
.socials a:hover { background: #111; color: #fff; text-decoration: none; }

/* Улучшение фокуса */
:focus-visible { outline: 2px dashed #000; outline-offset: 2px; }


