/* ============================================================
   angelbaloi.com · v4 mockup (runda 4)
   "Hârtie cu antet": semnătură caligrafică + O SINGURĂ familie
   de litere (Newsreader). Cerneală pe hârtie, accent smarald
   (cifre, starea activă, uneltele zilnice) și un bloc verde
   închis la final. Titlul fiecărei secțiuni stă deasupra, iar
   conținutul folosește toată lățimea: fără coloane goale.
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #f5f4f0;
  --surface: #ffffff;
  --ink: #14171c;
  --ink-2: #474d57;
  --ink-3: #686e78;
  --line: #dddbd3;
  --line-2: #c5c3ba;
  --accent: #0b6e4f;

  /* blocul de final (contact + footer) */
  --inv-bg: #0d3b2e;
  --inv-ink: #f3f1ea;
  --inv-ink-2: #a9c6b9;
  --inv-line: #24574a;
  --inv-accent: #86e5bb;

  --frame-shadow: 0 1px 2px rgba(20, 23, 28, 0.04), 0 14px 34px -18px rgba(20, 23, 28, 0.22);

  --font: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 68px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1114;
  --surface: #171a1f;
  --ink: #ecebe6;
  --ink-2: #b1b5bd;
  --ink-3: #8a909a;
  --line: #24282f;
  --line-2: #363b44;
  --accent: #6fe0ae;

  --inv-bg: #0c3127;
  --inv-line: #1f4d41;

  --frame-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -18px rgba(0, 0, 0, 0.6);
}

/* schimbarea temei: noua temă se deschide ca un cerc din buton (View Transitions) */
::view-transition-old(root), :root.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- bază ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--font);
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.icon { width: 0.85em; height: 0.85em; flex: none; }
.nb { white-space: nowrap; }
.label { font-size: 1.0625rem; font-style: italic; font-weight: 400; line-height: 1.3; color: var(--ink-3); }

/* ---------- legături ---------- */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-2);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.go {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 500;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
}
.go .icon { color: var(--accent); transition: transform 220ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .link:hover { color: var(--accent); text-decoration-color: currentColor; }
  .go:hover .icon-out { transform: translate(2px, -2px); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 30px; }

.wordmark { display: block; margin-right: auto; padding: 4px 0; color: var(--ink); }
/* centrat optic pe înălțimea barei: +1px, fiindcă partea de sus a semnăturii e mai grea decât coada lui g */
.wordmark svg { display: block; height: 42px; width: auto; transform: translateY(1px); }

.nav-links { display: flex; gap: 28px; }
.nav-links a, .nav .resume, .lang a {
  position: relative;
  font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); text-decoration: none;
  padding: 6px 0;
  transition: color 160ms ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { transform: scaleX(1); }
.nav .resume { display: inline-flex; align-items: center; gap: 0.35em; }
.nav .resume .icon { position: relative; top: -1px; color: var(--accent); transition: transform 200ms var(--ease-out); }

.nav-tools { display: flex; align-items: center; gap: 24px; }
.lang { display: flex; align-items: center; gap: 7px; font-size: 1.0625rem; line-height: 1.5; }
.lang a { color: var(--ink-3); }
.lang a[aria-current="true"] { color: var(--ink); }
.lang span { color: var(--line-2); }

/* iconițele stau pe aceeași linie cu textul: aceeași mărime, urcate cât să atingă linia de bază */
.icon-btn {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 4px;
  color: var(--ink-2); font-size: 1.1875rem;
  transition: color 160ms ease, transform 140ms var(--ease-out);
}
.icon-btn .icon { position: relative; top: -1.5px; }
.icon-btn:active { transform: scale(0.94); }
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }

.menu-btn { display: none; }

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover, .lang a:hover, .icon-btn:hover, .nav .resume:hover { color: var(--ink); }
  .nav .resume:hover .icon { transform: translateY(2px); }
}

.menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 19;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 28px;
}
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 1.5rem; font-weight: 500; line-height: 1.2; text-decoration: none;
}

/* ---------- înapoi sus ---------- */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 15;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px -12px rgba(20, 23, 28, 0.35);
  font-size: 1.125rem;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 220ms ease, transform 220ms var(--ease-out), border-color 160ms ease, color 160ms ease;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .to-top:hover { border-color: var(--accent); color: var(--accent); } }

