:root {
  --bg: #08090d;
  --ink: #dde2eb;
  --muted: #99a2ae;
  --heading: #f7f3fb;
  --profile-text: #d9dce5;
  --link: #69e8fb;
  --link-hover: #ff9df4;
  --rule: rgba(170, 220, 232, 0.2);
  --button-border: rgba(105, 232, 251, 0.48);
  --toggle-bg: rgba(15, 18, 25, 0.84);
  --toggle-border: rgba(148, 242, 255, 0.8);
  --toggle-color: #a8f6ff;
  --toggle-shadow: 0 0 26px rgba(148, 242, 255, 0.28), 0 10px 28px rgba(0, 0, 0, 0.32);
  --accent: linear-gradient(100deg, #ff9df4 0%, #b49aff 43%, #57edff 100%);
  --profile-ring: var(--accent);
  --icon-bg: linear-gradient(135deg, rgba(255, 157, 244, 0.14), rgba(87, 237, 255, 0.11)), rgba(255, 255, 255, 0.032);
  --button-bg: linear-gradient(135deg, rgba(255, 157, 244, 0.13), rgba(87, 237, 255, 0.11));
  --logo-bg: #ffffff;
  --page-bg:
    linear-gradient(120deg, rgba(255, 255, 255, 0.028), transparent 26%, rgba(255, 255, 255, 0.012) 58%, rgba(0, 0, 0, 0.3)),
    linear-gradient(180deg, #10121a 0%, #08090d 42%, #050609 100%),
    var(--bg);
  --ambient-spots:
    radial-gradient(circle at 17% 13%, rgba(255, 157, 244, 0.34), transparent 10rem),
    radial-gradient(circle at 91% 10%, rgba(87, 237, 255, 0.26), transparent 11rem),
    radial-gradient(circle at 7% 57%, rgba(180, 154, 255, 0.25), transparent 12rem),
    radial-gradient(circle at 90% 70%, rgba(87, 237, 255, 0.18), transparent 10rem),
    radial-gradient(circle at 38% 92%, rgba(255, 157, 244, 0.16), transparent 11rem);
  --ambient-opacity: 1;
}

:root[data-theme="light"] {
  --bg: #f4f0f7;
  --ink: #2b2831;
  --muted: #625b6b;
  --heading: #20172b;
  --profile-text: #342d3d;
  --link: #007f9f;
  --link-hover: #a42bad;
  --rule: rgba(67, 52, 88, 0.22);
  --button-border: rgba(0, 127, 159, 0.46);
  --toggle-bg: rgba(255, 255, 255, 0.72);
  --toggle-border: rgba(0, 127, 158, 0.68);
  --toggle-color: #006f8a;
  --toggle-shadow: 0 10px 28px rgba(83, 54, 105, 0.22), 0 0 26px rgba(37, 184, 209, 0.22);
  --accent: linear-gradient(100deg, #d946ef 0%, #9385ff 42%, #00c5e8 100%);
  --profile-ring: linear-gradient(100deg, rgba(217, 70, 239, 0.56), rgba(0, 197, 232, 0.56));
  --icon-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.13), rgba(0, 197, 232, 0.1)), rgba(255, 255, 255, 0.68);
  --button-bg: linear-gradient(135deg, rgba(217, 70, 239, 0.13), rgba(0, 197, 232, 0.11));
  --logo-bg: #ffffff;
  --page-bg:
    linear-gradient(115deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.36) 44%, rgba(255, 255, 255, 0.56)),
    linear-gradient(180deg, #fbfaff 0%, #f8f5fc 52%, #f5f9fc 100%),
    var(--bg);
  --ambient-spots:
    radial-gradient(circle at 17% 13%, rgba(217, 70, 239, 0.2), transparent 10rem),
    radial-gradient(circle at 91% 10%, rgba(0, 197, 232, 0.18), transparent 11rem),
    radial-gradient(circle at 8% 58%, rgba(147, 133, 255, 0.13), transparent 12rem),
    radial-gradient(circle at 89% 70%, rgba(0, 197, 232, 0.1), transparent 10rem),
    radial-gradient(circle at 40% 92%, rgba(217, 70, 239, 0.1), transparent 11rem);
  --ambient-opacity: 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Crimson Text", Georgia, serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--ambient-spots);
  opacity: var(--ambient-opacity);
  filter: blur(5px) saturate(1.12);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 53% 31%, rgba(255, 255, 255, 0.035), transparent 32rem);
}

