/* DeusApps static site — reworked portfolio hub */

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #f8fbff;
  --text: #142033;
  --muted: #5b6b83;
  --border: rgba(42, 64, 101, 0.14);
  --shadow: 0 24px 70px rgba(31, 50, 84, 0.13);
  --shadow-soft: 0 14px 38px rgba(31, 50, 84, 0.10);
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.10);
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --green: #0f9f6e;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --max-width: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0f1b2d;
  --surface-strong: #132139;
  --text: #eef5ff;
  --muted: #a8b6ca;
  --border: rgba(180, 198, 224, 0.16);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.26);
  --primary: #7aa7ff;
  --primary-strong: #a5c1ff;
  --primary-soft: rgba(122, 167, 255, 0.13);
  --accent: #c4a7ff;
  --accent-soft: rgba(196, 167, 255, 0.14);
  --green: #54d8a6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 34rem),
    radial-gradient(circle at top right, var(--primary-soft), transparent 42rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; }

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.brand-name { font-size: 1.05rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow-soft);
}

.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--primary-soft);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.language-selector { position: relative; }

.language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  display: none;
  min-width: 11rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-menu.visible { display: block; }

.language-menu li {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 650;
}

.language-menu li:hover,
.language-menu li.active {
  background: var(--primary-soft);
  color: var(--text);
}

.section {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 4rem 0;
}

.hero {
  min-height: min(760px, calc(100vh - 92px));
  display: flex;
  align-items: center;
  padding-top: 2rem;
}

.hero-panel,
.project-card,
.app-detail,
.contact-card {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: var(--shadow);
}

.hero-panel {
  width: 100%;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
  font-weight: 850;
}

.eyebrow.small { font-size: 0.72rem; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 6.2vw, 5.8rem);
  line-height: 0.98;
}

h2 { font-size: clamp(2rem, 4vw, 3.35rem); }
h3 { font-size: 1.35rem; }

.hero-lead,
.section-heading p,
.project-card p,
.app-copy p,
.contact-card p,
.site-footer {
  color: var(--muted);
}

.hero-lead {
  max-width: 55rem;
  margin: 1.4rem 0 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.hero-actions,
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-actions { margin-top: 1.8rem; }

.button,
.card-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.button {
  padding: 0.75rem 1.15rem;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 32%, transparent);
}

.button.secondary {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
}

.button:hover,
.card-links a:hover,
.app-tab:hover {
  transform: translateY(-2px);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.hero-badges span,
.tag,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-badges span,
.tag {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.status {
  background: var(--surface-strong);
  color: var(--muted);
  border: 1px solid var(--border);
}

.status.live,
.status[data-i18n="status.active"] { color: var(--green); }

.section-heading {
  max-width: 820px;
  margin-bottom: 1.7rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.project-card p {
  flex: 1;
  margin: 1rem 0 0;
}

.card-links { margin-top: 1.25rem; }

.card-links a {
  padding: 0.55rem 0.82rem;
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.app-showcase {
  display: grid;
  gap: 1rem;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.app-tab {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 88px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.app-tab.active {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
  background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--surface) 92%, transparent));
}

.tab-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  padding: 0.55rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.app-detail {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
}

.app-visual {
  display: grid;
  place-items: center;
}

.app-icon.large {
  width: 148px;
  height: 148px;
  border-radius: 34px;
  padding: 1.35rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.feature-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.55rem;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius-xl);
}

.qr-code {
  text-align: center;
}

.qr-code img {
  width: 150px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.qr-code p {
  max-width: 14rem;
  margin: 0.75rem auto 0;
  font-size: 0.92rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-footer a {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 800;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 1120px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    max-width: 14ch;
    font-size: clamp(2.8rem, 7vw, 5rem);
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 2.75rem 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    padding: 1.35rem;
  }

  h1 {
    font-size: clamp(2.5rem, 11vw, 4.2rem);
    max-width: 10.5ch;
  }

  .project-grid,
  .app-tabs,
  .app-detail,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .project-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-detail {
    gap: 1rem;
  }

  .site-footer {
    flex-direction: column;
  }
}


/* === Social contact section === */
.contact-section {
  padding-top: clamp(3rem, 6vw, 5.5rem);
}

.contact-heading {
  max-width: 820px;
}

.social-hub-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

.contact-copy-card,
.qr-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface), var(--surface-strong));
  box-shadow: var(--shadow-soft);
}

.contact-copy-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-copy-card h3 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.contact-copy-card p {
  color: var(--muted);
}

.social-buttons {
  display: grid;
  gap: 0.8rem;
}

.social-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: var(--primary-soft);
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.social-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.telegram-qr-note {
  font-size: 0.92rem;
  line-height: 1.55;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.2rem);
}

.qr-card {
  border-radius: 24px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 148px;
}

.qr-card img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  padding: 0.45rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.qr-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.qr-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

.qr-card-telegram img {
  object-fit: cover;
}

@media (max-width: 980px) {
  .social-hub-grid {
    grid-template-columns: 1fr;
  }
}

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

  .qr-card {
    grid-template-columns: 88px 1fr;
  }

  .qr-card img {
    width: 88px;
    height: 88px;
    border-radius: 16px;
  }
}
/* === End social contact section === */


/* === Profiles contact block refresh === */
.contact-section {
  position: relative;
}

.profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.7rem 0 2rem;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 3rem;
  padding: 0.78rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-button:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 167, 255, 0.45);
  background: linear-gradient(135deg, rgba(122,167,255,0.16), rgba(196,167,255,0.10));
}

.social-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.social-github {
  color: var(--text);
}

.social-linkedin {
  color: #82b8ff;
}

.social-threads {
  color: #d7ccff;
}

.profile-qr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.profile-qr-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  box-shadow: var(--shadow-soft);
}

.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.72rem;
}

.profile-card-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.profile-service-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.profile-service-mark.service-github {
  background: rgba(255,255,255,0.10);
  color: var(--text);
}

.profile-service-mark.service-linkedin {
  background: rgba(10,102,194,0.22);
  color: #9ac8ff;
}

