/* ============================================================
   SEKSE.IT — "EN REISE" — scene styles
   ============================================================ */

/* ════════ SCENE 1 — ANKOMST (hero) ════════ */
.s-hero {
  min-height: auto; display: flex; flex-direction: column;
  justify-content: center; padding-top: 68px; padding-bottom: 0;
  height: 100vh; height: calc(100svh - 40px);
  position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.hero-headline {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 7.5vw, 5.4rem); line-height: 0.95;
  word-wrap: break-word; overflow-wrap: break-word;
  letter-spacing: -0.035em; display: flex; flex-direction: column;
}
.hl-row { display: block; overflow: hidden; padding-bottom: 0.12em; }
.hl-word { display: inline-block; transform: translateY(115%);
  transition: transform 1s var(--ease); }
.s-hero.lit .hl-word { transform: translateY(0); }
.s-hero.lit .hl-row:nth-child(1) .hl-word { transition-delay: 0.12s; }
.s-hero.lit .hl-row:nth-child(2) .hl-word { transition-delay: 0.25s; }
.s-hero.lit .hl-row:nth-child(3) .hl-word { transition-delay: 0.38s; }
.hl-word .c { display: inline-block; }
.hl-word[data-fx="wave"]:hover .c {
  animation: c-wave 0.6s calc(var(--j) * 36ms) cubic-bezier(.3,1.4,.5,1) both; }
@keyframes c-wave { 35% { transform: translateY(-13px) rotate(-4deg); }
  65% { transform: translateY(4px) rotate(1deg); } }
.hl-word[data-fx="drop"]:hover .c {
  animation: c-drop 0.55s calc(var(--j) * 52ms) cubic-bezier(.2,1.6,.4,1) both; }
@keyframes c-drop { 25% { transform: scaleY(.78) translateY(10px); }
  55% { transform: scaleY(1.18) translateY(-14px); } 80% { transform: scaleY(.96) translateY(2px); } }
.hl-lit { color: var(--accent); font-weight: 700; position: relative;
  text-shadow: 0 2px 40px rgba(var(--accent-rgb), 0.25); letter-spacing: -0.045em; }
.hl-lit::before { content: ''; position: absolute; inset: -14% -18%;
  background: radial-gradient(ellipse 80% 66% at 50% 56%,
    rgba(var(--accent-rgb), 0.14) 0%, rgba(var(--accent-rgb), 0.05) 44%, transparent 70%);
  opacity: 0; transition: opacity 0.6s var(--ease); filter: blur(10px); pointer-events: none; }
.hl-lit:hover::before { opacity: 1; }
.hl-lit:hover .c { animation: c-surge 0.7s calc(var(--j) * 26ms) var(--ease) both; }
@keyframes c-surge { 30% { transform: translateY(-10px) scaleX(1.07); color: #ffd6ab; }
  70% { transform: translateY(2px); } }

.hero-sub { font-size: clamp(1rem, 1.7vw, 1.35rem); color: var(--fg-muted);
  max-width: 46ch; line-height: 1.6;
  opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) 0.5s, transform 0.8s var(--ease) 0.5s; }
.hero-sub b { color: var(--fg); font-weight: 600; }
.s-hero.lit .hero-sub { opacity: 1; transform: none; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) 0.62s, transform 0.8s var(--ease) 0.62s; }
.s-hero.lit .hero-actions { opacity: 1; transform: none; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 9px 0; margin-top: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) 0.74s, transform 0.8s var(--ease) 0.74s; }
.s-hero.lit .marquee { opacity: 1; transform: none; }
.marquee-inner { display: flex; width: max-content; animation: ticker 32s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
.marquee-run { display: inline-flex; align-items: center; gap: 14px; padding-right: 14px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }
.marquee-run .sep { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .marquee-inner { animation: none; } }

.scrollcue { display: none; position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-muted);
  opacity: 0; transition: opacity 0.8s var(--ease) 0.95s; }
