:root {
  --bg: #111722;
  --card: #1b2230;
  --bar: #161d29;
  --border: #2a3546;
  --text: #e6edf3;
  --muted: #7d8896;
  --accent: #4ade80;
  --accent-ink: #06210f;
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: var(--sans);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(60% 50% at 50% 0%, rgba(74, 222, 128, 0.10), transparent 70%);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 640px; }

/* --- окно macOS --- */
.win {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.6),
    0 0 110px -30px rgba(74, 222, 128, 0.17); /* лёгкое свечение-градиент вокруг окна */
}
.win__bar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--border);
}
.dots { display: inline-flex; gap: 8px; flex: none; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.dots i:nth-child(2) { background: #ffbd2e; }
.dots i:nth-child(3) { background: #27c93f; }
.win__title {
  flex: 1;
  margin-right: 58px; /* компенсация «кружков», чтобы заголовок был по центру */
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win__body { display: flex; }

/* --- боковая панель --- */
.pane {
  flex: 0 0 190px;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.avatar {
  display: block;
  flex: 0 0 56px;            /* фикс. ширина, не сжимать (в т.ч. на телефоне) */
  width: 56px; height: 56px;
  aspect-ratio: 1 / 1;       /* всегда круг, не овал */
  margin: 0 0 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  /* фон-обрезка: если фото не загрузится — аккуратная подложка, а не «битая» картинка.
     ?v — сброс кэша браузера после первого 404 */
  background: #16351f url("avatar.jpg?v=2") center / cover no-repeat;
  -webkit-appearance: none; appearance: none;
  cursor: zoom-in;           /* подсказка: кликабельно, откроется крупно */
  transition: filter .15s ease, transform .1s ease;
}
.avatar:hover { filter: brightness(1.08); }
.avatar:active { transform: scale(.97); }
.avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pane__nav { display: flex; flex-direction: column; gap: 3px; }
.pane__link {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
a.pane__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.pane__link.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pane__link.is-soon { opacity: .5; cursor: default; }

/* --- основная область --- */
.main { flex: 1; min-width: 0; padding: 28px 28px 30px; }
.name { margin: 0; font-size: clamp(24px, 5vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.role { margin: 9px 0 0; color: var(--muted); font-size: 15px; }
.spec { margin: 6px 0 0; color: var(--accent); font-size: 13px; font-weight: 600; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s ease, transform .1s ease;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(1px); }
.cta svg { flex: none; }
.cta__tag { padding: 3px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.22); }

/* --- контакты: полоса во всю ширину окна --- */
.win__foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.contacts { display: flex; flex-wrap: wrap; gap: 14px 22px; font-size: 13px; }
.contacts a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.contacts a:hover { color: var(--accent); }

.cta:focus-visible,
.contacts a:focus-visible,
a.pane__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* --- увеличение фото по клику (нативный popover, без JS) --- */
.lightbox { margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
.lightbox__close { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-out; }
.lightbox__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 18px; }
.lightbox__img {
  display: block;
  width: min(88vw, 420px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}

/* видимая реакция на клик по пункту меню: мягкая подсветка целевого блока */
#about, #contacts { scroll-margin-top: 24px; }
#about:target, #contacts:target { animation: pulse-target 1.2s ease; }
@keyframes pulse-target {
  0%, 100% { box-shadow: inset 0 0 0 9999px rgba(74, 222, 128, 0); }
  20%      { box-shadow: inset 0 0 0 9999px rgba(74, 222, 128, 0.12); }
}

.foot { margin: 18px 4px 0; text-align: center; font-size: 12px; color: var(--muted); opacity: .7; }

/* --- адаптив --- */
@media (max-width: 560px) {
  .win__body { flex-direction: column; }
  .pane {
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
  }
  .avatar { margin: 0; }
  .pane__nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .main { padding: 24px 20px 26px; }
  .win__foot { padding: 14px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .avatar { transition: none; }
  #about:target, #contacts:target { animation: none; }
}