.profile-service-mark.service-threads {
  background: rgba(196,167,255,0.18);
  color: #ded4ff;
}

.profile-service-mark.service-telegram {
  background: rgba(37,99,235,0.22);
  color: #9fc2ff;
}

.profile-qr-card p {
  flex: 1;
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile-qr-frame {
  display: block;
  width: 100%;
  max-width: 13rem;
  margin: 0 auto;
  padding: 0.7rem;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0,0,0,0.22);
}

.profile-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (max-width: 1050px) {
  .profile-qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-link-row {
    flex-direction: column;
  }

  .social-button {
    justify-content: center;
    width: 100%;
  }

  .profile-qr-grid {
    grid-template-columns: 1fr;
  }

  .profile-qr-frame {
    max-width: 12rem;
  }
}
/* === End profiles contact block refresh === */


/* === Final compact hero === */
main,
#top {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

section:has([data-i18n="hero.title"]),
.hero,
.hero.section,
.site-hero,
.hero-section {
  margin-top: 0 !important;
  padding-top: clamp(0.7rem, 1.5vw, 1.25rem) !important;
  padding-bottom: clamp(1rem, 2vw, 1.7rem) !important;
  min-height: auto !important;
}

section:has([data-i18n="hero.title"]) .container,
section:has([data-i18n="hero.title"]) .hero-panel,
section:has([data-i18n="hero.title"]) .hero-shell,
section:has([data-i18n="hero.title"]) .hero-inner,
section:has([data-i18n="hero.title"]) .hero-copy,
.hero-panel,
.hero-shell,
.hero-inner,
.hero-copy {
  padding-top: clamp(1.35rem, 2.5vw, 2.25rem) !important;
  padding-bottom: clamp(1.35rem, 2.5vw, 2.25rem) !important;
  min-height: auto !important;
}

[data-i18n="hero.title"],
.hero h1,
.hero-title,
.hero__title {
  max-width: min(100%, 840px) !important;
  font-size: clamp(2.1rem, 3.55vw, 3.35rem) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.052em !important;
  margin-bottom: 0.75rem !important;
}

[data-i18n="hero.lead"],
.hero-lead,
.hero__lead {
  max-width: min(100%, 760px) !important;
  font-size: clamp(0.88rem, 1.05vw, 1rem) !important;
  line-height: 1.48 !important;
  margin-bottom: 0.9rem !important;
}

.hero-actions,
.hero__actions,
section:has([data-i18n="hero.title"]) .actions {
  margin-top: 0.85rem !important;
  gap: 0.55rem !important;
}

.hero-badges,
.hero-tags,
.hero__tags,
.tag-row,
section:has([data-i18n="hero.title"]) .tags {
  margin-top: 0.8rem !important;
  gap: 0.45rem !important;
}

.hero-badges span,
.hero-tags span,
.tag-row span,
section:has([data-i18n="hero.title"]) .tag,
section:has([data-i18n="hero.title"]) .badge {
  font-size: 0.72rem !important;
  padding: 0.38rem 0.62rem !important;
}

@media (max-width: 900px) {
  [data-i18n="hero.title"],
  .hero h1,
  .hero-title,
  .hero__title {
    max-width: 100% !important;
    font-size: clamp(2rem, 7vw, 2.9rem) !important;
  }

  section:has([data-i18n="hero.title"]) .container,
  section:has([data-i18n="hero.title"]) .hero-panel,
  section:has([data-i18n="hero.title"]) .hero-shell,
  section:has([data-i18n="hero.title"]) .hero-inner,
  section:has([data-i18n="hero.title"]) .hero-copy {
    padding: 1.35rem !important;
  }
}

@media (max-width: 560px) {
  [data-i18n="hero.title"],
  .hero h1,
  .hero-title,
  .hero__title {
    font-size: clamp(1.85rem, 9vw, 2.55rem) !important;
    letter-spacing: -0.04em !important;
  }
}
/* === End final compact hero === */


/* === Final profiles QR visual polish === */
:root {
  --deus-purple: #7c3aed;
  --deus-violet: #a855f7;
  --deus-magenta: #f013c7;
  --deus-coral: #ff6b62;
  --deus-orange: #ff9f43;
  --deus-yellow: #ffe539;
  --deus-ink: #07111f;
}

.profiles-section {
  position: relative;
  isolation: isolate;
}

.profiles-section::before {
  content: "";
  position: absolute;
  top: -5.5rem;
  left: 50%;
  width: 100vw;
  height: 15rem;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 35%, color-mix(in srgb, var(--deus-magenta) 16%, transparent), transparent 34%),
    radial-gradient(circle at 55% 10%, color-mix(in srgb, var(--deus-purple) 12%, transparent), transparent 36%),
    radial-gradient(circle at 86% 42%, color-mix(in srgb, var(--deus-yellow) 12%, transparent), transparent 34%);
  opacity: 0.34;
  filter: blur(24px);
}

.profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.35rem 0 2.1rem;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  min-height: 48px;
  padding: 0.86rem 1.16rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(13, 25, 45, 0.92), rgba(8, 17, 31, 0.98)) padding-box,
    linear-gradient(135deg, var(--deus-purple), var(--deus-magenta), var(--deus-orange), var(--deus-yellow)) border-box;
  color: #f8fbff;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(3, 10, 23, 0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--deus-purple) 20%, rgba(3, 10, 23, 0.36));
  filter: saturate(1.08);
}

.social-button-icon {
  width: 21px;
  height: 21px;
  display: block;
  object-fit: contain;
}

.social-button .social-button-icon {
  filter: brightness(0) invert(1);
}

.profiles-qr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.profile-qr-card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 30px;
  padding: clamp(1rem, 2vw, 1.25rem);
  background:
    linear-gradient(180deg, rgba(15, 27, 47, 0.96), rgba(8, 18, 34, 0.99)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--deus-purple) 82%, transparent), color-mix(in srgb, var(--deus-magenta) 70%, transparent), color-mix(in srgb, var(--deus-yellow) 56%, transparent)) border-box;
  box-shadow: 0 18px 46px rgba(4, 10, 22, 0.28);
  backdrop-filter: none !important;
}

