:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(16, 22, 38, 0.66);
  --panel-strong: rgba(21, 30, 50, 0.86);
  --text: #f6f8ff;
  --muted: #a7b0c6;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #46e6ff;
  --green: #5dffb2;
  --pink: #ff6fb1;
  --amber: #ffd166;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(70, 230, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(255, 111, 177, 0.14), transparent 26rem),
    linear-gradient(135deg, #070a12 0%, #0d1524 48%, #10131e 100%);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  overscroll-behavior-x: none;
}

img,
.brand,
.nav,
.top-actions,
.button,
.chip,
.hero-tech,
.client-logo,
.testimonial-card,
.project-filters,
.modal-close,
.language-picker {
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 230, 255, 0.5) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 10, 18, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(70, 230, 255, 0.78), rgba(93, 255, 178, 0.72));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 111, 177, 0.82), rgba(70, 230, 255, 0.78));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  width: min(1180px, calc(100% - 32px));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  transform: translateX(-50%);
}

.brand,
.nav a,
.status,
.button,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.brand {
  gap: 10px;
  padding: 6px 14px 6px 6px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #051118;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.nav a {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.status {
  min-width: 104px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #081116;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 0.83rem;
  font-weight: 800;
}

.status.offline {
  color: var(--text);
  background: rgba(255, 111, 177, 0.22);
}

.app-main {
  padding-top: 118px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 64px;
  padding: 22px 0 4px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  user-select: none;
}

.site-footer a {
  color: var(--green);
}

.site-footer i {
  color: #ff3b5c;
  filter: drop-shadow(0 0 12px rgba(255, 59, 92, 0.45));
}

.loading-screen {
  min-height: 58vh;
  display: grid;
  place-items: center;
  gap: 18px;
  color: var(--muted);
}