/* ---------- hero: pagină de titlu ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(44px, 5vw, 64px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.hero-copy { text-align: center; }
.display {
  font-size: clamp(2.5rem, 1.1rem + 4vw, 4.25rem);
  font-weight: 400; line-height: 1.08; letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero-rule { display: block; width: 44px; height: 1.5px; margin: clamp(24px, 3vw, 36px) auto; background: var(--accent); }
.hero-sub { max-width: 38ch; margin-inline: auto; font-size: 1.3125rem; font-style: italic; line-height: 1.5; color: var(--ink-2); text-wrap: balance; }

/* fotografia: fereastra ~66..693 x 13..797 din 800x800 (subiectul puțin spre dreapta), colțuri rotunjite */
.portrait-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px; background: var(--line); }
.portrait-frame img { position: absolute; left: -10.5%; top: -1.7%; width: 127.5%; max-width: none; height: auto; }
.portrait figcaption { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-left: 6px; font-size: 1rem; line-height: 1.35; color: var(--ink-2); }
.portrait h1 { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.g-logo { width: 28px; height: auto; flex: none; opacity: 0.8; }
:root[data-theme="dark"] .g-logo { filter: invert(1) brightness(1.5); }

/* cifre-cheie: număr sus, etichetă dedesubt, la același nivel */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.stat { padding: 26px 16px 0; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: center; gap: 8px; text-align: center; }
.stat:first-child { border-left: 0; }
.stat dd { font-size: 2.75rem; font-weight: 400; line-height: 1; letter-spacing: -0.02em; color: var(--accent); }
.stat dt { font-size: 1.0625rem; line-height: 1.3; color: var(--ink-2); max-width: 17ch; text-wrap: balance; }

/* ---------- secțiuni ---------- */
.section { position: relative; padding: clamp(52px, 6vw, 84px) 0; }
/* linia de sus a secțiunii se trasează la intrare */
.section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line); transform-origin: left;
}
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 40px; margin-bottom: clamp(22px, 3vw, 34px); }
.h2 { font-size: clamp(1.875rem, 1.3rem + 1.7vw, 2.5rem); line-height: 1.1; letter-spacing: -0.016em; }

/* ---------- proiecte: listă + panou ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.filters button {
  position: relative; padding: 8px 0;
  font-size: 1.0625rem; color: var(--ink-3);
  transition: color 160ms ease;
}
.filters button sup { font-size: 0.75rem; margin-left: 3px; vertical-align: 0.6em; line-height: 1; }
.filters button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out);
}
.filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .filters button:hover { color: var(--ink); } }

.work-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

.picks { position: sticky; top: calc(var(--nav-h) + 24px); border-top: 1px solid var(--line-2); }
.picks li { border-bottom: 1px solid var(--line); }
.picks li[hidden] { display: none; }
.pick {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 13px 0; text-align: left;
  font-size: 1.3125rem; line-height: 1.25; color: var(--ink-3);
  transition: color 200ms ease;
}
.pick-name { transition: transform 320ms var(--ease-out); }
.pick-yr { font-size: 1rem; font-style: italic; flex: none; }
.pick[aria-pressed="true"] { color: var(--ink); }
.pick[aria-pressed="true"] .pick-name { transform: translateX(18px); }
/* marcajul activ alunecă între rânduri */
.pick-mark {
  position: absolute; left: 0; top: 0; width: 3px; height: 0; border-radius: 2px;
  background: var(--accent);
  transition: transform 380ms var(--ease-out), height 380ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .pick:hover { color: var(--ink); }
  .pick:not([aria-pressed="true"]):hover .pick-name { transform: translateX(6px); }
}

.pane { display: none; }
.pane.is-active { display: block; }
.stepper, .pane-name { display: none; }

.frame {
  display: block; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); box-shadow: var(--frame-shadow);
  text-decoration: none;
  transition: border-color 200ms ease;
}
.frame-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: 36px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem; line-height: 1; color: var(--ink-3);
}
.frame-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 200ms ease; }
.frame-go { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--accent); }
.frame-go .icon { transition: transform 220ms var(--ease-out); }
.frame-shot { display: block; overflow: hidden; }
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .frame:hover { border-color: var(--accent); }
  .frame:hover .frame-url { color: var(--ink); }
  .frame:hover .frame-go .icon { transform: translate(2px, -2px); }
  .frame:hover img { transform: scale(1.025); }
}

.pane-txt { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: 16px 40px; margin-top: 26px; }
.pane.no-shot .pane-txt { margin-top: 0; padding-top: 22px; border-top: 1px solid var(--line-2); }
.pane-tag { font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem); line-height: 1.18; letter-spacing: -0.012em; }
.pane-desc { margin-top: 12px; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); text-align: justify; text-indent: 1.6em; hyphens: auto; -webkit-hyphens: auto; }
.pane-desc i { color: var(--ink-3); }
.pane-meta { font-size: 1rem; line-height: 1.45; color: var(--ink-2); padding-top: 6px; }
.pane-meta p + p { margin-top: 8px; }
.pane-meta i { color: var(--ink-3); }
.pane-meta .go { margin-top: 16px; font-size: 1.0625rem; }

