/* ============== CV — Bold modern esports / league ops ============== */
:root {
  /* accent is overridden live by the tweaks panel */
  --accent: #2e7bff;
  --accent-ink: #ffffff;

  --bg: oklch(0.17 0.018 264);
  --bg-2: oklch(0.205 0.02 264);
  --surface: oklch(0.225 0.022 264);
  --surface-2: oklch(0.26 0.024 264);
  --line: oklch(0.34 0.02 264);
  --line-soft: oklch(0.30 0.018 264 / 0.7);
  --ink: oklch(0.97 0.006 260);
  --ink-mut: oklch(0.78 0.018 262);
  --ink-dim: oklch(0.62 0.02 262);

  --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 18px 40px -24px oklch(0 0 0 / 0.8);
  --maxw: 1180px;

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: oklch(0.972 0.004 255);
  --bg-2: oklch(0.95 0.006 255);
  --surface: oklch(0.995 0.002 255);
  --surface-2: oklch(0.965 0.005 255);
  --line: oklch(0.88 0.008 255);
  --line-soft: oklch(0.9 0.006 255 / 0.8);
  --ink: oklch(0.22 0.02 262);
  --ink-mut: oklch(0.42 0.02 262);
  --ink-dim: oklch(0.56 0.02 262);
  --shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 40px -26px oklch(0.4 0.05 264 / 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* soft accent glow that follows the theme */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 88% -8%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(700px 500px at -6% 4%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 55%);
  opacity: 0.85;
}
[data-theme="light"] body::before { opacity: 0.5; }

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

a { color: inherit; text-decoration: none; }

/* ---------- mono labels ---------- */
.kicker {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.section-no {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}

/* ---------- language toggle ---------- */
.lang-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 50;
  display: flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 100px;
  background: color-mix(in oklch, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px);
  font-family: var(--f-mono);
}
.lang-toggle button {
  position: relative; overflow: hidden;
  border: 0; background: transparent; color: var(--ink-dim);
  font: inherit; font-size: 12px; letter-spacing: 0.08em; font-weight: 600;
  padding: 6px 12px; border-radius: 100px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: color 0.2s, background 0.2s, transform 0.12s ease;
}
.lang-toggle button:active { transform: scale(0.9); }
.lang-toggle .flag {
  width: 19px; height: 13px; border-radius: 2.5px; overflow: hidden;
  display: block; flex: none;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.18);
  transition: transform 0.2s ease;
}
.lang-toggle .flag svg { width: 100%; height: 100%; display: block; }
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button:hover .flag { transform: scale(1.08); }
.lang-toggle button.active { background: var(--accent); color: var(--accent-ink); }
/* flag pops when its button is clicked */
.lang-toggle .flag.pop { animation: flagPop 0.5s cubic-bezier(.3,1.4,.5,1); }
@keyframes flagPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35) rotate(-6deg); }
  100% { transform: scale(1) rotate(0); }
}
/* click ripple */
.lt-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 55%, white) 0%, transparent 70%);
  transform: scale(0); opacity: 0.6;
  animation: ltRipple 0.6s ease-out forwards;
}
.lang-toggle button.active .lt-ripple {
  background: radial-gradient(circle, color-mix(in oklch, white 70%, transparent) 0%, transparent 70%);
}
@keyframes ltRipple {
  to { transform: scale(1); opacity: 0; }
}
/* translated text fades/lifts in when the language switches */
@media (prefers-reduced-motion: no-preference) {
  .lang-swap { animation: langSwap 0.45s cubic-bezier(.2,.7,.2,1); }
}
@keyframes langSwap {
  0% { opacity: 0.15; transform: translateY(5px); filter: blur(1.5px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- theme toggle (top-left) ---------- */
.theme-toggle {
  position: fixed; top: 16px; left: 16px; z-index: 50;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink-mut); cursor: pointer;
  display: grid; place-items: center;
  transition: color 0.2s, border-color 0.2s, transform 0.12s ease, background 0.2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ic-moon { display: none; }
.theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-moon { display: block; }

/* ---------- side dot nav ---------- */
.dotnav {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dotnav button {
  --d: 9px;
  width: var(--d); height: var(--d);
  border-radius: 50%;
  border: 1.5px solid var(--ink-dim);
  background: transparent;
  padding: 0; cursor: pointer;
  position: relative;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.dotnav button::after {
  content: attr(data-label);
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
  color: var(--ink-mut);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.dotnav button:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.dotnav button:hover { border-color: var(--accent); }
.dotnav button.active {
  background: var(--accent); border-color: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent);
}

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vh, 72px) 0 clamp(20px, 3vh, 40px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr clamp(300px, 36vw, 460px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-availbadge {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
  border: 1px solid color-mix(in oklch, var(--accent) 42%, transparent); border-radius: 100px;
  padding: 9px 18px; margin-bottom: 26px;
  background:
    linear-gradient(120deg, color-mix(in oklch, var(--accent) 17%, transparent), color-mix(in oklch, var(--accent) 5%, transparent)),
    color-mix(in oklch, var(--surface) 72%, transparent);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.hero-availbadge:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--accent) 65%, transparent); }
/* breathing accent glow draws the eye */
@media (prefers-reduced-motion: no-preference) {
  .hero-availbadge { animation: badgeBreathe 3.2s ease-in-out infinite; }
}
@keyframes badgeBreathe {
  0%, 100% { box-shadow: 0 0 16px -4px color-mix(in oklch, var(--accent) 32%, transparent); }
  50% { box-shadow: 0 0 28px 1px color-mix(in oklch, var(--accent) 48%, transparent); }
}
/* periodic sheen sweep across the pill */
.hero-availbadge::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 100px;
  background: linear-gradient(105deg, transparent 42%, color-mix(in oklch, white 24%, transparent) 50%, transparent 58%);
  transform: translateX(-130%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-availbadge::after { animation: badgeSheen 5s ease-in-out 1.2s infinite; }
}
@keyframes badgeSheen {
  0%, 64% { transform: translateX(-130%); }
  86%, 100% { transform: translateX(130%); }
}
/* live "available now" status dot */
.pulse { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 60%, transparent), 0 0 9px color-mix(in oklch, var(--accent) 85%, transparent);
  animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 60%, transparent), 0 0 9px color-mix(in oklch, var(--accent) 85%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent, 0 0 9px color-mix(in oklch, var(--accent) 85%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 9px color-mix(in oklch, var(--accent) 85%, transparent); }
}
.name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.name .edit { color: var(--accent); }
.role {
  color: var(--accent);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(19px, 2.4vw, 27px);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.role b { color: var(--accent); font-weight: 700; }
.lede { max-width: 54ch; color: var(--ink-mut); font-size: clamp(16px, 1.5vw, 18.5px); margin: 0 0 28px; text-wrap: pretty; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.01em;
  color: var(--ink-mut);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 13px; background: color-mix(in oklch, var(--surface) 55%, transparent);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.chip svg { width: 15px; height: 15px; stroke: var(--accent); }

/* photo */
.photo-card { position: relative; }
.photo-card image-slot {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.photo-card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 18px; pointer-events: none;
  border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent);
  mask: linear-gradient(135deg, black, transparent 60%);
}
.photo-tag {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); background: color-mix(in oklch, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
}

/* ---------- stat strip ---------- */
.stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  margin: clamp(16px, 3vh, 32px) 0 clamp(20px, 4vh, 44px); }
/* one-time sheen sweep when the strip reveals */
.stats::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg, transparent 38%,
    color-mix(in oklch, var(--accent) 22%, transparent) 50%, transparent 62%);
  transform: translateX(-130%); opacity: 0;
}
.stats.in::after { animation: statSheen 1.5s cubic-bezier(.4,.1,.2,1) 0.35s both; }
@keyframes statSheen {
  0% { transform: translateX(-130%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(130%); opacity: 0; }
}
.stat { position: relative; background: var(--surface); padding: clamp(18px, 2.4vw, 28px) clamp(16px, 2vw, 26px);
  transition: background 0.3s ease; cursor: default; isolation: isolate; }
/* growing top accent line on hover */
.stat::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
/* radial accent glow on hover */
.stat::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(120% 100% at 50% 0%,
    color-mix(in oklch, var(--accent) 16%, transparent), transparent 70%);
  transition: opacity 0.35s ease; }
.stat:hover { background: var(--surface-2); }
.stat:hover::before { transform: scaleX(1); }
.stat:hover::after { opacity: 1; }
.stat .num { font-family: var(--f-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 50px); line-height: 1; letter-spacing: -0.02em;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1); transform-origin: left; }
.stat:hover .num { transform: scale(1.06); }
.stat .num small { font-size: 0.5em; color: var(--accent); margin-left: 2px; display: inline-block;
  transition: transform 0.35s cubic-bezier(.3,1.4,.5,1); }