.loader {
  width: 54px;
  height: 54px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.section-in {
  animation: enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero {
  min-height: calc(100vh - 164px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 390px;
  align-items: center;
  gap: 34px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-title {
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 800;
}

.hero-text,
.page-head p,
.content-grid p,
.glass-card p,
.timeline p,
.project-card p,
.form-note {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 680px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.chip {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 230, 255, 0.5);
}

.button.primary,
.chip.active {
  color: #061016;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 800;
}

.profile-panel,
.glass-card,
blockquote,
.contact-card,
.contact-form,
.project-card,
.metrics article,
.skills article {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
}

.profile-panel {
  display: grid;
  gap: 22px;
  padding: 26px;
  border-radius: var(--radius);
}

.avatar-orbit {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--cyan), var(--green), var(--pink), var(--cyan));
  animation: float 5s ease-in-out infinite;
}

.avatar {
  width: 146px;
  height: 146px;
  display: grid;
  place-items: center;
  border: 10px solid rgba(7, 10, 18, 0.9);
  border-radius: 50%;
  color: #071018;
  background: linear-gradient(135deg, #f7fbff, #9befff);
  font-size: 2.4rem;
  font-weight: 900;
}

.contact-grid,
.contact-card {
  display: grid;
  gap: 12px;
}

.contact-grid a,
.contact-grid div,
.contact-card a,
.contact-card div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.contact-grid span,
.contact-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 42px;
}

.metrics article,
.skills article {
  border-radius: 18px;
  padding: 22px;
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.metrics span {
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.content-grid .wide {
  grid-column: 1 / -1;
  padding: 4px 0 10px;
}

.content-grid h2,
.page-head h1 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

.glass-card,
blockquote,
.project-card,
.contact-card,
.contact-form {
  border-radius: var(--radius);
  padding: 24px;
}

.split {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  margin-top: 18px;
}

blockquote {
  margin: 0;
}

blockquote p {
  font-size: 1.08rem;
}

blockquote footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-list a {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.page-head {
  padding: 52px 0 24px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  position: relative;
  padding: 0 0 2px 24px;
  border-left: 1px solid var(--line);
}

.timeline article::before {
  position: absolute;
  top: 6px;
  left: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 24px var(--cyan);
}

.timeline span {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.skills,
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.skills article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
}

.project-visual {
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(70, 230, 255, 0.26), rgba(93, 255, 178, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 14px);
}

.project-visual span {
  color: var(--text);
  font-size: 2rem;
  font-weight: 900;
}

.project-card a {
  color: var(--green);
  font-weight: 800;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 18px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(70, 230, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(70, 230, 255, 0.12);
}

.form-note {
  margin-bottom: 0;
  font-size: 0.9rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    border-radius: 28px;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .hero,
  .split,
  .timeline-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 24px;
  }

  .profile-panel {
    order: -1;
  }

  .content-grid,
  .skills,
  .projects,
  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .brand span:last-child,
  .status {
    font-size: 0.8rem;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3.15rem;
  }
}

.brand-avatar {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(70, 230, 255, 0.25);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-button,
.mobile-menu {
  display: none;
}

.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 230, 255, 0.58);
  background: rgba(70, 230, 255, 0.12);
}

.nav a,
.button,
.chip {
  gap: 8px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 111, 177, 0.34);
  border-radius: 18px;
  background: rgba(20, 14, 28, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: enter 240ms ease both;
}

.testimonial-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
}

.testimonial-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.testimonial-head .stars {
  margin-bottom: 0;
}

.testimonial-head strong {
  font-size: 0.96rem;
}

.testimonial-card footer span {
  color: rgba(167, 176, 198, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
}

.stars {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  color: var(--amber);
}

.client-slider {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.client-track {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 20px;
  animation: clientSlide 24s linear infinite;
}

.client-slider:hover .client-track {
  animation-play-state: paused;
}

.client-logo {
  width: 156px;
  min-height: 136px;
  display: grid;
  place-items: center;
  gap: 10px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.client-logo img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.client-logo span {
  color: var(--muted);
  font-weight: 800;
}

.project-visual img {
  width: 100%;
  height: 100%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 14px;
}

.project-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 14, 0.62);
  backdrop-filter: blur(18px);
}

.modal-root[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  background: rgba(12, 18, 32, 0.92);
  box-shadow: var(--shadow);
  animation: enter 260ms ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
}

.login-modal,
.account-modal {
  display: grid;
  gap: 16px;
}

.login-modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.login-modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
}

.typing {
  opacity: 0.35;
  filter: blur(2px);
  transition: opacity 120ms ease, filter 120ms ease;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0;
  color: var(--green);
  font-weight: 800;
}

.project-detail {
  padding-bottom: 40px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
}

.project-hero-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.project-hero-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.project-hero-media img {
  width: 100%;
  height: min(440px, 52vw);
  object-fit: contain;
  border-radius: 20px;
}

.project-stats,
.project-feature-grid,
.project-gallery {
  display: grid;
  gap: 16px;
}

.project-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.project-stats article,
.project-feature-grid article,
.project-gallery figure {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.project-stats i,
.project-feature-grid i {
  color: var(--cyan);
  font-size: 1.25rem;
}

.project-stats span,
.project-feature-grid p,
.project-gallery figcaption {
  color: var(--muted);
}

.project-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px 0;
}

.project-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery figure {
  margin: 0;
}

.project-image-button {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.project-image-button img {
  transition: transform 240ms ease, filter 240ms ease, opacity 240ms ease;
}

.project-image-openable {
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.project-image-openable:hover {
  border-color: rgba(70, 230, 255, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 34px rgba(70, 230, 255, 0.12);
}

.project-image-openable:hover .project-image-button img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.04);
}

.project-gallery img {
  width: 100%;
  height: clamp(220px, 30vw, 380px);
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.project-gallery figcaption {
  margin-top: 12px;
  font-weight: 700;
}

@keyframes clientSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 900px) {
  .project-hero,
  .project-feature-grid,
  .project-stats,
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

/* New homepage composition and resilient marquees */
.language-picker {
  position: relative;
}

.language-trigger {
  min-width: 108px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.language-trigger:hover,
.language-trigger[aria-expanded="true"] {
  transform: translateY(-2px);
  border-color: rgba(70, 230, 255, 0.58);
  background: rgba(70, 230, 255, 0.12);
}

.language-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.language-code {
  font-size: 0.8rem;
  font-weight: 900;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  min-width: 176px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
  background: rgba(12, 18, 32, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  animation: enter 180ms ease both;
  pointer-events: auto;
}

.language-picker {
  z-index: 121;
}

.language-menu[hidden] {
  display: none;
}

.language-menu button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.language-menu button:hover,
.language-menu button.active {
  background: rgba(255, 255, 255, 0.1);
}

.language-menu span {
  font-size: 1.05rem;
}

.flag-icon {
  position: relative;
  width: 24px;
  height: 16px;
  display: inline-block;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 4px 14px rgba(0, 0, 0, 0.28);
  flex: 0 0 auto;
}

.flag-fr {
  background: linear-gradient(90deg, #1d4ed8 0 33.33%, #ffffff 33.33% 66.66%, #ef233c 66.66% 100%);
}

.flag-gb {
  background: #123c8c;
}

.flag-gb::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(33deg, transparent 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(-33deg, transparent 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(90deg, transparent 38%, #fff 38% 45%, #c8102e 45% 55%, #fff 55% 62%, transparent 62%),
    linear-gradient(0deg, transparent 33%, #fff 33% 42%, #c8102e 42% 58%, #fff 58% 67%, transparent 67%);
}

.portrait-hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
}

.profile-panel-photo {
  overflow: hidden;
}

.portrait-stage {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.portrait-stage::before {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px dashed rgba(70, 230, 255, 0.28);
  border-radius: 50%;
  content: "";
  animation: spin 18s linear infinite;
}

.orbit-label {
  position: absolute;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  font-size: 0.8rem;
  font-weight: 900;
}

.orbit-label-top { top: 10px; left: 50%; transform: translateX(-50%); }
.orbit-label-right { right: 0; top: 43%; }
.orbit-label-bottom { bottom: 14px; left: 50%; transform: translateX(-50%); }
.orbit-label-left { left: 0; top: 43%; }

.avatar-photo {
  width: 184px;
  height: 184px;
  border: 10px solid rgba(7, 10, 18, 0.9);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #0d1524;
}

.profile-panel-photo .avatar-orbit {
  position: relative;
  z-index: 1;
  width: 212px;
  height: 212px;
}

.marquee-section {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.marquee-shell {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 18px;
  animation: marqueeLeft var(--marquee-duration, 26s) linear infinite;
}

.marquee-shell[data-direction="right"] .marquee-track {
  animation-name: marqueeRight;
}

.marquee-shell:hover .marquee-track {
  animation-play-state: paused;
}

.testimonial-card.marquee-item {
  flex: 0 0 380px;
  max-width: 380px;
}

.client-logo {
  width: 132px;
  min-height: 132px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.client-logo img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.28));
}

.lang-switching #app,
.lang-switching .nav {
  transition: opacity 180ms ease, filter 180ms ease;
}

.text-swap-out {
  animation: textSwapOut 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.text-swap-in {
  animation: textSwapIn 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes marqueeLeft {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--marquee-distance, 900px) * -1)); }
}

@keyframes marqueeRight {
  from { transform: translateX(calc(var(--marquee-distance, 900px) * -1)); }
  to { transform: translateX(0); }
}

@keyframes textSwapOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  to {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-10px);
  }
}

@keyframes textSwapIn {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .portrait-hero {
    grid-template-columns: 1fr;
  }

  .testimonial-card.marquee-item {
    flex-basis: min(340px, calc(100vw - 54px));
  }

  .orbit-label-right,
  .orbit-label-left {
    top: auto;
    bottom: 62px;
  }
}

/* Hero visual v2 */
.portrait-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 0.68fr);
  gap: clamp(32px, 6vw, 88px);
}

.profile-panel-photo {
  position: relative;
  min-height: 650px;
  align-content: center;
  border-color: rgba(70, 230, 255, 0.18);
  background:
    radial-gradient(circle at 50% 34%, rgba(70, 230, 255, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.profile-panel-photo::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) - 2px);
  pointer-events: none;
  content: "";
}

.profile-panel-photo::after {
  position: absolute;
  inset: auto -16% -14% 18%;
  height: 220px;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse, rgba(255, 111, 177, 0.18), transparent 68%);
  filter: blur(18px);
}

.profile-panel-photo > div:not(.portrait-stage),
.profile-panel-photo .contact-grid {
  position: relative;
  z-index: 2;
}

.portrait-stage {
  min-height: 390px;
  isolation: isolate;
}

.portrait-stage::before {
  width: 360px;
  height: 360px;
  border-color: rgba(70, 230, 255, 0.34);
  box-shadow:
    0 0 80px rgba(70, 230, 255, 0.14),
    inset 0 0 48px rgba(93, 255, 178, 0.07);
}

.portrait-stage::after {
  position: absolute;
  z-index: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  content: "";
  background:
    conic-gradient(from 0deg, rgba(70, 230, 255, 0.34), rgba(255, 111, 177, 0.18), rgba(93, 255, 178, 0.32), rgba(70, 230, 255, 0.34));
  filter: blur(26px);
  opacity: 0.72;
  animation: heroPulse 4.6s ease-in-out infinite;
}

.profile-panel-photo .avatar-orbit {
  width: 288px;
  height: 288px;
  animation: portraitFloat 7s ease-in-out infinite;
}

.avatar-photo {
  width: 250px;
  height: 250px;
  border-width: 12px;
  box-shadow:
    0 22px 90px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.orbit-label {
  z-index: 4;
  color: #f8fbff;
  background: rgba(34, 41, 61, 0.86);
}

.orbit-label-top { top: 4px; }
.orbit-label-right { right: -16px; top: 45%; }
.orbit-label-bottom { bottom: 2px; }
.orbit-label-left { left: -16px; top: 45%; }

.profile-panel-photo h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.profile-panel-photo .contact-grid {
  grid-template-columns: 1fr;
}

.profile-panel-photo .contact-grid a,
.profile-panel-photo .contact-grid div {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.065);
}

@keyframes heroPulse {
  0%,
  100% {
    transform: scale(0.94) rotate(0deg);
    opacity: 0.52;
  }
  50% {
    transform: scale(1.05) rotate(16deg);
    opacity: 0.78;
  }
}

@keyframes portraitFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(2deg);
  }
}

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

  .profile-panel-photo {
    min-height: auto;
  }
}

