/* Shared typography and contact surfaces for all portfolio pages.
   CSS beam inspired by https://libraries.dev/beam; this site is buildless. */
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-italic-variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}

html body #intro-title,
html:root[lang][data-theme] body .footer-title.serif-title {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-stretch: normal;
  font-synthesis: none;
  letter-spacing: -0.025em;
  text-transform: none;
  line-height: 1.12;
  color: var(--heading);
}

html body #intro-title {
  font-size: clamp(2.5rem, 6.8vw, 3.5rem);
  font-style: normal;
}

html:root[lang][data-theme] body .footer-title.serif-title {
  font-size: clamp(2.5rem, 7.6vw, 6rem);
  font-style: italic;
  white-space: normal;
  text-wrap: balance;
}

html:root[lang][data-theme] body .footer-title.serif-title [data-lang] {
  font: inherit;
  letter-spacing: inherit;
}

@property --contact-beam-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* Explicit modifier wins over older page-specific solid tray styles. */
html:root[lang][data-theme] body .contact-dock.contact-dock--glass {
  --dock-divider: rgba(75, 58, 100, 0.18);
  --dock-caption: var(--text);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.86), transparent 65%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.52), rgba(234, 222, 246, 0.22) 48%, rgba(228, 241, 255, 0.4));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px rgba(150, 133, 180, 0.16),
    0 12px 32px rgba(57, 36, 92, 0.1),
    0 2px 6px rgba(57, 36, 92, 0.06);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  backdrop-filter: blur(22px) saturate(1.8);
}

html:root[lang][data-theme][data-theme="dark"] body .contact-dock.contact-dock--glass {
  --dock-divider: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, #1f1f1f 0%, #1D1D1D 50%, #1b1b1b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

/* The masked ring leaves the glass and links clear; it never catches input.
   Browsers without masking keep the static glass rim instead. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass::before,
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass::after {
    content: "";
    display: block;
    position: absolute;
    z-index: -1;
    inset: -1px;
    padding: 1.5px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(from var(--contact-beam-angle),
      transparent 0deg 205deg,
      rgba(122, 162, 255, 0.15) 235deg,
      #8bbdff 265deg,
      #c4a0ff 290deg,
      #f18bc2 315deg,
      #fff5df 338deg,
      transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.85;
    animation: contact-border-beam 7s linear infinite;
  }

  html:root[lang][data-theme] body .contact-dock.contact-dock--glass::before {
    inset: -3px;
    padding: 4px;
    filter: blur(5px);
    opacity: 0.7;
  }
}



@keyframes contact-border-beam {
  to { --contact-beam-angle: 360deg; }
}

@media (max-width: 640px) {
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass {
    gap: clamp(10px, 3.5vw, 16px);
    padding: 12px;
    border-radius: 24px;
  }

  html:root[lang][data-theme] body .contact-dock.contact-dock--glass .dock-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
  }

  /* Preserve a visible confirmation after copying email on touch screens. */
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass .dock-item.is-copied .dock-label--done {
    display: block !important;
    position: absolute;
    bottom: calc(100% + 18px);
    left: 50%;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--dock-tip-bg);
    color: var(--dock-tip-text);
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass::before,
  html:root[lang][data-theme] body .contact-dock.contact-dock--glass::after {
    animation: none;
  }
}

/* Hover beams are separate overlays, preserving concept zoom controls. */
html body :is(.case-cover, .case-texture-frame, .concept-card, .concept-marquee__tile) { position: relative; }
html body .portfolio-beam {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  box-shadow: inset 0 0 12px rgba(178, 148, 255, .45);
}
html body .portfolio-beam::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--contact-beam-angle), transparent 0deg 180deg, #87bfff 230deg, #b399ff 275deg, #ff8dcb 315deg, #fff 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: contact-border-beam 3s linear infinite paused;
}
html body .case-link:is(:hover, :focus-visible) .portfolio-beam,
html body :is(.concept-card, .concept-marquee__tile):is(:hover, :focus-within) > .portfolio-beam { opacity: 1; }
html body .case-link:is(:hover, :focus-visible) .portfolio-beam::after,
html body :is(.concept-card, .concept-marquee__tile):is(:hover, :focus-within) > .portfolio-beam::after { animation-play-state: running; }
html body :is(.concept-card, .concept-marquee__tile):hover { outline-color: transparent !important; }
html body .case-link :is(.case-texture-frame, .case-cover:has(> .remate-cover-video))::after { box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  html body .portfolio-beam { transition: none; }
  html body .portfolio-beam::after { animation: none; }
}