.stat:hover .num small { transform: translateY(-4px); }
.stat .lab { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); margin-top: 10px;
  transition: color 0.3s ease; }
.stat:hover .lab { color: var(--ink-mut); }

/* ---------- trusted-by strip ---------- */
.trusted {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 40px);
  flex-wrap: wrap;
  padding: clamp(18px, 3vh, 28px) 0 clamp(4px, 2vh, 12px);
}
.trusted-label {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); flex: none;
}
.trusted-logos {
  display: flex; align-items: center; gap: clamp(22px, 3.4vw, 46px);
  flex-wrap: wrap;
}
.trusted-logos img {
  display: block; width: auto;
  opacity: 0; transform: translateY(14px) scale(0.94); filter: blur(3px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
  transition-delay: calc(0.2s + var(--i) * 0.12s);
}
/* class-flip reveal: final value applies even if animations are paused offscreen */
.trusted.in .trusted-logos img { opacity: 0.72; transform: none; filter: blur(0); }
.trusted-logos img:hover { opacity: 1; transform: translateY(-3px) scale(1.04); filter: blur(0); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .trusted-logos img { transition: none; }
}
.tl-supercell { height: 40px; }
.tl-riot { height: 30px; }
.tl-dreamhack { height: 22px; }
.tl-pgw { height: 30px; }
.tl-own { height: 21px; }
[data-theme="light"] .trusted-logos img { filter: invert(1) blur(3px); }
[data-theme="light"] .trusted.in .trusted-logos img { opacity: 0.6; filter: invert(1) blur(0); }
[data-theme="light"] .trusted-logos img:hover { opacity: 0.92; filter: invert(1) blur(0); }

/* ---------- section frame ---------- */
section { padding: clamp(22px, 4vh, 44px) 0; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(16px, 2.6vh, 28px); flex-wrap: wrap; }
.sec-head h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.02em; margin: 0; }
.sec-head .kicker { margin-left: auto; }