/* Hero background portrait v3 */
.portrait-hero {
  position: relative;
  min-height: calc(100vh - 150px);
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  isolation: isolate;
}

.portrait-hero::before {
  position: absolute;
  inset: 6% -12% 2% 42%;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 44% 42%, rgba(70, 230, 255, 0.28), transparent 22%),
    radial-gradient(circle at 56% 45%, rgba(255, 111, 177, 0.2), transparent 30%),
    radial-gradient(ellipse at 45% 50%, rgba(93, 255, 178, 0.13), transparent 58%);
  filter: blur(4px);
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 760px;
}

.hero-copy h1 {
  text-shadow:
    0 18px 70px rgba(0, 0, 0, 0.62),
    0 0 34px rgba(70, 230, 255, 0.08);
}

.hero-portrait-bg {
  position: absolute;
  z-index: 2;
  top: 52%;
  right: clamp(-210px, -2vw, 24px);
  width: clamp(540px, 54vw, 920px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: visible;
  clip-path: inset(-28% -32% -28% -32% round 0);
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 15%, #000 92%, transparent 100%),
    linear-gradient(to right, #000 0, #000 82%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 15%, #000 92%, transparent 100%),
    linear-gradient(to right, #000 0, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
}

.hero-portrait-bg::before,
.hero-portrait-bg::after {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  content: "";
}

.hero-portrait-bg::before {
  inset: 10%;
  border: 0;
  background:
    radial-gradient(circle, transparent 54%, rgba(70, 230, 255, 0.2) 55%, transparent 56%),
    radial-gradient(circle, rgba(70, 230, 255, 0.16), transparent 64%);
  opacity: 0.7;
}

.hero-portrait-bg::after {
  inset: 14%;
  background:
    radial-gradient(circle at 44% 30%, rgba(255, 255, 255, 0.34), transparent 18%),
    radial-gradient(circle at 52% 45%, rgba(70, 230, 255, 0.2), transparent 42%),
    radial-gradient(circle at 50% 58%, rgba(93, 255, 178, 0.14), transparent 52%);
  filter: blur(40px);
  opacity: 0.62;
}

.hero-portrait-frame {
  position: absolute;
  inset: 18%;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 46% 54% 48% 52% / 43% 48% 52% 57%;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(70, 230, 255, 0.26) 34%, rgba(255, 111, 177, 0.18) 68%, rgba(93, 255, 178, 0.24)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 -28px 90px rgba(255, 255, 255, 0.16),
    0 26px 130px rgba(0, 0, 0, 0.58),
    0 0 120px rgba(70, 230, 255, 0.24);
}

.hero-portrait-frame::before {
  position: absolute;
  inset: -18%;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.24), transparent 42%);
  filter: blur(20px);
}

.hero-portrait-frame img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 43% 57% 46% 54% / 42% 48% 52% 58%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.04);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 10px rgba(7, 10, 18, 0.62);
}

