/* =========================================================================
   polautsau.com — shared design system
   Light palette on bare :root; dark redefined for both system + manual.
   ========================================================================= */

:root {
  color-scheme: light;

  /* Brand */
  --brand:        #4d7c0f;   /* accessible lime for text/links on light */
  --brand-vivid:  #9fe870;   /* the signature lime, for fills & accents */
  --brand-soft:   #f0fadf;

  /* Surfaces */
  --bg:           #ffffff;
  --bg-subtle:    #f7f8f7;
  --surface:      #ffffff;
  --surface-2:    #f2f4f1;
  --border:       #e3e6e1;
  --border-strong:#cdd2c9;

  /* Text */
  --text:         #16181a;
  --text-muted:   #5c6169;
  --text-faint:   #868c94;
  --text-invert:  #ffffff;

  /* Per-page accent — overridden by each app landing */
  --accent:       var(--brand);
  --accent-2:     #2f6f2f;
  --accent-fill:  var(--brand-vivid);
  --accent-soft:  var(--brand-soft);
  --on-accent:    #16181a;

  /* Depth */
  --shadow-sm: 0 1px 2px rgb(16 24 16 / .06), 0 1px 3px rgb(16 24 16 / .04);
  --shadow-md: 0 4px 12px rgb(16 24 16 / .07), 0 2px 4px rgb(16 24 16 / .04);
  --shadow-lg: 0 16px 40px rgb(16 24 16 / .10), 0 4px 12px rgb(16 24 16 / .05);

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand:        #a8ef7c;
    --brand-vivid:  #9fe870;
    --brand-soft:   #1c2916;

    --bg:           #0c0e0d;
    --bg-subtle:    #121514;
    --surface:      #161a18;
    --surface-2:    #1e2320;
    --border:       #2a302c;
    --border-strong:#3b433d;

    --text:         #f2f5f2;
    --text-muted:   #a9b1ab;
    --text-faint:   #79817c;
    --text-invert:  #0c0e0d;

    --accent:       var(--brand);
    --accent-2:     #7fd15a;
    --accent-fill:  var(--brand-vivid);
    --accent-soft:  #1c2916;
    --on-accent:    #0c0e0d;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
    --shadow-md: 0 4px 14px rgb(0 0 0 / .45);
    --shadow-lg: 0 18px 44px rgb(0 0 0 / .55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand:        #a8ef7c;
  --brand-vivid:  #9fe870;
  --brand-soft:   #1c2916;

  --bg:           #0c0e0d;
  --bg-subtle:    #121514;
  --surface:      #161a18;
  --surface-2:    #1e2320;
  --border:       #2a302c;
  --border-strong:#3b433d;

  --text:         #f2f5f2;
  --text-muted:   #a9b1ab;
  --text-faint:   #79817c;
  --text-invert:  #0c0e0d;

  --accent:       var(--brand);
  --accent-2:     #7fd15a;
  --accent-fill:  var(--brand-vivid);
  --accent-soft:  #1c2916;
  --on-accent:    #0c0e0d;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --shadow-md: 0 4px 14px rgb(0 0 0 / .45);
  --shadow-lg: 0 18px 44px rgb(0 0 0 / .55);
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, .98rem + .5vw, 1.3rem); }
p  { text-wrap: pretty; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-2); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--brand-vivid); color: #16181a; }

/* --------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--bg-subtle); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin-top: .75rem; }

.stack > * + * { margin-top: 1rem; }
.lede { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--text-muted); }

/* ------------------------------------------------------------ site nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.nav-brand {
  font-weight: 800; letter-spacing: -.03em; font-size: 1.05rem;
  color: var(--text); text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: center; gap: .55rem;
}
.nav-brand .mark {
  width: 1.85rem; height: 1.85rem; border-radius: 8px; flex: none;
  background: var(--accent-fill); color: #16181a;
  display: grid; place-items: center; font-size: .78rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: .45rem .7rem; border-radius: var(--r-sm);
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: .93rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.icon-btn {
  width: 2.35rem; height: 2.35rem; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; inset-inline: var(--gutter); top: calc(100% + .4rem);
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: .5rem;
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: .65rem .75rem; }
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: var(--r-full);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); color: var(--on-accent); }

.btn--dark { background: var(--text); color: var(--bg); }
.btn--dark:hover { color: var(--bg); box-shadow: var(--shadow-md); }

.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--surface-2); }

.btn--sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .95rem; }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* --------------------------------------------------------------- badges */
.badges { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.badge {
  display: inline-flex; align-items: center; gap: .32rem;
  padding: .2rem .6rem; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
}
.badge--accent {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent);
}