.profile-qr-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--deus-purple), var(--deus-magenta), var(--deus-orange), var(--deus-yellow));
  opacity: 0.84;
}

.profile-qr-card::after {
  content: "";
  position: absolute;
  width: 7rem;
  height: 7rem;
  right: -3.6rem;
  top: -3.6rem;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--deus-magenta) 12%, transparent), transparent 68%);
  pointer-events: none;
}

.profile-qr-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  min-height: 76px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.profile-service-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: linear-gradient(135deg, #ffe539 0%, #ff9f43 28%, #ff6b62 52%, #f013c7 74%, #7c3aed 100%);
  box-shadow: 0 13px 30px color-mix(in srgb, var(--deus-purple) 24%, transparent);
}

.profile-service-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.profile-qr-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
}

.profile-qr-card p {
  margin: 0;
  color: var(--muted, #a8b6ca);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-qr-frame {
  display: grid;
  place-items: center;
  padding: clamp(0.58rem, 1.45vw, 0.84rem);
  border-radius: 30px;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.045),
    0 18px 38px rgba(7, 17, 31, 0.22);
  position: relative;
  z-index: 1;
}

.profile-qr-frame img {
  width: min(100%, 224px);
  aspect-ratio: 1;
  display: block;
  border-radius: 25px;
}

[data-theme="light"] .profiles-section::before {
  opacity: 0.24;
  filter: blur(30px);
}

[data-theme="light"] .profile-qr-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 253, 0.98)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--deus-purple) 62%, transparent), color-mix(in srgb, var(--deus-magenta) 50%, transparent), color-mix(in srgb, var(--deus-yellow) 46%, transparent)) border-box;
  box-shadow: 0 18px 46px rgba(25, 40, 72, 0.13);
}

[data-theme="light"] .social-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 249, 253, 0.98)) padding-box,
    linear-gradient(135deg, var(--deus-purple), var(--deus-magenta), var(--deus-orange), var(--deus-yellow)) border-box;
  color: #0b1220;
}

[data-theme="light"] .social-button .social-button-icon {
  filter: none;
}

@media (max-width: 1120px) {
  .profiles-qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-link-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profiles-qr-grid {
    grid-template-columns: 1fr;
  }
}
/* === End final profiles QR visual polish === */

/* === Profile QR repair v2 === */
/* Keep the Profiles surface aligned with the main dark DeusApps style. */
.profiles-section,
.contact-section,
section:has([data-i18n="contact.title"]) {
  overflow: hidden;
}

.profiles-section::before,
.contact-section::before,
section:has([data-i18n="contact.title"])::before {
  opacity: 0.13 !important;
  filter: blur(110px) !important;
  width: 110vw !important;
  max-width: none !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: radial-gradient(circle at 18% 20%, rgba(216, 59, 255, 0.30), transparent 34%),
              radial-gradient(circle at 82% 12%, rgba(255, 209, 72, 0.18), transparent 38%) !important;
}

.profile-actions,
.profile-links,
.social-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.profile-action,
.profile-link,
.social-button,
.contact-button,
a[href*="github.com/dturovskiy"],
a[href*="linkedin.com/in/denysturovskiy"],
a[href*="threads.com/@d.turovskiy"] {
  --profile-action-border: rgba(255, 255, 255, 0.18);
}

.profile-action img,
.profile-link img,
.social-button img,
.contact-button img,
a[href*="github.com/dturovskiy"] img[src*="icon-"],
a[href*="linkedin.com/in/denysturovskiy"] img[src*="icon-"],
a[href*="threads.com/@d.turovskiy"] img[src*="icon-"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  flex: 0 0 1.15rem !important;
  display: inline-block !important;
  object-fit: contain !important;
}

[data-theme="dark"] .profile-action img,
[data-theme="dark"] .profile-link img,
[data-theme="dark"] .social-button img,
[data-theme="dark"] .contact-button img,
[data-theme="dark"] a[href*="github.com/dturovskiy"] img[src*="icon-"],
[data-theme="dark"] a[href*="linkedin.com/in/denysturovskiy"] img[src*="icon-"],
[data-theme="dark"] a[href*="threads.com/@d.turovskiy"] img[src*="icon-"] {
  filter: brightness(0) invert(1) !important;
  opacity: 0.98 !important;
}

.profile-grid,
.profile-cards,
.social-grid,
.qr-grid,
.contact-grid {
  align-items: stretch !important;
}

.profile-card,
.social-card,
.qr-card,
.contact-card {
  border-radius: 24px !important;
  border: 1px solid rgba(214, 72, 255, 0.38) !important;
  border-top-color: rgba(255, 124, 89, 0.90) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24) !important;
}

[data-theme="dark"] .profile-card,
[data-theme="dark"] .social-card,
[data-theme="dark"] .qr-card,
[data-theme="dark"] .contact-card {
  background: linear-gradient(180deg, rgba(22, 28, 52, 0.96), rgba(9, 18, 33, 0.98)) !important;
}

.profile-card:has(img[src*="qr-"]),
.social-card:has(img[src*="qr-"]),
.qr-card:has(img[src*="qr-"]),
.contact-card:has(img[src*="qr-"]) {
  display: flex !important;
  flex-direction: column !important;
  min-height: 292px !important;
}

.profile-card img[src*="icon-"],
.social-card img[src*="icon-"],
.qr-card img[src*="icon-"],
.contact-card img[src*="icon-"] {
  width: 1.35rem !important;
  height: 1.35rem !important;
  object-fit: contain !important;
}

.profile-card:has(img[src*="qr-"]) > :last-child,
.social-card:has(img[src*="qr-"]) > :last-child,
.qr-card:has(img[src*="qr-"]) > :last-child,
.contact-card:has(img[src*="qr-"]) > :last-child {
  margin-top: auto !important;
}

