:root {
  --bg: #0a0c0f;
  --surface: #11151a;
  --surface-2: #161b21;
  --line: #222a33;
  --text: #e7ebef;
  --muted: #8b97a4;
  --accent: #ffb224;
  --accent-dim: rgba(255, 178, 36, .14);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.accent { color: var(--accent); }
.wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 12, 15, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 32px; height: 60px; }
.logo { font: 700 20px var(--mono); text-decoration: none; letter-spacing: -.5px; }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a, .lang { font: 13px var(--mono); color: var(--muted); text-decoration: none; text-transform: lowercase; transition: color .15s; }
.nav a:hover, a.lang:hover { color: var(--text); }
.langs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.lang { padding: 3px 8px; border-radius: 4px; text-transform: none; }
.lang.current { background: var(--accent); color: #111; font-weight: 700; }

/* hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.prompt { font: 14px var(--mono); color: var(--muted); margin-bottom: 16px; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -2px; font-weight: 800; }
.roles { margin-top: 20px; font: 600 clamp(15px, 1.6vw, 19px) var(--mono); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.roles i { color: var(--accent); font-style: normal; }
.lead { margin-top: 24px; font-size: clamp(17px, 1.8vw, 21px); color: #c4ccd4; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 8px; border: 1px solid var(--line);
  font: 600 15px var(--sans); text-decoration: none; background: var(--surface);
  transition: border-color .15s, transform .15s, background .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn small { font: 11px var(--mono); opacity: .7; }
.btn.primary { background: var(--accent); color: #111; border-color: var(--accent); }
.btn.primary:hover { background: #ffc24f; }

.photo { position: relative; justify-self: end; width: min(100%, 440px); }
.photo::before, .photo::after {
  content: ''; position: absolute; width: 36px; height: 36px; border: 2px solid var(--accent); z-index: 2;
}
.photo::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.photo::after { bottom: 18px; right: -10px; border-left: 0; border-top: 0; }
.photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 720 / 760; object-fit: cover;
  border-radius: 4px;
  filter: grayscale(1) contrast(1.12) brightness(.92);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.photo figcaption { margin-top: -18px; position: relative; font: 12px var(--mono); color: var(--muted); text-align: right; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.card {
  position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .2s;
}
.card:hover { border-color: rgba(255, 178, 36, .5); }
.card-num { position: absolute; top: 20px; right: 22px; font: 12px var(--mono); color: var(--muted); }
.card h2, .card h3 { font-size: 22px; letter-spacing: -.3px; }
.card-for { font: 13px var(--mono); color: var(--accent); margin: 4px 0 12px; }
.card p:last-child { color: #b6bfc8; font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stats li { padding: 20px 24px; display: flex; flex-direction: column; gap: 2px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats b { font: 700 32px var(--mono); color: var(--accent); letter-spacing: -1px; }
.stats span { font-size: 13px; color: var(--muted); }

/* sections */
.section { padding: 88px 0 24px; }
.section-title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; margin-bottom: 32px; }
.section-title .accent { font: 500 .45em var(--mono); vertical-align: super; margin-right: 6px; }
.section-lead { color: var(--muted); margin: -16px 0 28px; font-size: 18px; }
.sub { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 8px 0 16px; }
.sub::before { content: '// '; color: var(--accent); }

/* skills */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.skill-group { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skill-group h4 { font-size: 18px; margin-bottom: 18px; }
.skill-group ul { display: grid; gap: 16px; }
.skill-group.soft ul { grid-template-columns: repeat(3, 1fr); gap: 32px; }
.skill-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 7px; }
.skill-name { font-weight: 600; font-size: 15px; }
.skill-level { font: 11px var(--mono); color: var(--muted); white-space: nowrap; text-transform: lowercase; }
.bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bar i { height: 8px; border-radius: 2px; background: var(--line); }
.bar i.on { background: var(--accent); box-shadow: 0 0 10px rgba(255, 178, 36, .25); }
.js .bar i.on { background: var(--line); box-shadow: none; transition: background .3s calc(var(--n) * 90ms), box-shadow .3s calc(var(--n) * 90ms); }
.js .bar.shown i.on { background: var(--accent); box-shadow: 0 0 10px rgba(255, 178, 36, .25); }
.skill-note { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font: 12px var(--mono); color: var(--muted); }
.legend b { color: var(--accent); }

/* cases */
.case { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 32px; }
.case + .case { margin-top: 20px; }
.case-head { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px dashed var(--line); }
.case-tag { font: 12px var(--mono); color: var(--accent); margin-bottom: 8px; }
.case h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.4px; max-width: 22em; }
.highlights { display: flex; gap: 28px; flex-shrink: 0; }
.highlights li { display: flex; flex-direction: column; text-align: right; }
.highlights b { font: 700 26px var(--mono); color: var(--accent); white-space: nowrap; letter-spacing: -.5px; }
.highlights span { font-size: 12px; color: var(--muted); }
.case-cols { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 32px; padding-top: 24px; }
.col h4 { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 12px; }
.col li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: #c4ccd4; }
.col li + li { margin-top: 8px; }
.col li::before { position: absolute; left: 0; font-family: var(--mono); }
.before li::before { content: '×'; color: #e5484d; }
.done li::before { content: '›'; color: var(--accent); }
.result li::before { content: '✓'; color: #46c37b; }

/* founder */
.cards.founder { margin-top: 0; }

/* experience */
.timeline { border-left: 1px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; display: grid; grid-template-columns: 150px 1fr 1fr; gap: 24px; padding: 14px 0 14px 28px; border-bottom: 1px solid rgba(34, 42, 51, .6); }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.period { font: 13px var(--mono); color: var(--accent); padding-top: 2px; }
.role { font-weight: 600; }
.area { color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.facts p { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.facts span { display: block; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }

/* contacts */
.contacts { padding-bottom: 96px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.contact { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-size: 18px; font-weight: 600; word-break: break-all; transition: border-color .15s; }
a.contact:hover { border-color: var(--accent); }
.contact span { font: 12px var(--mono); color: var(--accent); font-weight: 400; }
.born { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.foot { border-top: 1px solid var(--line); padding: 24px 0; font: 12px var(--mono); color: var(--muted); }

/* adaptive */
@media (max-width: 1024px) {
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
  .case-cols { grid-template-columns: 1fr 1fr; }
  .case-cols .done { grid-column: 1 / -1; order: 2; }
  .case-cols .result { order: 1; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .langs { margin-left: auto; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .photo { order: -1; justify-self: start; width: min(100%, 300px); }
  .cards, .skill-group.soft ul, .contact-grid, .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .case { padding: 22px; }
  .case-head { flex-direction: column; gap: 16px; }
  .highlights li { text-align: left; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .skill-groups, .case-cols { grid-template-columns: 1fr; }
  .case-cols .done, .case-cols .result { order: 0; }
  .section { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .js .bar i.on { transition: none; }
}