/* ------------------------------------------------------------ app cards */
.app-card { display: flex; flex-direction: column; gap: 1rem; }
/* Карточки приложений одного размера: строки сетки равной высоты, описание
   до 4 строк, кнопки и ссылки на документы прижаты к низу. */
.app-grid { grid-auto-rows: 1fr; }
.app-card > p {
  flex: none; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; min-height: calc(4 * 1.65em);
}
.app-card .badges { min-height: 1.7rem; }
.app-card__links { margin-top: auto; }
.app-card__legal { min-height: 1.3rem; }
.app-card__links .badge { padding-block: .45rem; }
.app-card .badges li { white-space: nowrap; }
.app-card__top { display: flex; align-items: flex-start; gap: .9rem; }
.app-icon {
  width: 60px; height: 60px; flex: none; border-radius: 14px;
  box-shadow: var(--shadow-sm); background: var(--surface-2);
}
.app-icon--lg { width: 88px; height: 88px; border-radius: 20px; }
.app-card__name { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; }
.app-card__meta { font-size: .8rem; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.app-card__links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.app-card__legal { display: flex; gap: .8rem; font-size: .8rem; }
.app-card__legal a { color: var(--text-faint); }
.app-card__legal a:hover { color: var(--accent); }

/* --------------------------------------------------------- app landings */
.app-hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem); }
.app-hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .app-hero__grid { grid-template-columns: 1.05fr .95fr; } }
.app-hero h1 { margin-block: .6rem .8rem; }
.app-hero .lede { max-width: 52ch; }

.shots { display: flex; gap: 1rem; overflow-x: auto; padding-block: .5rem 1rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img {
  width: 218px; flex: none; border-radius: 20px; scroll-snap-align: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--surface-2);
}
.shots--hero { justify-content: center; }
@media (min-width: 860px) { .shots--hero { justify-content: flex-end; } }

.feature { display: flex; gap: .9rem; }
.feature__icon {
  width: 2.4rem; height: 2.4rem; flex: none; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.15rem;
  background: var(--accent-soft); color: var(--accent);
}
.feature h3 { font-size: 1.03rem; margin-bottom: .25rem; }
.feature p { color: var(--text-muted); font-size: .93rem; }

.checklist { list-style: none; padding: 0; display: grid; gap: .6rem; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--text-muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .95rem; height: .5rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); border-radius: 1px;
}

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.stat { text-align: center; padding: 1.1rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.stat b { display: block; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; color: var(--accent); letter-spacing: -.03em; }
.stat span { font-size: .84rem; color: var(--text-muted); }

.cta-band {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(1.75rem, 5vw, 3rem);
  text-align: center; box-shadow: var(--shadow-sm);
}
.cta-band p { color: var(--text-muted); margin: .75rem auto 1.5rem; max-width: 52ch; }
.cta-band .btn-row { justify-content: center; }

/* ---------------------------------------------------------- lang switch */
.lang-switch { display: inline-flex; gap: .2rem; padding: .25rem; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); }
.lang-switch button {
  padding: .32rem .8rem; border: 0; border-radius: var(--r-full); background: transparent;
  color: var(--text-muted); font-weight: 700; font-size: .8rem; cursor: pointer; transition: background .2s, color .2s;
}
.lang-switch button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------- timeline */
.timeline { display: grid; gap: 1rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: .5rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--border); }
.timeline > li { list-style: none; position: relative; padding-left: 2.1rem; }
.timeline > li::before {
  content: ""; position: absolute; left: .5rem; top: .75rem;
  width: .65rem; height: .65rem; border-radius: 50%;
  background: var(--accent-fill); transform: translateX(-50%); box-shadow: 0 0 0 3px var(--bg);
}
.timeline .when { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.timeline .role { font-weight: 700; margin-top: .1rem; }
.timeline .org { font-size: .9rem; color: var(--text-faint); margin-bottom: .4rem; }
.timeline .what { color: var(--text-muted); font-size: .94rem; }

/* ------------------------------------------------------------ prose/legal */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); margin-top: 2.5rem; margin-bottom: .7rem; }
.prose > :first-child, .prose > :first-child > :first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; margin-bottom: .4rem; }
.prose p, .prose li { color: var(--text-muted); }
.prose > * + * { margin-top: .9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .35rem; }
.prose strong { color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; }
.page-head .updated { font-size: .88rem; color: var(--text-faint); margin-top: .5rem; }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); margin-bottom: .7rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.footer-grid a { color: var(--text-muted); text-decoration: none; font-size: .92rem; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-base p { font-size: .87rem; color: var(--text-faint); }

/* --------------------------------------------------------------- motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .card--hover:hover { transform: none; }
}

/* --------------------------------------------------------------- to-top */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  display: grid; place-items: center; cursor: pointer; color: var(--text-muted);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, transform .25s, color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { color: var(--text); transform: translateY(-2px); }
.to-top svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- utils */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--accent-fill); color: #16181a; padding: .6rem 1rem;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: .5rem; }
.text-muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------------------------------------------------------------- travel log */
/* Все карточки одного размера: строки сетки равной высоты, длинное описание
   обрезается до двух строк (полный текст — в title). */
