/* ============================================================
   JRX redesign — Nord theme, sim.ai-inspired structure
   No external fonts, analytics, maps, or fonts. Self-contained.
   Palette: https://www.nordtheme.com/
   Aesthetic cues: monochrome-first surfaces, hairline borders,
   corner-tag labels, confident flat type, one restrained accent.
   ============================================================ */

:root {
  /* Nord — Polar Night */
  --nord0: #2E3440;
  --nord1: #3B4252;
  --nord2: #434C5E;
  --nord3: #4C566A;
  /* Nord — Snow Storm */
  --nord4: #D8DEE9;
  --nord5: #E5E9F0;
  --nord6: #ECEFF4;
  /* Nord — Frost */
  --frost-1: #8FBCBB;
  --frost-2: #88C0D0;
  --frost-3: #81A1C1;
  --frost-4: #5E81AC;
  /* Nord — Aurora */
  --aurora-red: #BF616A;
  --aurora-orange: #D08770;
  --aurora-yellow: #EBCB8B;
  --aurora-green: #A3BE8C;
  --aurora-purple: #B48EAD;

  /* Semantic — Dark default */
  --bg: var(--nord0);
  --bg-elev: #323845;          /* slightly lifted from nord0/1 for cards */
  --bg-sidebar: #2A2F3A;       /* a touch darker than nord0 for contrast */
  --surface-line: rgba(216, 222, 233, 0.08);
  --surface-line-strong: rgba(216, 222, 233, 0.14);

  --text: #ECEFF4;             /* nord6 — primary text, AAA on bg */
  --text-soft: #D8DEE9;        /* nord4 */
  --text-muted: #A6B0C0;       /* lifted from nord3 for legibility */
  --text-dim: #8893A6;

  --accent: var(--frost-2);    /* primary accent */
  --accent-strong: var(--frost-3);
  --accent-soft: rgba(136, 192, 208, 0.14);

  --link: #A8CFE0;             /* lighter frost for AA on dark bg */
  --link-hover: var(--nord6);
  --eyebrow: #A8CFE0;          /* tightened from frost-2 for legibility */

  /* Monochrome inverse — the one high-contrast surface, used sparingly for CTAs */
  --mono-fill: var(--nord6);
  --mono-fill-text: var(--nord0);
  --mono-fill-hover: #FFFFFF;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 0 rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 0 1px var(--surface-line), 0 12px 40px rgba(0,0,0,0.45);

  --container: 1180px;
  --sidebar-w: 320px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: "Iowan Old Style", "Apple Garamond", Georgia, Cambria,
    "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Light theme override — follows the OS/browser color scheme automatically,
   no toggle or script needed. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F6FA;
    --bg-elev: #FFFFFF;
    --bg-sidebar: #ECEFF4;
    --surface-line: rgba(46, 52, 64, 0.10);
    --surface-line-strong: rgba(46, 52, 64, 0.18);

    --text: #2E3440;
    --text-soft: #3B4252;
    --text-muted: #4C566A;
    --text-dim: #6B7280;

    --accent: var(--frost-4);
    --accent-strong: #4C6E96;
    --accent-soft: rgba(94, 129, 172, 0.14);

    --link: #4C6E96;
    --link-hover: var(--nord0);
    --eyebrow: var(--frost-4);

    --mono-fill: var(--nord0);
    --mono-fill-text: var(--nord6);
    --mono-fill-hover: #1B202A;

    --shadow-md: 0 8px 24px rgba(46, 52, 64, 0.10);
    --shadow-glow: 0 0 0 1px var(--surface-line), 0 12px 40px rgba(46, 52, 64, 0.10);
  }

  .avatar-img { outline-color: var(--frost-4); }
}

/* ----------------------------------------------------------
   Reset & base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  min-height: 100vh;
  position: relative;
}

/* Quiet, monochrome technical grid — fixed backdrop layer, no color wash, no requests */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--surface-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(1200px 800px at 50% 0%, black 0%, transparent 72%);
  mask-image: radial-gradient(1200px 800px at 50% 0%, black 0%, transparent 72%);
}

a { color: var(--link); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--link-hover); }

::selection { background: var(--accent-soft); color: var(--text); }

button { font: inherit; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--bg-elev); color: var(--text);
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; top: 16px; z-index: 100; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----------------------------------------------------------
   App shell
   ---------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   Sidebar
   ---------------------------------------------------------- */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--surface-line);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
}

@media (max-width: 880px) {
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--surface-line);
  }
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 28px 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand:hover .brand-flow { stroke-dashoffset: 0; }
.brand:hover .brand-node-b { transform: scale(1.15); }

.brand-mark {
  width: 32px; height: 32px;
  display: block;
  flex: 0 0 auto;
}
.brand-bg {
  fill: var(--bg-elev);
  stroke: var(--surface-line-strong);
  stroke-width: 1;
}
.brand-flow {
  stroke: var(--accent);
  stroke-dasharray: 60;
  stroke-dashoffset: 14;
  transition: stroke-dashoffset .5s var(--ease);
}
.brand-node-a {
  fill: var(--accent);
  transform-origin: 19px 22px;
  transition: transform .2s var(--ease);
}
.brand-node-b {
  fill: var(--frost-4);
  transform-origin: 45px 42px;
  transition: transform .2s var(--ease);
}
.brand-text { font-size: 15px; }
.brand-dot { color: var(--accent); }

.brand-tag {
  display: inline-block;
  margin-top: -16px;
  margin-left: 42px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 3px 7px;
  background: var(--accent-soft);
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  align-self: flex-start;
}
@media (prefers-reduced-motion: reduce) {
  .brand-flow { transition: none; }
  .brand-node-a, .brand-node-b { transition: none; }
}

