/* Gevorg Arushanyan — CV site. One page, a central timeline that rises from the first job
   at the bottom to the current one at the top. Content comes from content/cv.json. */

:root {
  --bg: #030a08;
  --bg-2: #0a0f1c;
  --panel: rgba(16, 22, 40, 0.62);
  --panel-solid: #0f1527;
  --line: color-mix(in srgb, var(--tint) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--tint) 32%, transparent);
  --text: #e8ecf8;
  --muted: #8b95b3;
  --faint: #5a6383;
  --a1: #34d399;   /* emerald, light */
  --a2: #10b981;   /* emerald */
  --a3: #e8892b;   /* dark mango, kept to the last third of every gradient */
  --tint: #6ee7b7; /* lines and borders */
  --on-accent: #06080f;
  --ok: #34d399;
  --grad: linear-gradient(120deg, var(--a1), var(--a2) 70%, var(--a3));
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Noto Sans Armenian", var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--a2) 45%, transparent); }

/* ---------- background: network canvas + glow blobs + grid ---------- */
#net { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-glow::before, .bg-glow::after {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.22; animation: drift 26s ease-in-out infinite alternate;
}
.bg-glow::before { background: var(--a2); top: -25vmax; left: -15vmax; }
.bg-glow::after { background: var(--a1); bottom: -30vmax; right: -20vmax; animation-delay: -13s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.12); } }
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 70%);
  opacity: 0.35;
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.bar.scrolled { border-color: var(--line); background: rgba(5, 7, 13, 0.8); }
.bar .brand { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; color: var(--muted); }
.bar .brand b { color: var(--text); }
.bar nav { display: flex; gap: 6px; }
.bar nav a {
  font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.bar nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 30; width: 0;
  background: var(--grad); box-shadow: 0 0 12px var(--a2);
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: grid; place-items: center;
  padding: 110px clamp(16px, 5vw, 48px) 60px;
}
.hero-inner {
  width: min(1100px, 100%);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.avatar { position: relative; width: clamp(180px, 22vw, 260px); aspect-ratio: 1; }
.avatar .ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--a1), var(--a2), var(--a3), var(--a1));
  animation: spin 8s linear infinite; filter: blur(.3px);
}
.avatar .ring::after {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  background: inherit; filter: blur(28px); opacity: .45;
}
.avatar .face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #1d2747, var(--panel-solid) 70%);
  display: grid; place-items: center; border: 4px solid var(--bg);
}
.avatar .face img { width: 100%; height: 100%; object-fit: cover; }
.avatar .face .initials {
  font-family: var(--display); font-weight: 700; font-size: clamp(56px, 7vw, 84px);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.avatar .face .hint {
  position: absolute; bottom: 22%; font-family: var(--mono); font-size: 10px;
  color: var(--faint); letter-spacing: .1em; text-transform: uppercase;
}
.avatar .status {
  position: absolute; right: 8%; bottom: 8%; display: flex; align-items: center; gap: 6px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  padding: 5px 10px 5px 8px; border-radius: 999px; font-size: 11px; color: var(--muted);
  white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 100% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--a1); letter-spacing: .12em; text-transform: uppercase; }
.hero h1 {
  font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em;
  font-size: clamp(42px, 7vw, 88px); margin: 10px 0 14px;
}
.hero h1 .grad { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: 200% 0; } }
.role-line { font-size: clamp(18px, 2.2vw, 24px); color: var(--muted); height: 1.6em; white-space: nowrap; overflow: hidden; }
.role-line .typed { color: var(--text); font-weight: 600; }
.role-line .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--a1); vertical-align: -3px; margin-left: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tagline { margin: 18px 0 26px; font-size: 17px; color: var(--muted); max-width: 52ch; border-left: 2px solid var(--a2); padding-left: 14px; font-style: italic; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--a1); box-shadow: 0 8px 30px -10px var(--a1); }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { box-shadow: 0 10px 34px -8px var(--a2); }
.btn svg { width: 16px; height: 16px; }
.langs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.02);
}
.chip b { color: var(--text); font-weight: 500; }

