:root {
  --paper: #ece5d6;
  --paper-2: #e2d9c6;
  --ink: #1f1d1a;
  --ink-2: #3a3631;
  --muted: #6d665b;
  --line: #c9bfab;
  --accent: #c2452d;
  --accent-soft: #e7b3a3;
  --ok: #3d5a4a;
  --dark: #1c1b19;
  --dark-2: #272522;
  --dark-line: #3d3a35;

  --f-display: 'Unbounded', 'Arial Black', sans-serif;
  --f-body: 'Golos Text', 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin: 0; }
.mono { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.small { font-size: .72rem; color: var(--muted); }

::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0 0.2  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topbar.is-scrolled { border-color: var(--line); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--ink); color: var(--paper); font: 600 .8rem var(--f-mono); border-radius: var(--radius);
  transition: transform .4s var(--ease), background .3s;
}
.brand:hover .brand__mark { transform: rotate(-8deg); background: var(--accent); }
.brand__name { font-weight: 600; }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a { text-decoration: none; font-size: .95rem; position: relative; }
.nav a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav__cta { padding: .5rem 1rem; border: 1.5px solid var(--ink); border-radius: 99px; transition: background .2s, color .2s; }
.nav__cta:hover { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .3s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.5rem; border-radius: 99px; border: 1.5px solid var(--bg);
  background: var(--bg); color: var(--fg); font: 600 .95rem var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -1px var(--accent); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--accent { --bg: var(--accent); }
.btn--accent:hover { box-shadow: 0 6px 0 -1px var(--ink); }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.btn.is-loading .btn__label::after { content: ''; display: inline-block; width: 1ch; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  grid-template-areas: "meta meta" "title aside" "stats stats";
  gap: 2.5rem var(--pad);
  padding: clamp(2rem, 6vw, 5rem) var(--pad) 0;
}
.hero__meta { grid-area: meta; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--ink); padding-top: .7rem; }
.hero__title { grid-area: title; font-size: clamp(2.4rem, 6.4vw, 6.2rem); line-height: .94; min-width: 0; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .08s; }
.hero__title .line:nth-child(3) > span { animation-delay: .16s; }
.hero__title .line:nth-child(4) > span { animation-delay: .24s; }
.line--accent { color: var(--accent); font-weight: 400; font-style: italic; padding-left: clamp(1rem, 8vw, 7rem); }
@keyframes rise { to { transform: none; } }
.hero__aside { grid-area: aside; align-self: end; display: flex; flex-direction: column; gap: 1.2rem; animation: fade 1s .5s both; }
.hero__role { color: var(--accent); margin: 0; }
.hero__summary { margin: 0; font-size: 1.08rem; color: var(--ink-2); max-width: 44ch; }
.hero__status { display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); position: relative; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } }

.stats {
  grid-area: stats; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stat { padding: 1.5rem 1.25rem 1.4rem 0; min-height: 120px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 1.25rem; }
.stat dt { font: 800 clamp(2rem, 4.4vw, 3.4rem)/1 var(--f-display); }
.stat dt small { font-size: .4em; font-weight: 400; margin-left: .2em; color: var(--muted); }
.stat dd { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 8rem) var(--pad); position: relative; }
.section__head { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.5rem; align-items: baseline; margin-bottom: 2.5rem; }
.section__num { color: var(--accent); font-size: .9rem; }
.section__head h2 { font-size: clamp(2.2rem, 5.6vw, 4.6rem); }
.section__lead { grid-column: 2; max-width: 56ch; color: var(--muted); margin: .8rem 0 0; }