.s-hero.lit .scrollcue { opacity: 1; }
.scrollcue .line { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent);
  position: relative; overflow: hidden; }
.scrollcue .line::after { content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: cue-drop 1.8s var(--ease) infinite; }
@keyframes cue-drop { 0% { top: -50%; } 100% { top: 100%; } }

/* ════════ section header (shared) ════════ */
.sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(24px, 4vw, 50px); }
.sec-title { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.0; max-width: 16ch; letter-spacing: -0.03em; }
.sec-title em { font-style: normal; color: var(--accent); font-weight: 800; }
.sec-intro { color: var(--fg-muted); max-width: 52ch; font-size: clamp(1rem, 1.5vw, 1.2rem); }

/* ════════ SCENE 2 — ELVEN (river) ════════ */
.s-river { padding: clamp(44px, 6vw, 70px) 0 clamp(20px, 3vw, 40px); position: relative; }
.river-stage { position: relative; }
#river-svg { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.3)); }
.river-eras { display: none; }

/* Year markers — large ghosted numeral tucked into the post's opposite margin */
.year-divider { display: none; }
.year-mark {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4rem, 10vw, 8rem); line-height: 1; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), 0.14);
  opacity: 0.7; top: 50%; transform: translateY(-50%);
}
.post.flow-left .year-mark { right: -15%; }
.post.flow-right .year-mark { left: -15%; }
@media (max-width: 680px) { .year-mark { display: none; } }
@media (max-width: 680px) { .river-eras { display: none; } }
.river-posts { position: relative; z-index: 2; display: flex; flex-direction: column;
  gap: clamp(46px, 8vw, 120px); }
.post {
  position: relative; width: min(60%, 540px); max-width: 100%;
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border); border-radius: 14px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(var(--accent-rgb),0.04);
  opacity: 0; transform: translateY(50px) scale(0.97);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), border-color 0.3s;
  cursor: none;
}
.post.in { opacity: 1; transform: none; }
.post.flow-left { margin-right: auto; margin-left: 0; }
.post.flow-right { margin-left: auto; margin-right: 0; }
.post:hover { border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 0 40px rgba(var(--accent-rgb),0.14); }
.post-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.post-date { font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.post-num { font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  margin-left: auto; opacity: 0.7; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.09); border: 1px solid rgba(var(--accent-rgb), 0.22);
  padding: 3px 9px; border-radius: 99px; transition: background 0.2s, transform 0.2s; cursor: none; }
.tag::before { content: '#'; opacity: 0.5; }
.tag:hover { background: rgba(var(--accent-rgb), 0.2); transform: translateY(-2px); }
.post-title { font-size: clamp(1.3rem, 2.5vw, 1.9rem); line-height: 1.1;
  margin-bottom: 12px; transition: color 0.3s; font-weight: 800;
  letter-spacing: -0.02em;
  word-wrap: break-word; overflow-wrap: break-word; }
.post.feat .post-title { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.post.feat { border-top: 2px solid rgba(var(--accent-rgb), 0.45); }
.post:hover .post-title { color: var(--accent); }
.post-desc { color: var(--fg-muted); font-size: 0.98rem; line-height: 1.6; margin-bottom: 18px;
  word-wrap: break-word; overflow-wrap: break-word; }
.post-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem;
  font-weight: 600; color: var(--fg-muted); transition: gap 0.3s, color 0.3s; }
.post-cta svg { width: 15px; height: 15px; }
.post:hover .post-cta { color: var(--accent); gap: 13px; }
@media (max-width: 680px) {
  .post { width: 100%; }
  #river-svg { display: none; }
  .post { border-left: 2px solid rgba(var(--accent-rgb), 0.3); }
}

/* ════════ SCENE 3 — KOMPETANSE (constellation) ════════ */
.s-comp { padding: clamp(80px, 12vw, 170px) 0; position: relative; }
.const-stage { position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden; max-width: 100%;
  background: radial-gradient(ellipse 70% 80% at 50% 42%, rgba(var(--accent-rgb),0.05), transparent 70%),
              color-mix(in srgb, var(--bg-card) 50%, transparent); }
