/* ==========================================================================
   László Gajó — digital visit card
   Dark glass, premium. Tokens first, then layout, then effects.
   ========================================================================== */

:root {
  /* ---- palette: near-black base, blue→violet accent bridging the p!/b! family, warm gold for emphasis ---- */
  --bg-0: #05070d;
  --bg-1: #090c16;
  --bg-2: #0d1220;
  --ink: #f4f6fb;
  --ink-soft: rgba(244, 246, 251, 0.72);
  --ink-mute: rgba(244, 246, 251, 0.48);
  --ink-faint: rgba(244, 246, 251, 0.28);

  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);

  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);

  --blue: #3fb2ff;
  --violet: #9b6bff;
  --gold: #f2b544;
  --gold-soft: #f5cd7d;

  --grad-brand: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(63,178,255,0.16) 0%, rgba(155,107,255,0.16) 100%);
  --grad-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 1px rgba(0,0,0,0.2), 0 20px 60px -20px rgba(0,0,0,0.6);
  --shadow-glow-blue: 0 0 0 1px rgba(63,178,255,0.25), 0 8px 30px -6px rgba(63,178,255,0.35);
  --shadow-glow-gold: 0 0 0 1px rgba(242,181,68,0.3), 0 8px 30px -6px rgba(242,181,68,0.4);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1160px;
  --nav-h: 76px;

  color-scheme: dark;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

section { position: relative; z-index: 1; }

::selection { background: rgba(155,107,255,0.35); color: #fff; }

/* ---- scrollbar ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue), var(--violet)); border-radius: 10px; }

/* ==========================================================================
   Ambient background — aurora blobs + grain + cursor glow
   ========================================================================== */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.aurora--1 { width: 620px; height: 620px; top: -220px; left: -160px; background: radial-gradient(circle at 30% 30%, var(--blue), transparent 70%); animation: drift1 26s ease-in-out infinite; }
.aurora--2 { width: 560px; height: 560px; top: 10%; right: -220px; background: radial-gradient(circle at 60% 40%, var(--violet), transparent 70%); animation: drift2 32s ease-in-out infinite; }
.aurora--3 { width: 480px; height: 480px; bottom: -180px; left: 20%; background: radial-gradient(circle at 50% 50%, var(--gold), transparent 72%); opacity: 0.28; animation: drift3 38s ease-in-out infinite; }
.aurora--4 { width: 500px; height: 500px; bottom: 5%; right: 10%; background: radial-gradient(circle, var(--blue), transparent 70%); opacity: 0.22; animation: drift1 30s ease-in-out infinite reverse; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,80px) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,60px) scale(0.94); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-50px) scale(1.08); } }

.grain {
  position: absolute; inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155,107,255,0.14), rgba(63,178,255,0.06) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}
.cursor-glow.active { opacity: 1; }

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(5, 7, 13, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled { background: rgba(5, 7, 13, 0.82); border-color: var(--line); }

.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.05rem; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #05070d;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow-blue);
  flex: none;
}
.brand-name { white-space: nowrap; }
.brand-name b { font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.pill:hover { color: var(--ink); background: var(--glass-strong); border-color: var(--line); transform: translateY(-1px); }
.pill svg { width: 15px; height: 15px; opacity: 0.85; }

.pill.active { color: var(--ink); background: var(--glass-strong); border-color: rgba(63,178,255,0.35); }

.pill--cta {
  color: #05070d;
  background: var(--grad-gold);
  font-weight: 600;
  box-shadow: var(--shadow-glow-gold);
}
.pill--cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--glass);
  align-items: center;
  justify-content: center;
  flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: 0.25s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open span::after { transform: rotate(-45deg); top: 0; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 56px) 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--grad-brand); }

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shimmer 8s ease infinite;
}
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-role {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 18px;
}
.hero-role .sep { color: var(--ink-faint); margin: 0 10px; }
.hero-role .accent { color: var(--gold-soft); }

