/* ── Design refresh layer ── */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm), var(--accent-strong));
  box-shadow: 0 0 12px var(--glow);
  transition: width 80ms linear;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-drift 18s ease-in-out infinite alternate;
}

.ambient__orb--1 {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -80px;
  background: rgba(155, 109, 255, 0.18);
}

.ambient__orb--2 {
  width: 360px;
  height: 360px;
  top: 40%;
  right: -100px;
  background: rgba(232, 160, 74, 0.1);
  animation-delay: -6s;
  animation-duration: 22s;
}

.ambient__orb--3 {
  width: 420px;
  height: 420px;
  bottom: -80px;
  left: 30%;
  background: rgba(141, 99, 255, 0.12);
  animation-delay: -12s;
  animation-duration: 20s;
}

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -20px) scale(1.08); }
}

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--accent-strong) 45%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 12.5cqi, 7.6rem) !important;
  line-height: 1 !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  white-space: nowrap !important;
  text-wrap: nowrap !important;
  max-width: 100%;
}

.hero-copy h1 .text-gradient {
  display: inline-block;
  white-space: nowrap;
  max-width: 100%;
}

.brand {
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--text), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & nav */
.header-inner {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(155, 109, 255, 0.08);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 220ms ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav a.is-active {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(155, 109, 255, 0.14);
}

/* Hero profile ring */
.hero-media .image-shell {
  position: relative;
  isolation: isolate;
}

.hero-media .image-shell::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm), var(--accent-strong), var(--accent));
  background-size: 300% 300%;
  animation: ring-shift 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
  pointer-events: none;
}

.hero-media .image-shell::after {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes ring-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(155, 109, 255, 0.1);
}

.hero-copy .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 10px var(--accent-warm);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* Role cards */
.role-card {
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.role-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(155, 109, 255, 0.12) 100%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.role-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(155, 109, 255, 0.1);
}

.role-card:hover::after {
  opacity: 1;
}

/* Experience timeline */
.experience-timeline {
  position: relative;
  padding-left: 28px;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.5;
}

.experience-entry {
  position: relative;
}

.experience-entry::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 36px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-strong);
  background: var(--bg);
  box-shadow: 0 0 12px var(--glow);
  transition: transform 220ms ease, background 220ms ease;
}

.experience-entry:hover::before {
  transform: scale(1.2);
  background: var(--accent);
}

.experience-entry:hover {
  background: linear-gradient(90deg, rgba(155, 109, 255, 0.06) 0%, transparent 60%);
  border-radius: 16px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

/* KPI stat cards */
.kpi-stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.kpi-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  opacity: 0;
  transition: opacity 220ms ease;
}

.kpi-stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(155, 109, 255, 0.08);
}

.kpi-stat-card:hover::before {
  opacity: 1;
}

.kpi-stat-number {
  transition: color 180ms ease;
}

.kpi-stat-card:hover .kpi-stat-number {
  color: var(--accent-strong);
}

/* Contact section */
.contact-box--premium {
  position: relative;
  background:
    linear-gradient(135deg, rgba(155, 109, 255, 0.12) 0%, rgba(18, 12, 30, 0.9) 50%, rgba(232, 160, 74, 0.06) 100%);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.contact-box--premium::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 109, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.contact-box--premium .contact-row a {
  background: rgba(8, 5, 14, 0.6);
}

.contact-box--premium .contact-row a:hover {
  background: rgba(155, 109, 255, 0.2);
  color: var(--text);
}

/* Section headings */
.section-heading-accent {
  display: inline-block;
  width: 48px;
  height: 3px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 2px;
}

.kpis-intro {
  margin-top: 28px;
}

/* Freelance notice */
.freelance-section {
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.freelance-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--border-strong);
  border-radius: clamp(22px, 2.4vw, 32px);
  background:
    linear-gradient(135deg, rgba(155, 109, 255, 0.1) 0%, rgba(18, 12, 30, 0.92) 55%, rgba(232, 160, 74, 0.05) 100%);
  box-shadow: var(--shadow);
}

.freelance-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.freelance-card__text {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--body-size);
  line-height: 1.75;
}

.role-card--highlight {
  border-color: var(--border-strong);
  background:
    linear-gradient(180deg, rgba(40, 28, 62, 0.95), rgba(18, 12, 30, 0.94)),
    radial-gradient(circle at top right, rgba(232, 160, 74, 0.14), transparent 40%);
}

.contact-row--hero .social-link {
  flex: 0 1 auto;
  min-width: 0;
}

.contact-row--hero .social-link span:last-child {
  font-weight: 600;
}

/* Marquee polish */
.marquee {
  background: linear-gradient(180deg, rgba(14, 10, 24, 0.9), rgba(8, 5, 14, 0.95));
}

/* Award/skills rows */
.award-row-feature {
  border-left: 3px solid var(--accent);
}

/* Beyond cards on profile */
.beyond-card[open] {
  border-color: var(--border-strong);
  background: var(--panel-strong);
}

.beyond-card[open] .beyond-card__image {
  filter: grayscale(0);
  transform: scale(1.05);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, transparent, rgba(8, 5, 14, 0.8));
}

.site-footer p {
  color: var(--muted);
}

body.nav-open {
  overflow: hidden;
}

/* Mobile nav */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px var(--container-gutter);
    background: rgba(5, 3, 8, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease;
    z-index: 19;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
  }

  .experience-timeline {
    padding-left: 0;
  }

  .experience-timeline::before,
  .experience-entry::before {
    display: none;
  }

  .experience-entry:hover {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient__orb,
  .hero-media .image-shell::before,
  .hero-copy .eyebrow::before {
    animation: none;
  }
}