.const-field { position: relative; flex: none; width: 100%; height: clamp(460px, 62vh, 640px); }
#const-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.node { position: absolute; transform: translate(-50%, -50%); cursor: none;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  z-index: 3; will-change: transform;
  background: none; border: none; padding: 0; margin: 0; font: inherit;
  -webkit-appearance: none; appearance: none; outline: none; }
.node:focus-visible .node-orb { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5), 0 0 30px rgba(var(--accent-rgb), 0.8); }
.node-orb { width: var(--sz, 16px); height: var(--sz, 16px); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 var(--glow, 18px) rgba(var(--accent-rgb), 0.6);
  transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.node.core .node-orb { background: radial-gradient(circle at 35% 30%, #fff, var(--accent-hi) 40%, var(--accent) 70%); }
.node-lbl { font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted);
  transition: color 0.3s, transform 0.3s; white-space: nowrap; }
.node.core .node-lbl { font-size: 12px; color: var(--fg); }
.node:hover .node-orb { transform: scale(1.5); box-shadow: 0 0 38px rgba(var(--accent-rgb), 0.9); }
.node:hover .node-lbl, .node.active .node-lbl { color: var(--accent); transform: scale(1.06); }
.node.active .node-orb { transform: scale(1.4); box-shadow: 0 0 36px rgba(var(--accent-rgb), 0.85); }
.node.dim { opacity: 0.16; }

/* category styling */
/* roles: hollow ringed orb with a halo */
.node.cat-role .node-orb {
  background: radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),0.5), rgba(var(--accent-rgb),0.14) 60%, transparent 72%);
  border: 1.5px solid var(--accent-hi);
  box-shadow: 0 0 var(--glow, 22px) rgba(var(--accent-rgb), 0.45), 0 0 0 5px rgba(var(--accent-rgb), 0.06);
}
.node.cat-role .node-lbl { font-size: 11px; color: var(--fg); opacity: 0.92; }
/* projects: small hollow diamond */
.node.cat-project .node-orb {
  background: var(--bg);
  border: 1.5px solid var(--accent);
  border-radius: 3px; transform: rotate(45deg);
  box-shadow: 0 0 var(--glow, 16px) rgba(var(--accent-rgb), 0.4);
}
.node.cat-project:hover .node-orb { transform: rotate(45deg) scale(1.5); }
.node.cat-project.active .node-orb { transform: rotate(45deg) scale(1.4); }
.node.cat-project .node-lbl { font-size: 9.5px; opacity: 0.8; }

/* legend */
.const-legend { position: absolute; top: clamp(14px,2.5vw,20px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 18px; z-index: 5; pointer-events: none;
  padding: 7px 16px; border-radius: 99px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lg-row { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.lg-dot { width: 12px; height: 12px; flex-shrink: 0; display: grid; place-items: center; }
.lg-dot i { display: block; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent) 60%, var(--accent-deep)); }
.lg-dot.role i { background: radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),0.5), transparent 70%);
  border: 1.5px solid var(--accent-hi); }
.lg-dot.project i { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg);
  background: var(--bg); border: 1.5px solid var(--accent); }
@media (max-width: 560px) { .const-legend { gap: 11px; padding: 6px 11px; } .lg-row span:last-child { display: none; } }

