:root {
  color-scheme: light;

  --bg: #f6f6f8;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5f5f68;
  --border: #e6e6ea;
  --chip-bg: #f0f0f4;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.10);

  --header-bg: #35333a;
  --header-bg2: #26242b;
  --header-text: #ffffff;

  --per: #FB4485;
  --pro: #22b8cf;
  --edu: #f59331;
  --int: #82b62b;
  --con: #d9a400;
}

/* dark tokens: the media query follows the OS unless the toggle pinned a theme,
   the attribute rule below wins when it did */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151518;
    --surface: #1e1e23;
    --text: #ececed;
    --muted: #a1a1ab;
    --border: #2c2c33;
    --chip-bg: #2a2a31;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-hover: 0 2px 6px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);

    --header-bg: #26242b;
    --header-bg2: #17161b;

    /* slightly brighter accents read better on dark */
    --per: #ff5c96;
    --pro: #45d0e3;
    --edu: #ffa94d;
    --int: #a3d152;
    --con: #f2c14e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #151518;
    --surface: #1e1e23;
    --text: #ececed;
    --muted: #a1a1ab;
    --border: #2c2c33;
    --chip-bg: #2a2a31;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-hover: 0 2px 6px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);

    --header-bg: #26242b;
    --header-bg2: #17161b;

    /* slightly brighter accents read better on dark */
    --per: #ff5c96;
    --pro: #45d0e3;
    --edu: #ffa94d;
    --int: #a3d152;
    --con: #f2c14e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Calibri, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--header-bg), var(--header-bg2));
  color: var(--header-text);
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 3px solid rgba(255,255,255,.18);
  flex: 0 0 auto;
}
.hero-text { flex: 1 1 260px; min-width: 220px; }
.hero-text h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.05;
}
.tagline {
  margin: 8px 0 4px;
  font-size: 1.05rem;
  color: #d9d7de;
  font-weight: 500;
}
.contact-line {
  margin: 6px 0 0;
  font-size: .95rem;
  color: #b9b7c0;
}
.contact-line a { color: #b9b7c0; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.contact-line a:hover { color: #fff; }

.socials { display: flex; gap: 6px; align-self: flex-start; }
.socials a, .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  transition: background .18s ease, transform .18s ease;
}
.socials a:hover, .theme-toggle:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.socials img { height: 24px; width: 24px; display: block; }

/* ---------- theme toggle ---------- */
.theme-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--header-text);
  cursor: pointer;
  align-self: flex-start;
  flex: 0 0 auto;
}
.theme-toggle:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.theme-toggle svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* show the icon of the theme the button switches to */
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }

/* ---------- sticky nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
  transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: var(--chip-bg); }
.nav a .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dot);
  flex: 0 0 auto;
}
.nav a.contact { margin-left: auto; }

/* ---------- sections ---------- */
main { max-width: 860px; margin: 0 auto; padding: 8px 24px 64px; }
.section { padding-top: 44px; scroll-margin-top: 68px; }

.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}
.section-title .hl { color: var(--accent); }
.rule {
  height: 4px; width: 68px; border-radius: 4px;
  background: var(--accent);
  margin: 0 0 22px;
}

.lead { font-size: 1.05rem; }
.lead .k { color: var(--accent); font-weight: 700; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  background: var(--accent);
  color: #17161b;
  font-weight: 700;
  font-size: .82rem;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.where { font-weight: 700; font-size: .98rem; }
.where a { color: var(--accent); text-decoration: none; }
.where a:hover { text-decoration: underline; }

.role { font-weight: 700; font-size: 1.12rem; margin: 2px 0 6px; }
.card p { margin: 0 0 10px; color: var(--text); }
.card p a { color: var(--accent); text-decoration: none; }
.card p a:hover { text-decoration: underline; }

.card ul { list-style: none; margin: 8px 0 0; padding: 0; }
.card li {
  position: relative;
  padding-left: 1.25em;
  margin: 4px 0;
  color: var(--muted);
}
.card li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.card li a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); }
.card li a:hover { color: var(--accent); }
.card li img { vertical-align: -2px; height: 15px; }

/* ---------- interests ---------- */
.facts { display: grid; gap: 14px; }
.fact { display: grid; grid-template-columns: 180px 1fr; gap: 6px 18px; }
.fact .label { font-weight: 700; color: var(--accent); }
.fact ul { list-style: none; margin: 0; padding: 0; }
.fact li { position: relative; padding-left: 1.25em; margin: 3px 0; color: var(--muted); }
.fact li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.fact li a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); }
.fact li a:hover { color: var(--accent); }

footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
footer a { color: var(--muted); }

/* section accent assignments */
.s-per { --accent: var(--per); }
.s-pro { --accent: var(--pro); }
.s-edu { --accent: var(--edu); }
.s-int { --accent: var(--int); }

@media (max-width: 620px) {
  .hero-inner { padding: 24px 18px; }
  .socials, .theme-toggle { align-self: center; }
  main { padding: 8px 18px 56px; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
  .fact .label { margin-top: 6px; }
}

/* ================= contact / impressum page ================= */
.hero .avatar-sm { width: 64px; height: 64px; }
.hero .home-link {
  display: inline-block;
  color: #b9b7c0;
  text-decoration: none;
  font-size: .9rem;
  margin-bottom: 6px;
}
.hero .home-link:hover { color: #fff; }
.hero h1.sub { font-size: clamp(24px, 5vw, 34px); }

.page { max-width: 720px; margin: 0 auto; padding: 8px 24px 64px; }

.langswitch {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
}
.langswitch a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color .15s ease, border-color .15s ease;
}
.langswitch a:hover { color: var(--text); border-color: var(--accent); }
.langswitch img { height: 12px; border-radius: 2px; }

.addr { color: var(--muted); line-height: 1.75; }
.addr strong { color: var(--text); }
.addr a { color: var(--accent); text-decoration: none; }
.addr a:hover { text-decoration: underline; }

.disclaimer-link { margin: 10px 0 0; }
.disclaimer-link a { color: var(--accent); text-decoration: none; }
.disclaimer-link a:hover { text-decoration: underline; }

.form-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: start;
  max-width: 540px;
}
.form-grid label { font-weight: 600; padding-top: 9px; }
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
}
.form-grid textarea { resize: vertical; min-height: 130px; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.form-actions { grid-column: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  color: #17161b;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.form-note { color: var(--muted); font-size: .82rem; }


.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--int);
  color: #17161b;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
}

.s-con { --accent: var(--con); }

@media (max-width: 560px) {
  .page { padding: 8px 18px 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label { padding-top: 0; }
  .form-actions { grid-column: 1; }
}

/* ---------- legal / disclaimer text ---------- */
.legal { color: var(--muted); line-height: 1.65; }
.legal b {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
  margin: 22px 0 4px;
}
.legal b:first-child { margin-top: 0; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ---------- error pages ---------- */
.errorcard { text-align: center; padding: 44px 24px; }
.errcode {
  font-size: clamp(66px, 16vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  color: var(--accent);
}
.errmsg { font-size: 1.15rem; color: var(--muted); margin: 10px 0 28px; }
.err-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  display: inline-block;
  font: inherit; font-weight: 700;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 22px;
  transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
