:root {
  --accent: #7c5cff;
  --accent-2: #38e1c6;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070d;
  --text: #e9edf8;
  --text-2: rgba(233, 237, 248, .74);
  --muted: rgba(233, 237, 248, .44);
  --panel: rgba(9, 13, 22, .62);
  --panel-2: rgba(13, 18, 30, .72);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --bar: rgba(5, 7, 13, .74);
  --grid: rgba(255, 255, 255, .035);
  --shade-top: rgba(5, 7, 13, .35);
  --shade-bottom: rgba(5, 7, 13, .94);
  --bg-blur: 7px;
  --bg-brightness: .6;
  --shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f8;
  --text: #0b1020;
  --text-2: rgba(11, 16, 32, .74);
  --muted: rgba(11, 16, 32, .46);
  --panel: rgba(255, 255, 255, .7);
  --panel-2: rgba(255, 255, 255, .82);
  --line: rgba(11, 16, 32, .1);
  --line-strong: rgba(11, 16, 32, .2);
  --bar: rgba(238, 241, 248, .78);
  --grid: rgba(11, 16, 32, .04);
  --shade-top: rgba(238, 241, 248, .35);
  --shade-bottom: rgba(238, 241, 248, .96);
  --bg-blur: 5px;
  --bg-brightness: 1.02;
  --shadow: 0 16px 40px rgba(20, 30, 60, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }

.bg {
  position: fixed;
  inset: -4%;
  background: url('assets/bg.jpg') center / cover no-repeat;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness)) saturate(1.1);
  transform: scale(1.04);
  z-index: -3;
  transition: filter .3s var(--ease);
}

.shade {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--shade-top) 0%, rgba(5, 7, 13, .55) 40%, var(--shade-bottom) 86%);
  z-index: -2;
  transition: background .3s var(--ease);
}

.lines {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 85%);
  z-index: -1;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  background: var(--bar);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font: 800 14px/1 'Manrope', sans-serif;
}

.brand-name { font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.brand-role { color: var(--muted); font-size: 11.5px; }

.clocks { display: flex; gap: 8px; margin-left: auto; }

.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.clock i { font-style: normal; font-size: 9.5px; letter-spacing: .1em; color: var(--muted); }
.clock b { font-size: 12px; letter-spacing: .02em; }
.clock em { font-style: normal; font-size: 11px; color: var(--accent-2); }

.actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s var(--ease);
}

.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 15px; height: 15px; }
html[data-theme="dark"] .i-sun { display: none; }
html[data-theme="light"] .i-moon { display: none; }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 10.5px/1 'Manrope', sans-serif;
  letter-spacing: .04em;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.lang button.active { color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); }

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font: 800 32px/1 'Manrope', sans-serif;
  box-shadow: 0 14px 36px rgba(124, 92, 255, .35);
  margin-bottom: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
}

.role {
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: .02em;
}

.lead {
  margin: 0 0 18px;
  max-width: 640px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.72;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 34px; }

.chips span {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title .count { margin-left: auto; font-size: 11px; color: var(--muted); }

.project {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: start;
  padding: 20px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: background .2s var(--ease), padding-left .2s var(--ease);
}

.project::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.project:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); padding-left: 18px; }
.project:hover::before { opacity: 1; }
.project:hover .parrow { color: var(--accent-2); transform: translate(2px, -2px); }

.pnum { font-size: 11px; color: var(--muted); padding-top: 4px; }
.pbody h3 { margin: 0 0 5px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.pbody p { margin: 0 0 10px; max-width: 560px; color: var(--text-2); font-size: 13.5px; line-height: 1.58; }

.ptags { display: flex; gap: 6px; }
.ptags span {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.parrow { color: var(--muted); font-size: 17px; padding-top: 2px; transition: color .2s var(--ease), transform .2s var(--ease); }

.side { display: flex; flex-direction: column; gap: 16px; }

.panel {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.panel-title {
  margin-bottom: 12px;
  padding-left: 10px;
  position: relative;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 1px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.prow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.prow:first-of-type { border-top: 0; }
.prow .k { color: var(--muted); }
.prow .v { font-weight: 600; text-align: right; }

.online { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); font-weight: 700; }
.online i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(56, 225, 198, .5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 225, 198, .45); }
  70% { box-shadow: 0 0 0 7px rgba(56, 225, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 225, 198, 0); }
}

.link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}

.link:hover { transform: translateX(2px); border-color: var(--line-strong); }
.link svg { width: 16px; height: 16px; color: var(--text-2); }
.link .chev { margin-left: auto; color: var(--muted); font-size: 16px; }
.link.accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.link.accent svg { color: var(--accent-2); }

.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

html[data-lang="ru"] .en { display: none; }
html[data-lang="en"] .ru { display: none; }

@media (max-width: 880px) {
  .page { grid-template-columns: 1fr; gap: 26px; }
  .side { order: 2; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .clocks { order: 3; width: 100%; margin-left: 0; }
  .actions { margin-left: auto; }
}

@media (max-width: 520px) {
  .page { padding: 36px 16px 28px; }
  .topbar { padding: 10px 16px; }
  .brand-role { display: none; }
  .clock em { display: none; }
  .project { grid-template-columns: 32px minmax(0, 1fr) 18px; padding: 16px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .online i { animation: none; }
}