.stats {
  width: min(1100px, 100%); margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: rgba(10, 15, 28, 0.85); padding: 22px 20px; }
.stat .n { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 8px; }
.scroll-cue { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.scroll-cue .mouse { width: 22px; height: 34px; border: 2px solid var(--faint); border-radius: 12px; position: relative; }
.scroll-cue .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--a1); animation: wheel 1.6s infinite; }
@keyframes wheel { to { transform: translateY(10px); opacity: 0; } }

/* ---------- sections ---------- */
section { padding: 90px clamp(16px, 5vw, 48px); }
.section-head { width: min(1100px, 100%); margin: 0 auto 48px; text-align: center; }
.section-head .eyebrow { display: inline-block; }
.section-head h2 { font-family: var(--display); font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.02em; margin: 8px 0 10px; line-height: 1.1; }
.section-head p { color: var(--muted); margin: 0 auto; max-width: 60ch; }

/* ---------- the timeline ---------- */
.timeline { position: relative; width: min(1100px, 100%); margin: 0 auto; padding: 20px 0 10px; }
.spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: var(--line-strong); overflow: hidden; border-radius: 2px;
}
.spine .fill {
  position: absolute; left: 0; right: 0; top: 0; height: 0;
  background: linear-gradient(to bottom, var(--a3), var(--a2) 40%, var(--a1));
  box-shadow: 0 0 14px var(--a2);
}
/* pulses travel UP the spine: the career rises from the first job to now */
.spine .pulse {
  position: absolute; left: -1px; width: 4px; height: 90px; bottom: -90px; border-radius: 4px;
  background: linear-gradient(to top, transparent, #fff, transparent);
  opacity: .75; filter: blur(.5px); animation: rise 4.5s linear infinite;
}
.spine .pulse:nth-child(3) { animation-delay: -1.5s; }
.spine .pulse:nth-child(4) { animation-delay: -3s; }
@keyframes rise { to { bottom: 100%; } }
.timeline-cap {
  position: relative; z-index: 2; display: flex; justify-content: center; margin: 0 0 30px;
}
.timeline-cap span {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line-strong); color: var(--muted);
}
.timeline-cap.top span { color: var(--ok); border-color: rgba(52,211,153,.45); }
.timeline-cap.bottom { margin: 30px 0 0; }

.item {
  position: relative; display: grid; grid-template-columns: 1fr 64px 1fr; align-items: start;
  margin: 0 0 46px;
}
.item .node {
  grid-column: 2; justify-self: center; margin-top: 26px; position: relative; z-index: 2;
  width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong);
  transition: border-color .5s, box-shadow .5s, transform .5s;
}
.item.in .node { border-color: var(--a1); box-shadow: 0 0 0 6px color-mix(in srgb, var(--a1) 12%, transparent), 0 0 22px var(--a1); }
.item.current .node { border-color: var(--ok); }
.item.current.in .node { box-shadow: 0 0 0 6px rgba(52,211,153,.14), 0 0 24px var(--ok); animation: nodepulse 2.2s infinite; }
@keyframes nodepulse { 50% { transform: scale(1.18); } }
.item .when {
  margin-top: 18px; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 42px);
  color: transparent; -webkit-text-stroke: 1px var(--line-strong); letter-spacing: -0.02em;
  transition: color .6s, -webkit-text-stroke-color .6s;
}
.item.in .when { -webkit-text-stroke-color: transparent; color: rgba(232,236,248,.16); }
.item:nth-child(odd) .card { grid-column: 1; grid-row: 1; }
.item:nth-child(odd) .when { grid-column: 3; grid-row: 1; text-align: left; }
.item:nth-child(even) .card { grid-column: 3; grid-row: 1; }
.item:nth-child(even) .when { grid-column: 1; grid-row: 1; text-align: right; }