/* ---------- experience cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 20px); }
.card {
  background:
    radial-gradient(130% 90% at 100% 0%, color-mix(in oklch, var(--accent) 12%, transparent), transparent 52%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 2.2vw, 30px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform 0.35s ease;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklch, var(--accent) 55%, var(--line));
  box-shadow: 0 22px 44px -26px color-mix(in oklch, var(--accent) 70%, transparent), 0 1px 0 oklch(1 0 0 / 0.06) inset; }
.card:hover::before { transform: scaleY(1); }
.card-top { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 6px; }
.card-no { font-family: var(--f-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.card-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in oklch, var(--accent) 26%, transparent), color-mix(in oklch, var(--accent) 12%, transparent));
  border: 1px solid color-mix(in oklch, var(--accent) 38%, transparent);
  box-shadow: 0 6px 18px -8px color-mix(in oklch, var(--accent) 60%, transparent), 0 1px 0 oklch(1 0 0 / 0.08) inset; }
.card-ico svg { width: 21px; height: 21px; stroke: var(--accent); }
.card h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(19px, 1.9vw, 23px); letter-spacing: -0.015em; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.card li { position: relative; padding-left: 18px; color: var(--ink-mut); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 2px;
  background: color-mix(in oklch, var(--accent) 75%, transparent); }
.card li b, .card li .hl { color: var(--ink); font-weight: 600; }
.tag { display: inline-flex; align-items: center; white-space: nowrap; font-family: var(--f-mono); font-size: 11px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }

/* span helper for a wide card */
.card.wide { grid-column: 1 / -1; }
.card.wide ul { grid-template-columns: 1fr 1fr; gap: 9px clamp(20px, 3vw, 44px); }

