/* =============================================================
   KsuDze — Portfolio
   Design system & styles (vanilla CSS, no build step)
   Fonts: Onest (Google Fonts)
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand accents (constant across themes) */
  --accent-blue: #2e5bff;
  --accent-green: #22a06b;
  --accent-yellow: #fcfb65;

  /* Dark palette (used by dark sections & dark theme) */
  --d-bg: #1c1f26;
  --d-card: #262a33;
  --d-border: #363b45;
  --d-text: #eef0f3;
  --d-muted: #9aa0a8;

  /* Light palette */
  --l-bg: #f4f0ef;        /* powdery */
  --l-surface: #ffffff;
  --l-surface-2: #fbfbfb;
  --l-text: #181a1f;
  --l-muted: #6e747c;
  --l-border: #dcdfe3;

  /* Semantic tokens — default = LIGHT */
  --bg: var(--l-bg);
  --surface: var(--l-surface);
  --surface-2: var(--l-surface-2);
  --text: var(--l-text);
  --muted: var(--l-muted);
  --border: var(--l-border);

  /* Layout */
  --pad: 56px;            /* section side padding */
  --maxw: 1280px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow-card: 0 1px 2px rgba(24,26,31,.04), 0 8px 30px rgba(24,26,31,.06);
}

/* Light-only site (dark theme removed — not in the Figma macet).
   Case pages carry their own fixed theme via per-page CSS. */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s var(--ease), color .35s var(--ease);
  /* clip (not hidden) prevents horizontal scroll WITHOUT breaking position:sticky on the header */
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- i18n: show only the active language ---------- */
html[data-lang="ru"] [data-lang-en] { display: none !important; }
html[data-lang="en"] [data-lang-ru] { display: none !important; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: 88px; }
.section--tight { padding-block: 56px; }
.eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--blue { color: var(--accent-blue); }

/* Type scale */
.h1 { font-size: clamp(38px, 6vw, 58px); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; }
.h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; line-height: 1.08; letter-spacing: -.01em; }
.h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; line-height: 1;
  padding: 11px 20px 12px; border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { opacity: .9; }
.btn--outline { border-color: var(--text); color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); }
.btn--accent { background: var(--accent-blue); color: #fff; }
.btn--green { background: var(--accent-green); color: #fff; }
.btn--lg { padding: 15px 26px; }
/* On dark sections the solid button should be light */
.on-dark .btn--solid { background: var(--d-text); color: var(--d-bg); }
.on-dark .btn--outline { border-color: var(--d-text); color: var(--d-text); }
.on-dark .btn--outline:hover { background: var(--d-text); color: var(--d-bg); }

/* ---------- Tags / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; font-size: 14px; font-weight: 600;
  padding: 6px 12px 7px; border-radius: 8px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text);
}
.chip--pill { border-radius: 999px; }
.chip--blue { background: rgba(46,91,255,.1); border-color: transparent; color: var(--accent-blue); }
.on-dark .chip { background: rgba(255,255,255,.05); border-color: var(--d-border); color: var(--d-text); }
.on-dark .chip--blue { background: rgba(46,91,255,.16); color: #8aa3ff; }

/* Availability status pill */
.status {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(34,160,107,.5); animation: pulse 2.4s infinite; }
.on-dark .status { background: rgba(255,255,255,.06); border-color: var(--d-border); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,160,107,.45);} 70%{box-shadow:0 0 0 8px rgba(34,160,107,0);} 100%{box-shadow:0 0 0 0 rgba(34,160,107,0);} }

/* =============================================================
   HEADER / NAV
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-blue); margin-top: 8px; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-weight: 600; font-size: 16px; }
.nav-links a { position: relative; padding: 4px 0; color: var(--text); transition: color .2s; }
.nav-links a:hover { color: var(--accent-blue); }
.nav-links a.is-active { color: var(--accent-blue); }
.nav-item { position: relative; }
.nav-toggle-caret { display: inline-block; transition: transform .25s var(--ease); font-size: .8em; }
.nav-item.open .nav-toggle-caret { transform: rotate(180deg); }

/* Language switch */
.lang {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.lang button { font-size: 14px; font-weight: 600; padding: 5px 11px; border-radius: 999px; color: var(--muted); transition: .2s; }
.lang button.is-active { background: var(--text); color: var(--bg); }


/* Cases dropdown */
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(24,26,31,.18); padding: 10px;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: 60;
}
/* invisible bridge across the gap so the menu doesn't vanish when the
   cursor moves from the "Cases" link down into the dropdown */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dd-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; transition: background-color .15s; }