.profile-card img[src*="qr-"],
.social-card img[src*="qr-"],
.qr-card img[src*="qr-"],
.contact-card img[src*="qr-"] {
  display: block !important;
  width: 146px !important;
  height: 146px !important;
  max-width: 146px !important;
  max-height: 146px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  margin: 1.25rem auto 0 !important;
  padding: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18) !important;
}

@media (max-width: 980px) {
  .profile-card:has(img[src*="qr-"]),
  .social-card:has(img[src*="qr-"]),
  .qr-card:has(img[src*="qr-"]),
  .contact-card:has(img[src*="qr-"]) {
    min-height: 270px !important;
  }
}

@media (max-width: 640px) {
  .profile-card img[src*="qr-"],
  .social-card img[src*="qr-"],
  .qr-card img[src*="qr-"],
  .contact-card img[src*="qr-"] {
    width: 136px !important;
    height: 136px !important;
    max-width: 136px !important;
    max-height: 136px !important;
  }
}
/* === End Profile QR repair v2 === */


/* === QR alignment and rounded-cube repair === */
:root {
  --qr-card-size: 154px;
  --qr-image-size: 132px;
}

/* Keep all profile QR cards on one visual baseline. */
.profile-card:has(img[src*="qr-"]),
.contact-card:has(img[src*="qr-"]),
.social-card:has(img[src*="qr-"]),
article:has(img[src*="qr-"]) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-height: 286px !important;
}

.profile-card:has(img[src*="qr-"]) p,
.contact-card:has(img[src*="qr-"]) p,
.social-card:has(img[src*="qr-"]) p,
article:has(img[src*="qr-"]) p {
  min-height: 3.25rem !important;
}

.profile-card:has(img[src*="qr-"]) > :last-child,
.contact-card:has(img[src*="qr-"]) > :last-child,
.social-card:has(img[src*="qr-"]) > :last-child,
article:has(img[src*="qr-"]) > :last-child {
  margin-top: auto !important;
  align-self: center !important;
}

.profile-card img[src*="qr-"],
.contact-card img[src*="qr-"],
.social-card img[src*="qr-"],
article img[src*="qr-"] {
  width: var(--qr-image-size) !important;
  height: var(--qr-image-size) !important;
  display: block !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.profile-card:has(img[src*="qr-"]) .qr-frame,
.profile-card:has(img[src*="qr-"]) .qr-shell,
.profile-card:has(img[src*="qr-"]) .qr-card,
.profile-card:has(img[src*="qr-"]) .profile-qr,
.profile-card:has(img[src*="qr-"]) .qr-image-wrap,
.contact-card:has(img[src*="qr-"]) .qr-frame,
.contact-card:has(img[src*="qr-"]) .qr-shell,
.contact-card:has(img[src*="qr-"]) .qr-card,
.contact-card:has(img[src*="qr-"]) .profile-qr,
.contact-card:has(img[src*="qr-"]) .qr-image-wrap,
.social-card:has(img[src*="qr-"]) .qr-frame,
.social-card:has(img[src*="qr-"]) .qr-shell,
.social-card:has(img[src*="qr-"]) .qr-card,
.social-card:has(img[src*="qr-"]) .profile-qr,
.social-card:has(img[src*="qr-"]) .qr-image-wrap,
article:has(img[src*="qr-"]) .qr-frame,
article:has(img[src*="qr-"]) .qr-shell,
article:has(img[src*="qr-"]) .qr-card,
article:has(img[src*="qr-"]) .profile-qr,
article:has(img[src*="qr-"]) .qr-image-wrap {
  width: var(--qr-card-size) !important;
  height: var(--qr-card-size) !important;
  padding: 11px !important;
  border-radius: 24px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgba(9, 16, 30, 0.20) !important;
  overflow: hidden !important;
}

/* Service icons: visible in dark mode, not swallowed by the card background. */
.profile-link img,
.profile-link svg,
.social-link img,
.social-link svg,
.profile-card-header img,
.profile-card-header svg,
.profile-card-icon img,
.profile-card-icon svg,
.card-icon img,
.card-icon svg,
img[src*="icon-"] {
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}

.profile-card-icon,
.card-icon,
.profile-service-icon {
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #ff5ea8 0%, #ff8a4b 48%, #ffd83d 100%) !important;
  color: #07111f !important;
}

/* Tame the Profiles glow: full-width and soft, not a harsh local blob. */
#contact::before,
.profiles-section::before,
.contact-section::before,
section:has([data-i18n="contact.title"])::before {
  opacity: 0.16 !important;
  filter: blur(90px) !important;
  width: 100vw !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

@media (max-width: 900px) {
  :root {
    --qr-card-size: 148px;
    --qr-image-size: 126px;
  }

  .profile-card:has(img[src*="qr-"]),
  .contact-card:has(img[src*="qr-"]),
  .social-card:has(img[src*="qr-"]),
  article:has(img[src*="qr-"]) {
    min-height: 268px !important;
  }
}
/* === End QR alignment and rounded-cube repair === */


/* === Supplied profile QR assets === */
.profiles-section,
#contact,
section:has([data-i18n="contact.title"]) {
  position: relative;
}

.profiles-section::before,
#contact::before,
section:has([data-i18n="contact.title"])::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2.5rem;
  left: 50%;
  width: min(100vw, 1180px);
  height: 18rem;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 30%, rgba(255, 48, 199, 0.20), transparent 34%),
    radial-gradient(circle at 83% 28%, rgba(255, 220, 65, 0.12), transparent 34%),
    radial-gradient(circle at 52% 10%, rgba(137, 95, 255, 0.14), transparent 30%);
  filter: blur(18px);
  opacity: 0.58;
}

[data-theme="dark"] .profiles-section::before,
[data-theme="dark"] #contact::before,
[data-theme="dark"] section:has([data-i18n="contact.title"])::before {
  opacity: 0.38;
  background:
    radial-gradient(circle at 16% 30%, rgba(255, 48, 199, 0.18), transparent 34%),
    radial-gradient(circle at 83% 28%, rgba(255, 202, 54, 0.10), transparent 34%),
    radial-gradient(circle at 52% 10%, rgba(92, 141, 255, 0.12), transparent 32%);
}