.hero-tech {
  position: absolute;
  z-index: 4;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(34, 41, 61, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  font-size: 0.82rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-tech i {
  color: var(--cyan);
}

.hero-tech-node { top: 15%; left: 18%; }
.hero-tech-socket { top: 30%; right: 4%; }
.hero-tech-security { bottom: 20%; right: 10%; }
.hero-tech-ejs { top: 54%; left: 3%; }
.hero-tech-server { bottom: 12%; left: 20%; }
.hero-tech-realtime { top: 8%; right: 23%; }

.hero-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-contact-strip a,
.hero-contact-strip div {
  min-width: min(230px, 100%);
  display: grid;
  gap: 4px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.hero-contact-strip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-contact-strip strong {
  font-size: 0.94rem;
}

@media (max-width: 980px) {
  .hero-portrait-bg {
    top: 28%;
    right: 50%;
    width: min(86vw, 520px);
    opacity: 0.34;
    transform: translate(50%, -50%);
  }

  .hero-copy {
    padding-top: 220px;
  }
}

@media (max-width: 560px) {
  .hero-contact-strip {
    display: none;
  }

  .hero-portrait-bg {
    top: 70px;
    width: 92vw;
  }
}

/* Micro interactions */
.testimonial-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.testimonial-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(70, 230, 255, 0.48);
  background: rgba(18, 27, 46, 0.78);
  box-shadow:
    var(--shadow),
    0 0 34px rgba(70, 230, 255, 0.12);
}

.client-logo img {
  filter: grayscale(1) saturate(0.25) opacity(0.62) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.22));
  transform: scale(0.94);
  transition: filter 220ms ease, transform 220ms ease;
}

