/* ============================================
   Osama Ghafoor — ENIGMA-Inspired Theme
   ============================================ */

:root {
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.65);
  --accent-muted: rgba(255, 255, 255, 0.35);
  --accent-glow: rgba(255, 255, 255, 0.12);
  --accent-inset: rgba(255, 255, 255, 0.06);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 100px;
  --radius-oval: 50% / 42%;

  --header-height: 76px;
  --container: 1240px;
  --transition: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #050505;
  --bg-elevated: #0c0c0c;
  --bg-card: #111111;
  --bg-inset: #0a0a0a;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-secondary: #8a8a8a;
  --text-muted: #555555;
  --overlay: rgba(5, 5, 5, 0.92);
  --shadow-glow: 0 0 50px rgba(255, 255, 255, 0.06);
  --inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 24px rgba(255, 255, 255, 0.03);
  --bg-gradient:
    radial-gradient(ellipse 110% 75% at 50% -18%, rgba(110, 112, 122, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse 70% 55% at 0% 45%, rgba(65, 68, 82, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 65% 50% at 100% 75%, rgba(58, 60, 72, 0.24) 0%, transparent 52%),
    radial-gradient(ellipse 55% 45% at 50% 105%, rgba(48, 50, 62, 0.2) 0%, transparent 48%),
    linear-gradient(165deg, #16161e 0%, #101016 22%, #0c0c12 48%, #12121a 72%, #0e0e14 100%);
}

[data-theme="light"] {
  --bg: #f4f4f6;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-inset: #ececf0;
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.14);
  --text: #0a0a0a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --overlay: rgba(244, 244, 246, 0.95);
  --shadow-glow: 0 0 40px rgba(0, 0, 0, 0.08);
  --inset-glow: inset 0 1px 0 rgba(0, 0, 0, 0.06);
  --bg-gradient:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(255, 255, 255, 0.95) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(220, 220, 228, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #fafafa 0%, #f2f2f6 45%, #e9e9ef 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background-color: var(--bg, #050505);
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  transition: color var(--transition);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 15%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 15%, transparent 88%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 68%),
    radial-gradient(ellipse 50% 35% at 75% 85%, rgba(255, 255, 255, 0.04) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 85% 15%, rgba(140, 145, 160, 0.05) 0%, transparent 60%);
}

/* Interactive background — fixed gradient + cursor glow + particles */
.bg-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  will-change: transform;
  transform: translateZ(0);
}

.bg-fx__glow {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: left, top;
  pointer-events: none;
}

.bg-fx__glow--main {
  width: min(280px, 42vw);
  height: min(280px, 42vw);
  background: radial-gradient(
    circle,
    rgba(160, 165, 180, 0.1) 0%,
    rgba(100, 105, 120, 0.04) 38%,
    transparent 62%
  );
  filter: blur(2px);
}

.bg-fx__glow--trail {
  width: min(160px, 28vw);
  height: min(160px, 28vw);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(180, 185, 200, 0.02) 42%,
    transparent 65%
  );
  filter: blur(6px);
}

.bg-fx__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

[data-theme="light"] .bg-fx__glow--main {
  background: radial-gradient(
    circle,
    rgba(100, 100, 120, 0.1) 0%,
    rgba(150, 150, 170, 0.04) 35%,
    transparent 68%
  );
}

[data-theme="light"] .bg-fx__glow--trail {
  background: radial-gradient(
    circle,
    rgba(80, 80, 100, 0.06) 0%,
    transparent 70%
  );
}

[data-theme="light"] .bg-fx__canvas {
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  .bg-fx { display: none; }
}

main, .header, .footer {
  position: relative;
  z-index: 1;
}

main {
  isolation: isolate;
}

body.loading { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .section:nth-of-type(even) {
  background: rgba(0, 0, 0, 0.015);
}

.section__header { margin-bottom: 3rem; }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  display: inline-block;
  transition: letter-spacing 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible .section__title {
  letter-spacing: -0.02em;
}

.accent { color: var(--accent); }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}
.loader__inner { text-align: center; }
.loader__logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 auto 1.5rem;
}
.loader__bar {
  width: 180px; height: 2px; background: var(--border);
  margin: 0 auto 1rem; overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 40%;
  background: var(--accent);
  animation: loaderBar 1.2s ease-in-out infinite;
}
.loader__text { color: var(--text-secondary); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
@keyframes loaderBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

.header.scrolled {
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 100%;
  gap: 2rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  justify-self: start;
  transition: opacity var(--transition);
}

.nav__brand:hover { opacity: 0.85; }

.nav__brand-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  justify-self: center;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav__indicator {
  font-size: 0.65rem;
  opacity: 0.45;
  font-weight: 400;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link.active .nav__indicator {
  opacity: 1;
  color: var(--text-secondary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
}

.nav__email {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 0.45rem 0;
  transition: color var(--transition);
  max-width: 220px;
}

.nav__email span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__email svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.nav__email:hover {
  color: var(--text);
}

.nav__email:hover svg { color: var(--text); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition);
}

.nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

.nav__backdrop {
  display: none;
}

.nav__menu-head {
  display: none;
}

.nav__close {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.9rem 2rem;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: var(--radius-pill);
  transition: var(--transition);
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08);
}
.btn--primary:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
  padding: 1rem 2.5rem;
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--full { width: 100%; }

.link-arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: gap var(--transition);
}
.link-arrow:hover { opacity: 0.8; }