:root[data-theme="light"] body::before {
  filter: blur(7px) saturate(1.08);
}

:root[data-theme="light"] body::after {
  background: radial-gradient(ellipse at 52% 32%, rgba(255, 255, 255, 0.58), transparent 32rem);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.wrapper {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 66px 0 74px;
}

header {
  float: left;
  width: 245px;
  position: fixed;
  text-align: center;
  color: var(--ink);
  padding: 0;
}

main {
  width: 650px;
  float: right;
  padding-bottom: 48px;
}

.profile-photo {
  display: block;
  width: 172px;
  height: 172px;
  margin: 0 auto 26px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 36% 33%;
  padding: 3px;
  background: var(--profile-ring);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34), 0 0 22px rgba(134, 233, 255, 0.14);
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.1;
}

h1 {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.005em;
}

h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
}

h2::after {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin-top: 8px;
  background: var(--accent);
  border-radius: 999px;
  opacity: 1;
  box-shadow: 0 0 10px rgba(126, 230, 239, 0.2);
}

h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
}

header p {
  margin: 0 0 3px;
}

header p:not(.email):not(.links) {
  color: var(--profile-text);
  font-size: 17px;
}

header p:not(.email):not(.links):first-of-type {
  color: var(--heading);
  font-weight: 600;
}

.email {
  margin-top: 11px;
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.links {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin: 25px 0 19px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 50%;
  color: var(--link);
  background: var(--icon-bg);
  box-shadow: 0 0 18px rgba(216, 180, 254, 0.075);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.links a:hover {
  color: var(--link-hover);
  border-color: rgba(244, 183, 255, 0.72);
  box-shadow: 0 0 18px rgba(240, 182, 234, 0.16), 0 0 24px rgba(126, 230, 239, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.links svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.links svg.filled {
  fill: currentColor;
  stroke: none;
}

.cv-link {
  display: inline-block;
  margin-top: 2px;
  padding: 7px 13px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  color: var(--link);
  background: var(--button-bg);
  box-shadow: 0 0 22px rgba(216, 180, 254, 0.08);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.cv-link:hover {
  border-color: rgba(244, 183, 255, 0.58);
  color: var(--link-hover);
  background: linear-gradient(135deg, rgba(244, 183, 255, 0.12), rgba(134, 233, 255, 0.09));
  text-decoration: none;
}

.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--toggle-border);
  border-radius: 50%;
  color: var(--toggle-color);
  background: var(--toggle-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--toggle-shadow);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
  box-shadow: 0 0 22px rgba(240, 182, 234, 0.18), 0 10px 30px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.theme-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

section {
  margin: 0 0 34px;
}

ul {
  margin: 0;
  padding-left: 28px;
}

li {
  margin: 0 0 6px;
}

strong {
  color: var(--heading);
  font-weight: 700;
}

.inline-logo {
  height: 16px;
  width: auto;
  margin: 0 2px;
  vertical-align: -3px;
  background: var(--logo-bg);
  border-radius: 3px;
  padding: 2px 4px;
  object-fit: contain;
}

.inline-logo.bmw-logo {
  height: 20px;
  padding: 1px;
  vertical-align: -5px;
}

.publication {
  padding: 5px 0 11px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.publication:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.pub-title {
  margin-bottom: 1px;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.2;
}

.publication p {
  margin-bottom: 2px;
  font-size: 15.75px;
  line-height: 1.24;
}

.publication em {
  color: var(--muted);
}

.pub-links {
  margin-top: 4px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.pub-links a {
  display: inline-block;
  padding: 1px 7px 2px;
  border: 1px solid var(--button-border);
  border-radius: 2px;
  color: var(--link);
  background: rgba(216, 180, 254, 0.035);
}

.pub-links a:hover {
  border-color: var(--link);
  color: var(--link-hover);
  background: rgba(251, 63, 114, 0.07);
  text-decoration: none;
}

footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
}

@media print, screen and (max-width: 960px) {
  .wrapper {
    width: min(720px, calc(100vw - 48px));
    padding: 44px 0 60px;
  }

  header,
  main {
    float: none;
    position: static;
    width: auto;
  }

  header {
    margin-bottom: 36px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile-photo {
    width: 156px;
    height: 156px;
    margin-bottom: 18px;
  }
}

@media print, screen and (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .wrapper {
    width: min(100% - 30px, 720px);
    padding-top: 30px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 26px;
  }

  ul {
    padding-left: 22px;
  }
}