.const-panel { position: relative; flex-shrink: 0; z-index: 5;
  display: flex; gap: clamp(16px, 3vw, 30px); align-items: flex-start;
  min-height: 132px; padding: 20px clamp(20px, 3vw, 30px);
  overflow: hidden; max-width: 100%;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(8px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.const-panel.show { opacity: 1; transform: none; }
.cp-left { width: clamp(160px, 26%, 260px); flex-shrink: 0; min-width: 0;
  border-right: 1px solid var(--border); padding-right: clamp(16px, 3vw, 28px); }
.cp-right { flex: 1; min-width: 0; overflow: hidden; }
.cp-kicker { font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.cp-title { font-size: clamp(1.1rem, 2.2vw, 1.7rem); line-height: 1.15; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
.cp-desc { font-size: 0.92rem; color: var(--fg-muted); line-height: 1.55; margin-bottom: 12px;
  text-wrap: pretty; word-wrap: break-word; overflow-wrap: break-word; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; overflow: hidden; }
.const-hint { position: absolute; top: clamp(14px,2.5vw,22px); right: clamp(14px,2.5vw,24px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-subtle); z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 7px; }
.const-hint .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.7); } }
@media (max-width: 720px) {
  .const-panel { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cp-left { width: 100%; border-right: none; border-bottom: 1px solid var(--border);
    padding-right: 0; padding-bottom: 10px; }
}

/* ════════ SCENE 4 — REISEN (timeline) ════════ */
.s-time { padding: clamp(80px, 12vw, 170px) 0; position: relative; }
.tl { position: relative; padding-left: clamp(34px, 6vw, 70px); }
.tl-spine { position: absolute; left: clamp(7px, 1.6vw, 16px); top: 0; bottom: 0; width: 2px;
  background: var(--border); }
.tl-spine .flow { position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(var(--accent-hi), var(--accent), var(--accent-deep));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6); }
/* comet head at the leading edge of the flow */
.tl-spine .flow::after { content: ''; position: absolute; left: 50%; bottom: 0;
  width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, 50%);
  background: radial-gradient(circle at 40% 35%, #fff, var(--accent-hi) 45%, var(--accent) 75%);
  box-shadow: 0 0 16px 4px rgba(var(--accent-rgb), 0.85), 0 0 40px 8px rgba(var(--accent-rgb), 0.4);
  animation: tl-head 1.4s var(--ease) infinite; }
@keyframes tl-head { 50% { box-shadow: 0 0 22px 6px rgba(var(--accent-rgb), 1), 0 0 54px 12px rgba(var(--accent-rgb), 0.5); } }
.tl-spark { position: absolute; left: 50%; width: 4px; height: 4px; border-radius: 50%;
  transform: translateX(-50%); background: #fff;
  box-shadow: 0 0 8px 1px rgba(var(--accent-rgb), 0.9); opacity: 0;
  animation: tl-flow 2.6s linear infinite; }
@keyframes tl-flow { 0% { top: 0%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tl-spark, .tl-spine .flow::after { animation: none; } .tl-spark { display: none; } }
.no-anim .tl-spark { display: none; } .no-anim .tl-spine .flow::after { animation: none; }
.tl-item { position: relative; padding-bottom: clamp(40px, 6vw, 72px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: absolute; left: calc(clamp(34px, 6vw, 70px) * -1 + clamp(8px, 1.6vw, 17px));
  top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  transform: translateX(-50%) scale(0); transition: transform 0.5s var(--ease); z-index: 2; }
.tl-item.in .tl-node { transform: translateX(-50%) scale(1); box-shadow: 0 0 14px rgba(var(--accent-rgb),0.7); }
.tl-period { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--fg-muted); margin-bottom: 8px; }
.tl-badge { font-size: 9px; padding: 2px 8px; border-radius: 99px; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12); border: 1px solid rgba(var(--accent-rgb), 0.3); letter-spacing: 0.08em;
  margin-left: 8px; }
.tl-role { font-size: clamp(1.3rem, 2.5vw, 1.9rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.tl-sector { font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.06em; margin: 4px 0 12px; text-transform: uppercase; opacity: 0.85; }
.tl-desc { color: var(--fg-muted); font-size: 0.98rem; line-height: 1.65; max-width: 60ch; margin-bottom: 14px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--fg-muted); border: 1px solid var(--border); padding: 3px 9px; border-radius: 5px; }

/* certs strip */
.certs { margin-top: clamp(56px, 8vw, 100px); }
.certs-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cert {
  display: flex; align-items: center; gap: 14px; cursor: none;
  background: color-mix(in srgb, var(--bg-card) 60%, transparent);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px 14px 14px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; }
.cert:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 48px rgba(var(--accent-rgb), 0.22), 0 0 0 1px rgba(var(--accent-rgb), 0.1); }
.cert-badge { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 800;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.1);
  border: 1.5px solid rgba(var(--accent-rgb), 0.45); }
