/* ==========================================================
   Narek Gyokchakyan — personal site
   ========================================================== */

:root {
  --bg: #0e0e11;
  --bg-2: #121216;
  --surface: #17171c;
  --surface-2: #1e1e24;
  --surface-3: #26262e;
  --border: #2a2a33;
  --border-2: #34343e;
  --text: #e8e8ec;
  --text-2: #b4b4be;
  --muted: #8a8a96;
  --faint: #5e5e6a;
  --accent: #a28bff;
  --accent-strong: #7c5cff;
  --accent-deep: #5b3df5;
  --accent-soft: rgba(124, 92, 255, .14);
  --accent-glow: rgba(124, 92, 255, .38);
  --ok: #4ade80;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --font: "Inter", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1180px;
  --header-h: 64px;

  /* surfaces & effects that change with the theme */
  --header-bg: rgba(14, 14, 17, .72);
  --header-bg-solid: rgba(14, 14, 17, .95);
  --chip-bg: rgba(30, 30, 36, .7);
  --dot: rgba(255, 255, 255, .06);
  --title-a: #ffffff;
  --title-b: #b9b3d6;
  --line: #4c4c5a;
  --border-hover: #4a4a58;
  --tile: #24242c;
  --card-hover: #1a1922;
  --card-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  --glow-1: rgba(124, 92, 255, .28);
  --glow-2: rgba(91, 61, 245, .12);
  --cta-glow: rgba(124, 92, 255, .22);
  --chip-active: #ffffff;

  /* graph colors (read by JS for the canvas) */
  --g-link: rgba(110, 110, 125, .38);
  --g-link-dim: rgba(90, 90, 105, .18);
  --g-link-lit: rgba(162, 139, 255, .75);
  --g-leaf: #8b8b98;
  --g-label: #7d7d8a;
  --g-label-strong: #e8e8ec;
  --g-center: #c9bbff;
  --g-glow: rgba(162, 139, 255, .45);
  --mg-link: #3a3a46;
  --mg-node: #6d6d7a;
  --mg-near: #b3a4ff;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f7f9;
  --bg-2: #f0f0f4;
  --surface: #ffffff;
  --surface-2: #f3f3f7;
  --surface-3: #e9e9ef;
  --border: #e2e2ea;
  --border-2: #d4d4de;
  --text: #17171c;
  --text-2: #43434e;
  --muted: #696976;
  --faint: #9898a5;
  --accent: #6345f2;
  --accent-strong: #6a4cf5;
  --accent-deep: #5b3df5;
  --accent-soft: rgba(106, 76, 245, .10);
  --accent-glow: rgba(106, 76, 245, .30);
  --ok: #16a34a;
  --warn: #b45309;
  --shadow: 0 30px 70px -30px rgba(30, 25, 70, .28), 0 0 0 1px rgba(20, 20, 40, .03);

  --header-bg: rgba(247, 247, 249, .75);
  --header-bg-solid: rgba(247, 247, 249, .97);
  --chip-bg: rgba(255, 255, 255, .8);
  --dot: rgba(20, 20, 40, .08);
  --title-a: #121217;
  --title-b: #4d4677;
  --line: #b9b9c7;
  --border-hover: #bdbdca;
  --tile: #f0f0f4;
  --card-hover: #fbfaff;
  --card-shadow: 0 12px 30px -14px rgba(30, 25, 70, .25);
  --glow-1: rgba(124, 92, 255, .20);
  --glow-2: rgba(91, 61, 245, .07);
  --cta-glow: rgba(124, 92, 255, .14);
  --chip-active: var(--accent);

  --g-link: rgba(80, 80, 100, .26);
  --g-link-dim: rgba(80, 80, 100, .10);
  --g-link-lit: rgba(106, 76, 245, .7);
  --g-leaf: #a3a3b0;
  --g-label: #6e6e7b;
  --g-label-strong: #17171c;
  --g-center: #6a4cf5;
  --g-glow: rgba(106, 76, 245, .28);
  --mg-link: #d2d2dc;
  --mg-node: #a5a5b2;
  --mg-near: #8f78ff;

  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.theme-anim, body.theme-anim * { transition: background-color .3s ease, border-color .3s ease, color .3s ease !important; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent-strong); color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 15px/1 var(--font);
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 8px; }
.btn-primary {
  background: linear-gradient(180deg, #8d70ff, var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover { box-shadow: 0 10px 34px -6px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .25); background: linear-gradient(180deg, #9a80ff, #6647f7); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-hover); }

.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: var(--header-bg-solid); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; flex: none; }

.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  height: 38px; min-width: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  font: 600 13px var(--font);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-hover); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn { padding: 0; width: 38px; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 150px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 60;
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text-2); cursor: pointer;
  font: 500 14px var(--font); text-align: left;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button[aria-checked="true"] { color: var(--text); }