.hero-sub {
  max-width: 560px;
  color: var(--ink-mute);
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 36px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid var(--line);
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--grad-gold); color: #05070d; border: none; box-shadow: var(--shadow-glow-gold); }
.btn--primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--ghost { background: var(--glass); color: var(--ink); backdrop-filter: blur(10px); }
.btn--ghost:hover { background: var(--glass-strong); border-color: rgba(63,178,255,0.4); transform: translateY(-2px); box-shadow: var(--shadow-glow-blue); }

.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat { }
.stat-num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--ink-mute); margin-top: 6px; letter-spacing: 0.02em; }

/* portrait */
.hero-portrait { position: relative; display: flex; justify-content: center; }
.portrait-frame {
  position: relative;
  width: min(360px, 84vw);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; filter: saturate(1.02) contrast(1.03); }
.portrait-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5,7,13,0.55) 100%), linear-gradient(120deg, rgba(63,178,255,0.14), transparent 40%);
  pointer-events: none;
}
.portrait-ring {
  position: absolute;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
}
.portrait-ring--1 { inset: -18px; border-color: rgba(63,178,255,0.25); animation: spin1 18s linear infinite; }
.portrait-ring--2 { inset: -34px; border-color: rgba(155,107,255,0.16); border-radius: 30px; }
@keyframes spin1 { to { transform: rotate(360deg); } }

.portrait-badge {
  position: absolute;
  bottom: -18px; left: -18px;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: rgba(9,12,22,0.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.portrait-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08a; box-shadow: 0 0 10px #3ee08a; flex: none; }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-faint);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--ink-faint), transparent); animation: scrollcue 2s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: scaleY(0.3); transform-origin: top; } 50% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; } }

/* ==========================================================================
   Portal grid — the lead buttons on the home page, each opening its own page
   ========================================================================== */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.portal-grid .portal-card:nth-child(1) { grid-column: span 2; }
.portal-grid .portal-card:nth-child(2) { grid-column: span 2; }

.portal-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.portal-card:hover { transform: translateY(-5px); border-color: rgba(63,178,255,0.4); box-shadow: var(--shadow-card), var(--shadow-glow-blue); }
.portal-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 0%) var(--my, 0%), rgba(155,107,255,0.12), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none;
}
.portal-card:hover::before { opacity: 1; }

.portal-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  color: var(--ink);
}
.portal-icon svg { width: 24px; height: 24px; }
.portal-card--cta .portal-icon { background: var(--grad-gold); color: #05070d; box-shadow: var(--shadow-glow-gold); }

.portal-body { flex: 1; min-width: 0; }
.portal-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin-bottom: 4px; }
.portal-title svg { width: 15px; height: 15px; color: var(--ink-faint); transition: transform 0.25s ease, color 0.25s ease; flex: none; margin-left: auto; }
.portal-card:hover .portal-title svg { transform: translate(3px, -3px); color: var(--blue); }
.portal-desc { font-size: 0.86rem; color: var(--ink-mute); line-height: 1.55; }

/* ==========================================================================
   Section shell
   ========================================================================== */

.section { padding: 120px 0; }
.section--tight { padding: 90px 0; }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 16px; }
.section-head p { color: var(--ink-mute); font-size: 1.02rem; line-height: 1.8; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > * { animation: none; }

/* ==========================================================================
   Glass card
   ========================================================================== */

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   About / summary
   ========================================================================== */

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-body p { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.9; margin-bottom: 20px; }
.about-body p:last-child { margin-bottom: 0; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 0.8rem;
  color: var(--ink-soft);
  transition: all 0.25s ease;
}
.tag:hover { border-color: rgba(63,178,255,0.5); color: var(--ink); background: var(--grad-brand-soft); }

.side-card { padding: 28px; }
.side-card h3 { font-size: 1.05rem; margin-bottom: 18px; color: var(--ink); font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em; }
.fact-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; }
.fact-row:last-child { border-bottom: none; padding-bottom: 0; }
.fact-row dt { color: var(--ink-mute); }
.fact-row dd { margin: 0; color: var(--ink); text-align: right; font-weight: 500; }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lang-chip { font-size: 0.72rem; padding: 5px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.04); border: 1px solid var(--line-soft); color: var(--ink-mute); }

/* ==========================================================================
   Timeline (experience)
   ========================================================================== */