.profile-links,
.social-links,
.contact-links,
.profile-actions,
.social-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.profile-links a,
.social-links a,
.contact-links a,
.profile-actions a,
.social-actions a,
a.profile-button,
a.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.profile-links img,
.social-links img,
.contact-links img,
.profile-actions img,
.social-actions img,
a.profile-button img,
a.social-button img,
.profile-link-icon,
.social-icon {
  width: 1.18rem;
  height: 1.18rem;
  min-width: 1.18rem;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

[data-theme="dark"] .profile-links img,
[data-theme="dark"] .social-links img,
[data-theme="dark"] .contact-links img,
[data-theme="dark"] .profile-actions img,
[data-theme="dark"] .social-actions img,
[data-theme="dark"] a.profile-button img,
[data-theme="dark"] a.social-button img {
  filter: invert(1);
}

.profile-grid,
.profiles-grid,
.contact-grid,
.qr-grid,
.profile-cards {
  align-items: stretch;
}

.profile-card,
.contact-card,
.qr-card,
.channel-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 24px;
}

.profile-card header,
.contact-card header,
.qr-card header,
.channel-card header,
.profile-card .card-header,
.contact-card .card-header,
.qr-card .card-header,
.channel-card .card-header {
  min-height: 4.9rem;
}

.profile-card p,
.contact-card p,
.qr-card p,
.channel-card p {
  min-height: 2.9rem;
}

.profile-card .profile-icon,
.contact-card .profile-icon,
.qr-card .profile-icon,
.channel-card .profile-icon,
.profile-card .service-icon,
.contact-card .service-icon,
.qr-card .service-icon,
.channel-card .service-icon {
  width: 2.05rem;
  height: 2.05rem;
  min-width: 2.05rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-card .profile-icon img,
.contact-card .profile-icon img,
.qr-card .profile-icon img,
.channel-card .profile-icon img,
.profile-card .service-icon img,
.contact-card .service-icon img,
.qr-card .service-icon img,
.channel-card .service-icon img {
  width: 1.16rem;
  height: 1.16rem;
  object-fit: contain;
  display: block;
}

.qr-shell,
.qr-frame,
.qr-image-wrap,
.profile-qr,
.profile-card .qr,
.contact-card .qr,
.qr-card .qr,
.channel-card .qr {
  width: 100%;
  min-height: 9.75rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

img[src*="qr-github"],
img[src*="qr-linkedin"],
img[src*="qr-threads"],
img[src*="qr-telegram"] {
  width: 8.7rem !important;
  height: 8.7rem !important;
  max-width: 100% !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 18px;
  image-rendering: auto;
}

@media (min-width: 980px) {
  .profile-grid,
  .profiles-grid,
  .contact-grid,
  .qr-grid,
  .profile-cards {
    grid-auto-rows: 1fr;
  }
}

@media (max-width: 720px) {
  img[src*="qr-github"],
  img[src*="qr-linkedin"],
  img[src*="qr-threads"],
  img[src*="qr-telegram"] {
    width: 9.2rem !important;
    height: 9.2rem !important;
  }

  .qr-shell,
  .qr-frame,
  .qr-image-wrap,
  .profile-qr,
  .profile-card .qr,
  .contact-card .qr,
  .qr-card .qr,
  .channel-card .qr {
    min-height: 10rem;
  }
}
/* === End Supplied profile QR assets === */


/* === QR layout and smooth surfaces === */
:root {
  --deus-magenta: #ff2bd6;
  --deus-purple: #8b5cf6;
  --deus-violet: #6d28d9;
  --deus-orange: #ff8a3d;
  --deus-yellow: #ffe84a;
  --deus-cyan: #16c8ff;
}

/* Keep glow and card shadows from being visibly chopped at section edges. */
body,
main,
.site-main,
.page,
.wrapper,
.content,
.section,
.container,
.shell,
#contact,
#profiles,
section:has(.profile-qr-frame) {
  overflow: visible !important;
}

/* Still prevent horizontal scroll caused by soft glows. */
html,
body {
  overflow-x: clip !important;
}

/* Smooth header transition instead of a hard glass strip. */
.site-header,
.header,
header {
  overflow: visible !important;
}

.site-header::after,
.header::after,
header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4.75rem;
  width: min(1120px, 92vw);
  height: 7rem;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%,
      color-mix(in srgb, var(--deus-purple) 18%, transparent) 0%,
      color-mix(in srgb, var(--deus-cyan) 8%, transparent) 38%,
      transparent 74%);
  filter: blur(24px);
  opacity: 0.42;
  z-index: -1;
}

[data-theme="light"] .site-header::after,
[data-theme="light"] .header::after,
[data-theme="light"] header::after {
  opacity: 0.28;
  background:
    radial-gradient(ellipse at 50% 0%,
      rgba(139, 92, 246, 0.18) 0%,
      rgba(22, 200, 255, 0.08) 42%,
      transparent 74%);
}

/* Make the profiles section glow wide and soft instead of a clipped bright patch. */
#contact,
#profiles,
section:has(.profile-qr-frame) {
  position: relative;
  isolation: isolate;
}

#contact::before,
#profiles::before,
section:has(.profile-qr-frame)::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -5.5rem;
  width: min(1480px, 118vw);
  height: min(560px, 60vh);
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 43, 214, 0.22), transparent 46%),
    radial-gradient(ellipse at 75% 8%, rgba(255, 232, 74, 0.12), transparent 44%),
    radial-gradient(ellipse at 48% 30%, rgba(109, 40, 217, 0.12), transparent 58%);
  filter: blur(34px);
  opacity: 0.62;
}

[data-theme="dark"] #contact::before,
[data-theme="dark"] #profiles::before,
[data-theme="dark"] section:has(.profile-qr-frame)::before {
  opacity: 0.36;
  background:
    radial-gradient(ellipse at 14% 10%, rgba(255, 43, 214, 0.18), transparent 48%),
    radial-gradient(ellipse at 82% 12%, rgba(255, 232, 74, 0.10), transparent 44%),
    radial-gradient(ellipse at 48% 28%, rgba(22, 200, 255, 0.08), transparent 58%);
}