.dd-item:hover { background: var(--bg); }
.dd-ico { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.dd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dd-title { font-weight: 700; font-size: 15px; color: var(--text); }
.dd-sub { font-size: 13px; color: var(--muted); }
.dd-status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.dd-status--ready { background: rgba(34,160,107,.14); color: var(--accent-green); }
.dd-status--soon { background: rgba(110,116,124,.16); color: var(--muted); }

/* Burger */
.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: .25s var(--ease); }
.burger span:nth-child(1){ top: 14px; } .burger span:nth-child(2){ top: 20px; } .burger span:nth-child(3){ top: 26px; }
body.menu-open .burger span:nth-child(1){ top: 20px; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2){ opacity: 0; }
body.menu-open .burger span:nth-child(3){ top: 20px; transform: rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px); z-index: 70; background: var(--surface);
  border-left: 1px solid var(--border); padding: 88px 28px 28px; transform: translateX(100%);
  transition: transform .35s var(--ease); display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
body.menu-open .mobile-menu { transform: translateX(0); }
/* explicit dark color so the white drawer panel never inherits a page's light text
   color (e.g. body.case-ds sets color:#eef0f3 → links went near-white) */
.mobile-menu a { font-size: 20px; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-menu .sub { font-size: 16px; font-weight: 600; color: var(--muted); padding: 8px 0 8px 16px; border: none; }
.scrim { position: fixed; inset: 0; background: rgba(12,14,18,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 65; backdrop-filter: blur(2px); }
body.menu-open .scrim { opacity: 1; visibility: visible; }

/* =============================================================
   HOME
   ============================================================= */
.hero { background: var(--bg); padding: 80px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.hero-photo { width: 300px; height: 372px; border-radius: 30px; object-fit: cover; object-position: center 18%; box-shadow: var(--shadow-card); }
.hero-content { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero-content .h1 { margin-top: 2px; }
.hero-sub { font-size: 19px; font-weight: 600; }
.hero-desc { color: var(--muted); font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Featured cases section (always dark) */
.cases { background: var(--d-bg); color: var(--d-text); padding: 80px 0 80px; border-radius: 60px 60px 0 0; }
.cases .eyebrow { color: var(--d-muted); }
.cases-head { margin-bottom: 36px; }
.case-list { display: flex; flex-direction: column; gap: 20px; }
.case-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: stretch;
  background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--radius-lg);
  padding: 24px; transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.case-card:hover { transform: translateY(-4px); border-color: #4b5160; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.case-thumb { width: 100%; aspect-ratio: 340 / 236; border-radius: 16px; overflow: hidden; background: #11141a; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* isqod custom yellow thumb */
.thumb-isqod { background: var(--accent-yellow); display: flex; flex-direction: column; justify-content: space-between; padding: 22px; color: #181a1f; }
.thumb-isqod .iq-logo { font-size: 34px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.thumb-isqod .iq-logo::before { content: "✳"; color: #181a1f; font-size: 26px; }
.thumb-isqod .iq-cap { font-size: 13px; font-weight: 600; opacity: .75; }
.thumb-isqod .iq-pill { align-self: flex-start; background: #181a1f; color: var(--accent-yellow); font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.case-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.case-body .tagline { align-self: flex-start; font-size: 14px; font-weight: 600; color: #fff; background: var(--accent-blue); border: 1px solid var(--d-border); letter-spacing: .3px; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
.case-body h3, .case-body > p { align-self: stretch; }
.case-body h3 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; line-height: 1.15; margin-bottom: 10px; }
.case-body p { color: var(--d-muted); font-size: 16px; line-height: 1.55; margin-bottom: 18px; }
/* short result summary — dark tags in a row */
.case-metrics { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; margin-bottom: 18px; }
.case-metric { display: inline-flex; align-items: center; gap: 6px; background: #14171c;
  border: 1px solid var(--d-border); color: #fbfbfb; font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; }
.case-metric b { color: inherit; font-weight: 600; }

/* button pinned to the bottom of the card */
.case-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: #181a1f;
  background: #fff; border: 1px solid transparent; padding: 11px 18px; border-radius: 999px;
  margin-top: auto; align-self: flex-start;
  transition: transform .15s var(--ease), opacity .2s; }
.case-link:hover { transform: translateY(-2px); opacity: .9; }

/* Home "more about me" CTA band */
.cta-band { background: var(--d-bg); color: var(--d-text); text-align: center; padding: 40px 0 96px; border-top: 1px solid var(--d-border); }
.cta-band .h3 { font-size: 25px; line-height: 1.08; letter-spacing: -0.25px; margin-bottom: 10px; }
.cta-band p { color: var(--d-muted); font-size: 15.5px; margin-bottom: 22px; }
.cta-band .btn--outline { border-color: #9aa0a8; color: #eef0f3; padding: 13px 24px 14px; font-size: 15px; }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer { background: var(--d-bg); color: var(--d-text); border-top: 1px solid var(--d-border); text-align: center; padding: 56px 0 40px; }
.site-footer .footer-h { font-size: 25px; font-weight: 800; line-height: 1.08; letter-spacing: -0.25px; margin-bottom: 10px; }
.site-footer .footer-sub { color: var(--d-muted); font-size: 15.5px; margin-bottom: 22px; }
.site-footer .footer-cta { border-color: #9aa0a8; color: var(--d-text); background: transparent; padding: 13px 24px 14px; font-size: 15px; }
.site-footer .footer-cta:hover { background: var(--d-text); color: var(--d-bg); }
.footer-li { display: flex; justify-content: center; margin-bottom: 6px; }
.footer-li svg { display: block; }
.footer-div { width: 100%; height: 1px; background: rgba(255,255,255,.09); margin: 36px 0 24px; }
.footer-meta { font-size: 13px; color: #fbfbfb; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; align-items: center; }
.footer-meta a { color: #fbfbfb; }
.footer-meta a:hover { color: var(--accent-blue); }

/* =============================================================
   ABOUT
   ============================================================= */
.about-intro { padding-block: 80px; }
.about-grid { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: stretch; }
.about-photo { width: 100%; height: 100%; min-height: 460px; border-radius: var(--radius-lg); object-fit: cover; object-position: 50% 30%; box-shadow: var(--shadow-card); }
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text .h2 { margin: 6px 0 4px; }
.about-text p { color: var(--text); font-size: 18px; line-height: 1.6; }
.about-text p.muted { color: var(--muted); }

.hobbies { background: var(--surface-2); border-top: 1px solid var(--border); }
.hobbies-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.hobby { display: flex; flex-direction: column; gap: 12px; }
.hobby img { width: 100%; aspect-ratio: 279 / 299; object-fit: cover; border-radius: 18px; }
.hobby h4 { font-size: 18px; font-weight: 600; }
.hobby p { font-size: 16px; color: var(--text); line-height: 1.55; }

/* =============================================================
   RESUME
   ============================================================= */
.resume-page { background: var(--d-bg); color: var(--d-text); min-height: 60vh; padding-block: 64px; }
.resume-page .page-title { text-align: center; font-size: clamp(30px,5vw,44px); font-weight: 800; margin-bottom: 40px; }
.resume-card { background: var(--surface); color: var(--text); border-radius: 28px; padding: clamp(28px, 4vw, 56px); max-width: 1080px; margin-inline: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.resume-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 28px; }
.resume-head h1 { font-size: clamp(26px,4vw,34px); font-weight: 800; }
.resume-head .role { color: var(--accent-blue); font-weight: 600; margin-top: 4px; }
.resume-body { display: grid; grid-template-columns: 280px 1fr; gap: 48px; }
.resume-side { display: flex; flex-direction: column; gap: 24px; }
.rs-block h4 { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.rs-block p, .rs-block li { font-size: 14.5px; line-height: 1.5; }
.rs-block li { margin-bottom: 4px; }
.resume-main { display: flex; flex-direction: column; gap: 30px; }
.exp h3 { font-size: 19px; font-weight: 800; }
.exp .company { color: var(--accent-blue); font-weight: 600; font-size: 15px; margin-top: 2px; }
.exp .period { color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; }
.exp .summary { font-size: 15px; margin-bottom: 12px; }
.exp h5 { font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 10px 0 6px; }
.exp ul { display: flex; flex-direction: column; gap: 6px; }
.exp ul li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; }
.exp ul li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-blue); }
.resume-cta { text-align: center; padding: 56px 0 8px; color: var(--d-text); }
.resume-cta .li-icon { width: 54px; height: 54px; border-radius: 14px; background: #0a66c2; color: #fff; display: grid; place-items: center; font-weight: 800; margin: 0 auto 16px; font-size: 24px; }

/* =============================================================
   CASE STUDY (shared)
   ============================================================= */
.case-page { background: var(--d-bg); color: var(--d-text); }
.case-page .container { max-width: 1280px; }
.case-hero { padding-block: 64px 40px; }
.case-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.case-hero--full .case-hero-grid { grid-template-columns: 1fr; }
.case-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin: 16px 0 16px; max-width: 18ch; }
.case-hero .case-sub { font-size: clamp(17px,2.2vw,20px); color: var(--d-muted); max-width: 70ch; margin-bottom: 22px; }
.case-logo-wrap { width: 360px; max-width: 38vw; border-radius: var(--radius-lg); overflow: hidden; position: relative; display: grid; place-items: center; aspect-ratio: 360/300; background: linear-gradient(135deg, #20242c, #14171c); }
.case-logo-wrap img { width: 70%; }
.case-logo-wrap .blob { position: absolute; width: 320px; height: 320px; border-radius: 50%; filter: blur(60px); opacity: .5; }
.case-logo-wrap .blob.g { background: var(--accent-green); right: -80px; top: -60px; }
.case-logo-wrap .blob.b { background: var(--accent-blue); left: -90px; bottom: -70px; }

.case-meta { display: flex; flex-wrap: wrap; gap: 36px; padding-top: 22px; border-top: 1px solid var(--d-border); margin-top: 6px; }
.case-meta .mi { max-width: 280px; }
.case-meta .mi .k { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--d-muted); font-weight: 700; margin-bottom: 6px; }
.case-meta .mi .v { font-size: 15.5px; font-weight: 600; }

/* Stat strip */
.statstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--d-border); border-bottom: 1px solid var(--d-border); }
.statstrip .stat { padding: 28px 28px 28px 0; border-right: 1px solid var(--d-border); }
.statstrip .stat:last-child { border-right: none; }
.statstrip .stat .num { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.statstrip .stat .num.green { color: var(--accent-green); }
.statstrip .stat .num.yellow { color: var(--accent-yellow); }
.statstrip .stat .lab { font-weight: 600; font-size: 15px; margin-top: 6px; }
.statstrip .stat .hint { font-size: 13px; color: var(--d-muted); margin-top: 3px; }

/* Section header (kicker) */
.case-section { padding-block: 56px; border-top: 1px solid rgba(255,255,255,.05); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--d-muted); margin-bottom: 16px; }
.kicker .n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--d-text); font-size: 12px; }
.case-section h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; max-width: 22ch; }
.case-section .sec-text { color: var(--d-muted); font-size: 17px; line-height: 1.6; max-width: 78ch; margin-top: 14px; }

/* Cards grid (pains, principles, findings) */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.dcard { background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--radius-md); padding: 24px; }
.dcard .tag { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-green); margin-bottom: 10px; }
.dcard .tag.red { color: #ff6b6b; }
.dcard h4 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.dcard p { color: var(--d-muted); font-size: 15.5px; line-height: 1.55; }
.dcard .sev { float: right; font-size: 12px; font-weight: 700; color: var(--d-muted); }

/* Method chips row */
.method-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.method-row .chip { background: var(--d-card); border-color: var(--d-border); color: var(--d-text); padding: 10px 16px; border-radius: 999px; font-size: 15px; }

/* Comparison bar chart */
.cmp { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.cmp-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 16px; align-items: center; }
.cmp-row .name { font-weight: 600; font-size: 15px; }
.cmp-row .track { height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; position: relative; }
.cmp-row .fill { height: 100%; border-radius: 8px; background: #3a4150; transition: width 1s var(--ease); width: 0; }
.cmp-row.is-best .fill { background: var(--accent-green); box-shadow: 0 0 24px rgba(34,160,107,.4); }
.cmp-row .val { font-size: 14px; font-weight: 700; color: var(--d-muted); white-space: nowrap; }
.cmp-row.is-best .val { color: var(--accent-green); }
.cmp-note { color: var(--d-muted); font-size: 14px; margin-top: 18px; }

/* Visual block (mockups / charts as images) */
.visual { margin-top: 28px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--d-border); background: #0f1217; }
.visual img { width: 100%; }
.visual--plain { border: none; background: transparent; }
.visual-cap { color: var(--d-muted); font-size: 14px; margin-top: 14px; }

/* Findings (with quote) */
.finding { background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--radius-md); padding: 26px; }
.finding-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.finding-head .crit { font-size: 12px; font-weight: 700; color: #ff6b6b; background: rgba(255,107,107,.12); padding: 4px 10px; border-radius: 999px; }
.finding-head .scope { font-size: 12px; font-weight: 700; color: var(--d-muted); }
.finding h4 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.finding p { color: var(--d-muted); font-size: 15.5px; line-height: 1.6; }
.finding blockquote { border-left: 3px solid var(--accent-yellow); padding: 4px 0 4px 16px; margin: 14px 0 0; font-size: 15.5px; font-style: italic; color: var(--d-text); }
.finding blockquote cite { display: block; font-style: normal; color: var(--d-muted); font-size: 13px; margin-top: 6px; }

/* Horizons (recommendations) */
.horizons { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 28px; }
.horizon { background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--radius-md); padding: 24px; }
.horizon .ht { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; color: var(--accent-yellow); margin-bottom: 4px; }
.horizon h4 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.horizon ul { display: flex; flex-direction: column; gap: 10px; }
.horizon li { position: relative; padding-left: 20px; font-size: 15px; color: var(--d-muted); line-height: 1.5; }
.horizon li::before { content: "→"; position: absolute; left: 0; color: var(--accent-green); font-weight: 700; }

/* Forecast */
.forecast { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 28px; }
.fcard { background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--radius-md); padding: 28px; }
.fcard .label { font-size: 14px; font-weight: 600; color: var(--d-muted); margin-bottom: 14px; }
.fcard .big { display: flex; align-items: baseline; gap: 14px; font-size: clamp(28px,4vw,40px); font-weight: 800; }
.fcard .big .from { color: var(--d-muted); }
.fcard .big .arrow { color: var(--accent-green); }
.fcard .big .to { color: var(--accent-green); }
.fcard p { color: var(--d-muted); font-size: 15px; line-height: 1.55; margin-top: 12px; }

/* Reflection (two columns) */
.reflect { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; margin-top: 28px; }
.reflect h4 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.reflect ul { display: flex; flex-direction: column; gap: 12px; }
.reflect li { position: relative; padding-left: 22px; color: var(--d-muted); line-height: 1.55; font-size: 15.5px; }
.reflect li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-yellow); }

/* Callout (business task / highlighted note) */
.callout { background: rgba(252,251,101,.06); border: 1px solid var(--d-border); border-left: 3px solid var(--accent-yellow); border-radius: 12px; padding: 20px 22px; margin-top: 22px; }
.callout h4 { font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-yellow); margin-bottom: 8px; font-weight: 700; }
.callout p { color: var(--d-muted); font-size: 15.5px; line-height: 1.6; }

/* Before / after caption */
.ba-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.ba-caption div { font-size: 14.5px; line-height: 1.5; }
.ba-caption .bad { color: #ff8f8f; } .ba-caption .good { color: #7be0a8; }

/* Quantitative chart block (rebuilt) */
.chart-block { margin-top: 30px; }
.chart-block h4 { font-size: 15.5px; font-weight: 700; }
.chart-block .ch-hint { font-size: 13px; color: var(--d-muted); margin: 2px 0 16px; }

/* mini segment stats */
.segs { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 22px; }
.seg .n { font-size: 34px; font-weight: 800; }
.seg .l { font-size: 14px; color: var(--d-muted); }

@media (max-width: 860px) { .ba-caption { grid-template-columns: 1fr; } }

/* Disclaimer */
.disclaimer { background: rgba(255,255,255,.03); border: 1px solid var(--d-border); border-radius: 12px; padding: 16px 20px; color: var(--d-muted); font-size: 14px; margin-top: 26px; line-height: 1.5; }

/* Case end CTA */
.case-end { text-align: left; padding-block: 56px 80px; }
.case-end .h2 { margin-bottom: 22px; }
.case-end-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Design-system: color tokens */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 28px; }
.swatch { background: var(--d-card); border: 1px solid var(--d-border); border-radius: 12px; padding: 10px; }
.swatch .chip-color { height: 56px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); }
.swatch .name { font-size: 12.5px; font-weight: 700; margin-top: 10px; word-break: break-word; }
.swatch .hex { font-size: 12px; color: var(--d-muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-top: 2px; }

/* Design-system: type scale samples */
.type-samples { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.type-sample { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px;
  background: var(--d-card); border: 1px solid var(--d-border); border-radius: 14px; padding: 20px 24px; }
.type-sample .sample { color: var(--d-text); }
.type-sample .ts-meta { font-size: 12.5px; color: var(--d-muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ts-h1 { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.ts-h2 { font-size: 24px; font-weight: 600; }
.ts-body { font-size: 16px; }
.ts-label { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--d-muted); }

/* Design-system: component inventory chips */
.inventory { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.inventory .chip { background: var(--d-card); border-color: var(--d-border); color: var(--d-text); }

/* =============================================================
   CONTACT MODAL
   ============================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-scrim { position: absolute; inset: 0; background: rgba(12,14,18,.6); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(520px, 100%); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 24px; padding: 32px; box-shadow: 0 40px 100px rgba(0,0,0,.4);
  transform: translateY(16px) scale(.98); transition: transform .3s var(--ease); }
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-card h3 { font-size: 26px; font-weight: 800; }
.modal-card .modal-sub { color: var(--muted); margin: 8px 0 22px; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg); display: grid; place-items: center; font-size: 20px; color: var(--muted); transition: .2s; }
.modal-close:hover { background: var(--text); color: var(--bg); }
.contact-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 12px; transition: .2s; }
.contact-row:hover { border-color: var(--accent-blue); background: var(--bg); transform: translateX(2px); }
.contact-row .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; color: #fff; }
.contact-row .ico.tg { background: #2aabee; } .contact-row .ico.mail { background: #ea4335; } .contact-row .ico.li { background: #0a66c2; }
.contact-row .ct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-row .ct .t { font-weight: 700; }
.contact-row .ct .s { color: var(--muted); font-size: 14px; }
.contact-row .arr { color: var(--muted); }

/* =============================================================
   Reveal-on-scroll animation
   ============================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  :root { --pad: 40px; }
  .statstrip { grid-template-columns: repeat(2, 1fr); }
  .statstrip .stat:nth-child(2) { border-right: none; }
  .statstrip .stat { border-bottom: 1px solid var(--d-border); }
  .statstrip .stat:nth-last-child(-n+2) { border-bottom: none; }
  .resume-body { grid-template-columns: 220px 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .nav-links, .lang { display: none; }
  .burger { display: block; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  /* hide the big portrait on mobile — it ate half the screen above the text */
  .hero-photo { display: none; }
  .hero-content { width: 100%; }
  .hero-desc { max-width: 100%; }
  .case-card { grid-template-columns: 1fr; gap: 18px; }
  .case-thumb { aspect-ratio: 16/10; }
  .cards-3, .horizons { grid-template-columns: 1fr; }
  .cards-2, .forecast, .reflect { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  /* hide the intro portrait on mobile (hobby photos below stay) */
  .about-photo { display: none; }
  .hobbies-grid { grid-template-columns: repeat(2, 1fr); }
  .resume-body { grid-template-columns: 1fr; gap: 28px; }
  .case-hero-grid { grid-template-columns: 1fr; }
  .case-logo-wrap { width: 100%; max-width: 100%; order: -1; aspect-ratio: 16/9; }
  .cmp-row { grid-template-columns: 100px 1fr auto; gap: 10px; }
}

@media (max-width: 520px) {
  :root { --pad: 20px; }
  body { font-size: 17px; }
  .section { padding-block: 56px; }
  .hero { padding-block: 48px; }
  .statstrip { grid-template-columns: 1fr; }
  .statstrip .stat { border-right: none; padding-right: 0; }
  .hobbies-grid { grid-template-columns: 1fr; }
  .case-meta { gap: 22px; }
  .cmp-row { grid-template-columns: 84px 1fr; }
  .cmp-row .val { grid-column: 2; justify-self: end; margin-top: -6px; }
  .modal-card, .resume-card { padding: 22px; }
}