.cert-code { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.08em; }
.cert-name { font-size: 1.05rem; line-height: 1.2; }
.cert-meta { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); letter-spacing: 0.06em; }

/* ════════ SCENE 5 — UTSIKT (outro) ════════ */
.s-outro { padding: clamp(90px, 14vw, 200px) 0 0; position: relative; text-align: center; overflow: hidden; }
.outro-glow { position: absolute; left: 50%; bottom: -30%; transform: translateX(-50%);
  width: 140%; height: 80%; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(var(--accent-rgb), 0.22), transparent 70%);
  filter: blur(20px); }
.outro-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.outro-eyebrow { justify-content: center; }
.outro-h { font-size: clamp(1.8rem, 4.5vw, 3.4rem); line-height: 1.0; max-width: 100%;
  letter-spacing: -0.03em;
  word-wrap: break-word; overflow-wrap: break-word; text-align: center; }
.outro-h em { font-style: normal; color: var(--accent); font-weight: 800; }
.outro-sub { color: var(--fg-muted); max-width: 44ch; font-size: clamp(1rem, 1.6vw, 1.25rem);
  text-align: center; word-wrap: break-word; overflow-wrap: break-word; }
.outro-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.profile-mini { display: flex; align-items: center; gap: 14px; margin-top: 8px;
  padding: 10px 20px 10px 10px; border: 1px solid var(--border); border-radius: 99px;
  background: color-mix(in srgb, var(--bg-card) 60%, transparent); }
.profile-mini img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid rgba(var(--accent-rgb), 0.5); }
.profile-mini .pm-name { font-family: var(--font-display); font-size: 1.1rem; }
.profile-mini .pm-role { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted);
  letter-spacing: 0.08em; text-transform: uppercase; }

/* bergen.exe teaser */
.bergen { margin-top: clamp(70px, 10vw, 130px); position: relative; z-index: 2;
  border-top: 1px solid var(--border); }
.bergen-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; text-align: left;
  padding: clamp(28px, 5vw, 50px) 0; cursor: none; }
.bergen-ico { width: 60px; height: 60px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.07); color: var(--accent); }
.bergen-txt { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.bergen-k { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); }
.bergen-h { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; }
.bergen-d { color: var(--fg-muted); font-size: 0.95rem; max-width: 50ch; }
.bergen-go { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; transition: gap 0.3s, opacity 0.3s; }
.bergen-card { transition: opacity 0.2s; }
.bergen-card:hover .bergen-go { gap: 16px; }
.bergen-card:hover .bergen-ico {
  background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.3);
  transform: scale(1.06) rotate(-4deg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.2s, border-color 0.2s;
}
.bergen-ico { transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.2s, border-color 0.2s; }

footer { position: relative; z-index: 2; border-top: 1px solid var(--border);
  margin-top: clamp(70px, 10vw, 130px); padding: 30px 0 40px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--fg-muted); }
footer .f-dot { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hl-word, .hero-sub, .hero-actions, .marquee, .scrollcue { animation: none !important; opacity: 1; transform: none; }
  .hl-word { transform: none; }
}

/* ---------- Kinetic typography ---------- */
.kt-ch { display: inline-block; opacity: 0; transform: translateY(20px) rotate(6deg);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--ki) * 28ms); }
.kt-in .kt-ch { opacity: 1; transform: none; }
.kt-split { overflow: hidden; }

.hl-row { transform-origin: left center; }
.outro-h { transform-origin: center center; }