.card {
  position: relative; border-radius: var(--radius); padding: 22px 22px 18px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(40px) scale(.98);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), border-color .3s;
  overflow: hidden;
}
.item:nth-child(odd) .card { transform: translate(-40px, 30px); }
.item:nth-child(even) .card { transform: translate(40px, 30px); }
.item.in .card { opacity: 1; transform: none; }
/* spotlight that follows the cursor */
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--a2) 16%, transparent), transparent 45%);
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-strong); }
/* gradient border on the current job */
.item.current .card { border-color: transparent; background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, var(--grad) border-box; border: 1px solid transparent; }

.card-top { display: flex; gap: 14px; align-items: flex-start; }
.mark {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--on-accent); background: var(--grad);
}
.card h3 { margin: 0; font-family: var(--display); font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.card .role { color: var(--a1); font-size: 14px; font-weight: 600; margin-top: 3px; }
.card .period { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.badge-now { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); border: 1px solid rgba(52,211,153,.45); padding: 1px 7px; border-radius: 999px; }
.card .summary { color: #c4cbe0; font-size: 15px; margin: 14px 0 12px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: rgba(255,255,255,0.02); }
.metric b { font-family: var(--display); font-size: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric span { font-size: 12px; color: var(--muted); margin-left: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--a2) 10%, transparent); border: 1px solid color-mix(in srgb, var(--a2) 20%, transparent); }

.more {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1);
}
.more > div { overflow: hidden; }
.card.open .more { grid-template-rows: 1fr; }
.more ul { list-style: none; padding: 14px 0 2px; margin: 14px 0 0; border-top: 1px dashed var(--line-strong); }
.more li {
  position: relative; padding-left: 22px; margin: 0 0 10px; font-size: 14.5px; color: #c4cbe0;
  opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s;
}
.card.open .more li { opacity: 1; transform: none; }
.more li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 2px;
  background: var(--grad); transform: rotate(45deg);
}
.toggle {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px;
  padding: 7px 12px; font: 600 13px var(--sans); transition: border-color .2s, background .2s;
}
.toggle:hover { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 6%, transparent); }
.toggle .chev { width: 14px; height: 14px; transition: transform .4s; }
.card.open .toggle .chev { transform: rotate(180deg); }