.client-logo:hover img {
  filter: grayscale(0) saturate(1.08) opacity(1) drop-shadow(0 22px 42px rgba(70, 230, 255, 0.16));
  transform: scale(1.08);
}

.hero-tech {
  animation: heroTechDrift 6.5s ease-in-out infinite;
}

.hero-tech:nth-of-type(2n) {
  animation-delay: -1.8s;
}

.hero-tech:nth-of-type(3n) {
  animation-delay: -3.2s;
}

@keyframes heroTechDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -5px, 0);
  }
}

/* Project detail polish */
.project-detail .back-link {
  margin-top: 22px;
  margin-bottom: 38px;
}

.project-detail .project-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.project-detail .project-hero-copy {
  position: relative;
  z-index: 2;
}

.project-detail .project-hero-copy h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(4.2rem, 10vw, 8.4rem);
  line-height: 0.86;
}

.project-detail .project-hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  font-size: 1.05rem;
}

.project-detail .project-hero-media {
  position: relative;
  justify-self: end;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.project-detail .project-hero-media::before {
  position: absolute;
  inset: -28%;
  content: "";
  background: radial-gradient(circle, rgba(70, 230, 255, 0.16), transparent 55%);
  filter: blur(24px);
}

.project-detail .project-hero-media img {
  position: relative;
  width: clamp(340px, 39vw, 560px);
  height: clamp(340px, 39vw, 560px);
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 36px 90px rgba(0, 0, 0, 0.42));
}