.timeline { position: relative; margin-top: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--blue), var(--violet), transparent);
}
.tl-item { position: relative; padding: 0 0 48px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 0; top: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.tl-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-brand); }
.tl-item.current .tl-dot { box-shadow: var(--shadow-glow-blue); border-color: var(--blue); }
.tl-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-role { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.tl-period { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.tl-org { font-size: 0.9rem; color: var(--gold-soft); margin-bottom: 12px; font-weight: 500; }
.tl-item ul { display: grid; gap: 8px; }
.tl-item li { position: relative; padding-left: 18px; color: var(--ink-mute); font-size: 0.92rem; line-height: 1.7; }
.tl-item li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 1px; background: var(--ink-faint); }

/* ==========================================================================
   Cards grid (apps / entrepreneurship)
   ========================================================================== */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }

.card {
  padding: 30px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); border-color: rgba(63,178,255,0.35); box-shadow: var(--shadow-card), var(--shadow-glow-blue); }
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(155,107,255,0.10), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--ink);
}
/* Real product logo instead of a lettered badge — each mark is already a
   complete rounded-square gradient badge, so the tile just holds it at
   size with no extra background of its own. */
.card-icon--logo {
  background: none;
  border-color: transparent;
  overflow: hidden;
}
.card-icon--logo img { width: 100%; height: 100%; display: block; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .kicker { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 8px; }
.card p { color: var(--ink-mute); font-size: 0.92rem; line-height: 1.75; margin-bottom: 18px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--blue); }
.card-link svg { width: 13px; height: 13px; transition: transform 0.25s ease; }
.card:hover .card-link svg { transform: translate(3px, -3px); }
.card-domain { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 4px; }

/* System diagram (entrepreneurship) — the six-moves flow, in the same
   animated-SVG technique SalesEvolution's own site uses for its hub-and-
   spoke "Custom AI Systems" diagram (dashed lines that flow, a travelling
   light packet per connector, a pulsing hub, glow-on-hover nodes) — copied
   verbatim as a *technique*, laid out as a horizontal chain instead of a
   radial hub-and-spoke, since six sequential moves read left-to-right
   rather than around a centre. */
.sys-diagram-wrap { overflow-x: auto; margin: 44px 0 8px; padding: 8px 0 14px; }
.sys-diagram { display: block; margin: 0 auto; min-width: 760px; max-width: 100%; overflow: visible; }
.sys-line { stroke-dasharray: 4 5; animation: sysFlow 1.4s linear infinite; }
.sys-hub-ping { transform-box: fill-box; transform-origin: center; animation: sysPing 2.6s cubic-bezier(0.2, 0.6, 0.4, 1) infinite; }
.sys-hub-glow { transform-box: fill-box; transform-origin: center; animation: sysHubGlow 2.6s ease-in-out infinite; }
.sys-node { transform-box: fill-box; transform-origin: center; transition: transform 0.25s ease; cursor: default; }
.sys-node-ring { transition: stroke 0.25s ease, filter 0.25s ease; }
.sys-node:hover { transform: scale(1.1); }
.sys-node:hover .sys-node-ring { stroke: var(--blue); filter: drop-shadow(0 0 10px rgba(63, 178, 255, 0.55)); }
.sys-node:hover .sys-node-label { fill: #fff; }
.sys-node-label { transition: fill 0.25s ease; }
@keyframes sysFlow { to { stroke-dashoffset: -18; } }
@keyframes sysPing {
  0% { opacity: 0.55; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes sysHubGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(155, 107, 255, 0.35)); }
  50% { filter: drop-shadow(0 0 16px rgba(155, 107, 255, 0.7)); }
}
@media (prefers-reduced-motion: reduce) {
  .sys-line, .sys-hub-ping, .sys-hub-glow, .sys-packet { animation: none !important; }
}