.travel-grid { list-style: none; padding: 0; grid-auto-rows: 1fr; }
.travel-grid > li { display: flex; min-width: 0; }
.trip { flex: 1; min-width: 0; }
.trip--home { border-color: var(--accent); background: var(--accent-soft); }
.trip__row { display: flex; align-items: flex-start; gap: .9rem; }
.trip__flag { width: 34px; height: auto; flex: none; margin-top: .25rem; border-radius: 4px; box-shadow: var(--shadow-sm); }
.trip__body { min-width: 0; }
.trip .trip__when, .trip .trip__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip .trip__when { font-size: .8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.trip .trip__title { font-size: 1.05rem; margin: .15rem 0 .2rem; }
.card p.trip__places {
  color: var(--text-muted); font-size: .93rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: calc(2 * 1.65em);
}

/* ---------------------------------------------------------------- CV page */
.cv-head { display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.75rem); }
.cv-avatar img { width: clamp(88px, 16vw, 132px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent-fill), var(--shadow-md); }
.cv-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.cv-role { font-weight: 600; color: var(--text-muted); margin-top: .35rem; }
.cv-summary { margin-top: 1.5rem; }
.cv-contacts { list-style: none; padding: 0; margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-size: .93rem; color: var(--text-muted); }
.cv-h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 1rem; }
.cv-job { padding: 1.35rem 0; border-top: 1px solid var(--border); }
.cv-job:first-of-type { border-top: 0; padding-top: 0; }
.cv-job header { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: baseline; margin-bottom: .6rem; }
.cv-job h3 { font-size: 1.08rem; grid-column: 1; }
.cv-org { grid-column: 1; color: var(--text-muted); font-weight: 600; font-size: .95rem; }
.cv-when { grid-column: 2; grid-row: 1; font-size: .85rem; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.cv-job ul, .cv-list { padding-left: 1.1rem; color: var(--text-muted); font-size: .95rem; }
.cv-job li + li, .cv-list li + li { margin-top: .3rem; }
.cv-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 2.5rem; }
.cv-tools { margin: 0; }
.cv-edu { list-style: none; padding: 0; }
.cv-edu b { display: block; color: var(--text); font-weight: 600; }
.cv-edu span { font-size: .88rem; }
.cv-side { color: var(--text-muted); font-size: .95rem; }
.print-only { display: none; }
@media (max-width: 560px) {
  .cv-head { flex-direction: column; align-items: flex-start; }
  .cv-job header { grid-template-columns: 1fr; }
  .cv-when { grid-column: 1; grid-row: auto; }
}