.image-lightbox {
  position: relative;
  width: min(1220px, calc(100vw - 32px));
  height: min(820px, calc(100dvh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(70, 230, 255, 0.12), transparent 38%),
    radial-gradient(circle at 82% 18%, rgba(255, 111, 177, 0.1), transparent 36%),
    rgba(8, 12, 22, 0.94);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58);
  animation: enter 220ms ease both;
}

.image-lightbox .modal-close {
  z-index: 3;
}

.image-lightbox-toolbar {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.image-lightbox-toolbar button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.image-lightbox-toolbar button:hover {
  color: #061016;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  transform: translateY(-1px);
}

.image-lightbox-stage {
  min-height: 0;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(0, 0, 0, 0.16);
  cursor: zoom-in;
}

.image-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  transition: transform 120ms ease;
  cursor: default;
  touch-action: none;
  will-change: transform;
}

.image-lightbox-stage img.is-zoomed {
  cursor: grab;
}

.image-lightbox-stage img.is-zoomed:active {
  cursor: grabbing;
}

.image-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.image-lightbox-caption strong {
  color: var(--text);
}

.project-detail .project-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-detail .project-stats article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 18px;
}

.project-detail .project-stats strong,
.project-detail .project-stats span {
  display: block;
}

.project-detail .project-stats strong {
  margin-bottom: 4px;
  line-height: 1.05;
}

.project-detail .project-stats span {
  line-height: 1.25;
}

.project-detail .project-feature-grid article {
  min-height: 210px;
  padding: 24px;
}

.project-detail .project-feature-grid h2 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.05;
}

@media (max-width: 980px) {
  .project-detail .project-hero,
  .project-detail .project-stats {
    grid-template-columns: 1fr;
  }

  .project-detail .project-hero-copy h1 {
    font-size: clamp(3.4rem, 18vw, 6rem);
  }
}