/* ---------- skills + languages ---------- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.skill-groups { display: grid; gap: 22px; }
.skill-group .gl { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.stag { font-size: 14px; color: var(--ink); padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s, transform 0.2s, color .2s; }
.stag:hover { border-color: var(--accent); transform: translateY(-2px); }

.langs { display: grid; gap: 16px; }
.lang { display: grid; gap: 8px; }
.lang-name { display: inline-flex; align-items: center; gap: 9px; }
.lflag { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; flex: none; display: block;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.22); }
.lflag svg { width: 100%; height: 100%; display: block; }
.tlogo { width: 22px; height: 22px; border-radius: 6px; flex: none; display: block;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.18); }
.tlogo svg { width: 22px; height: 22px; display: block; border-radius: 6px; }
.lang-top { display: flex; align-items: baseline; justify-content: space-between; }
.lang-name { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.lang-lvl { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.lang-top { gap: 14px; }
.lang-name { white-space: nowrap; }
.meter { height: 7px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--line); }
.meter span { position: relative; overflow: hidden; display: block; height: 100%; width: 0; border-radius: 100px;
  background: linear-gradient(90deg, color-mix(in oklch, var(--accent) 55%, transparent), var(--accent));
  box-shadow: 0 0 10px -1px color-mix(in oklch, var(--accent) 50%, transparent);
  transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
/* flowing light streak along the filled portion */
.meter span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 18%, color-mix(in oklch, white 45%, transparent) 50%, transparent 82%);
  background-size: 220% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .meter span::after { animation: meterFlow 2.4s linear infinite; }
}
@keyframes meterFlow {
  0% { background-position: 210% 0; }
  100% { background-position: -120% 0; }
}
.note { font-family: var(--f-mono); font-size: 11px; color: var(--ink-dim); margin-top: 4px; }

/* ---------- experience timeline ---------- */
.timeline { display: grid; }
.role-entry { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 2.4vw, 26px);
  padding: clamp(16px, 2vw, 24px) 0; }
.role-entry + .role-entry { border-top: none; }
.role-rail { display: flex; justify-content: center; padding-top: 4px; }
.role-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 16%, transparent); flex: none; }
.role-logo { width: 56px; height: 56px; flex: none; border-radius: 13px;
  display: grid; place-items: center; padding: 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.05) inset; }
.role-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.role-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.role-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(19px, 2vw, 26px);
  letter-spacing: -0.015em; margin: 0; }
.role-dates { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-dim); white-space: nowrap; }
.role-org { font-family: var(--f-mono); font-size: 13.5px; color: var(--accent); margin: 7px 0 11px; letter-spacing: 0.02em; }
.role-desc { color: var(--ink-mut); max-width: 64ch; margin: 0; font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.role-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.role-tags .tag { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mut);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; background: var(--surface); }

/* ---------- experience timeline: effects ---------- */
.role-entry { position: relative; border-radius: 14px; transition: background 0.4s ease; }
.role-entry:hover {
  background: linear-gradient(90deg, color-mix(in oklch, var(--accent) 7%, transparent), transparent 70%);
}
.role-rail { position: relative; }

/* animated vertical connector between logo nodes */
.role-entry:not(:last-child) .role-rail::after {
  content: ""; position: absolute; left: 50%; top: 62px; bottom: -26px; width: 2px;
  transform: translateX(-50%) scaleY(0); transform-origin: top;
  background: linear-gradient(180deg,
    color-mix(in oklch, var(--accent) 80%, transparent),
    color-mix(in oklch, var(--accent) 14%, transparent));
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1) 0.15s;
}
.role-entry.in:not(:last-child) .role-rail::after { transform: translateX(-50%) scaleY(1); }