.founder-note { margin-top: 40px; padding: 26px 30px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.founder-note p { color: var(--ink-soft); font-size: 0.95rem; }
.founder-note strong { color: var(--ink); }

/* ==========================================================================
   Books
   ========================================================================== */

.books-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.book-card { display: block; }
/* The covers are studio product shots on white — dropped straight onto the
   dark page they read as broken tiles. Mounting each on its own light card,
   with the brand gradient as a top accent bar, keeps them legible and on
   brand instead of fighting the dark theme. object-fit: contain (not cover)
   is what actually fixes the seam: the photo's own white background then
   blends into the card's, so there is no visible crop line. */
.book-cover {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid rgba(8, 10, 20, 0.08);
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: linear-gradient(180deg, #f7f8fc 0%, #eceef6 100%);
  padding: 16px;
}
.book-cover::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--grad-brand);
  z-index: 1;
}
.book-card:hover .book-cover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-card), var(--shadow-glow-blue); }
.book-cover img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; position: relative; }
.book-title { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.4; font-weight: 500; }
.book-num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { display: grid; gap: 14px; max-width: 760px; }
.faq-item { padding: 26px 30px; }
.faq-item h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.faq-item p { color: var(--ink-mute); font-size: 0.95rem; line-height: 1.8; margin: 0; }
.faq-item p + p { margin-top: 10px; }

/* ==========================================================================
   Research
   ========================================================================== */

.research-card { padding: 44px; display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
.research-mark {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  flex: none;
}
.research-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.research-inst { color: var(--gold-soft); font-size: 0.9rem; font-weight: 500; margin-bottom: 16px; }
.research-card p { color: var(--ink-mute); font-size: 0.96rem; line-height: 1.85; margin-bottom: 12px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.contact-card .card-icon { margin-bottom: 4px; }
.reveal-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-m);
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.02);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-mute);
  width: 100%;
  justify-content: flex-start;
  transition: all 0.25s ease;
}
.reveal-btn:hover { border-color: rgba(63,178,255,0.5); color: var(--ink); background: var(--glass-strong); }
.reveal-btn.revealed { border-style: solid; color: var(--blue); }
.reveal-btn .copy-check { margin-left: auto; font-size: 0.72rem; opacity: 0; transition: opacity 0.2s ease; color: #3ee08a; }
.reveal-btn.copied .copy-check { opacity: 1; }

.contact-note { font-size: 0.76rem; color: var(--ink-faint); line-height: 1.6; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer { padding: 56px 0 40px; border-top: 1px solid var(--line-soft); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--ink-mute); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: 0.78rem; color: var(--ink-faint); margin-top: 22px; }

/* ==========================================================================
   Sub-pages (books index / detail)
   ========================================================================== */

.subpage-hero { padding: calc(var(--nav-h) + 64px) 0 60px; }
.subpage-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: 16px; }
.subpage-hero p { color: var(--ink-mute); font-size: 1.02rem; max-width: 620px; line-height: 1.8; }
.crumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 20px; display: block; }
.crumb a { color: var(--blue); }

.book-detail { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; padding: 20px 0 100px; }
.book-detail .book-cover { aspect-ratio: 1/1; }
.book-detail h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.book-detail .book-lede { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.7; }
.book-detail .book-body p { color: var(--ink-mute); line-height: 1.9; margin-bottom: 18px; font-size: 0.98rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-grid .portal-card:nth-child(1),
  .portal-grid .portal-card:nth-child(2) { grid-column: span 2; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; margin-bottom: 8px; }
  .portrait-frame { width: min(280px, 60vw); margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .books-rail { grid-template-columns: repeat(3, 1fr); }
  .book-detail { grid-template-columns: 1fr; }
  .book-detail .book-cover { max-width: 280px; }
}

@media (max-width: 760px) {
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: rgba(5,7,13,0.97); backdrop-filter: blur(20px); flex-direction: column; align-items: stretch; padding: 24px; gap: 8px; transform: translateX(100%); transition: transform 0.35s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links .pill { width: 100%; justify-content: flex-start; padding: 16px 18px; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .books-rail { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px 0; }
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-grid .portal-card:nth-child(1),
  .portal-grid .portal-card:nth-child(2) { grid-column: span 1; }
  .portal-card { flex-direction: column; text-align: center; }
  .portal-title svg { margin-left: 0; }
}

@media (max-width: 520px) {
  .hero-stats { gap: 24px; }
  .books-rail { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