.footnote { max-width: 70ch; margin-top: 32px; font-size: 1rem; font-style: italic; line-height: 1.5; color: var(--ink-3); }
.footnote .link { color: inherit; }

/* ---------- despre: frază de început + file cu un singur panou ---------- */
/* aceeași grilă de trei coloane ca panourile de dedesubt: fraza mare pe două, paragraful în a treia */
.about-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 40px; align-items: baseline; }
.lead { grid-column: span 2; font-size: clamp(1.5rem, 1rem + 1.5vw, 2.125rem); line-height: 1.3; letter-spacing: -0.012em; text-wrap: balance; }
.more { color: var(--ink-2); font-size: 1.125rem; line-height: 1.55; }

/* patru blocuri, unul sub altul: nume + linie, apoi conținutul pe trei coloane */
.block { margin-top: 60px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.block-name { padding-bottom: 14px; margin-bottom: 28px; border-bottom: 1px solid var(--line-2); font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.014em; }

/* toate panourile stau pe trei coloane: totul cade la același nivel */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.note h3 { font-size: 1.25rem; font-weight: 500; }
.note p { margin-top: 8px; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); }
/* textele curg ca într-o carte: aliniate stânga-dreapta, cu primul rând retras */
.note p, .cv-note, .more { text-align: justify; text-indent: 1.6em; hyphens: auto; -webkit-hyphens: auto; }
.note, .card { padding-top: 0; }
.cv-when { font-size: 1rem; font-style: italic; line-height: 1.4; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.card.is-now .cv-when { color: var(--accent); }
.cv-role { margin-top: 4px; font-size: 1.25rem; line-height: 1.25; }
.cv-org { margin-top: 3px; font-size: 1.0625rem; line-height: 1.4; color: var(--ink-2); }
.cv-note { margin-top: 10px; font-size: 1.0625rem; line-height: 1.5; color: var(--ink-3); }

.tech { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.tech div { padding: 16px 0 22px; border-top: 1px solid var(--line-2); }
.tech div:nth-child(-n + 3) { border-top: 0; padding-top: 0; }
.tech dt { font-size: 1.0625rem; font-style: italic; color: var(--ink-3); }
.tech dd { margin-top: 4px; font-size: 1.1875rem; line-height: 1.45; color: var(--ink-2); }
.tech dd b { font-weight: 500; color: var(--accent); }
.legend { padding-top: 14px; border-top: 1px solid var(--line); font-size: 1rem; font-style: italic; color: var(--ink-3); }
.legend b { font-weight: 400; color: var(--accent); }

/* ---------- contact (bloc verde, compact) ---------- */
.contact { background: var(--inv-bg); color: var(--inv-ink); padding: clamp(52px, 6vw, 80px) 0 0; }
.contact ::selection { background: var(--inv-ink); color: var(--inv-bg); }
.contact :focus-visible { outline-color: var(--inv-accent); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(32px, 5vw, 72px); align-items: end; }
.contact-title { font-size: clamp(2.125rem, 1.2rem + 3vw, 3.375rem); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; }
.contact-lead { margin-top: 16px; max-width: 44ch; font-size: 1.1875rem; line-height: 1.5; color: var(--inv-ink-2); }

.mailrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.mail {
  position: relative; padding-bottom: 4px;
  font-size: clamp(1.375rem, 1rem + 1.2vw, 1.875rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.012em;
  color: var(--inv-ink); text-decoration: none; overflow-wrap: anywhere;
}
.mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--inv-accent); transform-origin: left;
}
.copy { font-size: 1.0625rem; font-style: italic; color: var(--inv-ink-2); transition: color 160ms ease; }
.reach { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 18px; font-size: 1.125rem; }
.reach a { display: inline-flex; align-items: center; gap: 0.4em; color: var(--inv-ink); text-decoration: none; transition: color 160ms ease; }
.reach .icon { color: var(--inv-accent); transition: transform 220ms var(--ease-out); }
.avail { margin-top: 14px; font-size: 1rem; font-style: italic; color: var(--inv-ink-2); }
.avail time { font-variant-numeric: lining-nums tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .mail:hover::after { animation: redraw 520ms var(--ease-out); }
  .copy:hover { color: var(--inv-ink); }
  .reach a:hover { color: var(--inv-accent); }
  .reach a:hover .icon-out { transform: translate(2px, -2px); }
  .reach a:hover .icon-down { transform: translateY(2px); }
}
@keyframes redraw { from { transform: scaleX(0); } }

/* subsol: semnătura, apoi rândul mic */
.foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 36px; margin-top: clamp(36px, 5vw, 56px); padding: 14px 0 18px; border-top: 1px solid var(--inv-line); font-size: 1rem; color: var(--inv-ink-2); }
.signoff svg { display: block; height: 62px; width: auto; margin-left: -4px; color: var(--inv-ink); }
.foot a { color: inherit; text-decoration: none; transition: color 160ms ease; }
.foot nav { display: flex; gap: 22px; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--inv-ink); } }