/* ─── HERO (ENIGMA) ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: var(--header-height);
  background: transparent;
}

.hero__layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero__center {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__meta-wrap {
  display: contents;
}

.hero__meta--left {
  grid-column: 1;
  grid-row: 1;
}

.hero__meta--right {
  grid-column: 3;
  grid-row: 1;
}

.hero__meta {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero__meta--right { align-items: flex-end; text-align: right; }

.meta-item span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.meta-item strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.hero__portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__oval-frame {
  position: relative;
  container-type: inline-size;
  width: min(320px, 70vw);
  aspect-ratio: 3 / 4.05;
  border-radius: 50% / 40%;
  border: 6px solid rgba(85, 85, 85, 0.55);
  background: #111;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  overflow: visible;
  animation: frameGlassPulse 4s ease-in-out infinite;
}

/* Spinning glassy ring — behind portrait */
.hero__oval-ring {
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.38),
    rgba(180, 180, 180, 0.18),
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0.02)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: ringSpin 7s linear infinite;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes frameGlassPulse {
  0%, 100% {
    border-color: rgba(85, 85, 85, 0.55);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.04),
      0 12px 40px rgba(0, 0, 0, 0.5);
  }
  50% {
    border-color: rgba(160, 160, 160, 0.65);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      0 12px 50px rgba(255, 255, 255, 0.06);
  }
}

.hero__oval {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #1a1a1a;
  z-index: 1;
  isolation: isolate;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  position: relative;
  z-index: 1;
}

/* OSAMA overlaid on portrait — sharp, fully visible on top */
.hero__name {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 13cqi, 2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  color: #ffffff;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #e8e8e8 40%,
    #b0b0b0 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9))
          drop-shadow(0 0 20px rgba(255, 255, 255, 0.25));
  animation: nameGlassGlow 4s ease-in-out infinite;
}

@keyframes nameGlassGlow {
  0%, 100% {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.15));
  }
  50% {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95))
            drop-shadow(0 0 28px rgba(255, 255, 255, 0.35));
  }
}

[data-theme="light"] .header {
  background: rgba(244, 244, 246, 0.7);
}

[data-theme="light"] .header.scrolled {
  background: rgba(244, 244, 246, 0.92);
}

[data-theme="light"] body::after {
  background:
    radial-gradient(ellipse 55% 35% at 50% 10%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 35% 25% at 90% 95%, rgba(200, 200, 210, 0.2) 0%, transparent 65%);
}

[data-theme="light"] .about__oval-frame {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .about__glow-ring {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about__glass-panel {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 32px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .service-card,
[data-theme="light"] .testimonial-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .service-card__icon,
[data-theme="light"] .testimonial-card__avatar {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(20, 20, 20, 0.85);
}

[data-theme="light"] .services-carousel__btn,
[data-theme="light"] .testimonials-carousel__btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .edu-card,
[data-theme="light"] .cert-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .edu-card::before,
[data-theme="light"] .cert-card::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.08));
}

[data-theme="light"] .edu-card__icon,
[data-theme="light"] .cert-card__icon {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(20, 20, 20, 0.8);
}

[data-theme="light"] .phone-card__frame {
  background: linear-gradient(155deg, rgba(180, 180, 180, 0.5), rgba(60, 60, 60, 0.85));
}

[data-theme="light"] .phone-card__screen {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .projects-carousel__btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .skill-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .skill-card::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.08));
}

[data-theme="light"] .skill-card__icon {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(20, 20, 20, 0.85);
}

[data-theme="light"] .skill-card__ring-fill {
  stroke: rgba(20, 20, 20, 0.65);
  filter: none;
}

[data-theme="light"] .skill-card__fill {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75));
  box-shadow: none;
}

[data-theme="light"] .skill-tag {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .highlight-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.01) 100%);
}

[data-theme="light"] .highlight-card::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.08));
}

[data-theme="light"] .highlight-card__icon {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hero__oval-frame {
  border-color: rgba(60, 60, 60, 0.35);
  background: #e8e8e8;
}

[data-theme="light"] .hero__name {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #e8e8e8 40%,
    #b0b0b0 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9))
          drop-shadow(0 0 20px rgba(255, 255, 255, 0.25));
}

.hero__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.social-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: var(--transition);
}
.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.social-link svg { width: 15px; height: 15px; }

/* Skill Pills (Hero) — ENIGMA capsule style */
.hero__skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.skill-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  background: transparent;
  border: none;
  padding: 0;
  min-width: auto;
  box-shadow: none;
}

.skill-pill__capsule {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 86px;
  min-height: 128px;
  padding: 1.35rem 1rem 1.1rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    rgba(0, 0, 0, 0.25) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -8px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.skill-pill:hover .skill-pill__capsule {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -8px 20px rgba(0, 0, 0, 0.35),
    0 8px 28px rgba(255, 255, 255, 0.06);
}

.skill-pill__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 0;
}

.skill-pill__icon svg {
  width: 100%;
  height: 100%;
}

.skill-pill__pct {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.skill-pill__name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Highlights / Experience */
.highlights {
  padding: 4.5rem 0;
  border-block: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 45%,
    transparent 100%
  );
}

.highlights__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
}

.highlights__heading {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.highlights__plus {
  color: var(--text-muted);
  font-weight: 400;
}

.highlights__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.highlight-card {
  position: relative;
  padding: 1.35rem 1.5rem 1.35rem 1.65rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--inset-glow);
  transition: var(--transition);
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  border-radius: 3px 0 0 3px;
}

.highlight-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.highlight-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.highlight-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.highlight-card__icon svg {
  width: 15px;
  height: 15px;
}