@media (prefers-reduced-motion: reduce) {
  .kt-ch { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hl-row, .sec-title, .tl-role, .outro-h { will-change: auto !important; }
}
.no-anim .kt-ch { opacity: 1 !important; transform: none !important; transition: none !important; }
body.still .marquee-inner { animation-play-state: paused; }
body.still .scrollcue .line::after { animation: none; opacity: 0; }
body.still .cue-drop, body.still .const-hint .pulse { animation: none; }
body.still .hl-row, body.still .sec-title, body.still .tl-role, body.still .outro-h {
  transform: none !important; opacity: 1 !important; }

/* frozen-timeline fallback — reveal everything instantly */
html.no-anim *, html.no-anim *::before, html.no-anim *::after {
  transition: none !important; animation: none !important;
}
.no-anim .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .hl-word { transform: none !important; transition: none !important; }
.no-anim .s-hero .hero-sub,
.no-anim .s-hero .hero-actions,
.no-anim .s-hero .marquee,
.no-anim .s-hero .scrollcue { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .post { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .tl-item .tl-node { transform: translateX(-50%) scale(1) !important; }

/* ============================================================
   LOADER — river draw animation on page load
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  background: var(--bg); transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-river { width: 60px; height: 120px; }
.loader-path {
  stroke-dasharray: 500; stroke-dashoffset: 500;
  animation: loader-draw 1.4s var(--ease) forwards;
}
.loader-dot {
  animation: loader-dot-move 1.4s var(--ease) forwards;
  opacity: 0;
}
@keyframes loader-draw { to { stroke-dashoffset: 0; } }
@keyframes loader-dot-move {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 1; }
}
.loader-text {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  letter-spacing: -0.04em; color: var(--fg); opacity: 0;
  animation: loader-fade 0.6s 0.8s var(--ease) forwards;
}
@keyframes loader-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loader { display: none; } }
.no-anim .loader { display: none; }

/* ============================================================
   BACK TO TOP — floating button
   ============================================================ */
.btt {
  position: fixed; bottom: 24px; left: 24px; z-index: 600; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border-hover);
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--fg-muted); cursor: none;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), color 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.btt.show { opacity: 1; transform: none; pointer-events: auto; }
.btt:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.2); }
.btt svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .btt { bottom: 74px; left: 16px; } }


/* ============================================================
   PROFILE CARD MICRO-INTERACTIONS
   ============================================================ */
/* Heartbeat status dot */
.pc-online { animation: heartbeat 2s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6); }
  14% { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3); }
  28% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
  42% { transform: scale(1.2); box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2); }
}
@media (prefers-reduced-motion: reduce) { .pc-online { animation: none; } }

/* Shimmer on tag hover */
.pc-tag { position: relative; overflow: hidden; }
.pc-tag::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.15), transparent);
  transition: none;
}
.pc-tag:hover::after {
  animation: tag-shimmer 0.6s var(--ease) forwards;
}
@keyframes tag-shimmer { to { left: 150%; } }

/* Avatar subtle glow pulse */
.pc-avatar img {
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.profile-card:hover .pc-avatar img {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
  transform: scale(1.03);
}

/* Tags in posts — darker bg + text for readability */
[data-theme='light'] .tag {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent-deep);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* Post cards — subtle shadow instead of relying on dark bg contrast */
[data-theme='light'] .post {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}
[data-theme='light'] .post:hover {
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.15), 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

/* Post date + number — ensure contrast */
[data-theme='light'] .post-date,
[data-theme='light'] .post-num { color: var(--fg-muted); }

/* River SVG — stronger glow on light backgrounds */
[data-theme='light'] #river-svg {
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.5));
}

/* Constellation nodes — darker for visibility */
[data-theme='light'] .const-field { background: var(--bg-2); }

/* Timeline spine — more visible */
[data-theme='light'] .tl-spine { opacity: 1; }
[data-theme='light'] .tl-spine .flow {
  background: linear-gradient(180deg, var(--accent-deep), var(--accent));
}