.lang-menu button[aria-checked="true"]::after { content: "✓"; color: var(--accent); font-weight: 700; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
}
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, top .2s ease; }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-open .nav-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 40px; }
.hero-glow {
  position: absolute;
  inset: -120px 0 auto 0;
  height: 900px;
  background:
    radial-gradient(600px 340px at 50% 30%, var(--glow-1), transparent 70%),
    radial-gradient(900px 500px at 50% 60%, var(--glow-2), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}
.hero-copy { text-align: center; max-width: 860px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--chip-bg);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }

.hero-title {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  background: linear-gradient(180deg, var(--title-a) 30%, var(--title-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 28px auto 0;
  max-width: 640px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-2);
}
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-cta { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hint { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- App window (shared) ---------- */
.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.win-dots { display: inline-flex; gap: 7px; flex: none; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a44; }
.win-dots i:nth-child(1) { background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }
.win-title { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---------- Vault (hero window) ---------- */
.hero-window { margin-top: 64px; }
.win-tabs { display: flex; gap: 2px; align-self: flex-end; min-width: 0; overflow: hidden; }
.win-tab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border-radius: 9px 9px 0 0;
  font-size: 13px; color: var(--muted);
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.win-tab.active { background: var(--surface); color: var(--text); }
.win-tab .x { opacity: .5; font-size: 11px; }
.win-search {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--faint);
  padding: 5px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.win-search svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.win-body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 260px; min-height: 480px; }
.win-body > * { min-width: 0; }

.vault-tree { background: var(--bg-2); border-right: 1px solid var(--border); padding: 14px 10px; font-size: 13.5px; }
.tree-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 2px 10px 10px; }
.tree-folder { color: var(--text-2); padding: 5px 10px; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.tree-folder::before { content: "▾"; font-size: 10px; color: var(--faint); width: 10px; }
.tree-file {
  display: block; width: 100%; text-align: left;
  padding: 5px 10px 5px 28px; border-radius: 6px;
  color: var(--muted); cursor: pointer;
  background: none; border: 0; font: inherit;
  transition: background .12s ease, color .12s ease;
}
.tree-file:hover { background: var(--surface-2); color: var(--text); }
.tree-file.active { background: var(--accent-soft); color: var(--text); }
.tree-file.root { padding-left: 10px; }

.vault-note { padding: 34px 44px 40px; min-width: 0; }
.vault-note.swap { animation: noteIn .28s ease; }
@keyframes noteIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vault-note h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 18px; }
.props {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 22px;
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px; margin: 0 0 22px; font-size: 14px;
}
.props div { display: contents; }
.props dt, .props dd { padding: 5px 0; }
.props dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.props dt::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--faint); flex: none; }
.props dd { margin: 0; color: var(--text); }
.vault-note p, .vault-note li { color: var(--text-2); font-size: 15.5px; }
.vault-note p + p, .vault-note p + ul, .vault-note ul + p { margin-top: 12px; }
.vault-note ul.bullets li { position: relative; padding-left: 18px; margin-top: 6px; }
.vault-note ul.bullets li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.vault-note h4 { margin: 22px 0 6px; font-size: 16px; color: var(--text); }
.note-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }

.wl {
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  border-radius: 3px;
  transition: background .12s ease;
}
button.wl { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; }
.wl:hover { background: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.wl.missing { color: var(--muted); cursor: default; }
.wl.missing:hover { background: none; text-decoration: none; }

.tag {
  display: inline-block;
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

.vault-side { border-left: 1px solid var(--border); padding: 14px 16px; background: var(--bg-2); }
.side-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 2px 0 8px; }
#mini-graph { width: 100%; height: auto; display: block; margin-bottom: 18px; }
#mini-graph line { stroke: var(--mg-link); stroke-width: 1; transition: stroke .2s ease; }
#mini-graph line.on { stroke: var(--accent-strong); stroke-width: 1.4; }
#mini-graph circle { fill: var(--mg-node); transition: fill .2s ease, r .2s ease; cursor: pointer; }
#mini-graph circle.near { fill: var(--mg-near); }
#mini-graph circle.cur { fill: var(--accent); }
#mini-graph text { font: 9px var(--font); fill: var(--muted); pointer-events: none; paint-order: stroke; stroke: var(--bg-2); stroke-width: 3px; stroke-linejoin: round; }
#mini-graph text.cur { fill: var(--text); font-weight: 600; }
.backlinks li { font-size: 13.5px; padding: 4px 0; }
.backlinks .empty { color: var(--faint); }

.win-status {
  display: flex; justify-content: flex-end; gap: 18px;
  padding: 7px 16px; font-size: 12px; color: var(--faint);
  border-top: 1px solid var(--border); background: var(--bg-2);
  font-family: var(--mono);
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section-first { padding-top: 72px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head.left { text-align: left; margin-left: 0; }
.section-title {
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.section-sub { margin-top: 16px; color: var(--text-2); font-size: clamp(16px, 1.8vw, 19px); }


/* ---------- Principles ---------- */
.principles { padding-top: 60px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.trio-item h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 750; letter-spacing: -0.03em; margin-bottom: 14px; }
.trio-item p { color: var(--text-2); font-size: 17px; }
.center-mark { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 110px; }
.big-mark { width: 96px; height: 96px; filter: drop-shadow(0 20px 50px rgba(124, 92, 255, .45)); }

/* ---------- Canvas board (about) ---------- */
.canvas-board {
  position: relative;
  height: 640px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--bg-2);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.canvas-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.canvas-lines path { fill: none; stroke: var(--line); stroke-width: 1.6; }
.canvas-lines circle { fill: var(--line); }
.canvas-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  touch-action: none;
  cursor: grab;
  user-select: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.canvas-card:hover { border-color: var(--border-hover); }
.canvas-card.dragging { cursor: grabbing; border-color: var(--accent-strong); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8), 0 0 0 3px var(--accent-soft); z-index: 5; }
.cc-label { position: absolute; top: -24px; left: 2px; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.canvas-card h3 { font-size: 22px; margin-bottom: 10px; }
.canvas-card h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.canvas-card p { color: var(--text-2); font-size: 15px; }
.canvas-card p + p { margin-top: 10px; }
.canvas-card img { border-radius: 8px; pointer-events: none; -webkit-user-drag: none; }

.c-photo { left: 3.5%; top: 56px; width: 280px; padding: 8px; }
.c-about { left: 33%; top: 96px; width: 380px; }
.c-lang { left: 72%; top: 70px; width: 230px; }
.c-work { left: 66%; top: 330px; width: 300px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-list li { font-size: 13.5px; padding: 4px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-2); }

/* ---------- Graph ---------- */
.graph-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.feature-list { margin-top: 30px; display: grid; gap: 16px; }
.feature-list li { color: var(--text-2); padding-left: 26px; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.feature-list b { color: var(--text); font-weight: 600; }
.chip-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 13.5px var(--font);
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s ease;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip:hover { color: var(--text); border-color: var(--border-hover); }
.chip.active { color: var(--chip-active); background: var(--accent-soft); border-color: var(--accent-strong); }
.graph-window canvas { display: block; width: 100%; height: 520px; cursor: grab; touch-action: none; }
.graph-window canvas.dragging { cursor: grabbing; }

/* ---------- Toolbox ---------- */
.toolbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.tool-group:hover { border-color: var(--border-2); transform: translateY(-2px); }
.tool-group h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.tool-group h3 i { width: 8px; height: 8px; border-radius: 50%; }
.tool-group .tg-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px; color: var(--text-2);
}
.tool span.ti { width: 28px; height: 28px; border-radius: 7px; background: var(--tile); display: grid; place-items: center; flex: none; }
.tool img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- Experience ---------- */
.exp-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: start; }
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent-strong), var(--border) 60%); border-radius: 2px; }
.timeline li { position: relative; padding-bottom: 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.timeline li:first-child::before { border-color: var(--accent); background: var(--accent-strong); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-when { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 6px; }
.timeline h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.timeline h3 span { color: var(--muted); font-weight: 500; }
.timeline p { color: var(--text-2); }

.client-list { padding: 8px; }
.client-list a {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 12px; border-radius: 10px;
  transition: background .15s ease;
}
.client-list a:hover { background: var(--surface-2); }
.client-list .logo { width: 42px; height: 42px; border-radius: 10px; background: #26262e; border: 1px solid var(--border-2); display: grid; place-items: center; flex: none; padding: 6px; }
.client-list .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cl-name { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; line-height: 1.3; }
.cl-name small { font-weight: 400; color: var(--muted); font-size: 13px; }
.client-list .arrow { margin-left: auto; color: var(--faint); transition: color .15s ease, transform .15s ease; }
.client-list a:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.clients-foot { padding: 14px 20px 18px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.service-list { display: grid; gap: 26px; }
.service { display: flex; gap: 18px; }
.svc-ico {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, .3);
  color: var(--accent);
}
.svc-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 18px; font-weight: 650; margin-bottom: 4px; }
.service p { color: var(--text-2); font-size: 15.5px; }

.terminal {
  --bg-2: #121216; --border: #2a2a33; --text: #e8e8ec; --muted: #8a8a96; --faint: #5e5e6a;
  --accent: #a28bff; --ok: #4ade80; --warn: #fbbf24;
  background: #0b0b0e;
  border-color: #2a2a33;
}
.term-body {
  margin: 0;
  padding: 20px 22px;
  min-height: 420px;
  font: 13.5px/1.7 var(--mono);
  color: #c9c9d3;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .p { color: var(--accent); }
.term-body .ok { color: var(--ok); }
.term-body .dim { color: var(--faint); }
.term-body .warn { color: var(--warn); }
.term-body .cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; background: var(--text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- CTA ---------- */
.cta { overflow: hidden; padding-bottom: 140px; }
.cta-glow {
  position: absolute; left: 50%; top: 0;
  width: 1100px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--cta-glow), transparent);
  pointer-events: none; z-index: -1;
}
.cta-head { text-align: center; max-width: 760px; margin: 0 auto 70px; }
.cta-title { font-size: clamp(40px, 6.5vw, 76px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact-card {
  display: flex; flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.contact-card:hover { border-color: var(--accent-strong); transform: translateY(-3px); background: var(--card-hover); }
.cc-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); margin-bottom: 18px; }
.cc-ico svg { width: 20px; height: 20px; }
.cc-ico svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-card h3 { font-size: 18px; margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.cc-link { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 280px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-2); font-size: 15px; padding: 4px 0; transition: color .15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13.5px; }

/* ---------- CV dialog ---------- */
.cv-dialog {
  width: min(960px, 94vw);
  height: min(90vh, 1200px);
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.cv-dialog[open] { display: flex; flex-direction: column; animation: dlgIn .22s ease; }
.cv-dialog::backdrop { background: rgba(5, 5, 8, .7); backdrop-filter: blur(4px); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.cv-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.cv-bar .btn { margin-left: auto; }
.cv-close { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 14px; }
.cv-close:hover { background: var(--surface-3); }
.cv-dialog iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Focus ---------- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1080px) {
  .win-body { grid-template-columns: 200px minmax(0, 1fr); }
  .vault-side { display: none; }
  .toolbox { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .c-photo { width: 230px; }
  .c-about { left: 34%; width: 340px; }
  .c-lang { left: auto; right: 4%; }
  .c-work { left: auto; right: 4%; top: 360px; }
}

/* narrow desktops: keep the About canvas cards from overlapping */
@media (min-width: 901px) and (max-width: 1000px) {
  .c-photo { width: 215px; }
  .c-about { left: 32%; width: 300px; }
  .c-lang { width: 205px; }
  .c-work { top: 392px; }
  .canvas-board { height: 700px; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: block; }
  .header-actions .header-cv { display: none; }
  .header-inner { gap: 12px; }
  .header-inner { justify-content: space-between; }
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px 20px;
    background: var(--header-bg-solid);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    margin: 0;
  }
  .main-nav a { padding: 12px 14px; font-size: 17px; }
  .nav-open .main-nav { opacity: 1; transform: none; pointer-events: auto; }

  .section { padding: 88px 0; }
  .hero { padding-top: 32px; }
  .section-first { padding-top: 48px; }
  .graph-grid, .exp-grid, .services-grid { grid-template-columns: minmax(0, 1fr); }
  .trio { grid-template-columns: 1fr; gap: 36px; }
  .center-mark { margin-top: 72px; }

  .canvas-board { height: auto; padding: 40px 20px 20px; display: grid; gap: 40px; background-size: 18px 18px; }
  .canvas-lines { display: none; }
  .canvas-card { position: relative; left: auto !important; right: auto !important; top: auto !important; width: auto; transform: none !important; cursor: default; touch-action: auto; user-select: text; }
  .c-photo { max-width: 300px; }
  .only-desktop { display: none; }

  .graph-window canvas { height: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .brand { font-size: 15px; gap: 8px; }
  .icon-btn { height: 36px; min-width: 36px; }
  .theme-btn { width: 36px; }
  .nav-toggle { width: 36px; height: 36px; }
  .nav-toggle span { left: 10px; right: 10px; }
  .nav-toggle span:first-child { top: 14px; }
  .nav-toggle span:last-child { top: 21px; }
  .nav-open .nav-toggle span:first-child, .nav-open .nav-toggle span:last-child { top: 17px; }
  .win-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .vault-tree { border-right: 0; border-bottom: 1px solid var(--border); padding: 10px; }
  .vault-tree ul { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .vault-tree ul::-webkit-scrollbar { display: none; }
  .tree-title, .tree-folder { display: none; }
  .tree-file, .tree-file.root { padding: 6px 12px; white-space: nowrap; background: var(--surface-2); }
  .win-search, .win-tabs .win-tab:not(.active) { display: none; }
  .vault-note { padding: 24px 20px 28px; }
  .vault-note h2 { font-size: 24px; }
  .props { column-gap: 14px; }
  .win-status { justify-content: flex-start; }

  .hero-cta .btn { width: 100%; }
  .toolbox { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .graph-window canvas { height: 360px; }
  .term-body { font-size: 12px; min-height: 360px; padding: 16px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .vault-note.swap { animation: none; }
  .term-body .cursor { animation: none; }
}

/* Armenian script needs a little more air in big headings */
:lang(hy) .hero-title, :lang(hy) .section-title, :lang(hy) .cta-title { letter-spacing: -0.02em; line-height: 1.12; }
:lang(hy) .hero-title { font-size: clamp(36px, 6.4vw, 80px); }
:lang(ru) .hero-title { font-size: clamp(40px, 7.4vw, 92px); }
.vault-note code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