/* ---------- skills + education ---------- */
.grid-2 { width: min(1100px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.panel { border-radius: var(--radius); padding: 26px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.panel h3 { margin: 0 0 18px; font-family: var(--display); font-size: 20px; }
.skill-group { margin-bottom: 16px; }
.skill-group .g { font-family: var(--mono); font-size: 11px; color: var(--a1); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.skill-group .items { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { font-size: 13px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.025); transition: border-color .2s, transform .2s; }
.skill:hover { border-color: var(--a2); transform: translateY(-2px); }
.edu { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.edu:last-child { border-bottom: 0; }
.edu .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--a1); }
.edu .ico svg { width: 18px; height: 18px; }
.edu b { display: block; font-size: 15px; }
.edu span { font-size: 13px; color: var(--muted); }

/* ---------- contact ---------- */
.contact { width: min(1100px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.contact a {
  border-radius: var(--radius); padding: 20px; background: var(--panel); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s, box-shadow .25s; display: block;
}
.contact a:hover { transform: translateY(-4px); border-color: var(--a1); box-shadow: 0 14px 40px -18px var(--a1); }
.contact .k { font-family: var(--mono); font-size: 11px; color: var(--a1); letter-spacing: .12em; text-transform: uppercase; }
.contact .v { margin-top: 8px; font-size: 15px; word-break: break-word; }
footer { text-align: center; padding: 40px 16px 60px; color: var(--faint); font-family: var(--mono); font-size: 12px; }

/* reveal for non-timeline blocks */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .bar nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .tagline { border-left: 0; padding-left: 0; }
  .cta, .langs { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .spine { left: 18px; }
  .item { grid-template-columns: 36px 1fr; }
  .item .node { grid-column: 1; margin-top: 26px; justify-self: start; margin-left: 9px; }
  .item:nth-child(odd) .card, .item:nth-child(even) .card { grid-column: 2; grid-row: 2; transform: translateY(30px); }
  .item:nth-child(odd) .when, .item:nth-child(even) .when { grid-column: 2; grid-row: 1; text-align: left; margin: 14px 0 8px; padding-left: 10px; font-size: 26px; }
  .item .node { grid-row: 1; }
  .item.in .card { transform: none; }
  .timeline-cap { justify-content: flex-start; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .contact { grid-template-columns: 1fr; } }

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

/* ---------- compact section heads ---------- */
.section-head.compact { margin-bottom: 30px; }
.section-head.compact h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 0; }
.muted-h { color: var(--faint); font-weight: 500; font-size: .6em; }
.motto { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .08em; }

/* ---------- expertise ---------- */
.areas { width: min(1100px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area {
  position: relative; padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(10px); overflow: hidden; transition: transform .3s, border-color .3s;
}
.area:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.area::after {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--grad); transition: width .6s;
}
.area.in::after { width: 100%; transition-delay: .3s; }
.area .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--a1); border: 1px solid var(--line-strong); margin-bottom: 14px; }
.area .ic svg { width: 20px; height: 20px; }
.area h3 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; }
.area p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- AI builds ---------- */
.builds { width: min(1100px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.build {
  position: relative; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  font-family: var(--sans); overflow: hidden; transition: transform .3s, border-color .3s;
}
.build:hover { transform: translateY(-4px); border-color: var(--a1); }
.build .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.build .prompt { font-family: var(--mono); font-size: 12px; color: var(--a1); }
.build .kind { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.build .kind.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.build h3 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; }
.build p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 820px) {
  .areas, .builds { grid-template-columns: 1fr; }
  }
@media (min-width: 821px) and (max-width: 1000px) { .areas, .builds { grid-template-columns: 1fr 1fr; } }

/* ---------- effect 4: headings word by word ---------- */
.section-head h2 .w { display: inline-block; opacity: 0; transform: translateY(.55em); filter: blur(6px);
  transition: opacity .6s, transform .6s cubic-bezier(.2,.7,.2,1), filter .6s; transition-delay: var(--d, 0ms); }
.section-head.in h2 .w { opacity: 1; transform: none; filter: none; }

/* ---------- effect 3: a node ignites with a ripple ---------- */
.item .node::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--a1); opacity: 0; pointer-events: none;
}
.item .node.lit { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 35%, var(--bg)); }
.item .node.lit::after { animation: ripple 1.1s ease-out 1; }
@keyframes ripple { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }

/* ---------- effect 6: quick jump (Ctrl+K) ---------- */
.kbd-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 4px 8px; margin-left: 8px; background: rgba(255,255,255,.03); cursor: pointer; }
.kbd-hint:hover { color: var(--text); border-color: var(--a1); }
.cmdk { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding-top: 14vh;
  background: rgba(2, 4, 8, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s; }
.cmdk.show { opacity: 1; }
/* the class sets display:grid, which beats the hidden attribute: without this the invisible layer
   covered the whole page and swallowed every click (found by the owner, 2026-11-23) */
.cmdk[hidden] { display: none; }
.cmdk-panel { width: min(560px, calc(100% - 32px)); border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px color-mix(in srgb, var(--a1) 20%, transparent);
  transform: translateY(-8px) scale(.98); transition: transform .18s; overflow: hidden; }
.cmdk.show .cmdk-panel { transform: none; }
.cmdk input { width: 100%; padding: 16px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); font: 500 15px var(--sans); outline: none; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.cmdk li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.cmdk li small { color: var(--faint); font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk li.on { background: color-mix(in srgb, var(--a1) 14%, transparent); }
.cmdk li.none { color: var(--muted); cursor: default; }
.cmdk-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---------- effect 7: the glow layer moves with the page ---------- */
.bg-glow { will-change: transform; }

@media (max-width: 820px) { .kbd-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .section-head h2 .w { opacity: 1; transform: none; filter: none; } }

/* ---------- the edges darken: a vignette over the green ---------- */
.vignette { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 75% 65% at 50% 40%, transparent 30%, rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .85) 100%),
    linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, .45)); }