/* Profiles cards: equal structure so QR blocks start on the same baseline. */
:is(.profile-card, .contact-card, .social-card, .qr-card, .channel-card):has(.profile-qr-frame) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-height: clamp(17rem, 27vw, 20.5rem) !important;
  overflow: visible !important;
  border-radius: 26px !important;
}

:is(.profile-card, .contact-card, .social-card, .qr-card, .channel-card):has(.profile-qr-frame) p {
  min-height: 3.15em;
}

/* The white QR surface should be a real square, not a flattened rectangle. */
.profile-qr-frame {
  width: clamp(8.6rem, 13.5vw, 10.25rem) !important;
  height: clamp(8.6rem, 13.5vw, 10.25rem) !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 auto !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  margin: auto auto 0 !important;
  padding: clamp(0.45rem, 0.85vw, 0.62rem) !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.075) !important;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.15),
    0 4px 10px rgba(15, 23, 42, 0.07) !important;
  overflow: hidden !important;
}

.profile-qr-frame img,
.profile-qr-frame picture,
.profile-qr-frame svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 18px !important;
}

/* Do not let older QR image rules squash the supplied PNGs. */
img[src*="qr-github"],
img[src*="qr-linkedin"],
img[src*="qr-threads"],
img[src*="qr-telegram"] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  image-rendering: auto !important;
}

/* Better contrast for social link icons in dark mode. */
.profile-links img,
.social-links img,
.contact-links img,
a[href*="github"] img,
a[href*="linkedin"] img,
a[href*="threads"] img {
  opacity: 1 !important;
  filter: none !important;
}

[data-theme="dark"] .profile-links a,
[data-theme="dark"] .social-links a,
[data-theme="dark"] .contact-links a,
[data-theme="dark"] a.profile-link,
[data-theme="dark"] a.social-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #f8fbff !important;
}

[data-theme="dark"] .profile-links a img,
[data-theme="dark"] .social-links a img,
[data-theme="dark"] .contact-links a img,
[data-theme="dark"] a.profile-link img,
[data-theme="dark"] a.social-link img {
  filter: brightness(0) invert(1) !important;
}

/* Slightly calmer profile card shadows. */
:is(.profile-card, .contact-card, .social-card, .qr-card, .channel-card):has(.profile-qr-frame) {
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] :is(.profile-card, .contact-card, .social-card, .qr-card, .channel-card):has(.profile-qr-frame) {
  box-shadow:
    0 18px 48px rgba(31, 50, 84, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.68) !important;
}

@media (max-width: 720px) {
  .profile-qr-frame {
    width: min(58vw, 10.25rem) !important;
    height: min(58vw, 10.25rem) !important;
  }

  :is(.profile-card, .contact-card, .social-card, .qr-card, .channel-card):has(.profile-qr-frame) {
    min-height: auto !important;
  }
}
/* === End QR layout and smooth surfaces === */

/* deusapps-header-smoothness-patch: soften lower edge of the top navigation strip */
:where(header:first-of-type, .site-header, .app-header, .topbar, .top-nav, .navbar, .nav-bar) {
  isolation: isolate;
  overflow: visible;
  border-bottom-left-radius: clamp(20px, 2.6vw, 34px) !important;
  border-bottom-right-radius: clamp(20px, 2.6vw, 34px) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
  backdrop-filter: blur(18px) saturate(1.14);
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

:where(header:first-of-type, .site-header, .app-header, .topbar, .top-nav, .navbar, .nav-bar)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 28px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238, 245, 255, 0.72), rgba(238, 245, 255, 0));
}

:where(header:first-of-type, .site-header, .app-header, .topbar, .top-nav, .navbar, .nav-bar) > :where(nav, div) {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

@media (max-width: 640px) {
  :where(header:first-of-type, .site-header, .app-header, .topbar, .top-nav, .navbar, .nav-bar) {
    border-bottom-left-radius: 22px !important;
    border-bottom-right-radius: 22px !important;
  }
}

/* deusapps-header-liquid-glass-v7:start */
/*
  v7:
  - existing header width/layout remains untouched;
  - the visible liquid-glass surface extends by 1cm on each side via pseudo-elements;
  - the content is not squeezed;
  - icons use the provided PNG files and invert by theme.
*/
:root {
  --deusapps-header-side-extension: 1cm;
  --deusapps-header-radius: 0 0 24px 24px;

  --deusapps-header-glass-top: rgba(255, 255, 255, 0.26);
  --deusapps-header-glass-mid: rgba(255, 255, 255, 0.16);
  --deusapps-header-glass-bottom: rgba(255, 255, 255, 0.07);
  --deusapps-header-border: rgba(205, 214, 228, 0.26);
  --deusapps-header-highlight: rgba(255, 255, 255, 0.34);

  --deusapps-header-shadow: 0 9px 24px rgba(26, 34, 55, 0.065),
    0 2px 7px rgba(26, 34, 55, 0.025);

  --deusapps-header-edge-1: rgba(255, 255, 255, 0.10);
  --deusapps-header-edge-2: rgba(246, 249, 255, 0.045);

  --deusapps-header-icon-bg: rgba(255, 255, 255, 0.20);
  --deusapps-header-icon-border: rgba(205, 214, 228, 0.32);
  --deusapps-header-icon-filter: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --deusapps-header-glass-top: rgba(22, 30, 52, 0.20);
    --deusapps-header-glass-mid: rgba(13, 19, 36, 0.12);
    --deusapps-header-glass-bottom: rgba(8, 12, 24, 0.045);
    --deusapps-header-border: rgba(154, 168, 198, 0.095);
    --deusapps-header-highlight: rgba(255, 255, 255, 0.055);

    --deusapps-header-shadow: 0 10px 26px rgba(0, 0, 0, 0.12),
      0 2px 7px rgba(0, 0, 0, 0.055);

    --deusapps-header-edge-1: rgba(110, 132, 190, 0.045);
    --deusapps-header-edge-2: rgba(8, 12, 24, 0.012);

    --deusapps-header-icon-bg: rgba(255, 255, 255, 0.04);
    --deusapps-header-icon-border: rgba(154, 168, 198, 0.12);
    --deusapps-header-icon-filter: invert(1) brightness(1.08);
  }
}