.highlight-card__badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.highlight-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.highlight-card__sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.highlight-card__meta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Marquee */
.marquee-section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
}

.marquee-wrap {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee {
  display: flex;
  align-items: center;
  animation: marquee 35s linear infinite;
  width: max-content;
}

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

.marquee__item {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 1.25rem;
  white-space: nowrap;
  transition: color var(--transition);
}

.marquee__item:hover {
  color: var(--text);
}

.marquee__dot {
  margin-left: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.45;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* About */
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__visual {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.about__vertical-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.about__oval-frame {
  flex: 1;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-oval);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 4px;
  animation: frameGlassPulse 4s ease-in-out infinite;
}

.about__oval {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: var(--bg-card);
}

.about__oval img { width: 100%; height: 100%; object-fit: cover; }

.about__glow-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 1rem;
}

.about__glow-ring {
  position: absolute;
  width: min(400px, 92vw);
  height: min(400px, 92vw);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 0 60px rgba(255, 255, 255, 0.04),
    inset 0 0 50px rgba(255, 255, 255, 0.03);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.04), inset 0 0 50px rgba(255, 255, 255, 0.03);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.08), inset 0 0 60px rgba(255, 255, 255, 0.05);
  }
}

.about__glass-panel {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 340px;
  padding: 2.25rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.2);
}

.about__glow-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.about__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.85;
  text-align: left;
}

/* Stats */
.stats {
  padding: 3rem 0;
  background: transparent;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--inset-glow);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.stat-card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card__label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Skills Grid */
.skills {
  position: relative;
  overflow: hidden;
}

.skills__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 15% 25%, rgba(255, 255, 255, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.skill-card {
  position: relative;
  padding: 1.5rem 1.35rem 1.35rem 1.5rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(0, 0, 0, 0.1) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--inset-glow);
  overflow: hidden;
  transition: var(--transition);
}

.skill-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08));
  border-radius: 3px 0 0 3px;
}

.skill-card__shine {
  position: absolute;
  top: -30%;
  right: -15%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-5px);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.skill-card:hover .skill-card__shine {
  opacity: 1;
}

.skill-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.skill-card__icon svg {
  width: 20px;
  height: 20px;
}

.skill-card__ring {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.skill-card__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.skill-card__ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2.8;
}

.skill-card__ring-fill {
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--level));
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
  transition: stroke-dashoffset 1.2s ease;
}

.skill-card__percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.skill-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.skill-card__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.skill-card__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.95));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
  transition: width 1.2s ease;
  border-radius: 4px;
}

.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-size: 0.66rem;
  padding: 0.28rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* Projects — Phone Carousel */
.projects {
  position: relative;
  overflow: hidden;
}

.projects__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.projects-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.projects-carousel__btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: var(--text);
  transition: var(--transition);
  z-index: 2;
}

.projects-carousel__btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.projects-carousel__btn svg {
  width: 20px;
  height: 20px;
}

.projects-carousel__track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2rem 0.5rem 2.5rem;
  flex: 1;
  -ms-overflow-style: none;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.projects-carousel__track::-webkit-scrollbar {
  display: none;
}

/* Phone mockup card */
.phone-card {
  flex: 0 0 min(270px, 72vw);
  scroll-snap-align: center;
  transition: var(--transition);
}

.phone-card__device {
  transition: transform var(--transition);
}

.phone-card:hover .phone-card__device {
  transform: translateY(-10px);
}

.phone-card__frame {
  border-radius: 38px;
  padding: 10px;
  background: linear-gradient(155deg, rgba(90, 90, 90, 0.55), rgba(25, 25, 25, 0.95));
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.phone-card__notch {
  width: 88px;
  height: 20px;
  margin: 0 auto 0.5rem;
  background: #0a0a0a;
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
}

.phone-card__screen {
  border-radius: 30px;
  min-height: 460px;
  padding: 0.85rem 1rem 1.25rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(0, 0, 0, 0.15) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.phone-card__status {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.phone-card__signals {
  display: flex;
  gap: 2px;
  align-items: flex-end;
}

.phone-card__signals i {
  display: block;
  width: 3px;
  background: var(--text-secondary);
  border-radius: 1px;
}

.phone-card__signals i:nth-child(1) { height: 4px; }
.phone-card__signals i:nth-child(2) { height: 6px; }
.phone-card__signals i:nth-child(3) { height: 8px; }

.phone-card__app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(200, 200, 200, 0.85));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 0.85rem;
}

.phone-card__badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.65rem;
}

.phone-card__badge--published {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.phone-card__badge--other {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.phone-card__type {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.phone-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.phone-card__desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.phone-card__tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.tech-badge {
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.phone-card__actions {
  width: 100%;
  margin-top: auto;
}

.phone-card__btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  transition: var(--transition);
}

.phone-card__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.phone-card__btn--disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Education & Credentials */
.credentials {
  position: relative;
  overflow: hidden;
}

.credentials-block {
  margin-bottom: 1rem;
}

.credentials-block--certs {
  margin-bottom: 0;
}

.credentials-block__header {
  margin-bottom: 2rem;
}

.credentials-block__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.credentials-block__plus {
  color: var(--text-muted);
  font-weight: 400;
}

.credentials-block__subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.credentials-divider {
  height: 1px;
  margin: 3.5rem 0;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.education__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.certifications__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.edu-card,
.cert-card {
  position: relative;
  padding: 1.5rem 1.35rem 1.5rem 1.5rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(0, 0, 0, 0.08) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--inset-glow);
  overflow: hidden;
  transition: var(--transition);
}

.edu-card::before,
.cert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08));
  border-radius: 3px 0 0 3px;
}

