:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1f2630;
  --border: #2a323d;
  --text: #e6e9ee;
  --muted: #8b95a3;
  --accent: #5eead4;
  --accent-ink: #0b1f1c;
  --error: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

h1, h2 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.4rem; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(14, 17, 22, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: block;
  border-radius: 10px;
  transition: filter .15s, transform .15s;
}
.logo img { display: block; width: 38px; height: 38px; }
.logo:hover { filter: drop-shadow(0 0 8px rgba(94, 234, 212, .35)); transform: translateY(-1px); }
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav { display: flex; align-items: center; gap: 20px; }
.nav a:not(.btn) { color: var(--muted); }
.nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* ---------- Переключатель языка ---------- */
.lang-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.lang-switch button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--accent);
}
.lang-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }

.btn-outline {
  padding: 6px 16px;
  background: transparent;
  color: var(--accent);
}
.btn-outline:hover { background: rgba(94, 234, 212, .1); }

/* ---------- Контент ---------- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 48px;
}

.photo {
  position: relative;
  flex: 0 0 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 3px solid var(--border);
  box-shadow: 0 0 0 6px var(--bg), 0 0 40px rgba(94, 234, 212, .15);
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.photo-placeholder {
  width: 100%;
  height: 100%;
  padding: 40px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.2;
}

.eyebrow { margin: 0; color: var(--muted); }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 4px 0 8px; }
.role { margin: 0 0 24px; color: var(--accent); font-size: 1.1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.card p { color: #c5ccd6; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.tags li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- Опыт работы ---------- */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--border);
}
.job { position: relative; padding-bottom: 28px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
}
.job:first-child::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, .15);
}
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.job h3 { margin: 0; font-size: 1.1rem; }
.job-period { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.card .job-company { margin: 2px 0 8px; color: var(--accent); }
.job > p:last-of-type { margin-bottom: 0; }
.job .tags { margin-top: 12px; }

#contacts { text-align: center; }
.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.contacts a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.contacts a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(94, 234, 212, .08);
  transform: translateY(-2px);
}
.contacts a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contacts svg { width: 24px; height: 24px; }

.footer {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--border);
}

/* ---------- Страница входа ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-wrap { width: 100%; max-width: 400px; padding: 24px 16px; }

.login-form { display: flex; flex-direction: column; margin: 0; }
.login-form h1 { font-size: 1.8rem; margin: 12px 0 20px; }
.login-form label { margin-bottom: 6px; color: var(--muted); font-size: .9rem; }
.login-form input {
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, .2);
}
.login-form .btn { margin-top: 4px; }
.login-form input:disabled,
.login-form .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: none;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.back { color: var(--muted); font-size: .9rem; }

.notice {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(94, 234, 212, .08);
  border: 1px solid rgba(94, 234, 212, .3);
  color: var(--accent);
  font-size: .9rem;
}
.notice.error {
  background: rgba(248, 113, 113, .08);
  border-color: rgba(248, 113, 113, .3);
  color: var(--error);
}

/* ---------- Мобильные ---------- */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .nav { gap: 12px; }
  .nav a:not(.btn) { display: none; }
  main { padding: 32px 16px; }
  .hero { flex-direction: column; text-align: center; gap: 28px; }
  .photo { flex-basis: auto; width: 180px; height: 180px; }
  .card { padding: 22px 20px; }
}