html.dark,
body.dark,
[data-theme="dark"],
body[data-theme="dark"] {
  --deusapps-header-glass-top: rgba(22, 30, 52, 0.20);
  --deusapps-header-glass-mid: rgba(13, 19, 36, 0.12);
  --deusapps-header-glass-bottom: rgba(8, 12, 24, 0.045);
  --deusapps-header-border: rgba(154, 168, 198, 0.095);
  --deusapps-header-highlight: rgba(255, 255, 255, 0.055);

  --deusapps-header-shadow: 0 10px 26px rgba(0, 0, 0, 0.12),
    0 2px 7px rgba(0, 0, 0, 0.055);

  --deusapps-header-edge-1: rgba(110, 132, 190, 0.045);
  --deusapps-header-edge-2: rgba(8, 12, 24, 0.012);

  --deusapps-header-icon-bg: rgba(255, 255, 255, 0.04);
  --deusapps-header-icon-border: rgba(154, 168, 198, 0.12);
  --deusapps-header-icon-filter: invert(1) brightness(1.08);
}

header[data-deusapps-liquid-header="true"] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: var(--deusapps-header-radius) !important;
  isolation: isolate;
  overflow: visible !important;
}

header[data-deusapps-liquid-header="true"] > * {
  position: relative;
  z-index: 2;
}

header[data-deusapps-liquid-header="true"]::before,
header[data-deusapps-liquid-header="true"]::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

header[data-deusapps-liquid-header="true"]::before {
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--deusapps-header-side-extension));
  right: calc(-1 * var(--deusapps-header-side-extension));
  z-index: 1;
  border-radius: var(--deusapps-header-radius);
  border: 1px solid var(--deusapps-header-border);
  border-top-color: transparent;

  background:
    radial-gradient(circle at 12% -20%, var(--deusapps-header-highlight), transparent 38%),
    linear-gradient(
      180deg,
      var(--deusapps-header-glass-top) 0%,
      var(--deusapps-header-glass-mid) 58%,
      var(--deusapps-header-glass-bottom) 100%
    );

  -webkit-backdrop-filter: blur(30px) saturate(1.18);
  backdrop-filter: blur(30px) saturate(1.18);

  box-shadow: var(--deusapps-header-shadow);
}

header[data-deusapps-liquid-header="true"]::after {
  left: calc(-1 * var(--deusapps-header-side-extension) + 18px);
  right: calc(-1 * var(--deusapps-header-side-extension) + 18px);
  bottom: -22px;
  z-index: 1;
  height: 34px;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
  background: linear-gradient(
    180deg,
    var(--deusapps-header-edge-1) 0%,
    var(--deusapps-header-edge-2) 44%,
    transparent 100%
  );
  filter: blur(16px);
  opacity: 0.72;
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: var(--deusapps-header-icon-bg) !important;
  border: 1px solid var(--deusapps-header-icon-border) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.12) !important;
  backdrop-filter: blur(14px) saturate(1.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 3px 10px rgba(16, 24, 40, 0.035) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 19px !important;
  max-height: 19px !important;
  object-fit: contain !important;
  image-rendering: auto !important;
  filter: var(--deusapps-header-icon-filter) !important;
  opacity: 0.9;
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:hover img {
  opacity: 1;
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.50) !important;
  outline-offset: 2px !important;
}

@media (max-width: 720px) {
  :root {
    --deusapps-header-side-extension: 14px;
    --deusapps-header-radius: 0 0 20px 20px;
  }

  header[data-deusapps-liquid-header="true"]::after {
    left: calc(-1 * var(--deusapps-header-side-extension) + 10px);
    right: calc(-1 * var(--deusapps-header-side-extension) + 10px);
    bottom: -18px;
    height: 28px;
    filter: blur(14px);
  }

  header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control img {
    max-width: 18px !important;
    max-height: 18px !important;
  }
}
/* deusapps-header-liquid-glass-v7:end */

/* deusapps-header-icon-theme-v8:start */
/*
  Fix only header icon colors:
  - light visual theme => original black PNGs;
  - dark visual theme => inverted white PNGs.
  This intentionally overrides the earlier prefers-color-scheme based filter
  without changing the header glass/layout.
*/
header[data-deusapps-icon-theme="light"] .deusapps-header-icon-control img {
  filter: none !important;
  opacity: 0.92 !important;
}

header[data-deusapps-icon-theme="dark"] .deusapps-header-icon-control img {
  filter: invert(1) brightness(1.08) contrast(1.02) !important;
  opacity: 0.92 !important;
}

header[data-deusapps-icon-theme="light"] .deusapps-header-icon-control:hover img,
header[data-deusapps-icon-theme="dark"] .deusapps-header-icon-control:hover img {
  opacity: 1 !important;
}
/* deusapps-header-icon-theme-v8:end */

/* deusapps-header-hover-v9:start */
/*
  Header button hover feedback.
  Works with the existing v7/v8 glass and icon setup.
  No layout/width/header opacity changes here.
*/
:root {
  --deusapps-header-nav-hover-bg: rgba(255, 255, 255, 0.58);
  --deusapps-header-nav-hover-border: rgba(129, 140, 248, 0.32);
  --deusapps-header-nav-hover-shadow: rgba(79, 70, 229, 0.16);
  --deusapps-header-nav-hover-color: #1d2740;

  --deusapps-header-icon-hover-bg: rgba(255, 255, 255, 0.42);
  --deusapps-header-icon-hover-border: rgba(129, 140, 248, 0.34);
  --deusapps-header-icon-hover-shadow: rgba(79, 70, 229, 0.17);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --deusapps-header-nav-hover-bg: rgba(129, 140, 248, 0.18);
    --deusapps-header-nav-hover-border: rgba(165, 180, 252, 0.24);
    --deusapps-header-nav-hover-shadow: rgba(129, 140, 248, 0.18);
    --deusapps-header-nav-hover-color: rgba(248, 250, 252, 0.98);

    --deusapps-header-icon-hover-bg: rgba(129, 140, 248, 0.16);
    --deusapps-header-icon-hover-border: rgba(165, 180, 252, 0.26);
    --deusapps-header-icon-hover-shadow: rgba(129, 140, 248, 0.20);
  }
}