.edu-card:hover,
.cert-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.edu-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.edu-card__icon svg {
  width: 18px;
  height: 18px;
}

.edu-card__period {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.edu-card__degree,
.cert-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.edu-card__institution,
.cert-card__desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.edu-card__detail {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cert-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cert-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.cert-card__icon svg {
  width: 18px;
  height: 18px;
}

.cert-card__year {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.cert-card__issuer {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.cert-card__desc {
  margin-top: 0;
}

/* Services — Coverflow Carousel */
.services-carousel,
.testimonials-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.services-carousel__btn,
.testimonials-carousel__btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: var(--text);
  transition: var(--transition);
  z-index: 5;
}

.services-carousel__btn:hover,
.testimonials-carousel__btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.coverflow-viewport {
  flex: 1;
  overflow: hidden;
  min-height: 320px;
  position: relative;
  touch-action: pan-y pinch-zoom;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.coverflow-viewport--tall {
  min-height: 300px;
}

.coverflow-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  width: max-content;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.services-carousel__btn svg,
.testimonials-carousel__btn svg {
  width: 20px;
  height: 20px;
}

.services-carousel__dots,
.testimonials-carousel__dots,
.projects-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.carousel-dot,
.projects-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  transition: var(--transition);
  padding: 0;
}

.carousel-dot.active,
.carousel-dot:hover,
.projects-dot.active,
.projects-dot:hover {
  background: var(--text);
  border-color: var(--text);
  transform: scale(1.15);
}

.service-card {
  flex: 0 0 min(300px, 72vw);
  padding: 2rem 1.75rem;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(0, 0, 0, 0.1) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--inset-glow);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  transform: scale(0.72);
  opacity: 0.35;
  pointer-events: none;
}

.service-card.is-center {
  transform: scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.service-card.is-left {
  transform: scale(0.82) translateX(12px);
  opacity: 0.65;
  z-index: 2;
  pointer-events: auto;
}

.service-card.is-right {
  transform: scale(0.82) translateX(-12px);
  opacity: 0.65;
  z-index: 2;
  pointer-events: auto;
}

.service-card.is-far,
.testimonial-card.is-far {
  transform: scale(0.55);
  opacity: 0;
  pointer-events: none;
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
}

.service-card__desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Testimonials — Coverflow Carousel */

.testimonial-card {
  flex: 0 0 min(420px, 80vw);
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(0, 0, 0, 0.1) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--inset-glow);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  transform: scale(0.72);
  opacity: 0.35;
  pointer-events: none;
}

.testimonial-card.is-center {
  transform: scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--inset-glow), var(--shadow-glow);
}

.testimonial-card.is-left {
  transform: scale(0.82) translateX(12px);
  opacity: 0.6;
  z-index: 2;
  pointer-events: auto;
}

.testimonial-card.is-right {
  transform: scale(0.82) translateX(-12px);
  opacity: 0.6;
  z-index: 2;
  pointer-events: auto;
}

.testimonial-card__quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.15);
  margin-bottom: 0.25rem;
}

.testimonial-card__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.testimonial-card__name {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.testimonial-card__role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Contact */
.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: stretch;
}

.contact__showcase {
  position: relative;
  min-height: 460px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(255, 255, 255, 0.07) 0%, transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  perspective: 1000px;
}

.showcase__grid {
  position: absolute;
  inset: 0;
  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: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 20%, transparent 100%);
  pointer-events: none;
}

.showcase__glow {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 72%);
  filter: blur(16px);
  pointer-events: none;
}

.device-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 460px;
  transform-style: preserve-3d;
}

.showcase__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.showcase__wire {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.2;
  stroke-dasharray: 6 10;
  stroke-linecap: round;
  animation: wire-flow 22s linear infinite;
}

.showcase__wire--alt {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-dasharray: 4 12;
  animation-duration: 28s;
  animation-direction: reverse;
}

.showcase__wire-dot {
  fill: rgba(255, 255, 255, 0.45);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25));
}

@keyframes wire-flow {
  to { stroke-dashoffset: -120; }
}

.device-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  margin-top: -26px;
  z-index: 4;
  transform-style: preserve-3d;
}

.device-hub__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  animation: hub-pulse 3s ease-in-out infinite;
}

.device-hub__ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.device-hub__core {
  position: absolute;
  inset: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.device-hub__core svg {
  width: 100%;
  height: 100%;
}

@keyframes hub-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 1; }
}

.device {
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 2;
}

.device__glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}

.device__shell {
  position: relative;
  background: linear-gradient(160deg, rgba(110, 110, 110, 0.35), rgba(18, 18, 18, 0.92));
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.device__screen {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.03) 55%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem 0.95rem;
  text-align: left;
}

.device__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