/* Profile card tags */
[data-theme='light'] .pc-tag {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-deep);
  border-color: rgba(var(--accent-rgb), 0.25);
}
[data-theme='light'] .pc-tag:hover {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.45);
}

/* Search overlay tags */
[data-theme='light'] .search-tags .pf-tag {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-deep);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* Eyebrow bar */
[data-theme='light'] .eyebrow .bar { background: var(--accent-deep); }

/* Hero sub text */
[data-theme='light'] .hero-sub { color: var(--fg-muted); }

/* Outro glow — stronger */
[data-theme='light'] .outro-glow {
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(var(--accent-rgb), 0.18), transparent 70%);
}

/* Certs — visible border */
[data-theme='light'] .cert {
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Year marks — more visible on light */
[data-theme='light'] .year-mark {
  -webkit-text-stroke: 2px rgba(var(--accent-rgb), 0.2);
}

/* Header — subtle shadow for separation */
[data-theme='light'] .hdr {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* Marquee text */
[data-theme='light'] .marquee-run { color: rgba(var(--accent-rgb), 0.2); }
[data-theme='light'] .marquee-run .sep { color: rgba(var(--accent-rgb), 0.35); }


/* ── Post card 3D tilt on hover — directional based on flow ── */
.post {
  transform-style: preserve-3d; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s;
}
.post.flow-left:hover {
  transform: perspective(900px) rotateY(-5deg) rotateX(1.5deg) translateY(-7px);
  box-shadow: 22px 28px 80px rgba(0,0,0,0.4), -2px 8px 20px rgba(0,0,0,0.15),
              0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 0 60px rgba(var(--accent-rgb), 0.1);
}
.post.flow-right:hover {
  transform: perspective(900px) rotateY(5deg) rotateX(1.5deg) translateY(-7px);
  box-shadow: -22px 28px 80px rgba(0,0,0,0.4), 2px 8px 20px rgba(0,0,0,0.15),
              0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 0 60px rgba(var(--accent-rgb), 0.1);
}

/* ── Reading time badge ── */
.post-read-time {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--fg-subtle);
  margin-left: auto; white-space: nowrap;
}


/* ── Scroll snap (opt-in via body class) ── */
body.snap-sections { scroll-snap-type: y proximity; }
body.snap-sections .scene { scroll-snap-align: start; }

/* ── Pull-to-refresh indicator ── */
.ptr-indicator {
  position: fixed; top: -50px; left: 50%; transform: translateX(-50%);
  z-index: 900; width: 40px; height: 40px;
  border-radius: 50%; background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  display: grid; place-items: center;
  transition: top 0.3s var(--ease), opacity 0.3s;
  opacity: 0;
}
.ptr-indicator svg { width: 20px; height: 20px; color: var(--accent); }
.ptr-indicator.pulling { top: 16px; opacity: 1; }
.ptr-indicator.refreshing svg { animation: ptr-spin 0.8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ── Print CV button ── */
.cv-print-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted); background: none; border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 10px; cursor: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cv-print-btn svg { width: 16px; height: 16px; }
.cv-print-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.06); }



/* ── Constellation nodes — light mode visibility fix ── */
[data-theme='light'] .node-lbl {
  color: var(--fg); font-weight: 700;
}
[data-theme='light'] .node.core .node-lbl { font-weight: 800; }
[data-theme='light'] .node-orb {
  box-shadow: 0 0 var(--glow, 18px) rgba(var(--accent-rgb), 0.9),
              0 0 4px rgba(var(--accent-rgb), 0.5);
}
[data-theme='light'] .node.dim { opacity: 0.28; }
[data-theme='light'] #const-canvas { opacity: 0.65; }
[data-theme='light'] .const-stage {
  background: radial-gradient(ellipse 70% 80% at 50% 42%, rgba(var(--accent-rgb),0.08), transparent 70%),
              color-mix(in srgb, var(--bg-card) 80%, transparent);
}