/* ---------- without JavaScript everything is simply visible ---------- */
.no-js .card, .no-js .reveal, .no-js .section-head h2 .w { opacity: 1; transform: none; filter: none; }
.no-js .more { grid-template-rows: 1fr; }
.no-js .toggle { display: none; }

/* ---------- intro: the texts arrive one after another; the photo stays still ---------- */
.intro .intro-1, .intro .intro-2, .intro .intro-3, .intro .intro-4 {
  animation: rise-in .8s cubic-bezier(.2,.7,.2,1) both; }
.intro .intro-2 { animation-delay: .12s; }
.intro .intro-3 { animation-delay: .3s; }
.intro .intro-4 { animation-delay: .48s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- language switch ---------- */
.lang-switch { display: flex; gap: 2px; margin-left: 10px; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang-switch a, .lang-switch span { padding: 3px 9px; border-radius: 999px; color: var(--muted); }
.lang-switch a:hover { color: var(--text); }
.lang-switch .on { background: var(--grad); color: var(--on-accent); font-weight: 700; }
.bar { gap: 8px; }
.bar nav { margin-left: auto; }

/* ---------- roulette ---------- */
.roulette { width: min(900px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; }
.wheel-wrap { position: relative; width: clamp(240px, 32vw, 340px); aspect-ratio: 1; }
.wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 40px rgba(0,0,0,.6)); }
.wheel .rim { fill: #1a140c; stroke: color-mix(in srgb, var(--a3) 55%, transparent); stroke-width: 3; }
.wheel path { stroke: rgba(255,255,255,.12); stroke-width: .5; }
.wheel path.r { fill: #9f2f1f; }
.wheel path.b { fill: #0d1412; }
.wheel path.z { fill: var(--a2); }
.wheel text { fill: #f5f0e6; font: 700 7px var(--mono); text-anchor: middle; dominant-baseline: middle; }
.wheel .inner { fill: radial-gradient(#000, #000); fill: #0a0f0d; stroke: color-mix(in srgb, var(--a3) 45%, transparent); stroke-width: 1.5; }
.wheel .spoke { stroke: color-mix(in srgb, var(--a3) 50%, transparent); stroke-width: 1.4; }
.hub { position: absolute; left: 50%; top: 50%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd9a8, var(--a3) 45%, #6b3a10); box-shadow: 0 0 20px color-mix(in srgb, var(--a3) 50%, transparent); }
.pointer { position: absolute; left: 50%; top: -6px; z-index: 2; transform: translateX(-50%); width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--a1);
  filter: drop-shadow(0 0 8px var(--a1)); }
.spin-side { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.spin-result { border-radius: var(--radius); padding: 22px; background: var(--panel); border: 1px solid var(--line); min-height: 150px; width: 100%;
  transition: border-color .4s, box-shadow .4s; }
.spin-result.show { border-color: var(--a1); box-shadow: 0 0 40px -12px var(--a1); }
.spin-result .num { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--mono);
  border: 1px solid var(--line-strong); margin-bottom: 12px; color: var(--muted); }
.spin-result .num.r { background: #9f2f1f; color: #fff; border-color: transparent; }
.spin-result .num.b { background: #0d1412; color: #fff; }
.spin-result .num.z { background: var(--a2); color: var(--on-accent); border-color: transparent; }
.spin-result p { margin: 0; font-size: 17px; }
.spin-result.show p { animation: rise-in .6s both; }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }

@media (max-width: 820px) {
  .roulette { grid-template-columns: 1fr; justify-items: center; }
  .spin-side { align-items: center; text-align: center; }
  .lang-switch { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .intro [class*="intro-"] { animation: none !important; } }