@media print {
  @page { size: A4; margin: 10mm 12mm; }
  :root { color-scheme: light; --bg: #fff; --bg-subtle: #fff; --surface: #fff; --text: #111; --text-muted: #333; --text-faint: #555; --accent: #3f6212; --border: #ddd; }
  html { font-size: 8.9pt; }
  body { background: #fff; color: #111; line-height: 1.36; }
  .site-header, .site-footer, .to-top, .skip-link, .no-print { display: none !important; }
  .print-only { display: initial; }
  .section { padding-block: 0; }
  .cv-hero { padding-bottom: .5rem; }
  .container { max-width: none; padding-inline: 0; }
  .eyebrow { display: none; }
  .cv-avatar img { width: 64px; box-shadow: none; }
  .cv-head h1 { font-size: 22pt; }
  .cv-summary { font-size: 10.2pt; margin-top: .8rem; color: #222; }
  .cv-contacts { font-size: 9pt; margin-top: .6rem; }
  .cv-contacts a { color: #111; text-decoration: none; }
  .cv-h2 { margin-bottom: .5rem; font-size: 10pt; }
  .cv-job { padding: .45rem 0; break-inside: avoid; }
  .cv-job header { margin-bottom: .25rem; }
  .cv-job ul, .cv-list, .cv-side { font-size: 8.8pt; }
  .cv-job li + li, .cv-list li + li { margin-top: .05rem; }
  .cv-grid { margin-top: .6rem; gap: 1rem; break-inside: avoid; grid-template-columns: 1fr 1fr; }
  .badge { border: 1px solid #ccc; background: #fff; color: #222; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------- home hero (bento) */
@view-transition { navigation: auto; }

  .hx-chip { display:inline-flex; align-items:center; gap:.5rem; padding:.4rem .8rem; border-radius:999px;
    font-size:.82rem; font-weight:600; background: color-mix(in srgb, var(--surface) 80%, transparent);
    border:1px solid var(--border); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
  .hx-sep { color: var(--text-faint); font-weight: 400; }
  .hx-chip--muted { color: var(--text-muted); font-weight: 500; }
  .hx-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
  .hx-dot { width:.55rem; height:.55rem; border-radius:50%; background:#22c55e; box-shadow:0 0 0 0 rgb(34 197 94 / .6); animation: hx-pulse 2s infinite; }
  @keyframes hx-pulse { 70% { box-shadow:0 0 0 .5rem rgb(34 197 94 / 0); } 100% { box-shadow:0 0 0 0 rgb(34 197 94 / 0); } }
  .hx-chips { display:flex; flex-wrap:wrap; gap:.5rem; }
  .hx-avatar img, .hx-laptop img { width:100%; height:100%; object-fit:cover; }
  

  .hxa { padding-block: clamp(1.5rem,4vw,3rem) clamp(3rem,6vw,5rem); }
  .hxa-grid { display:grid; gap: clamp(.75rem,1.6vw,1rem); grid-template-columns: repeat(12, 1fr); }
  .hxa-tile { background: var(--surface); border:1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.1rem,2.4vw,1.6rem); position:relative; overflow:hidden; }
  .hxa-intro { grid-column: span 7; grid-row: span 3; display:flex; flex-direction:column; gap:1.1rem; justify-content:center; }
  .hxa-intro h1 { font-size: clamp(2.3rem, 1.2rem + 4vw, 4.2rem); letter-spacing:-.035em; }
  .hxa-intro .role { font-weight:650; color: var(--accent); }
  .hxa-photo { grid-column: span 5; grid-row: span 2; padding:0; min-height: 300px; }
  .hxa-photo .hx-laptop { position:absolute; inset:0; }
  .hxa-photo .hx-laptop img { transform: scale(1.04); }
  .hxa-photo::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / .55)); }
  .hxa-avatar { position:absolute; left:1.1rem; bottom:1.1rem; z-index:2; display:flex; align-items:center; gap:.75rem; color:#fff; }
  .hxa-avatar .hx-avatar { width:64px; height:64px; border-radius:50%; overflow:hidden; box-shadow: 0 0 0 3px var(--brand-vivid), var(--shadow-lg); flex:none; }
  .hxa-avatar b { display:block; font-size:.95rem; } .hxa-avatar span { font-size:.8rem; opacity:.85; }
  .hxa-stat { grid-column: span 2; min-height: 150px; display:flex; flex-direction:column; justify-content:flex-end; }
  .hxa-stat b { font-size: clamp(1.8rem,1.2rem + 1.6vw,2.6rem); letter-spacing:-.04em; line-height:1; color: var(--accent); }
  .hxa-stat span { font-size:.82rem; color: var(--text-muted); margin-top:.35rem; line-height:1.35; }
  .hxa-apps { grid-column: span 3; min-height: 150px; display:flex; flex-direction:column; justify-content:space-between; gap:.75rem; text-decoration:none; color:inherit; }
  .hxa-apps:hover { border-color: var(--border-strong); }
  .hxa-icons { display:flex; } .hxa-icons img { width:34px; height:34px; border-radius:9px; border:2px solid var(--surface); margin-right:-8px; }
  .hxa-apps p { font-size:.85rem; color: var(--text-muted); } .hxa-apps b { color: var(--text); }
  .hxa-stat--wide { grid-column: span 3; min-height: 0; flex-direction: row; align-items: center; gap: .75rem; justify-content: flex-start; }
  .hxa-stat--wide b { flex: none; }
  .hxa-stat--wide span { margin-top: 0; line-height: 1.3; }
  .hxa-now { grid-column: span 9; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; padding-block: .85rem; }
  .hxa-now .logos { font-size:.9rem; color: var(--text-muted); } .hxa-now .logos b { color: var(--text); font-weight:700; margin-inline:.3rem; white-space: nowrap; }
  .hxa-tile { animation: hxa-in .7s cubic-bezier(.2,.7,.2,1) both; }
  .hxa-tile:nth-child(2){animation-delay:.06s}.hxa-tile:nth-child(3){animation-delay:.12s}.hxa-tile:nth-child(4){animation-delay:.18s}.hxa-tile:nth-child(5){animation-delay:.24s}.hxa-tile:nth-child(6){animation-delay:.3s}.hxa-tile:nth-child(7){animation-delay:.36s}
  @keyframes hxa-in { from { opacity:0; transform: translateY(14px) scale(.985); } }
  @supports (animation-timeline: view()) {
    .hxa-photo .hx-laptop img { animation: hxa-drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes hxa-drift { to { transform: scale(1.14) translateY(4%); } }
  }
  @media (max-width: 900px) {
    .hxa-intro, .hxa-photo { grid-column: span 12; } .hxa-photo { min-height: 260px; }
    .hxa-stat { grid-column: span 6; } .hxa-apps { grid-column: span 6; } .hxa-stat--wide, .hxa-now { grid-column: span 12; }
  }
  @media (max-width: 600px) {
    .hxa { padding-top: .75rem; }
    .hxa-grid { gap: .7rem; }
    .hxa-tile { border-radius: 20px; }
    .hxa-intro { padding: 1.25rem 1.15rem 1.35rem; gap: .9rem; }
    .hxa-intro h1 { font-size: clamp(2.3rem, 11vw, 3rem); line-height: 1.02; }
    .hxa-intro .role { font-size: .9rem; }
    .hxa-intro .lede { font-size: 1rem; }
    .hx-chip { font-size: .76rem; padding: .32rem .65rem; }
    .hxa-intro .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .hxa-intro .btn-row .btn--primary { grid-column: 1 / -1; }
    .hxa-intro .btn-row .btn { padding-block: .8rem; }
    .hxa-photo { min-height: 230px; }
    .hxa-avatar { left: .9rem; bottom: .9rem; }
    .hxa-avatar .hx-avatar { width: 54px; height: 54px; }
    .hxa-stat, .hxa-apps { min-height: 132px; padding: 1rem; }
    .hxa-icons img { width: 28px; height: 28px; border-radius: 8px; margin-right: -9px; }
    .hxa-stat--wide { min-height: 0; }
    .hxa-now { flex-direction: column; align-items: flex-start; gap: .35rem; padding-block: .9rem; }
    .hxa-now .logos:last-child { font-size: .8rem; }
  }
@media (prefers-reduced-motion: reduce) { .hx-dot, .hxa-tile, .hxa-photo .hx-laptop img { animation: none !important; } }