.device__tag {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.device__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.device__icon svg {
  width: 13px;
  height: 13px;
}

.device__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.device__text {
  font-size: 0.64rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.device__node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  z-index: 5;
}

/* Laptop */
.device--laptop {
  left: 6%;
  top: 20%;
  width: 54%;
  z-index: 2;
}

.device--laptop .device__node {
  right: -3px;
  bottom: 28%;
}

.device__shell--laptop {
  border-radius: 14px 14px 4px 4px;
  padding: 9px 9px 0;
}

.device__shell--laptop .device__screen {
  border-radius: 8px;
  min-height: 108px;
}

.device__base {
  height: 11px;
  margin: 0 auto;
  width: 110%;
  margin-left: -5%;
  background: linear-gradient(180deg, rgba(80, 80, 80, 0.85), rgba(35, 35, 35, 0.95));
  border-radius: 0 0 10px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-top: none;
}

.device__base::after {
  content: '';
  display: block;
  width: 18%;
  height: 3px;
  margin: 3px auto 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Phone */
.device--phone {
  right: 7%;
  top: 10%;
  width: 23%;
  z-index: 5;
}

.device--phone .device__node {
  left: -3px;
  top: 42%;
}

.device__shell--phone {
  border-radius: 24px;
  padding: 8px;
}

.device__notch {
  width: 40%;
  height: 9px;
  margin: 0 auto 7px;
  background: #080808;
  border-radius: 0 0 9px 9px;
}

.device__shell--phone .device__screen {
  border-radius: 18px;
  min-height: 148px;
}

.device__shell--phone .device__title {
  font-size: 0.68rem;
}

.device__shell--phone .device__text {
  font-size: 0.58rem;
}

/* Tablet / Design */
.device--tablet {
  left: 30%;
  bottom: 9%;
  width: 40%;
  z-index: 3;
}

.device--tablet .device__node {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.device__shell--tablet {
  border-radius: 16px;
  padding: 9px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
}

.device__shell--tablet .device__screen {
  border-radius: 10px;
  min-height: 88px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(255, 255, 255, 0.02) 6px,
      rgba(255, 255, 255, 0.02) 7px
    );
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2rem;
}

.contact__form { margin-bottom: 2rem; }

.form-field {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-muted); }

.form-field textarea { resize: vertical; min-height: 80px; }

.form-status { margin-top: 1rem; font-size: 0.85rem; text-align: center; min-height: 1.2rem; }
.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

.contact__details { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.85rem; color: var(--text-secondary);
}
.contact-item a:hover { color: var(--accent); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
  background: var(--bg-elevated);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer__links {
  display: flex; gap: 1.5rem;
}
.footer__links a {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }

.footer__brand-center {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.6;
}

.footer__codrax {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.footer__codrax:hover {
  color: var(--accent);
}

.footer__social { display: flex; gap: 0.5rem; }

/* Chatbot */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 1100;
}

.chat-backdrop {
  display: none;
}

body.chat-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  overscroll-behavior: none;
}

body.chat-open .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chat-toggle {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(120, 120, 130, 0.08) 45%, rgba(30, 30, 35, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: chat-toggle-pulse 3s ease-in-out infinite;
}

.chat-toggle::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, transparent, rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0.5;
  z-index: -1;
  animation: chat-ring-spin 6s linear infinite;
}

.chat-toggle:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.chat-toggle svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

.chat-toggle__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6ee7a0, #22c55e);
  border: 2px solid #0a0a0a;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

@keyframes chat-toggle-pulse {
  0%, 100% { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}

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

.chat-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  width: min(390px, calc(100vw - 2rem));
  height: min(540px, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(90, 92, 105, 0.18) 0%, transparent 50%),
    linear-gradient(165deg, rgba(28, 28, 32, 0.97) 0%, rgba(14, 14, 18, 0.98) 55%, rgba(8, 8, 10, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.94);
  transform-origin: bottom left;
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.45s;
  overflow: hidden;
  touch-action: none;
}

.chat-panel__shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
  z-index: 2;
}

.chat-panel__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 120%;
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.chat-panel--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.chat-panel__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-panel__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0a0a0a;
  background: linear-gradient(145deg, #ffffff 0%, #c8c8cc 55%, #9898a0 100%);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.chat-panel__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(180deg, #ffffff 0%, #b0b0b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chat-panel__sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.chat-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.chat-panel__maximize,
.chat-panel__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-panel__maximize:hover,
.chat-panel__close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
}

.chat-panel__maximize svg,
.chat-panel__close svg {
  width: 16px;
  height: 16px;
}

.chat-panel__icon--shrink {
  display: none;
}

.chat-panel--maximized .chat-panel__icon--expand,
.chat-widget--maximized .chat-panel__icon--expand {
  display: none;
}

.chat-panel--maximized .chat-panel__icon--shrink,
.chat-widget--maximized .chat-panel__icon--shrink {
  display: block;
}

.chat-panel__messages {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 40%, rgba(0, 0, 0, 0.15) 100%);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.chat-firebase-load {
  position: absolute;
  inset: 0;
  z-index: 5;
  top: 52px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.chat-firebase-load--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-firebase-load__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, rgba(28, 28, 32, 0.95), rgba(14, 14, 18, 0.98));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.chat-firebase-load__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.85);
  animation: chat-firebase-spin 0.75s linear infinite;
}

.chat-firebase-load__text {
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-align: center;
}

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

.chat-msg {
  display: flex;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-msg--bot {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
}

.chat-msg__bubble {
  max-width: 88%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-msg--bot .chat-msg__bubble {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-msg--user .chat-msg__bubble {
  background: linear-gradient(145deg, #ffffff 0%, #d8d8de 55%, #b8b8c0 100%);
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
}

.chat-msg__bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-msg__bubble--typing {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 52px;
  padding: 0.85rem 1rem;
}

.chat-msg__bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #888);
  animation: chat-typing 1.2s ease-in-out infinite;
}

.chat-msg__bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg__bubble--typing span:nth-child(3) { animation-delay: 0.3s; }

.chat-msg__bubble--live {
  min-height: 1.2em;
}

.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(255, 255, 255, 0.75);
  animation: chat-cursor-blink 0.75s step-end infinite;
}

@keyframes chat-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.chat-panel__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@keyframes chat-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.chat-quick {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0 1rem 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x;
  flex-shrink: 0;
}

.chat-quick--hidden {
  display: none;
}

.chat-quick__btn {
  font-size: 0.68rem;
  padding: 0.42rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.chat-quick__btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.06);
}

.chat-panel__form {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.35) 100%);
  flex-shrink: 0;
}