/* Responsive final pass */
@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
    padding-bottom: 36px;
  }

  .topbar {
    top: 8px;
    width: calc(100% - 20px);
    gap: 8px;
    min-height: auto;
    padding: 8px;
    border-radius: 24px;
    align-items: center;
  }

  .brand {
    min-width: 0;
    padding-right: 8px;
  }

  .brand-avatar {
    width: 38px;
    height: 38px;
  }

  .brand span:last-child {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    margin-left: auto;
  }

  .mobile-menu-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(16px);
    touch-action: manipulation;
  }

  .language-trigger {
    min-width: 78px;
    height: 40px;
    gap: 6px;
  }

  .language-trigger .fa-language {
    display: none;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .topbar > .nav {
    display: none;
  }

  .mobile-menu {
    order: 4;
    width: 100%;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
      radial-gradient(circle at 18% 0%, rgba(70, 230, 255, 0.12), transparent 45%),
      rgba(255, 255, 255, 0.045);
    animation: mobileMenuIn 180ms ease both;
  }

  .mobile-menu[hidden] {
    display: none;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .mobile-nav a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.055);
  }

  .mobile-nav a.active {
    color: #061016;
    background: linear-gradient(135deg, var(--cyan), var(--green));
  }

  .app-main {
    padding-top: 104px;
  }

  .hero,
  .portrait-hero {
    min-height: calc(100dvh - 104px);
    padding-top: 18px;
    padding-bottom: 74px;
    align-items: start;
    max-width: 100%;
  }

  .portrait-hero {
    overflow: visible;
  }

  .portrait-hero::before {
    inset: -140px -70px -80px -70px;
    background:
      radial-gradient(circle at 64% 26%, rgba(70, 230, 255, 0.2), transparent 32%),
      radial-gradient(circle at 86% 36%, rgba(255, 111, 177, 0.18), transparent 34%),
      radial-gradient(ellipse at 62% 36%, rgba(93, 255, 178, 0.1), transparent 58%);
    filter: blur(18px);
  }

  .hero-copy {
    max-width: 100%;
    padding-top: clamp(148px, 50vw, 218px);
  }

  .hero-copy h1,
  h1 {
    max-width: 100%;
    font-size: clamp(3rem, 18vw, 5.3rem);
    line-height: 0.9;
  }

  .hero-title {
    font-size: clamp(1.35rem, 8vw, 2rem);
  }

  .hero-text {
    max-width: 92%;
    font-size: 0.98rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .hero-portrait-bg {
    z-index: 5;
    top: -30px;
    right: clamp(6px, 4vw, 24px);
    width: min(94vw, 460px);
    opacity: 0.66;
    transform: none;
    clip-path: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .hero-portrait-bg::after {
    filter: blur(54px);
    opacity: 0.74;
  }

  .hero-portrait-frame {
    box-shadow:
      0 -30px 110px rgba(255, 255, 255, 0.16),
      0 34px 150px rgba(0, 0, 0, 0.62),
      0 0 150px rgba(70, 230, 255, 0.28);
  }

  .hero-tech {
    display: inline-flex;
    z-index: 6;
    padding: 6px 9px;
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32), 0 0 18px rgba(70, 230, 255, 0.14);
  }

  .hero-tech-node {
    top: 0;
    left: 18%;
  }

  .hero-tech-realtime {
    top: 8%;
    right: 13%;
  }

  .hero-tech-socket {
    top: 38%;
    right: -2%;
  }

  .hero-tech-ejs {
    top: 43%;
    left: -1%;
  }

  .hero-tech-security {
    right: 10%;
    bottom: 18%;
  }

  .hero-tech-server {
    bottom: 9%;
    left: 15%;
  }

  .metrics {
    margin-top: 74px;
  }

  .content-grid,
  .timeline-grid,
  .contact-layout,
  .projects,
  .skills,
  .metrics,
  .project-feature-grid,
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding-top: 34px;
  }

  .page-head h1,
  .content-grid h2 {
    max-width: 100%;
    font-size: clamp(2.3rem, 12vw, 4rem);
  }

  .project-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .project-filters::-webkit-scrollbar {
    display: none;
  }

  .project-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .project-visual {
    min-height: 190px;
  }

  .marquee-shell {
    margin-inline: -10px;
    padding: 14px 0;
  }

  .testimonial-card.marquee-item {
    flex-basis: min(330px, calc(100vw - 42px));
    max-width: min(330px, calc(100vw - 42px));
    min-width: min(330px, calc(100vw - 42px));
  }

  .client-logo {
    width: 104px;
    min-height: 104px;
  }

  .client-logo img {
    width: 92px;
    height: 92px;
  }

  .project-detail .back-link {
    margin-bottom: 22px;
  }

  .project-detail .project-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-detail .project-hero-copy h1 {
    max-width: 100%;
    font-size: clamp(3.4rem, 19vw, 5.8rem);
  }

  .project-detail .project-hero-media {
    justify-self: center;
    order: -1;
    margin-top: 8px;
  }

  .project-detail .project-hero-media img {
    width: min(76vw, 310px);
    height: min(76vw, 310px);
  }

  .project-detail .project-stats {
    grid-template-columns: 1fr;
  }

  .project-detail .project-stats article {
    min-height: auto;
  }

  .contact-card,
  .contact-form,
  .glass-card,
  .project-detail .project-feature-grid article,
  .project-gallery figure {
    padding: 18px;
  }

  .site-footer {
    margin-top: 42px;
    padding-bottom: 16px;
    font-size: 0.86rem;
  }
}

@media (max-width: 390px) {
  .brand span:last-child {
    display: none;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .language-trigger {
    min-width: 64px;
  }
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