/* glowing pulse that continuously travels down the connector */
.role-entry:not(:last-child) .role-rail::before {
  content: ""; position: absolute; left: 50%; top: 62px; z-index: 2;
  width: 7px; height: 7px; border-radius: 50%; transform: translateX(-50%);
  background: var(--accent);
  box-shadow: 0 0 10px 2px color-mix(in oklch, var(--accent) 80%, transparent);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .role-entry.in:not(:last-child) .role-rail::before {
    animation: flowDown 2.8s ease-in-out 0.9s infinite;
  }
}
@keyframes flowDown {
  0%   { top: 62px; opacity: 0; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { top: calc(100% + 18px); opacity: 0; }
}

/* logo node: gentle breathing glow + lights up / lifts when its entry is hovered */
.role-logo {
  position: relative; z-index: 1;
  transition: transform 0.55s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .role-entry.in .role-logo { animation: nodeGlow 3.4s ease-in-out infinite; }
}
@keyframes nodeGlow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 22%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in oklch, var(--accent) 0%, transparent); }
}
.role-entry:hover .role-logo {
  border-color: color-mix(in oklch, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 14%, transparent),
              0 12px 26px -12px color-mix(in oklch, var(--accent) 65%, transparent);
  transform: scale(1.07);
  animation: none;
}

/* staggered slide-in of the entry's content (gated on .in — robust class flip) */
.role-logo { transform: translateX(-14px); }
.role-entry.in .role-logo { transform: none; }
.role-body > * { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); transform: translateY(14px); }
.role-entry.in .role-body > * { transform: none; }
.role-entry.in .role-body > *:nth-child(1) { transition-delay: 0.06s; }
.role-entry.in .role-body > *:nth-child(2) { transition-delay: 0.13s; }
.role-entry.in .role-body > *:nth-child(3) { transition-delay: 0.20s; }
.role-entry.in .role-body > *:nth-child(4) { transition-delay: 0.27s; }
.role-entry.in .role-body > *:nth-child(5) { transition-delay: 0.34s; }

/* company name: underline grows on hover */
.role-org { position: relative; display: inline-block; }
.role-org::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--accent); opacity: 0.7;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.role-entry:hover .role-org::after { transform: scaleX(1); }

/* dates badge gets a leading accent dot */
.role-dates { display: inline-flex; align-items: center; gap: 8px; }
.role-dates::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in oklch, var(--accent) 70%, transparent);
}

/* interactive tags */
.role-tags .tag {
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.role-tags .tag:hover {
  border-color: var(--accent); color: var(--ink);
  background: color-mix(in oklch, var(--accent) 10%, var(--surface)); transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .role-logo, .role-body > * { transition: none; transform: none !important; }
  .role-entry.in:not(:last-child) .role-rail::after { transform: translateX(-50%) scaleY(1); }
}

/* ---------- contact / footer ---------- */
.cta {
  margin-top: clamp(20px, 5vh, 60px);
  border: 1px solid var(--line); border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--accent) 8%, transparent), transparent),
    var(--surface);
  padding: clamp(34px, 6vw, 64px);
  text-align: center;
}
.cta h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 4.6vw, 54px); letter-spacing: -0.02em; margin: 0 0 14px; }
.cta p { color: var(--ink-mut); max-width: 46ch; margin: 0 auto 28px; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { box-shadow: 0 12px 30px -12px color-mix(in oklch, var(--accent) 70%, transparent); }
.btn svg { width: 16px; height: 16px; }
.btn svg.fill-ic { fill: var(--accent); stroke: none; }
.btn.primary svg.fill-ic { fill: var(--accent-ink); }
.btn.primary svg { stroke: var(--accent-ink); }
.btn:not(.primary) svg { stroke: var(--accent); }

footer { padding: 40px 0 64px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-dim); letter-spacing: 0.04em; border-top: 1px solid var(--line); margin-top: 30px; }

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

/* ========================================================= */
/* ============== MOTION / VISUAL EFFECTS LAYER ============ */
/* ========================================================= */

/* scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg,
    color-mix(in oklch, var(--accent) 55%, transparent), var(--accent));
  box-shadow: 0 0 12px color-mix(in oklch, var(--accent) 60%, transparent);
  will-change: transform;
}

/* slowly breathing background glow */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: bgDrift 22s ease-in-out infinite alternate; }
}
@keyframes bgDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  50%  { transform: translate3d(-2.5%, 1.6%, 0) scale(1.07); opacity: 1; }
  100% { transform: translate3d(1.8%, -1.2%, 0) scale(1.04); opacity: 0.9; }
}
[data-theme="light"] body::before { animation-name: bgDriftLight; }
@keyframes bgDriftLight {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: translate3d(-2%, 1%, 0) scale(1.06); opacity: 0.62; }
  100% { transform: translate3d(1.5%, -1%, 0) scale(1.03); opacity: 0.54; }
}

/* hero stacking helpers (no entrance/cursor effects — hero is static) */
.hero { position: relative; }
.hero-grid, .stats, .trusted { position: relative; z-index: 1; }

/* hero entrance: handled by the robust .reveal pattern (transition+class), so
   content stays visible even if the page loads in a background/paused tab.
   The hero children carry .reveal in the HTML and stagger via cv.js. */

/* name highlight: static accent color (no shimmer) */
.name .edit { position: relative; }

/* photo sheen sweep + lift on hover (whole card moves as one piece) */
.photo-card { transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.photo-card:hover { transform: translateY(-5px); }
.photo-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: 18px; clip-path: inset(0 round 18px);
  background: linear-gradient(105deg, transparent 40%,
    color-mix(in oklch, white 28%, transparent) 50%, transparent 60%);
  transform: translateX(-130%); opacity: 0;
}
.photo-card:hover::before { animation: photoSheen 0.9s ease both; }
@keyframes photoSheen {
  0% { transform: translateX(-130%); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(130%); opacity: 0; }
}

/* animated card icon on card hover */
.card-ico { transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s cubic-bezier(.3,1.3,.5,1); }
.card-ico svg { transition: stroke 0.3s ease; }
.card:hover .card-ico { background: var(--accent); border-color: var(--accent); transform: rotate(-6deg) scale(1.1); }
.card:hover .card-ico svg { stroke: var(--accent-ink); }

/* staggered skill tags: base state is visible (no keyframe-gated hiding) */

/* shine sweep on all CTA buttons */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: 0;
  background: linear-gradient(105deg, transparent, color-mix(in oklch, white 26%, transparent), transparent);
  transform: translateX(-260%) skewX(-18deg); pointer-events: none;
}
.btn.primary::before { background: linear-gradient(105deg, transparent, color-mix(in oklch, white 40%, transparent), transparent); }
.btn:hover::before { animation: btnShine 0.8s ease; }
.btn > * , .btn svg, .btn { z-index: 1; }
@keyframes btnShine {
  to { transform: translateX(360%) skewX(-18deg); }
}

/* gentle lift on contact chips already handled; add icon nudge */
.chip svg { transition: transform 0.25s ease, stroke 0.2s ease; }
.chip:hover svg { transform: translateX(2px); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .photo-card { max-width: 260px; order: -1; }
  .photo-card image-slot { height: auto; aspect-ratio: 1 / 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .card.wide ul { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .dotnav { display: none; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- print: condense to ~1 page ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #111; --ink-mut: #333; --ink-dim: #555; --line: #ccc; }
  body { background: #fff; font-size: 11px; }
  body::before, .dotnav, .lang-toggle, .theme-toggle, .cta, .hero-availbadge, .photo-tag, .scroll-progress { display: none !important; }
  .hero::after, .photo-card::before, .btn::before { display: none !important; }
  /* freeze every decorative animation and force visible end-states for print */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-availbadge, .name, .role, .lede, .contact-row, .photo-card, .stag {
    opacity: 1 !important; transform: none !important; }
  .name .edit { -webkit-text-fill-color: var(--accent) !important; color: var(--accent) !important; background: none !important; }
  .trusted-logos img { opacity: 1 !important; transform: none !important; filter: invert(1) !important; }
  .wrap { max-width: 100%; padding: 0 14px; }
  .hero { padding: 8px 0; }
  .name { font-size: 34px; }
  section { padding: 10px 0; }
  .card { break-inside: avoid; }
  .meter span { transition: none; }
}