/* Matte glass contact icons. Dark tiles in the dark theme, light tiles in the white theme. */
html:root[lang][data-theme] body .contact-dock .dock-icon {
  visibility: hidden;
}

html:root[lang][data-theme] body .contact-dock .dock-item::before,
html:root[lang][data-theme="dark"] body .contact-dock .dock-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  pointer-events: none;
  transform: translateX(-50%);
  border: 0;
  border-radius: 18px;
  background: transparent var(--dock-glass-icon) center / 100% 100% no-repeat;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: transform 180ms ease;
}

html:root[lang][data-theme="light"] body .contact-dock .dock-item::before {
  box-shadow: 0 8px 16px rgba(24, 20, 32, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
}

html:root[lang][data-theme] body .contact-dock .dock-item::after,
html:root[lang][data-theme="dark"] body .contact-dock .dock-item::after {
  content: none;
  display: none;
}

html:root[lang][data-theme] body .contact-dock .dock-item[data-cv] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%231f1f1f%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%231c1c1c%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23000000%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%2F%3E%3C%2FclipPath%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22%2F%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-opacity%3D%220.04%22%20stroke-width%3D%221.1%22%2F%3E%0A%20%20%3Cg%20fill%3D%22%23f2f2f4%22%20fill-opacity%3D%220.92%22%20stroke%3D%22none%22%3E%3Cpath%20transform%3D%22translate%2810.2%209.4%29%20scale%281.58%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M6.2%201.6h7.1c.3%200%20.6.1.8.3l4.6%204.6c.2.2.3.5.3.8v12.2a1.7%201.7%200%200%201-1.7%201.7H6.2a1.7%201.7%200%200%201-1.7-1.7V3.3a1.7%201.7%200%200%201%201.7-1.7zm.5%209.2h8.4v1.35H6.7v-1.35zm0%203.15h8.4v1.35H6.7v-1.35z%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E"); }
html:root[lang][data-theme] body .contact-dock .dock-item[href*="linkedin.com"] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%231f1f1f%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%231c1c1c%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23000000%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%2F%3E%3C%2FclipPath%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22%2F%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-opacity%3D%220.04%22%20stroke-width%3D%221.1%22%2F%3E%0A%20%20%3Cg%20fill%3D%22%23f2f2f4%22%20fill-opacity%3D%220.92%22%20stroke%3D%22none%22%3E%3Cg%20transform%3D%22translate%2828%2029.2%29%20scale%281.82%29%20translate%28-12%20-12.9%29%22%3E%3Cpath%20d%3D%22M20.45%2020.45h-3.55v-5.57c0-1.33-.03-3.04-1.85-3.04-1.85%200-2.14%201.45-2.14%202.94v5.67H9.35V9h3.41v1.56h.05c.48-.9%201.64-1.85%203.37-1.85%203.6%200%204.27%202.37%204.27%205.46v6.28zM5.34%207.43a2.06%202.06%200%200%201-2.06-2.06%202.06%202.06%200%201%201%202.06%202.06zm1.78%2013.02H3.56V9h3.56v11.45z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E"); }
html:root[lang][data-theme] body .contact-dock .dock-item[href*="t.me"],
html:root[lang][data-theme] body .contact-dock .dock-item[href*="telegram"] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%231f1f1f%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%231c1c1c%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23000000%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%2F%3E%3C%2FclipPath%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22%2F%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-opacity%3D%220.04%22%20stroke-width%3D%221.1%22%2F%3E%0A%20%20%3Cg%20fill%3D%22%23f2f2f4%22%20fill-opacity%3D%220.92%22%20stroke%3D%22none%22%3E%3Cpath%20transform%3D%22translate%2828%2028%29%20scale%281.42%29%20translate%28-12.2%20-12.4%29%22%20d%3D%22M9.42%2015.18%209.02%2020.76c.57%200%20.82-.24%201.11-.54l2.66-2.54%205.52%204.04c1.01.56%201.72.27%202-.93l3.62-16.97h.01c.32-1.5-.54-2.08-1.53-1.71L2.22%2010.26c-1.45.56-1.43%201.37-.25%201.74l5.44%201.69%2012.64-7.91c.6-.39%201.14-.18.69.22%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E"); }
html:root[lang][data-theme] body .contact-dock .dock-item[data-copy-email] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%231f1f1f%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%231c1c1c%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23000000%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%2F%3E%3C%2FclipPath%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22%2F%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-opacity%3D%220.04%22%20stroke-width%3D%221.1%22%2F%3E%0A%20%20%3Cg%20fill%3D%22%23f2f2f4%22%20fill-opacity%3D%220.92%22%20stroke%3D%22none%22%3E%3Cg%20transform%3D%22translate%2828%2028%29%20scale%281.48%29%20translate%28-12%20-12.4%29%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M3.1%206.2h17.8A2.1%202.1%200%200%201%2023%208.3v9.5a2.1%202.1%200%200%201-2.1%202.1H3.1A2.1%202.1%200%200%201%201%2017.8V8.3A2.1%202.1%200%200%201%203.1%206.2zm.55%201.55%208.35%205.55%208.35-5.55v1.35L12%2014.8%203.65%209.1V7.75z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E"); }

html:root[lang][data-theme="light"] body .contact-dock .dock-item[data-cv] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fafbfc%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dce0e5%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220.7%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238d8d96%22%20stop-opacity%3D%220.16%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22/%3E%3C/clipPath%3E%0A%20%20%3C/defs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22/%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22/%3E%0A%20%20%3C/g%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%231c1c1e%22%20stroke-opacity%3D%220.10%22%20stroke-width%3D%221.1%22/%3E%0A%20%20%3Cg%20fill%3D%22%232e2e33%22%20fill-opacity%3D%220.86%22%20stroke%3D%22none%22%3E%3Cpath%20transform%3D%22translate%2810.2%209.4%29%20scale%281.58%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M6.2%201.6h7.1c.3%200%20.6.1.8.3l4.6%204.6c.2.2.3.5.3.8v12.2a1.7%201.7%200%200%201-1.7%201.7H6.2a1.7%201.7%200%200%201-1.7-1.7V3.3a1.7%201.7%200%200%201%201.7-1.7zm.5%209.2h8.4v1.35H6.7v-1.35zm0%203.15h8.4v1.35H6.7v-1.35z%22/%3E%3C/g%3E%0A%3C/svg%3E"); }
html:root[lang][data-theme="light"] body .contact-dock .dock-item[href*="linkedin.com"] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fafbfc%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dce0e5%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220.7%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238d8d96%22%20stop-opacity%3D%220.16%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22/%3E%3C/clipPath%3E%0A%20%20%3C/defs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22/%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22/%3E%0A%20%20%3C/g%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%231c1c1e%22%20stroke-opacity%3D%220.10%22%20stroke-width%3D%221.1%22/%3E%0A%20%20%3Cg%20fill%3D%22%232e2e33%22%20fill-opacity%3D%220.86%22%20stroke%3D%22none%22%3E%3Cg%20transform%3D%22translate%2828%2029.2%29%20scale%281.82%29%20translate%28-12%20-12.9%29%22%3E%3Cpath%20d%3D%22M20.45%2020.45h-3.55v-5.57c0-1.33-.03-3.04-1.85-3.04-1.85%200-2.14%201.45-2.14%202.94v5.67H9.35V9h3.41v1.56h.05c.48-.9%201.64-1.85%203.37-1.85%203.6%200%204.27%202.37%204.27%205.46v6.28zM5.34%207.43a2.06%202.06%200%200%201-2.06-2.06%202.06%202.06%200%201%201%202.06%202.06zm1.78%2013.02H3.56V9h3.56v11.45z%22/%3E%3C/g%3E%3C/g%3E%0A%3C/svg%3E"); }
html:root[lang][data-theme="light"] body .contact-dock .dock-item[href*="t.me"],
html:root[lang][data-theme="light"] body .contact-dock .dock-item[href*="telegram"] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fafbfc%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dce0e5%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220.7%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238d8d96%22%20stop-opacity%3D%220.16%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22/%3E%3C/clipPath%3E%0A%20%20%3C/defs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22/%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22/%3E%0A%20%20%3C/g%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%231c1c1e%22%20stroke-opacity%3D%220.10%22%20stroke-width%3D%221.1%22/%3E%0A%20%20%3Cg%20fill%3D%22%232e2e33%22%20fill-opacity%3D%220.86%22%20stroke%3D%22none%22%3E%3Cpath%20transform%3D%22translate%2828%2028%29%20scale%281.42%29%20translate%28-12.2%20-12.4%29%22%20d%3D%22M9.42%2015.18%209.02%2020.76c.57%200%20.82-.24%201.11-.54l2.66-2.54%205.52%204.04c1.01.56%201.72.27%202-.93l3.62-16.97h.01c.32-1.5-.54-2.08-1.53-1.71L2.22%2010.26c-1.45.56-1.43%201.37-.25%201.74l5.44%201.69%2012.64-7.91c.6-.39%201.14-.18.69.22%22/%3E%3C/g%3E%0A%3C/svg%3E"); }
html:root[lang][data-theme="light"] body .contact-dock .dock-item[data-copy-email] { --dock-glass-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2056%2056%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22plate%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fafbfc%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dce0e5%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%20%20%3ClinearGradient%20id%3D%22shade%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220.7%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%220%22/%3E%0A%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238d8d96%22%20stop-opacity%3D%220.16%22/%3E%0A%20%20%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%3CclipPath%20id%3D%22sq%22%3E%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22/%3E%3C/clipPath%3E%0A%20%20%3C/defs%3E%0A%20%20%3Cg%20clip-path%3D%22url%28%23sq%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23plate%29%22/%3E%0A%20%20%20%20%3Crect%20width%3D%2256%22%20height%3D%2256%22%20fill%3D%22url%28%23shade%29%22/%3E%0A%20%20%3C/g%3E%0A%20%20%3Crect%20x%3D%221.2%22%20y%3D%221.2%22%20width%3D%2253.6%22%20height%3D%2253.6%22%20rx%3D%2216.5%22%20fill%3D%22none%22%20stroke%3D%22%231c1c1e%22%20stroke-opacity%3D%220.10%22%20stroke-width%3D%221.1%22/%3E%0A%20%20%3Cg%20fill%3D%22%232e2e33%22%20fill-opacity%3D%220.86%22%20stroke%3D%22none%22%3E%3Cg%20transform%3D%22translate%2828%2028%29%20scale%281.48%29%20translate%28-12%20-12.4%29%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M3.1%206.2h17.8A2.1%202.1%200%200%201%2023%208.3v9.5a2.1%202.1%200%200%201-2.1%202.1H3.1A2.1%202.1%200%200%201%201%2017.8V8.3A2.1%202.1%200%200%201%203.1%206.2zm.55%201.55%208.35%205.55%208.35-5.55v1.35L12%2014.8%203.65%209.1V7.75z%22/%3E%3C/g%3E%3C/g%3E%0A%3C/svg%3E"); }

@media (hover: hover) {
  html:root[lang][data-theme] body .contact-dock .dock-item:hover::before {
    transform: translateX(-50%) translateY(-2px);
  }
}
html:root[lang][data-theme] body .contact-dock .dock-item:active::before {
  transform: translateX(-50%) scale(0.95);
}
html:root[lang][data-theme] body .contact-dock .dock-item:focus-visible::before {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html:root[lang][data-theme] body .contact-dock .dock-item::before { transition: none; }
}


/* Matte contact tooltips: dark on the light theme, light on the dark theme. */
html:root[lang][data-theme="dark"] body .contact-dock {
  --dock-tip-bg: #f4f4f6;
  --dock-tip-text: #2a2a2e;
}
html:root[lang][data-theme="light"] body .contact-dock,
html:root[lang][data-theme="pink"] body .contact-dock {
  --dock-tip-bg: #2c2c31;
  --dock-tip-text: #f3f3f5;
}

@media (min-width: 641px) {
  html:root[lang][data-theme="dark"] body .contact-dock .dock-label,
  html:root[lang][data-theme="dark"] body .np-tip {
    background: linear-gradient(180deg, #ffffff 0%, #e7e7eb 100%);
    color: #2a2a2e;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 0 0 1px rgba(0, 0, 0, 0.08),
      0 8px 16px rgba(0, 0, 0, 0.12);
  }

  html:root[lang][data-theme="light"] body .contact-dock .dock-label,
  html:root[lang][data-theme="pink"] body .contact-dock .dock-label,
  html:root[lang][data-theme="light"] body .np-tip,
  html:root[lang][data-theme="pink"] body .np-tip {
    background: linear-gradient(180deg, #3c3c41 0%, #242428 100%);
    color: #f3f3f5;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 8px 16px rgba(0, 0, 0, 0.22);
  }
}

html:root[lang][data-theme="dark"] body .contact-dock.contact-dock--glass .dock-item.is-copied .dock-label--done {
  background: linear-gradient(180deg, #ffffff 0%, #e7e7eb 100%);
  color: #2a2a2e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.12);
}
html:root[lang][data-theme="light"] body .contact-dock.contact-dock--glass .dock-item.is-copied .dock-label--done,
html:root[lang][data-theme="pink"] body .contact-dock.contact-dock--glass .dock-item.is-copied .dock-label--done {
  background: linear-gradient(180deg, #3c3c41 0%, #242428 100%);
  color: #f3f3f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

/* Theme and language controls share the matte tiles. The pink / white / black words stay as they are. */
html:root[lang][data-theme="dark"] body .theme-toggle {
  border-radius: 13px;
  background: linear-gradient(180deg, #2f2d36 0%, #26242c 100%);
  color: #f3f3f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.28);
}
html:root[lang][data-theme="light"] body .theme-toggle {
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #e7e7eb 100%);
  color: #2a2a2e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(24, 20, 32, 0.08);
}

html:root[lang][data-theme="dark"] body .lang-switch {
  background: linear-gradient(180deg, rgba(58, 54, 68, 0.55), rgba(28, 26, 34, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
html:root[lang][data-theme="light"] body .lang-switch,
html:root[lang][data-theme="pink"] body .lang-switch {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 232, 236, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(24, 20, 32, 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

html:root[lang="ru"][data-theme="dark"] body .lang-btn[data-lang-set="ru"],
html:root[lang="en"][data-theme="dark"] body .lang-btn[data-lang-set="en"] {
  background: none;
  box-shadow: none;
  color: #f4f5f6;
}
html:root[lang="ru"][data-theme="light"] body .lang-btn[data-lang-set="ru"],
html:root[lang="en"][data-theme="light"] body .lang-btn[data-lang-set="en"],
html:root[lang="ru"][data-theme="pink"] body .lang-btn[data-lang-set="ru"],
html:root[lang="en"][data-theme="pink"] body .lang-btn[data-lang-set="en"] {
  background: none;
  box-shadow: none;
  color: #1d1e21;
}
html:root[lang][data-theme="dark"] body .lang-btn {
  color: #8e939c;
}
html:root[lang][data-theme="dark"] body .lang-btn:hover,
html:root[lang][data-theme="dark"] body .lang-btn:focus-visible {
  color: #c8ccd3;
}


/* One light surface treatment for the contact dock and portfolio covers. */
html.bilingual-home[lang][data-theme="light"] {
  --contact-light-surface: linear-gradient(155deg, rgba(250,251,252,.96) 0%, rgba(238,240,243,.96) 46%, rgba(220,224,229,.96) 100%);
}

/* RU light theme: inverse of the dark contact dock. Icons remain unchanged. */
html.bilingual-home[lang][data-theme="light"] body .contact-dock.contact-dock--glass {
  --dock-divider: rgba(50, 50, 50, 0.22);
  background: var(--contact-light-surface);
  border: 1px solid rgba(143, 150, 162, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 2px rgba(114, 122, 134, 0.09),
    0 8px 18px rgba(76, 87, 106, 0.075),
    0 2px 5px rgba(76, 87, 106, 0.035);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
}

/* Keep the existing multicolour animated border beam visible in light mode. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  html.bilingual-home[lang][data-theme="light"] body .contact-dock.contact-dock--glass::before,
  html.bilingual-home[lang][data-theme="light"] body .contact-dock.contact-dock--glass::after {
    content: "";
    display: block;
    position: absolute;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(
      from var(--contact-beam-angle),
      transparent 0deg 205deg,
      rgba(110, 155, 255, 0.15) 235deg,
      #8bbdff 265deg,
      #c4a0ff 290deg,
      #f18bc2 315deg,
      #fff5df 338deg,
      transparent 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: contact-border-beam 7s linear infinite;
  }
  html.bilingual-home[lang][data-theme="light"] body .contact-dock.contact-dock--glass::before {
    inset: -3px;
    padding: 4px;
    filter: blur(5px);
    opacity: 0.7;
  }
  html.bilingual-home[lang][data-theme="light"] body .contact-dock.contact-dock--glass::after {
    inset: -1px;
    padding: 1.5px;
    filter: none;
    opacity: 0.95;
  }
}

/* Light-mode frosted glass: visual depth on the icon tiles, symbols unchanged. */
html.bilingual-home[lang][data-theme="light"] body .contact-dock .dock-item::before {
  border: 1px solid rgba(144, 151, 163, 0.22);
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.98),
    inset 0 -1px 2px rgba(109,119,131,0.07),
    0 3px 8px rgba(76,87,106,0.065),
    0 1px 2px rgba(76,87,106,0.035);
}