/* ---------- mișcare ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* intrarea la scroll, o singură dată */
  .js [data-rv] { opacity: 0; transform: translateY(14px); }
  .js [data-rv].in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }

  .js .section:not(.in)::before { transform: scaleX(0); }
  .section::before { transition: transform 1200ms var(--ease-out); }

  /* hero: textul urcă în trepte, fotografia se dezvelește */
  .hero-copy > * { animation: rise 800ms var(--ease-out) both; }
  .hero-copy > .hero-rule { animation-name: rule; animation-delay: 120ms; }
  .hero-copy > .hero-sub { animation-delay: 200ms; }
  .portrait-frame { animation: unveil 1000ms var(--ease-in-out) 80ms both; }
  .portrait figcaption { animation: rise 700ms var(--ease-out) 600ms both; }
  .stat { animation: rise 700ms var(--ease-out) both; }
  .stat:nth-child(1) { animation-delay: 380ms; }
  .stat:nth-child(2) { animation-delay: 450ms; }
  .stat:nth-child(3) { animation-delay: 520ms; }
  .stat:nth-child(4) { animation-delay: 590ms; }

  /* proiecte: panoul nou intră lin (blur scurt ca să mascheze schimbarea) */
  .pane.is-active .frame { animation: shot 560ms var(--ease-out) both; }
  .pane.is-active .pane-txt > * { animation: rise 520ms var(--ease-out) 90ms both; }
  .pane.is-active .pane-txt > :nth-child(2) { animation-delay: 160ms; }

  /* contact: semnătura se scrie de la stânga la dreapta */
  .js .signoff:not(.in) svg { clip-path: inset(0 100% 0 0); }
  .signoff svg { clip-path: inset(0 0 0 0); transition: clip-path 1700ms cubic-bezier(0.65, 0, 0.35, 1) 200ms; }

  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes rule { from { opacity: 0; transform: scaleX(0); } }
  @keyframes unveil { from { clip-path: inset(0 0 100% 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
  @keyframes shot { from { opacity: 0; transform: scale(0.985); filter: blur(6px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links, .nav .resume { display: none; }
  .menu-btn { display: grid; }
  .menu.is-open { display: block; }

  .contact-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .tech { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech div:nth-child(3) { border-top: 1px solid var(--line-2); padding-top: 16px; }

  /* proiecte pe ecran îngust: un proiect pe rând, cu săgeți și glisare */
  .work-body { grid-template-columns: minmax(0, 1fr); }
  .picks { display: none; }
  .stepper { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; border-bottom: 1px solid var(--line-2); }
  .step-count { font-size: 1.0625rem; font-style: italic; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
  .step-count b { font-weight: 400; font-style: normal; color: var(--accent); }
  .steps { display: flex; gap: 10px; }
  .step { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 1.125rem; color: var(--ink); transition: transform 140ms var(--ease-out), border-color 160ms ease; }
  .step:active { transform: scale(0.94); border-color: var(--accent); }
  .pane-name { display: block; margin: 18px 0 14px; font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.012em; }
  .pane-tag { font-size: 1.25rem; font-weight: 400; color: var(--ink-2); }
  .pane-desc, .note p, .cv-note, .more { text-align: left; text-indent: 0; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 340px; margin-inline: auto; }
  .hero-sub { font-size: 1.1875rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding-bottom: 18px; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .pane-txt { grid-template-columns: minmax(0, 1fr); }
  .trio, .about-top { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lead { grid-column: auto; }
  .block { margin-top: 40px; }
  /* contact pe mobil: totul centrat, ca hero-ul */
  .contact { text-align: center; }
  .contact-lead { margin-inline: auto; }
  .mailrow, .reach { justify-content: center; }
  .mailrow { flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; }
  .foot { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; padding-top: 18px; }
  .foot nav { justify-content: center; }
  .signoff svg { margin: 0 auto 6px; }
}

@media (max-width: 560px) {
  .wordmark svg { height: 38px; }
  .tech { grid-template-columns: minmax(0, 1fr); }
  .tech div:nth-child(2) { border-top: 1px solid var(--line-2); padding-top: 16px; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 0; padding: 40px var(--gutter); text-align: center; }
.nf .wordmark { margin: 0 0 28px; }
.nf .wordmark svg { height: 64px; transform: none; }
.nf .display { color: var(--accent); }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; margin-top: 30px; font-size: 1.1875rem; }