html.dark,
body.dark,
[data-theme="dark"],
body[data-theme="dark"],
header[data-deusapps-icon-theme="dark"] {
  --deusapps-header-nav-hover-bg: rgba(129, 140, 248, 0.18);
  --deusapps-header-nav-hover-border: rgba(165, 180, 252, 0.24);
  --deusapps-header-nav-hover-shadow: rgba(129, 140, 248, 0.18);
  --deusapps-header-nav-hover-color: rgba(248, 250, 252, 0.98);

  --deusapps-header-icon-hover-bg: rgba(129, 140, 248, 0.16);
  --deusapps-header-icon-hover-border: rgba(165, 180, 252, 0.26);
  --deusapps-header-icon-hover-shadow: rgba(129, 140, 248, 0.20);
}

header[data-deusapps-icon-theme="light"] {
  --deusapps-header-nav-hover-bg: rgba(255, 255, 255, 0.58);
  --deusapps-header-nav-hover-border: rgba(129, 140, 248, 0.32);
  --deusapps-header-nav-hover-shadow: rgba(79, 70, 229, 0.16);
  --deusapps-header-nav-hover-color: #1d2740;

  --deusapps-header-icon-hover-bg: rgba(255, 255, 255, 0.42);
  --deusapps-header-icon-hover-border: rgba(129, 140, 248, 0.34);
  --deusapps-header-icon-hover-shadow: rgba(79, 70, 229, 0.17);
}

header[data-deusapps-liquid-header="true"] nav :is(a, button, [role="button"]),
header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control {
  transition:
    background-color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    color 170ms ease,
    opacity 170ms ease,
    transform 170ms ease,
    filter 170ms ease !important;
  will-change: transform;
}

header[data-deusapps-liquid-header="true"] nav :is(a, button, [role="button"]):hover {
  background: var(--deusapps-header-nav-hover-bg) !important;
  border-color: var(--deusapps-header-nav-hover-border) !important;
  color: var(--deusapps-header-nav-hover-color) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px var(--deusapps-header-nav-hover-shadow) !important;
  transform: translateY(-1px);
}

header[data-deusapps-liquid-header="true"] nav :is(a, button, [role="button"]):active,
header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:active {
  transform: translateY(0) scale(0.98);
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:hover {
  background: var(--deusapps-header-icon-hover-bg) !important;
  border-color: var(--deusapps-header-icon-hover-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 20px var(--deusapps-header-icon-hover-shadow) !important;
  transform: translateY(-1px);
}

header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:hover img {
  opacity: 1 !important;
  transform: scale(1.08);
}

header[data-deusapps-liquid-header="true"] nav :is(a, button, [role="button"]):focus-visible,
header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.58) !important;
  outline-offset: 3px !important;
}
/* deusapps-header-hover-v9:end */

/* deusapps-header-single-glass-v11:start */
/*
  The visible header glass is now only the outer pseudo-layer from v7.
  The immediate inner shell keeps layout/flex/padding only; no second glass panel.
  Nav pill and icon buttons are intentionally not targeted.
*/
header[data-deusapps-liquid-header="true"] > :is(
  .header-inner,
  .header-content,
  .header-shell,
  .header-container,
  .navbar,
  .topbar,
  .nav-shell,
  .container
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/*
  Fallback for projects where the header's first child has no stable class.
  This removes only the duplicated full-width/shell layer, not nested nav buttons.
*/
header[data-deusapps-liquid-header="true"] > div:first-child {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/*
  Keep the center navigation pill and right-side icon buttons as separate controls.
  They should still have hover/active feedback from v9.
*/
header[data-deusapps-liquid-header="true"] nav,
header[data-deusapps-liquid-header="true"] .language-selector,
header[data-deusapps-liquid-header="true"] .deusapps-header-icon-control {
  -webkit-backdrop-filter: inherit;
  backdrop-filter: inherit;
}
/* deusapps-header-single-glass-v11:end */

/* deusapps-header-90-percent-v17:start */
/*
  Header geometry:
  - 90% width, centered;
  - logo/right controls keep 1cm inset from header edge;
  - glass layer follows the real header bounds.
*/
:root {
  --deusapps-header-content-inset: 1cm;
  --deusapps-header-side-extension: 0px !important;
}

header[data-deusapps-liquid-header="true"] {
  box-sizing: border-box !important;
  width: 90% !important;
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--deusapps-header-content-inset) !important;
  padding-right: var(--deusapps-header-content-inset) !important;
}

header[data-deusapps-liquid-header="true"]::before {
  left: 0 !important;
  right: 0 !important;
}

header[data-deusapps-liquid-header="true"]::after {
  left: 16px !important;
  right: 16px !important;
}

header[data-deusapps-liquid-header="true"] > :is(
  .header-inner,
  .header-content,
  .header-shell,
  .header-container,
  .navbar,
  .topbar,
  .nav-shell,
  .container
),
header[data-deusapps-liquid-header="true"] > div:first-child {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 720px) {
  :root {
    --deusapps-header-content-inset: 14px;
    --deusapps-header-side-extension: 0px !important;
  }

  header[data-deusapps-liquid-header="true"] {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--deusapps-header-content-inset) !important;
    padding-right: var(--deusapps-header-content-inset) !important;
  }

  header[data-deusapps-liquid-header="true"]::after {
    left: 10px !important;
    right: 10px !important;
  }
}
/* deusapps-header-90-percent-v17:end */
