:root {
  color-scheme: dark;
  --paper: #111417;
  --surface: #191d21;
  --ink: #f7f5ef;
  --muted: #b0b5b8;
  --line: #383c40;
  --accent: #ff965d;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #faf9f6;
  --surface: white;
  --ink: #172126;
  --muted: #505c63;
  --line: #d3d7d6;
  --accent: #a64011;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 400 17px/1.55 Onest, system-ui, sans-serif; user-select: none; }
.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); background: var(--surface); }
header .wrap, nav, .brand, footer .wrap { display: flex; align-items: center; gap: 1rem; }
header .wrap { min-height: 72px; justify-content: space-between; flex-wrap: wrap; padding-block: .65rem; }
nav { flex-wrap: wrap; gap: clamp(.6rem, 2vw, 1.6rem); }
a { color: inherit; text-decoration: none; }
nav a { color: var(--muted); }
nav a:hover, .btn:hover { color: var(--accent); }
.brand { font: 700 17px Unbounded, sans-serif; gap: .65rem; }
.brand img { width: 36px; }
select, button { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: inherit; padding: .38rem; cursor: pointer; font: inherit; }
.theme-icon::before { content: "◐"; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pa { position: relative; isolation: isolate; overflow: hidden; margin: 0; padding: clamp(4rem, 9vw, 8rem) 0; border-bottom: 1px solid var(--line); }
.pa::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 48%; background: url("/assets/contours.svg") right center / contain no-repeat; }
.badge { display: inline-flex; align-items: center; gap: .55rem; color: var(--accent); font-weight: 500; }
.badge::before { content: ""; width: .48rem; height: .48rem; border-radius: 50%; background: currentColor; }
.pa h1 { margin: 1.2rem 0; font: 700 clamp(3rem, 8vw, 7rem)/1.05 Unbounded, sans-serif; letter-spacing: -.06em; }
.pa p { max-width: 33ch; margin: 0; color: var(--muted); font-size: clamp(1.12rem, 2vw, 1.5rem); }
#projects { padding-block: clamp(3rem, 6vw, 5rem); }
h2 { margin: 0 0 2rem; font: 500 clamp(1.5rem, 3vw, 2.5rem)/1.2 Unbounded, sans-serif; letter-spacing: -.04em; }
.list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem),1fr)); gap: 1rem; }
.item { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.25rem, 2.5vw, 2rem); background: var(--surface); }
.logo img { width: 50px; height: 50px; display: block; }
.item h3 { margin: 1.5rem 0 .5rem; font: 500 1.23rem/1.35 Unbounded, sans-serif; }
.item .svyaz-title { font-family: Onest, sans-serif; }
.item p, .url, footer { color: var(--muted); }
.url { font-size: .85rem; }
.item ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; }
.item li { border: 1px solid var(--line); border-radius: 4px; padding: .12rem .48rem; font-size: .8rem; }
.btn { margin-top: auto; padding-top: 1rem; font-weight: 500; }
.btn::after { content: " ↗"; color: var(--accent); }
footer { border-top: 1px solid var(--line); padding: 1.5rem 0; }
@media(max-width: 44rem) {
  .pa { padding-bottom: 11rem; }
  .pa::before { inset: auto -1rem 0 0; height: 10rem; }
}
@media(prefers-reduced-motion: no-preference) {
  .pa::before { animation: contours 12s ease-in-out infinite alternate; }
  @keyframes contours { to { transform: translateY(.4rem); } }
}