/* Avatar */
.avatar {
  margin: 8px auto 4px;
  width: 168px;
  border-radius: 0;
  padding: 0;
  position: relative;
  text-align: center;
}
.avatar > .avatar-img { width: 168px; height: 168px; }
.avatar::after {
  content: "";
  position: absolute;
  top: -6px; left: -6px;
  width: calc(168px + 12px);
  height: calc(168px + 12px);
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--frost-2), var(--frost-4), var(--frost-1), var(--frost-2));
  filter: blur(14px);
  opacity: 0.35;
  z-index: -1;
  animation: halo-spin 18s linear infinite;
}
@keyframes halo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .avatar::after { animation: none; }
}

.avatar-img {
  width: 100%; height: 100%; display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-glow);
  /* Subtle Frost ring + soft inner border for polish */
  outline: 2px solid var(--frost-2);
  outline-offset: 2px;
  background: var(--bg-elev);
}
.identity { text-align: center; margin-top: -4px; }
.name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.role {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.role-company { color: var(--accent); font-weight: 600; text-decoration: none; }
.role-company:hover { color: var(--text); }
.role-sep { color: var(--text-dim); }

.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--surface-line);
  padding: 5px 10px;
  border-radius: 999px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--aurora-green);
  box-shadow: 0 0 0 3px rgba(163, 190, 140, 0.18);
}

/* Socials */
.socials {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.social {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--surface-line);
  background: var(--bg-elev);
  color: var(--text-soft);
  transition: transform .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.social svg { width: 16px; height: 16px; }
.social:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--surface-line);
}

/* ----------------------------------------------------------
   Main content
   ---------------------------------------------------------- */
.content { min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--surface-line);
}

.nav {
  display: flex; gap: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  padding: 4px;
}
.nav-link {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  color: var(--text-muted);
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
}

.topbar-tools { display: inline-flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.lang-link {
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  padding: 4px 9px; border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-link:hover { color: var(--text); }
.lang-link.is-active {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
}
/* Page container */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  display: flex; flex-direction: column; gap: 64px;
}
@media (max-width: 640px) {
  .page { padding: 40px 22px 72px; gap: 48px; }
  .topbar { padding: 12px 20px; }
}

/* Hero */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--eyebrow);
  margin: 0 0 18px;
  font-weight: 700;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--eyebrow);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(34px, 4.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
}
.hero-title .muted {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  margin-top: 14px;
}

.hero-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 0;
  padding-left: 14px;
  border-left: 1px solid var(--surface-line-strong);
}
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}
.hero-stat-label {
  font-size: 12.5px;
  color: var(--text-dim);
}
.hero-link {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  padding-bottom: 1px;
}
.hero-link:hover { color: var(--accent); background-size: 100% 3px; }
.hero-foot {
  margin: 22px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
  font-style: italic;
  border-top: 1px dashed var(--surface-line);
  padding-top: 14px;
  max-width: 56ch;
}

/* Section heads */
.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.section-rule {
  height: 1px; width: 100%;
  background: linear-gradient(to right, var(--surface-line-strong), transparent);
}

/* Prose */
.prose p { margin: 0 0 14px; color: var(--text-soft); font-size: 16.5px; }
.prose .lede {
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.prose .lede em {
  font-style: italic;
  color: var(--accent);
  font-family: var(--font-serif);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose-note {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--surface-line);
  font-style: italic;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 62ch;
}

.link {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size .25s var(--ease), color .2s var(--ease);
}
.link:hover { background-size: 100% 2px; color: var(--link-hover); }
.link-accent { color: var(--accent); }
.link-accent:hover { color: var(--accent); }

.ghost {
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(216,222,233,0.25);
  text-decoration-thickness: 1px;
}

/* Focus cards */
.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  padding: 20px 20px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--surface-line-strong);
  background: color-mix(in srgb, var(--bg-elev) 92%, var(--text) 8%);
}
.card-tag {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.card-title {
  margin: 0 22px 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.card-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Stack groups */
.stack-groups {
  display: flex; flex-direction: column; gap: 18px;
}
.stack-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* Stack chips */
.chips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover {
  transform: translateY(-1px);
  border-color: var(--surface-line-strong);
  color: var(--text);
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim);
}
.chip:hover .chip-dot { background: var(--accent); }
.chip.is-past {
  color: var(--text-muted);
  background: transparent;
  border-style: dashed;
}
.chip.is-past .chip-dot { background: var(--text-dim); }

/* Contact card */
.cta-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "Contact";
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  pointer-events: none;
}
html[lang="de"] .cta-card::before { content: "Kontakt"; }
.cta-text { position: relative; }
.cta-lede { margin: 0 0 4px; font-size: 18px; color: var(--text); font-weight: 600; }
.cta-sub { margin: 0; color: var(--text-muted); font-size: 14px; }
.cta-verify {
  margin: 14px 0 0;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.cta-verify-icon {
  width: 14px; height: 14px;
  color: var(--accent);
  flex: 0 0 auto;
}

.cta-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 12px 20px;
  background: var(--mono-fill);
  color: var(--mono-fill-text);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--mono-fill);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.cta-btn:hover {
  background: var(--mono-fill-hover);
  border-color: var(--mono-fill-hover);
  transform: translateY(-1px);
  color: var(--mono-fill-text);
}
.cta-btn svg { width: 16px; height: 16px; }
.cta-btn:hover svg { transform: translateX(2px); transition: transform .2s var(--ease); }

@media (max-width: 560px) {
  .cta-card { flex-direction: column; align-items: flex-start; padding: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