.section--dark { background: var(--dark); color: var(--paper); }
.section--dark .section__lead { color: #a59d8f; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }
.chip {
  font: 500 .88rem var(--f-body); padding: .5rem 1rem; border-radius: 99px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--line); transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .count { font: .72rem var(--f-mono); opacity: .6; margin-left: .35rem; }
.filters--dark .chip { color: var(--paper); border-color: var(--dark-line); }
.filters--dark .chip:hover { border-color: var(--paper); }
.filters--dark .chip[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Effects matrix (03) ---------- */
.matrix { border-top: 1px solid var(--ink); }
.matrix[hidden] { display: none; }
.matrix__row {
  display: block; border-bottom: 1px solid var(--line); position: relative;
  animation: fade .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.matrix__name { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.matrix__name small { display: block; font: .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; margin-top: .3rem; }
.effect summary {
  display: grid; grid-template-columns: 3rem minmax(200px, 1.1fr) minmax(0, 1.6fr) 40px; gap: 1.5rem; align-items: center;
  padding: 1.25rem 0; cursor: pointer; list-style: none; min-height: 72px;
}
.effect summary::-webkit-details-marker { display: none; }
.effect summary:hover, .effect[open] summary { background: linear-gradient(90deg, var(--paper-2), transparent); }
.effect__num { color: var(--accent); padding-left: .25rem; }
.effect__claim { color: var(--ink-2); font-size: .98rem; }
.effect__toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; justify-self: end;
  transition: transform .35s var(--ease), border-color .2s, background .2s;
}
.effect__toggle::before, .effect__toggle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.effect__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.effect summary:hover .effect__toggle { border-color: var(--ink); }
.effect[open] .effect__toggle { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); }
.effect[open] .effect__toggle::before, .effect[open] .effect__toggle::after { background: var(--paper); }
.effect__body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; padding: .3rem 0 1.6rem calc(3rem + 1.5rem);
  animation: fade .45s var(--ease) both;
}
.effect__body h4 { margin: 0 0 .4rem; font: .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.effect__body p { margin: 0; color: var(--ink-2); font-size: .96rem; max-width: 58ch; }
.effect__body > div:nth-child(2) { border-left: 2px solid var(--accent-soft); padding-left: 1rem; }
.effect__proof { grid-column: 1 / -1; font-weight: 500; color: var(--ink) !important; }

/* ---------- Chain (01) ---------- */
.chain { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 0; color: var(--ink-2); }
.chain li { display: flex; align-items: center; }
.chain li + li::before { content: '→'; color: var(--accent); margin: 0 .8rem; }

/* ---------- Projects ---------- */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
.project {
  grid-column: span 3; min-height: 300px; position: relative; border: 1px solid var(--dark-line); border-radius: var(--radius);
  background: var(--dark-2); overflow: hidden; animation: fade .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.project:nth-child(5n+1) { grid-column: span 4; }
.project:nth-child(5n+2) { grid-column: span 2; }
.project:nth-child(5n+4) { grid-column: span 2; }
.project:nth-child(5n+5) { grid-column: span 4; }
@media (min-width: 961px) {
  /* добиваем последний ряд, чтобы при 1, 3 и 4 карточках не было дыр */
  .project:only-child, .project:nth-child(3):last-child { grid-column: span 6; }
  .project:nth-child(4):last-child { grid-column: span 3; }
  .project:nth-child(3):nth-last-child(2) { grid-column: span 3; }
}
.status { display: inline-flex; align-items: center; gap: .45rem; font-size: .7rem; padding: .25rem .6rem; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--done { color: #8fb79f; }
.status--calc { color: #d9b77a; }
.status--current { color: #9fb6d6; }
.modal .status--done { color: var(--ok); }
.modal .status--calc { color: #8a6420; }
.modal .status--current { color: #2f4a6b; }
.project button {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; height: 100%; width: 100%; padding: 1.5rem;
}
.project button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.project__art {
  position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--c), transparent 70%); opacity: .55;
  transition: transform .7s var(--ease), opacity .4s;
}
.project:hover .project__art { transform: scale(1.5) translate(-20px, 20px); opacity: .8; }
.project__top { display: flex; justify-content: space-between; gap: 1rem; color: #a59d8f; position: relative; }
.project__title { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.05; margin-top: auto; padding-top: 3rem; position: relative; overflow-wrap: anywhere; hyphens: auto; }
.project__metric { display: block; position: relative; margin-top: .8rem; color: var(--accent-soft); font: 600 1.05rem/1.3 var(--f-display); }
.project__summary { display: block; color: #c8c0b1; margin: .6rem 0 1.2rem; max-width: 52ch; position: relative; font-size: .95rem; }
.project__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: relative; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.tags li { font: .7rem var(--f-mono); text-transform: uppercase; padding: .2rem .5rem; border: 1px solid var(--dark-line); border-radius: 3px; color: #c8c0b1; }
.project__arrow { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--dark-line); flex: none; transition: all .3s var(--ease); }
.project:hover .project__arrow { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }
.empty { grid-column: 1 / -1; padding: 3rem; text-align: center; border: 1px dashed var(--dark-line); border-radius: var(--radius); color: #a59d8f; }
.error-box { grid-column: 1 / -1; padding: 1.5rem; border: 1px solid var(--accent); border-radius: var(--radius); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal {
  --mpad: clamp(1.5rem, 4vw, 2.8rem);
  border: 0; padding: 0; width: min(820px, 94vw); max-height: 90vh; overflow: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 30px 80px -20px rgba(20,18,15,.5);
}
.modal::backdrop { background: rgba(28, 27, 25, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.modal__inner { padding: var(--mpad); position: relative; }
html.is-locked { overflow: hidden; }
.modal__close { position: absolute; top: 1.4rem; right: 1rem; z-index: 1; color: var(--ink); width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: none; font-size: 1.4rem; cursor: pointer; line-height: 1; transition: all .2s; }
.modal__close:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }
.modal h3 { font-size: clamp(1.8rem, 4.4vw, 2.9rem); line-height: 1.05; margin: .6rem 0 1rem; padding-right: 2.5rem; overflow-wrap: anywhere; }
.modal__kicker { color: var(--accent); margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-right: 3rem; }
.modal__lead { font-size: 1.08rem; margin: 0; }
.modal__role { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; margin: 0 0 1rem; }
.modal__role .mono { color: var(--muted); font-size: .7rem; }
.modal__band { height: 8px; margin: calc(-1 * var(--mpad)) calc(-1 * var(--mpad)) 2rem; background: var(--c); }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal__grid h4 { margin: 0 0 .5rem; font: .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.modal__grid ul { margin: 0; padding-left: 1.1rem; }
.modal__steps { list-style: none; }
.modal__steps li li { margin-bottom: .25rem; }
.modal__steps > li p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.modal__steps h4 span { color: var(--accent); margin-right: .6rem; }
.modal__steps > li:nth-child(3) { font-weight: 500; }
.modal .tags li { border-color: var(--line); color: var(--ink-2); }

/* ---------- Experience ---------- */
.exp { max-width: 980px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 2.2rem 2rem; animation: fade .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.timeline li::before { content: ''; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; transition: background .2s; }
.timeline li:hover::before { background: var(--accent); border-color: var(--accent); }
.timeline .period { color: var(--accent); }
.timeline h3 { font-size: 1.35rem; margin: .4rem 0 .2rem; font-weight: 600; }
.timeline h3 span { font-family: var(--f-body); font-weight: 400; color: var(--muted); font-size: 1rem; }
.timeline p { margin: .3rem 0 0; color: var(--ink-2); max-width: 54ch; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-2); }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--pad); }
.form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .4rem; border: 0; margin: 0; padding: 0; }
.field label, .field legend { font: 600 .74rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: 0; }
.field input, .field textarea {
  font: 400 1rem var(--f-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1rem; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.field.has-error input, .field.has-error textarea { border-color: var(--accent); }
.field__error { margin: 0; min-height: 1.1em; font-size: .82rem; color: var(--accent); }
.field--chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.field--chips legend { margin-bottom: .5rem; width: 100%; }
.field--chips label { cursor: pointer; font: 500 .9rem var(--f-body); text-transform: none; letter-spacing: 0; }
.field--chips input { position: absolute; opacity: 0; }
.field--chips span { display: inline-block; padding: .55rem 1rem; border: 1.5px solid var(--line); border-radius: 99px; transition: all .2s; background: var(--paper); }
.field--chips input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.field--chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form__status { margin: 0; min-height: 1.4em; font-size: .95rem; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--accent); }
.contact__side { display: flex; flex-direction: column; gap: 1.5rem; }
.contact__mail { font: 600 clamp(1.4rem, 3vw, 2.3rem)/1.1 var(--f-display); text-decoration: none; word-break: break-all; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size .4s var(--ease); padding-bottom: 4px; }
.contact__mail:hover { background-size: 100% 3px; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.links a { display: flex; justify-content: space-between; padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; transition: padding .3s var(--ease), color .2s; }
.links a:hover { padding-left: .6rem; color: var(--accent); }

.footer { display: flex; justify-content: space-between; padding: 1.5rem var(--pad); background: var(--dark); color: #a59d8f; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }

/* ---------- Skeletons ---------- */
.skeleton-block, .skeleton {
  background: linear-gradient(90deg, var(--paper-2) 20%, color-mix(in srgb, var(--paper-2) 50%, white) 50%, var(--paper-2) 80%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite; border-radius: var(--radius);
}
.section--dark .skeleton-block { background-image: linear-gradient(90deg, var(--dark-2) 20%, #34312c 50%, var(--dark-2) 80%); border: 0; }
.skeleton--text { display: block; height: .9em; margin: .45em 0; }
.skeleton--text.short { width: 60%; }
.stats .skeleton-block { margin: 1rem .5rem; min-height: 90px; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 80; transform: translate(-50%, calc(100% + 2rem)); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: .85rem 1.3rem; border-radius: 99px; font-size: .92rem;
  transition: transform .45s var(--ease), opacity .3s; max-width: 92vw;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
/* ---------- Services ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.service { padding: 1.6rem 1.4rem 1.8rem 0; min-height: 220px; animation: fade .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.service + .service { border-left: 1px solid var(--line); padding-left: 1.4rem; }
.service.skeleton-block { min-height: 220px; }
.service__num { color: var(--accent); }
.service h3 { font-size: 1.25rem; line-height: 1.15; margin: .9rem 0 .7rem; font-weight: 600; transition: transform .3s var(--ease); }
.service:hover h3 { transform: translateX(4px); }
.service p { margin: 0; color: var(--ink-2); font-size: .96rem; }

/* ---------- Timeline extras ---------- */
.timeline__points { margin: .7rem 0 0; padding: 0; list-style: none; max-width: 60ch; }
.timeline .timeline__points li { padding: 0 0 0 1.1rem; position: relative; animation: none; color: var(--ink-2); font-size: .95rem; }
.timeline .timeline__points li::before { content: '—'; position: absolute; left: 0; top: 0; width: auto; height: auto; border: 0; background: none; border-radius: 0; color: var(--muted); }
.timeline .timeline__lead { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; margin-top: .8rem; padding: .55rem .8rem; background: var(--paper-2); border-left: 3px solid var(--accent); color: var(--ink); font-weight: 500; font-size: .95rem; }
.timeline__lead .mono { color: var(--accent); font-size: .7rem; }
.terms { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.terms div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.terms dt { color: var(--muted); font-size: .7rem; padding-top: .2rem; }
.terms dd { margin: 0; font-weight: 500; }

@media (max-width: 960px) {
  .services { grid-template-columns: 1fr 1fr; }
  .service:nth-child(3) { border-left: 0; padding-left: 0; }
  .service:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; grid-template-areas: "meta" "title" "aside" "stats"; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .projects { grid-template-columns: 1fr 1fr; }
  .project, .project:nth-child(n) { grid-column: span 1; }
  .project:nth-child(3n+1) { grid-column: span 2; }
  .contact__grid { grid-template-columns: 1fr; }
  }
@media (max-width: 720px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { border-left: 0; padding-left: 0; min-height: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 1.2rem;
    padding: 1.5rem var(--pad) 2rem; background: var(--paper); border-bottom: 1px solid var(--ink);
    transform: translateY(-120%); transition: transform .4s var(--ease); z-index: -1;
  }
  .nav.is-open { transform: none; }
  .nav a { font-size: 1.2rem; }
  .nav-toggle { display: block; }
  .section__head { grid-template-columns: 1fr; }
  .section__lead { grid-column: 1; }
  .effect summary { grid-template-columns: 2rem 1fr 36px; gap: .5rem 1rem; }
  .effect__claim { grid-column: 2 / -1; grid-row: 2; font-size: .92rem; }
  .effect__body { grid-template-columns: 1fr; padding-left: 0; }
  .effect__body > div:nth-child(2) { padding-left: .8rem; }
  .chain { flex-direction: column; gap: .35rem; }
  .chain li + li::before { content: '↓'; margin: 0 .6rem 0 0; }
  .terms div { grid-template-columns: 1fr; gap: .2rem; }
  .projects { grid-template-columns: 1fr; }
  .project, .project:nth-child(n) { grid-column: span 1; min-height: 260px; }
  .modal__grid { grid-template-columns: 1fr; }
  .modal__band { margin: -1.5rem -1.5rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .line > span { transform: none; }
}