.chat-panel__input {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.45;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-panel__input::placeholder {
  color: var(--text-muted);
}

.chat-panel__input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.chat-panel__send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #d0d0d8 50%, #a8a8b0 100%);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.chat-panel__send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.18);
}

.chat-panel__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.chat-panel__send svg {
  width: 18px;
  height: 18px;
}

.chat-panel__note {
  position: relative;
  z-index: 1;
  padding: 0 1rem 0.85rem;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
}


.chat-msg__bubble strong {
  color: var(--text);
  font-weight: 600;
}

.chat-msg__bubble em {
  font-style: italic;
}

.chat-inline-code {
  font-family: ui-monospace, monospace;
  font-size: 0.78em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.chat-widget-block {
  width: 100%;
  max-width: 100%;
  margin-top: 0.45rem;
}

.chat-widget-block__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.chat-portfolio {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-portfolio__card {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.chat-portfolio__card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.chat-portfolio__title {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.chat-portfolio__desc {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.chat-portfolio__link {
  font-size: 0.65rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-calendar {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.chat-calendar__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.chat-calendar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.chat-calendar__head-text {
  line-height: 1.3;
}

.chat-calendar__days {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.chat-calendar__day {
  padding: 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-calendar__day-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

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

.chat-slot__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  white-space: nowrap;
}

.chat-slot__time {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
}

.chat-slot__btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.chat-slot__btn--selected {
  color: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(145deg, #ffffff 0%, #d0d0d8 55%, #a8a8b0 100%);
}

.chat-booking {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.chat-booking-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-booking-form input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  outline: none;
}

.chat-booking-form input:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.chat-booking-form input::placeholder {
  color: var(--text-muted);
}

.chat-booking--done {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.chat-action-btn--primary {
  background: linear-gradient(145deg, #ffffff 0%, #d0d0d8 55%, #a8a8b0 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.chat-action-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.15);
}

.chat-action-btn--whatsapp {
  background: linear-gradient(145deg, #25d366 0%, #1da851 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.chat-action-btn--whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.chat-cv,
.chat-whatsapp {
  padding: 0.25rem 0;
}

body.chat-maximized-open {
  overflow: hidden;
}

.chat-widget--maximized {
  position: fixed;
  inset: 0;
  z-index: 2500;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
}

.chat-widget--maximized .chat-toggle {
  display: none;
}

.chat-widget--maximized .chat-panel,
.chat-panel--maximized {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: 100dvh !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.chat-widget--maximized .chat-panel__messages,
.chat-panel--maximized .chat-panel__messages {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.chat-widget--maximized .chat-panel__form,
.chat-widget--maximized .chat-quick,
.chat-widget--maximized .chat-panel__note,
.chat-panel--maximized .chat-panel__form,
.chat-panel--maximized .chat-quick,
.chat-panel--maximized .chat-panel__note {
  max-width: 760px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.chat-widget--maximized .chat-calendar__days,
.chat-panel--maximized .chat-calendar__days {
  max-height: min(48vh, 420px);
}

.chat-widget--maximized .chat-calendar__times,
.chat-panel--maximized .chat-calendar__times {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .chat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1099;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .chat-backdrop--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .chat-widget {
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    left: max(0.85rem, env(safe-area-inset-left));
    right: auto;
    width: auto;
    pointer-events: none;
  }

  .chat-widget .chat-toggle {
    pointer-events: auto;
  }

  .chat-widget--open,
  .chat-widget--open .chat-panel {
    pointer-events: auto;
  }

  .chat-widget--open .chat-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.85);
  }

  .chat-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: min(88dvh, 100dvh);
    max-height: 100dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    transform: translateY(110%);
    transform-origin: bottom center;
    transition:
      transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.28s ease,
      visibility 0.28s ease;
    z-index: 1101;
  }

  .chat-panel:not(.chat-panel--open) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .chat-panel--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .chat-panel--open:not(.chat-panel--maximized) {
    height: var(--chat-vv-height, min(88dvh, 100dvh));
    max-height: var(--chat-vv-height, 100dvh);
    top: var(--chat-vv-offset, auto);
    bottom: auto;
  }

  .chat-panel__form {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    flex-shrink: 0;
  }

  .chat-panel__note {
    flex-shrink: 0;
  }

  .chat-quick {
    flex-shrink: 0;
  }

  .chat-firebase-load {
    top: 52px;
    bottom: 0;
  }

  .chat-toggle {
    width: 48px;
    height: 48px;
  }

  .services-carousel,
  .testimonials-carousel {
    gap: 0.35rem;
  }

  .services-carousel__btn,
  .testimonials-carousel__btn {
    width: 36px;
    height: 36px;
  }

  .coverflow-viewport {
    min-height: 280px;
  }

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

  .chat-widget--maximized .chat-calendar__times,
  .chat-panel--maximized .chat-calendar__times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  filter: blur(6px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal--delay { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

.highlights__layout .highlight-card:nth-child(1) { transition-delay: 0.05s; }
.highlights__layout .highlight-card:nth-child(2) { transition-delay: 0.12s; }
.highlights__layout .highlight-card:nth-child(3) { transition-delay: 0.19s; }
.highlights__layout .highlight-card:nth-child(4) { transition-delay: 0.26s; }

.skills__grid .skill-card:nth-child(1) { transition-delay: 0.04s; }
.skills__grid .skill-card:nth-child(2) { transition-delay: 0.08s; }
.skills__grid .skill-card:nth-child(3) { transition-delay: 0.12s; }
.skills__grid .skill-card:nth-child(4) { transition-delay: 0.16s; }
.skills__grid .skill-card:nth-child(5) { transition-delay: 0.2s; }
.skills__grid .skill-card:nth-child(6) { transition-delay: 0.24s; }
.skills__grid .skill-card:nth-child(7) { transition-delay: 0.28s; }
.skills__grid .skill-card:nth-child(8) { transition-delay: 0.32s; }

.stats__grid .stat-card:nth-child(1) { transition-delay: 0.05s; }
.stats__grid .stat-card:nth-child(2) { transition-delay: 0.15s; }
.stats__grid .stat-card:nth-child(3) { transition-delay: 0.25s; }
.stats__grid .stat-card:nth-child(4) { transition-delay: 0.35s; }

/* Responsive */
@media (max-width: 1024px) {
  .section { padding: 4rem 0; }
  .section__header { margin-bottom: 2.25rem; }

  .hero { min-height: auto; padding-top: calc(var(--header-height) + 1.5rem); padding-bottom: 2rem; }
  .hero__layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
  }
  .hero__center {
    order: 1;
    width: 100%;
    grid-column: auto;
    grid-row: auto;
  }
  .hero__meta-wrap {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  .hero__meta--left,
  .hero__meta--right {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 1.75rem;
    width: 100%;
    grid-column: auto;
    grid-row: auto;
  }
  .hero__meta--right { align-items: center; text-align: center; }
  .hero__oval-frame { width: min(300px, 78vw); }

  .about__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__visual { justify-content: center; }
  .about__glow-card { min-height: 320px; }

  .skills__grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  .projects-carousel__btn--prev,
  .projects-carousel__btn--next { display: none; }
  .services-carousel__btn--prev,
  .services-carousel__btn--next,
  .testimonials-carousel__btn--prev,
  .testimonials-carousel__btn--next { display: none; }

  .contact__layout { grid-template-columns: 1fr; gap: 2rem; }
  .contact__showcase { min-height: 300px; }
  .device-scene { min-height: 300px; }
  .device--laptop { width: 62%; left: 4%; top: 14%; }
  .device--phone { width: 28%; right: 3%; top: 8%; }
  .device--tablet { width: 48%; left: 24%; bottom: 5%; }
  .device-hub { transform: scale(0.85); }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .highlights__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .education__grid { grid-template-columns: 1fr; }
  .certifications__grid { grid-template-columns: 1fr; }

  .coverflow-viewport { min-height: 280px; }
  .coverflow-viewport--tall { min-height: 260px; }
}

@media (max-width: 768px) {
  :root { --header-height: 68px; }

  .container { width: min(100% - 1.5rem, var(--container)); }
  .section { padding: 3.25rem 0; }
  .section__header { margin-bottom: 1.75rem; }
  .section__title { font-size: clamp(1.45rem, 6vw, 2rem); }

  body.nav-open { overflow: hidden; }

  .nav {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }
  .nav__brand-text { font-size: 0.88rem; }
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 88vw);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1.25rem 1.75rem 2rem;
    background: var(--overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transition: right var(--transition);
    z-index: 1002;
    justify-self: auto;
    overflow-y: auto;
  }
  .nav__menu.open { right: 0; }
  .nav__menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    list-style: none;
  }
  .nav__menu-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
  }
  .nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    flex-shrink: 0;
    transition: var(--transition);
  }
  .nav__close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
  }
  .nav__close svg {
    width: 18px;
    height: 18px;
  }
  .nav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 1001;
  }
  .nav__backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav__link {
    width: 100%;
    padding: 0.85rem 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav__email { display: none; }
  .nav__toggle {
    display: flex;
    position: relative;
    z-index: 1003;
  }
  body.nav-open .nav__toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav__brand { grid-column: 1; min-width: 0; }
  .nav__brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
  }
  .nav__actions { grid-column: 2; }

  .hero { padding-top: calc(var(--header-height) + 1rem); }
  .hero__layout { gap: 1.25rem; margin-bottom: 1.25rem; }
  .hero__oval-frame { width: min(260px, 82vw); border-width: 4px; }
  .hero__name { font-size: clamp(0.95rem, 10cqi, 1.45rem); bottom: 14%; }
  .hero__social {
    gap: 0.55rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 280px;
    margin-inline: auto;
  }
  .social-link { width: 34px; height: 34px; }

  /* Hero meta — clean card grid (mobile only) */
  .hero__meta-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    max-width: 400px;
    margin-inline: auto;
  }
  .hero__meta--left,
  .hero__meta--right {
    display: contents;
  }
  .hero__meta-wrap .meta-item {
    padding: 0.7rem 0.65rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
  }
  .hero__meta-wrap .meta-item:nth-child(3),
  .hero__meta-wrap .meta-item:nth-child(6) {
    grid-column: 1 / -1;
  }
  .hero__meta-wrap .meta-item span {
    font-size: 0.62rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.14em;
  }
  .hero__meta-wrap .meta-item strong {
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .hero__skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem 0.65rem;
    justify-items: center;
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
  }
  .skill-pill { width: 100%; max-width: 96px; }
  .skill-pill__capsule { width: 100%; min-height: 108px; padding: 1rem 0.5rem 0.85rem; }
  .skill-pill__pct { font-size: 1.05rem; }
  .skill-pill__name { font-size: 0.56rem; letter-spacing: 0.1em; }

  .highlights { padding: 3rem 0; }
  .highlights__layout { gap: 2rem; }
  .highlight-card { padding: 1.25rem 1.15rem; }

  .marquee__item { font-size: 0.85rem; padding: 0 1rem; }

  .about__vertical-label { display: none; }
  .about__visual { flex-direction: column; gap: 1rem; }
  .about__oval-frame { max-width: min(280px, 85vw); width: 100%; }
  .about__glow-card { min-height: auto; padding: 0.5rem 0; }
  .about__glow-ring { width: min(320px, 90vw); height: min(320px, 90vw); }
  .about__glass-panel { max-width: 100%; padding: 1.75rem 1.35rem; }
  .about__glow-title { font-size: 1.3rem; }
  .about__text { font-size: 0.84rem; }

  .stat-card { padding: 1.5rem 0.85rem; }
  .stat-card__num { font-size: 2rem; }

  .skills__grid { grid-template-columns: 1fr; gap: 1rem; }
  .skill-card { padding: 1.35rem 1.2rem; }

  .projects__filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    margin-bottom: 1.5rem;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .projects__filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; font-size: 0.68rem; padding: 0.4rem 0.95rem; }

  .phone-card { flex: 0 0 min(250px, 84vw); }
  .phone-card__screen { min-height: 380px; }
  .projects-carousel__track { gap: 1.25rem; padding: 1.5rem 0.25rem 2rem; }

  .service-card { flex: 0 0 min(270px, 88vw); padding: 1.65rem 1.35rem; }
  .testimonial-card { flex: 0 0 min(300px, 90vw); }
  .coverflow-viewport,
  .coverflow-viewport--tall { min-height: 260px; }
  .coverflow-track { gap: 1rem; }

  .credentials-divider { margin: 2.5rem 0; }
  .credentials-block__header { margin-bottom: 1.5rem; }

  .contact__title { font-size: clamp(1.35rem, 5.5vw, 1.75rem); margin-bottom: 1.5rem; }
  .contact__showcase { min-height: 260px; border-radius: var(--radius-md); }
  .device-scene { min-height: 260px; }
  .device--laptop { width: 68%; left: 2%; top: 12%; }
  .device--phone { width: 30%; right: 2%; top: 6%; }
  .device--tablet { width: 52%; left: 20%; bottom: 4%; }
  .device__title { font-size: 0.72rem; }
  .device__text { font-size: 0.6rem; }

  .footer { padding: 1.75rem 0 1.25rem; }
  .footer__top {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    padding-bottom: 1.25rem;
  }
  .footer__bottom { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
  .footer__copy { text-align: center; }
  .footer__links { justify-content: center; flex-wrap: wrap; gap: 1rem; }
  .footer__brand-center { font-size: 1.25rem; }

  .back-to-top {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .container { width: min(100% - 1.25rem, var(--container)); }
  .section { padding: 2.75rem 0; }

  .hero__meta-wrap { max-width: 100%; gap: 0.55rem; }
  .hero__meta-wrap .meta-item { padding: 0.65rem 0.55rem; }
  .hero__meta-wrap .meta-item strong { font-size: 0.74rem; }

  .hero__skills {
    grid-template-columns: repeat(3, 1fr);
    max-width: 300px;
    gap: 0.75rem 0.5rem;
  }
  .skill-pill { max-width: 88px; }
  .skill-pill__capsule { min-height: 100px; padding: 0.9rem 0.4rem 0.75rem; }
  .skill-pill__icon { width: 20px; height: 20px; }
  .skill-pill__pct { font-size: 0.98rem; }
  .skill-pill__name { font-size: 0.52rem; }

  .stats__grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card__num { font-size: 1.75rem; }
  .stat-card__label { font-size: 0.7rem; }

  .phone-card { flex: 0 0 min(230px, 88vw); }
  .phone-card__screen { min-height: 340px; }

  .service-card { flex: 0 0 min(250px, 92vw); padding: 1.5rem 1.2rem; }
  .service-card__title { font-size: 1rem; }
  .testimonial-card { flex: 0 0 min(270px, 92vw); }

  .btn { padding: 0.8rem 1.5rem; font-size: 0.72rem; }
  .btn--outline { padding: 0.85rem 1.75rem; }

  .contact__showcase { min-height: 220px; }
  .device-scene { min-height: 220px; }
  .device-hub { transform: scale(0.75); }

  .footer__logo { font-size: 1rem; }
  .footer__links a { font-size: 0.66rem; }
}

@media (max-width: 360px) {
  .nav__brand-text { font-size: 0.8rem; max-width: 46vw; }
  .hero__oval-frame { width: min(220px, 88vw); }
  .skill-pill__capsule { width: 66px; min-height: 100px; }
  .stats__grid { grid-template-columns: 1fr; }
}

[data-theme="light"] .skill-pill__capsule {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 45%, rgba(0, 0, 0, 0.06) 100%);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -8px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .skill-pill__icon {
  color: rgba(20, 20, 20, 0.85);
}

[data-theme="light"] .btn--primary {
  background: #0a0a0a;
  color: #ffffff;
}

[data-theme="light"] .btn--primary:hover {
  background: #222222;
}

[data-theme="light"] .filter-btn.active {
  background: #0a0a0a;
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
  .reveal { filter: none; transform: none; opacity: 1; }
  .chat-toggle { animation: none; }
  .chat-toggle::before { animation: none; }
}
