:root {
  color-scheme: light;
  --bg: #f7f4ed;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: rgba(23, 32, 42, 0.12);
  --navy: #12355b;
  --teal: #0f766e;
  --gold: #c29204;
  --coral: #d8614c;
  --shadow: 0 24px 70px rgba(18, 53, 91, 0.16);
}

body.dark {
  color-scheme: dark;
  --bg: #10151d;
  --surface: rgba(24, 32, 43, 0.76);
  --surface-strong: #192231;
  --text: #f4f7fb;
  --muted: #a8b3c2;
  --line: rgba(255, 255, 255, 0.14);
  --navy: #8ec5ff;
  --teal: #45d5c6;
  --gold: #f1c453;
  --coral: #ff8a72;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 50px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(216, 97, 76, 0.14), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#network-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  display: grid;
  width: min(1040px, calc(100% - 32px));
  min-height: 64px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions,
.filters {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  font-size: 0.84rem;
}

.nav-links {
  gap: 8px;
  justify-self: center;
  justify-content: center;
}

.theme-toggle {
  justify-self: end;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-links a:hover {
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
}

.theme-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.sun-icon,
.sun-icon::before {
  display: block;
  border-radius: 50%;
}

.sun-icon {
  width: 18px;
  height: 18px;
  background: var(--gold);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 18%, transparent);
}

body.dark .sun-icon {
  background: transparent;
  box-shadow: inset -6px -4px 0 0 var(--gold);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
  scroll-margin-top: 50px;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(42px, 6vw, 82px);
  padding-top: 140px;
  padding-bottom: 60px;
}

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

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

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 5.8vw, 4.8rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.hero-lead,
.hero-subtitle,
.contact-panel > p,
.about-card p,
.education-card p,
.work-card p,
.timeline p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-subtitle {
  margin-bottom: 18px;
  color: var(--teal);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.4;
}

.hero-lead {
  max-width: 670px;
  font-size: 1.16rem;
}

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

.button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 10px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
}

.button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 34%, transparent);
  outline-offset: 3px;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--teal));
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.24);
}


.button.whatsapp {
  border-color: transparent;
  background: linear-gradient(135deg, #075e54, #25d366);
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 211, 102, 0.24);
}

.button.ghost {
  background: rgb(92 31 31);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 16px 0 rgba(92, 31, 31, 0.18), 0 26px 42px rgba(92, 31, 31, 0.22);
}

.button.ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 48%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.button.ghost:hover,
.button.ghost:focus-visible {
  box-shadow: 0 10px 0 rgba(92, 31, 31, 0.18), 0 24px 40px rgba(92, 31, 31, 0.24);
}

.button.ghost:hover::after,
.button.ghost:focus-visible::after {
  opacity: 1;
}

.contact-button {
  min-width: 146px;
  min-height: 54px;
  border-color: transparent;
  color: #fff;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 16px 0 rgba(18, 53, 91, 0.12), 0 26px 42px rgba(18, 53, 91, 0.18);
}

.contact-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 48%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.contact-button:hover,
.contact-button:focus-visible {
  box-shadow: 0 10px 0 rgba(18, 53, 91, 0.12), 0 24px 40px rgba(18, 53, 91, 0.2);
}

.contact-button:hover::after,
.contact-button:focus-visible::after {
  opacity: 1;
}

.contact-button svg,
.contact-button span {
  position: relative;
  z-index: 1;
}

.contact-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}

.contact-button.gmail svg {
  fill: none;
}

.contact-button.linkedin {
  background: linear-gradient(135deg, #0a66c2, #064a8f);
}

.contact-button.whatsapp {
  background: linear-gradient(135deg, #075e54, #25d366);
}

.button.contact-button.whatsapp {
  box-shadow: 0 16px 0 rgba(7, 94, 84, 0.18), 0 26px 42px rgba(37, 211, 102, 0.22);
}

.button.contact-button.whatsapp:hover,
.button.contact-button.whatsapp:focus-visible {
  box-shadow: 0 10px 0 rgba(7, 94, 84, 0.18), 0 24px 40px rgba(37, 211, 102, 0.24);
}

.contact-button.gmail {
  background: linear-gradient(135deg, #ffff, #ffff);
  color: #17202a;
}

.stats-strip {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hero-stats {
  width: 100%;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: center;
}

.stats-strip article,
.content-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats-strip article {
  min-height: 160px;
  padding: 24px;
}

.hero-stats article {
  min-height: 176px;
}

.hero-stats .stat-number {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.stat-number {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  font-weight: 600;
}

.stat-number::before {
  content: "+";
}

.stats-strip p {
  color: var(--muted);
  line-height: 1.45;
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px;
  align-items: start;
}

.content-card {
  padding: 28px;
}

.about-card p:last-child,
.education-card p:last-child,
.work-card p:last-child,
.contact-panel p:last-child {
  margin-bottom: 0;
}

.education-grid,
.work-grid,
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.education-card {
  min-height: 260px;
}

.card-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 16px;
  background: rgba(194, 146, 4, 0.12);
  color: var(--gold);
  font-weight: 800;
}

.education-card small,
.timeline small {
  color: var(--teal);
  font-weight: 800;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.timeline-carousel {
  position: relative;
}

.timeline {
  position: relative;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
  scroll-behavior: smooth;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--teal) 62%, transparent) transparent;
}

.timeline::-webkit-scrollbar {
  height: 8px;
}

.timeline::-webkit-scrollbar-track {
  background: transparent;
}

.timeline::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 58%, transparent);
}

.timeline-page {
  display: grid;
  width: 100%;
  min-width: 100%;
  gap: 16px;
  scroll-snap-align: start;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  min-height: 174px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.timeline-controls {
  position: absolute;
  top: -76px;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.timeline-item h3 {
  margin-bottom: 6px;
}

.timeline-marker {
  color: var(--gold);
  font-weight: 800;
}

.timeline,
.certifications-carousel .certifications-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.timeline::-webkit-scrollbar,
.certifications-carousel .certifications-grid::-webkit-scrollbar {
  display: none;
}

.filters {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

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

.work-card {
  min-height: 260px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.work-card:hover {
  transform: translateY(-5px);
}

.certifications-section {
  width: min(1180px, calc(100% - 32px));
}

.certifications-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.certificate-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  font: inherit;
  box-shadow: 0 18px 44px rgba(18, 53, 91, 0.13);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

body.dark .certificate-card {
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.certificate-card:hover,
.certificate-card:focus-visible {
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
  box-shadow: 0 24px 60px rgba(15, 118, 110, 0.2);
  transform: translateY(-6px);
}

.certificate-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 34%, transparent);
  outline-offset: 3px;
}

.certificate-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.certificate-frame {
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 16px;
  background: #fff;
  aspect-ratio: 16 / 10;
}

.certificate-card-featured .certificate-frame {
  aspect-ratio: 16 / 10.4;
}

.certificate-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.certificate-card:hover .certificate-frame img,
.certificate-card:focus-visible .certificate-frame img {
  transform: scale(1.035);
}

.certificate-copy {
  display: grid;
  gap: 7px;
  padding: 0 4px 6px;
}

.certificate-issuer {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.certificate-copy strong {
  line-height: 1.28;
}

.certificate-copy small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.certificate-link-card {
  justify-content: space-between;
  text-decoration: none;
}

.certificate-document {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 18%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface-strong) 92%, transparent);
  color: var(--gold);
  font-size: 2rem;
  font-weight: 800;
}

.certificate-document.edx-mark {
  border-color: color-mix(in srgb, var(--teal) 36%, var(--line));
  color: var(--teal);
}

.certificate-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 76px 24px 24px;
  background: rgba(5, 10, 16, 0.78);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease;
}

.certificate-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.certificate-lightbox img {
  max-width: min(1120px, 96vw);
  max-height: 82vh;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.certificate-lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.work-tag {
  display: inline-flex;
  margin-bottom: 22px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(216, 97, 76, 0.12);
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-panel {
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--navy) 14%, transparent), transparent 54%),
    var(--surface);
}

.contact-panel h2 {
  max-width: 760px;
}

.contact-panel > p {
  max-width: 680px;
}

footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-header[data-reveal] {
  transform: translate(-50%, 22px);
}

.site-header[data-reveal].is-visible {
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    grid-template-columns: auto 1fr auto;
    border-radius: 18px;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

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

  .hero {
    gap: 28px;
    padding-top: 118px;
  }

  .hero-stats {
    max-width: 620px;
    justify-self: center;
  }

  .stats-strip:not(.hero-stats),
  .education-grid,
  .certifications-grid,
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .certificate-card-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-left: 10px;
  }

  .nav-links a {
    font-size: 0;
  }

  .nav-links a::first-letter {
    font-size: 0;
  }

  .nav-links a::after {
    font-size: 0.76rem;
  }

  .nav-links a[href="#about"]::after { content: "About"; }
  .nav-links a[href="#experience"]::after { content: "Exp"; }
  .nav-links a[href="#work"]::after { content: "Work"; }
  .nav-links a[href="#certifications"]::after { content: "Certs"; }
  .nav-links a[href="#contact"]::after { content: "Contact"; }

  .section {
    padding: 70px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    gap: 34px;
  }

  h1 {
    font-size: clamp(2.65rem, 13vw, 4.25rem);
    line-height: 1.06;
  }

  .stats-strip:not(.hero-stats),
  .education-grid,
  .certifications-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card-featured {
    grid-column: span 1;
  }

  .certificate-card {
    border-radius: 18px;
  }

  .certificate-document {
    min-height: 112px;
  }

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

  .hero-stats article {
    min-height: 150px;
    padding: 20px;
  }

  .hero-stats .stat-number {
    font-size: clamp(2rem, 12vw, 3.15rem);
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}

.certifications-carousel {
  position: relative;
}

.certifications-carousel .certifications-grid {
  display: flex;
  grid-template-columns: none;
  gap: 18px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
  scroll-behavior: smooth;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.certifications-carousel .certifications-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.certifications-carousel .certifications-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.certifications-carousel .certifications-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.certifications-carousel .certificate-card,
.certifications-carousel .certificate-card-featured {
  width: clamp(310px, 33vw, 430px);
  min-width: clamp(310px, 33vw, 430px);
  grid-column: auto;
  grid-row: auto;
  scroll-snap-align: start;
}

.certifications-carousel .certificate-card-featured {
  width: clamp(360px, 43vw, 560px);
  min-width: clamp(360px, 43vw, 560px);
}

.certifications-controls {
  position: absolute;
  top: -76px;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.carousel-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(18, 53, 91, 0.12);
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.2);
}

.carousel-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 34%, transparent);
  outline-offset: 3px;
}

.carousel-button:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

@media (max-width: 760px) {
  .site-header {
    width: calc(100% - 16px);
    grid-template-columns: auto minmax(0, 1fr) 42px;
    gap: 6px;
    padding: 8px;
  }

  .brand {
    min-width: 40px;
  }

  .nav-links {
    min-width: 0;
    justify-self: stretch;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    padding: 10px 7px;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    justify-self: end;
  }

  .certifications-section {
    width: min(100% - 16px, 1180px);
  }

  .certifications-controls {
    position: static;
    justify-content: flex-end;
    margin: -8px 0 14px;
  }

  .timeline-controls {
    position: static;
    justify-content: flex-end;
    margin: -8px 0 14px;
  }

.certifications-carousel .certifications-grid {
  gap: 14px;
  margin-inline: -8px;
  padding: 4px 8px;
  scroll-padding-inline: 8px;
}

  .certifications-carousel .certificate-card,
  .certifications-carousel .certificate-card-featured {
    width: calc(100vw - 42px);
    min-width: calc(100vw - 42px);
  }
}

/* Final floating layout: centered glass dock + independent theme button */
.site-header,
body.dark .site-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav-links {
  grid-column: 2;
  justify-self: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(87, 101, 120, .22);
  border-top-color: rgba(255,255,255,.92);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(255,255,255,.30) 58%, rgba(230,240,243,.42));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(77,93,110,.1),
    0 14px 38px rgba(36,48,60,.12);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
}

body.dark .nav-links {
  border-color: rgba(188,205,219,.34);
  border-top-color: rgba(255,255,255,.44);
  background:
    linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.045) 58%, rgba(69,213,198,.05)),
    rgba(26,36,50,.60);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -1px 0 rgba(255,255,255,.06),
    0 14px 38px rgba(0,0,0,.24);
}

.nav-links a {
  min-width: 98px;
  min-height: 58px;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.nav-links a::before {
  border-color: rgba(255,255,255,.82);
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.34) 55%, rgba(216,235,237,.48));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(85,101,118,.1),
    0 8px 22px rgba(43,58,72,.13);
}

body.dark .nav-links a::before {
  border-color: rgba(255,255,255,.3);
  background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.065) 58%, rgba(69,213,198,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 8px 22px rgba(0,0,0,.2);
}

.theme-toggle {
  grid-column: 3;
  justify-self: end;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border-color: rgba(88,103,120,.2);
  background: rgba(255,255,255,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 9px 26px rgba(35,49,62,.11);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
}

body.dark .theme-toggle {
  border-color: rgba(255,255,255,.3);
  background: rgba(42,55,69,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 26px rgba(0,0,0,.22);
}

.sun-icon {
  width: 15px;
  height: 15px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent);
}

@media (max-width: 760px) {
  .site-header,
  body.dark .site-header {
    width: calc(100% - 16px);
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 7px;
  }

  .nav-links {
    grid-column: 1;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
    border-radius: 21px;
  }

  .nav-links a {
    min-width: 64px;
    min-height: 50px;
  }

  .theme-toggle {
    grid-column: 2;
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .certifications-carousel .certifications-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.certifications-carousel .certifications-grid::-webkit-scrollbar {
  display: none;
}
}

.certifications-carousel .certifications-grid {
  padding-bottom: 4px;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.certifications-carousel .certifications-grid::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.typing-cursor {
  display: inline-block;
  margin-left: 3px;
  color: var(--accent, #f25b24);
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(15,118,110,.18), transparent 30rem),
    radial-gradient(circle at 84% 12%, rgba(216,97,76,.16), transparent 26rem),
    var(--bg);
  transition: opacity .7s ease, visibility .7s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  width: min(360px, calc(100% - 40px));
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(18px);
}

.preloader-logo-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
}

.preloader-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 3px;
  background: conic-gradient(var(--teal), var(--gold), var(--coral), var(--teal));
  animation: spinLoader 2.4s linear infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.preloader-logo {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(18,53,91,.22);
}

.preloader-name {
  margin: 0 0 18px;
  font-size: 1.55rem;
  line-height: 1.15;
}

.loading-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.loading-progress {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
  transition: width 0.12s ease;
}

.loading-text {
  margin-top: 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

#loading-percent {
  display: inline-block;
  min-width: 40px;
  margin-left: 6px;
  color: var(--gold);
  letter-spacing: 0;
}

@keyframes loading {
  to { width: 100%; }
}

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

@media (prefers-reduced-motion: reduce) {
  .preloader-logo-wrap::before,
  .loading-progress {
    animation: none;
  }

  .loading-progress {
    width: 100%;
  }
}
#preloader {
  overflow: hidden;
  isolation: isolate;
}

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

.meteors-bg span {
  position: absolute;
  top: -140px;
  left: var(--x);
  width: var(--w);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), rgba(194,146,4,.8));
  box-shadow: 0 0 22px rgba(194,146,4,.55);
  opacity: 0;
  transform: rotate(125deg);
  animation: meteorFall var(--speed) linear infinite;
  animation-delay: var(--delay);
}

.meteors-bg span:nth-child(1) { --x: 15%; --w: 170px; --speed: 8s; --delay: 0s; }
.meteors-bg span:nth-child(2) { --x: 35%; --w: 130px; --speed: 7s; --delay: 0s; }
.meteors-bg span:nth-child(3) { --x: 58%; --w: 190px; --speed: 7s; --delay: 0s; }
.meteors-bg span:nth-child(4) { --x: 78%; --w: 145px; --speed: 6s; --delay: 0s; }
.meteors-bg span:nth-child(5) { --x: 92%; --w: 120px; --speed: 7s; --delay: 0s; }
.meteors-bg span:nth-child(6) { --x: 25%; --w: 155px; --speed: 8s; --delay: 0s; }

@keyframes meteorFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(125deg);
  }

  10% {
    opacity: 1;
  }

  35% {
    opacity: .9;
  }

  100% {
    opacity: 0;
    transform: translate3d(-520px, 760px, 0) rotate(125deg);
  }
}

.preloader-content {
  position: relative;
  z-index: 2;
}
.meteors-bg {
  display: none;
}

/* Liquid glass navigation */
.site-header {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #fff 46%, var(--line));
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0.18)),
    color-mix(in srgb, var(--surface) 62%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 18px 50px rgba(8, 19, 35, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  backdrop-filter: blur(24px) saturate(175%);
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70%;
  left: var(--glass-x, 50%);
  width: 260px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.52), rgba(88,210,226,.13) 43%, transparent 72%);
  filter: blur(8px);
  opacity: .7;
  transform: translateX(-50%);
  transition: left 360ms cubic-bezier(.22,1,.36,1), opacity 220ms ease;
  pointer-events: none;
}

body.dark .site-header {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(115deg, rgba(255,255,255,.11), rgba(255,255,255,.025) 48%, rgba(69,213,198,.07)),
    rgba(14, 22, 33, 0.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 20px 55px rgba(0,0,0,.28);
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.nav-links a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  transition: color 240ms ease, border-color 240ms ease, box-shadow 240ms ease, transform 240ms cubic-bezier(.22,1,.36,1);
}

.nav-links a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.7), transparent 48%),
    linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,255,255,.08));
  opacity: 0;
  transform: scale(.74);
  transition: opacity 220ms ease, transform 360ms cubic-bezier(.22,1,.36,1);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  border-color: rgba(255,255,255,.42);
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 8px 24px rgba(15,118,110,.13);
  transform: translateY(-1px);
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before,
.nav-links a.is-active::before {
  opacity: 1;
  transform: scale(1);
}

.nav-links a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--teal) 60%, #fff);
  outline-offset: 3px;
}

.theme-toggle {
  border-color: rgba(255,255,255,.36);
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 22px rgba(18,53,91,.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 12px 28px rgba(15,118,110,.18);
}

@media (max-width: 760px) {
  .site-header {
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  }
}

/* Static icon dock — iOS-style liquid glass, without pointer-following light */
.site-header {
  min-height: 82px;
  width: min(1120px, calc(100% - 32px));
  padding: 8px 12px 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 30px;
  overflow: visible;
  background:
    linear-gradient(140deg, rgba(255,255,255,.42), rgba(255,255,255,.11) 52%, rgba(255,255,255,.25)),
    color-mix(in srgb, var(--surface) 54%, transparent);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.72),
    inset 0 -1px 0 rgba(255,255,255,.18),
    0 20px 48px rgba(18,53,91,.13);
  -webkit-backdrop-filter: blur(30px) saturate(185%);
  backdrop-filter: blur(30px) saturate(185%);
}

.site-header::before {
  content: none;
}

body.dark .site-header {
  border-color: rgba(255,255,255,.2);
  background:
    linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.035) 52%, rgba(69,213,198,.08)),
    rgba(12,20,34,.58);
}

.nav-links {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}

.nav-links a {
  display: grid;
  min-width: 92px;
  min-height: 62px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: .72rem;
  line-height: 1;
}

.nav-links a svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms cubic-bezier(.22,1,.36,1);
}

.nav-links a span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.nav-links a::after {
  content: none !important;
}

.nav-links a::before {
  inset: 0;
  border: 1px solid rgba(255,255,255,.48);
  background:
    linear-gradient(145deg, rgba(255,255,255,.5), rgba(255,255,255,.12) 58%, rgba(15,118,110,.08));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    inset 0 -1px 0 rgba(255,255,255,.18),
    0 9px 24px rgba(18,53,91,.12);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  transform: scale(.88);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}

.nav-links a:hover svg,
.nav-links a:focus-visible svg,
.nav-links a.is-active svg {
  transform: translateY(-1px) scale(1.07);
}

.theme-toggle {
  width: 54px;
  height: 54px;
  border-radius: 20px;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 72px;
  }

  .nav-links a {
    min-width: 72px;
    min-height: 56px;
    padding-inline: 8px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
    padding: 6px 7px;
    border-radius: 24px;
  }

  .brand {
    display: none;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .nav-links {
    justify-content: flex-start;
    border-radius: 19px;
  }

  .nav-links a {
    min-width: 64px;
    min-height: 52px;
    padding: 6px 7px;
    border-radius: 16px;
  }

  .nav-links a svg {
    width: 21px;
    height: 21px;
  }

  .nav-links a span {
    font-size: .6rem;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }
}

/* Cascade lock: keep the final floating dock after all legacy navbar rules. */
.site-header,
body.dark .site-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header::before { content: none; }

.nav-links {
  grid-column: 2;
  justify-self: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(87,101,120,.22);
  border-top-color: rgba(255,255,255,.92);
  border-radius: 28px;
  background: linear-gradient(145deg,rgba(255,255,255,.68),rgba(255,255,255,.30) 58%,rgba(230,240,243,.42));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(77,93,110,.1), 0 14px 38px rgba(36,48,60,.12);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
}

body.dark .nav-links {
  border-color: rgba(188,205,219,.34);
  background: linear-gradient(145deg,rgba(255,255,255,.14),rgba(255,255,255,.045) 58%,rgba(69,213,198,.05)),rgba(26,36,50,.60);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 14px 38px rgba(0,0,0,.24);
}

.nav-links a { min-width: 98px; min-height: 58px; }

.theme-toggle,
body.dark .theme-toggle {
  grid-column: 3;
  justify-self: end;
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

@media (max-width: 760px) {
  .site-header,
  body.dark .site-header {
    width: calc(100% - 16px);
    min-height: 64px;
    grid-template-columns: minmax(0,1fr) 38px;
    gap: 7px;
    padding: 0;
  }

  .nav-links {
    grid-column: 1;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
  }

  .nav-links a { min-width: 64px; min-height: 50px; }
  .theme-toggle,
  body.dark .theme-toggle { grid-column: 2; width: 38px; height: 38px; }
}

/* Mobile navigation */
.mobile-menu-toggle { display: none; }

@media (max-width: 760px) {
  .site-header,
  body.dark .site-header {
    grid-template-columns: minmax(0,1fr) 38px;
    align-items: start;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 3;
    display: inline-flex;
    grid-column: 1;
    width: max-content;
    min-width: 104px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(87,101,120,.22);
    border-top-color: rgba(255,255,255,.9);
    border-radius: 16px;
    padding: 0 15px;
    background: rgba(255,255,255,.55);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 28px rgba(36,48,60,.12);
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
  }

  body.dark .mobile-menu-toggle { border-color: rgba(255,255,255,.26); background: rgba(29,40,54,.72); }

  .menu-icon { display: grid; gap: 3px; width: 16px; }
  .menu-icon i { display: block; width: 16px; height: 1.5px; border-radius: 99px; background: currentColor; transition: transform 180ms ease, opacity 180ms ease; }
  .menu-open .menu-icon i:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-open .menu-icon i:nth-child(2) { opacity: 0; }
  .menu-open .menu-icon i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    z-index: 2;
    top: 52px;
    left: 0;
    display: grid;
    width: min(330px, calc(100vw - 70px));
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 5px;
    overflow: visible;
    padding: 7px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.97);
    transform-origin: top left;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(.22,1,.36,1), visibility 180ms ease;
  }

  .site-header.menu-open .nav-links { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-links a { min-width: 0; width: 100%; min-height: 66px; }
  .theme-toggle,
  body.dark .theme-toggle { position: relative; z-index: 3; }
}

/* Clearer light-mode glass and a compact floating theme orb */
body:not(.dark) .nav-links {
  border-color: rgba(92,110,128,.22);
  border-top-color: rgba(255,255,255,.94);
  background:
    linear-gradient(150deg, rgba(255,255,255,.38), rgba(255,255,255,.10) 56%, rgba(201,230,232,.19));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(68,87,105,.10),
    0 12px 34px rgba(31,48,61,.10);
  -webkit-backdrop-filter: blur(20px) saturate(190%) contrast(104%);
  backdrop-filter: blur(20px) saturate(190%) contrast(104%);
}

body:not(.dark) .nav-links::after {
  content: "";
  position: absolute;
  inset: 1px 12% auto;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.92),transparent);
  pointer-events: none;
}

body:not(.dark) .nav-links a::before {
  border-color: rgba(255,255,255,.64);
  background: linear-gradient(145deg,rgba(255,255,255,.54),rgba(255,255,255,.16) 58%,rgba(194,226,228,.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(35,54,68,.10);
}

.theme-toggle,
body.dark .theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border-width: 1px;
  transition: transform 220ms cubic-bezier(.22,1,.36,1), box-shadow 220ms ease, background 220ms ease;
}

body:not(.dark) .theme-toggle {
  border-color: rgba(90,108,124,.24);
  border-top-color: rgba(255,255,255,.92);
  background: linear-gradient(145deg,rgba(255,255,255,.46),rgba(255,255,255,.13));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94), 0 10px 26px rgba(31,48,61,.11);
  -webkit-backdrop-filter: blur(18px) saturate(185%);
  backdrop-filter: blur(18px) saturate(185%);
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(7deg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 14px 30px rgba(15,118,110,.16);
}

.theme-toggle .sun-icon { transition: transform 300ms cubic-bezier(.22,1,.36,1), background 220ms ease, box-shadow 220ms ease; }
.theme-toggle:hover .sun-icon { transform: scale(1.08); }
body.dark .theme-toggle .sun-icon { transform: rotate(-18deg); }
body.dark .theme-toggle:hover .sun-icon { transform: rotate(-10deg) scale(1.08); }

@media (max-width:760px) {
  .theme-toggle,
  body.dark .theme-toggle { width: 38px; height: 38px; }
}

/* Unified liquid-glass career metrics */
.hero {
  grid-template-columns: minmax(0,1fr);
  align-content: center;
  gap: clamp(30px,5vh,48px);
}

.hero-copy {
  max-width: 800px;
}

.hero-stats {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(93,109,124,.2);
  border-top-color: rgba(255,255,255,.9);
  border-radius: 28px;
  background: linear-gradient(145deg,rgba(255,255,255,.37),rgba(255,255,255,.1) 56%,rgba(201,230,232,.17));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92),0 18px 44px rgba(31,48,61,.1);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}

body.dark .hero-stats {
  border-color: rgba(188,205,219,.24);
  background: linear-gradient(145deg,rgba(255,255,255,.11),rgba(255,255,255,.035) 60%,rgba(69,213,198,.05)),rgba(23,33,46,.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18),0 18px 44px rgba(0,0,0,.22);
}

.hero-stats article,
body.dark .hero-stats article {
  position: relative;
  display: grid;
  min-height: 170px;
  align-content: center;
  justify-items: center;
  padding: 24px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-stats article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 0;
  width: 1px;
  height: 60%;
  background: linear-gradient(transparent,var(--line),transparent);
}

.stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 7px;
  border: 1px solid color-mix(in srgb,var(--teal) 22%,transparent);
  border-radius: 12px;
  background: color-mix(in srgb,var(--teal) 8%,transparent);
  color: var(--teal);
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-stats .stat-number {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: clamp(2.25rem,4vw,3.4rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
}

.stat-number::before { content: none; }
.stat-number::after { content: "+"; font-size: .58em; vertical-align: top; margin-left: 2px; }

.hero-stats p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width:760px) {
  .hero-stats { grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 23px; }
  .hero-stats article { min-height: 148px; padding: 19px 12px; }
  .hero-stats article:nth-child(2)::after { content: none; }
  .hero-stats article:nth-child(-n+2)::before {
    content: "";
    position: absolute;
    right: 14%;
    bottom: 0;
    left: 14%;
    height: 1px;
    background: linear-gradient(90deg,transparent,var(--line),transparent);
  }
}

/* Stacked mobile menu and progressive back-to-top control */
.scroll-top {
  --scroll-progress: 0;
  position: fixed;
  z-index: 20;
  right: clamp(14px,2.2vw,28px);
  bottom: clamp(14px,2.2vw,28px);
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 50%;
  background: linear-gradient(145deg,rgba(255,255,255,.48),rgba(255,255,255,.12));
  color: var(--teal);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9),0 12px 30px rgba(22,42,56,.14);
  opacity: var(--scroll-progress);
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(calc((1 - var(--scroll-progress)) * 14px)) scale(calc(.88 + var(--scroll-progress) * .12));
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  transition: visibility 180ms ease,box-shadow 180ms ease,background 180ms ease;
}

.scroll-top.is-visible { visibility: visible; pointer-events: auto; }

.scroll-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  background: linear-gradient(145deg,rgba(255,255,255,.68),rgba(255,255,255,.2));
  box-shadow: inset 0 1px 0 #fff,0 16px 36px rgba(15,118,110,.2);
}

.scroll-top:focus-visible { outline: 2px solid color-mix(in srgb,var(--teal) 60%,#fff); outline-offset: 3px; }

body.dark .scroll-top {
  border-color: rgba(255,255,255,.24);
  background: linear-gradient(145deg,rgba(255,255,255,.14),rgba(255,255,255,.04)),rgba(24,35,49,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22),0 12px 30px rgba(0,0,0,.25);
}

@media (max-width:760px) {
  .nav-links {
    width: min(250px,calc(100vw - 70px));
    grid-template-columns: minmax(0,1fr);
    gap: 4px;
    padding: 7px;
  }

  .nav-links a {
    min-height: 56px;
    grid-template-columns: 28px 1fr;
    grid-auto-flow: column;
    justify-items: start;
    align-content: center;
    gap: 12px;
    padding: 9px 16px;
    text-align: left;
  }

  .nav-links a svg { width: 22px; height: 22px; }
  .nav-links a span { font-size: .72rem; }
  .scroll-top { right: 14px; bottom: 14px; width: 43px; height: 43px; }
}

@media (prefers-reduced-motion:reduce) {
  .scroll-top { transform: none; }
}

/* Compact career metrics bar */
.hero-stats {
  width: min(900px,100%);
  justify-self: center;
  border-radius: 24px;
}

.hero-stats article,
body.dark .hero-stats article {
  min-height: 118px;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  justify-items: center;
  column-gap: 9px;
  row-gap: 7px;
  padding: 15px 12px;
}

.stat-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 10px;
}

.stat-icon svg { width: 16px; height: 16px; }

.hero-stats .stat-number {
  margin: 0;
  font-size: clamp(2rem,3.2vw,2.75rem);
  letter-spacing: -.055em;
}

.hero-stats p {
  grid-column: 1 / -1;
  max-width: 170px;
  font-size: .76rem;
  line-height: 1.25;
}

.hero-stats article:not(:last-child)::after {
  top: 24%;
  height: 52%;
}

@media (max-width:760px) {
  .hero-stats { width: min(100%,440px); border-radius: 21px; }
  .hero-stats article,
  body.dark .hero-stats article { min-height: 112px; padding: 14px 9px; }
  .hero-stats .stat-number { font-size: clamp(1.9rem,10vw,2.35rem); }
  .hero-stats p { max-width: 138px; font-size: .7rem; }
}

/* Borderless executive metrics */
.hero-stats,
body.dark .hero-stats {
  width: min(880px,100%);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-stats article,
body.dark .hero-stats article {
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 9px 20px;
}

.stat-icon { display: none; }

.hero-stats .stat-number {
  font-size: clamp(2.25rem,3.8vw,3.15rem);
  color: var(--teal);
}

.hero-stats p {
  max-width: none;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero-stats article:not(:last-child)::after {
  top: 12%;
  height: 76%;
  background: linear-gradient(transparent,color-mix(in srgb,var(--muted) 34%,transparent),transparent);
}

@media (max-width:760px) {
  .hero-stats,
  body.dark .hero-stats { width: min(100%,420px); }

  .hero-stats article,
  body.dark .hero-stats article { min-height: 105px; padding: 14px 10px; }

  .hero-stats article:nth-child(2)::after { content: none; }
  .hero-stats .stat-number { font-size: clamp(2.1rem,11vw,2.7rem); }
  .hero-stats p { max-width: 145px; font-size: .64rem; letter-spacing: .06em; }
}

/* BA glass reveal and cinematic content entrances */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb,var(--bg) 72%,transparent);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  transition: opacity 560ms cubic-bezier(.22,1,.36,1),visibility 560ms ease,backdrop-filter 560ms ease;
}

#preloader::before {
  content: "";
  position: absolute;
  width: min(480px,86vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--teal) 14%,transparent),transparent 68%);
  animation: introAura 1.6s ease-in-out infinite alternate;
}

#preloader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.preloader-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(390px,calc(100% - 40px));
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 17px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 25px;
  background: linear-gradient(145deg,rgba(255,255,255,.40),rgba(255,255,255,.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85),0 22px 60px rgba(18,42,58,.14);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  animation: glassCardIn 680ms cubic-bezier(.16,1,.3,1) both;
}

body.dark .preloader-content {
  border-color: rgba(255,255,255,.2);
  background: linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.035)),rgba(19,29,42,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2),0 24px 64px rgba(0,0,0,.28);
}

.preloader-logo {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 21px;
  background: linear-gradient(135deg,var(--navy),var(--teal));
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28),0 14px 34px rgba(15,118,110,.22);
}

.preloader-wordmark { display: grid; gap: 5px; text-align: left; }
.preloader-wordmark strong { font-size: 1.08rem; letter-spacing: -.025em; }
.preloader-wordmark span { color: var(--muted); font-size: .69rem; font-weight: 700; letter-spacing: .04em; }

.preloader-line {
  grid-column: 1 / -1;
  width: 100%;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb,var(--line) 72%,transparent);
}

.preloader-line::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,transparent,var(--teal),var(--gold),transparent);
  animation: introLine 900ms cubic-bezier(.65,0,.35,1) both;
}

[data-reveal] {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0,34px,0) scale(.985);
  transition:
    opacity 760ms cubic-bezier(.16,1,.3,1) var(--reveal-delay,0ms),
    transform 820ms cubic-bezier(.16,1,.3,1) var(--reveal-delay,0ms),
    filter 720ms ease var(--reveal-delay,0ms);
  will-change: opacity,transform,filter;
}

[data-reveal].is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0,0,0) scale(1);
}

.site-header[data-reveal] { transform: translate(-50%,-18px) scale(.97); }
.site-header[data-reveal].is-visible { transform: translate(-50%,0) scale(1); }

.hero-copy.is-visible > * { animation: heroPieceIn 720ms cubic-bezier(.16,1,.3,1) both; }
.hero-copy.is-visible > :nth-child(1) { animation-delay: 80ms; }
.hero-copy.is-visible > :nth-child(2) { animation-delay: 160ms; }
.hero-copy.is-visible > :nth-child(3) { animation-delay: 240ms; }
.hero-copy.is-visible > :nth-child(4) { animation-delay: 320ms; }

.hero-stats.is-visible article { animation: metricRise 680ms cubic-bezier(.16,1,.3,1) both; }
.hero-stats.is-visible article:nth-child(1) { animation-delay: 120ms; }
.hero-stats.is-visible article:nth-child(2) { animation-delay: 200ms; }
.hero-stats.is-visible article:nth-child(3) { animation-delay: 280ms; }
.hero-stats.is-visible article:nth-child(4) { animation-delay: 360ms; }

.work-grid.is-visible .work-card,
.certifications-carousel.is-visible .certificate-card,
.timeline-carousel.is-visible .timeline-item { animation: cardCascade 680ms cubic-bezier(.16,1,.3,1) both; }
.work-grid.is-visible .work-card:nth-child(2n),
.certifications-carousel.is-visible .certificate-card:nth-child(2n),
.timeline-carousel.is-visible .timeline-item:nth-child(2n) { animation-delay: 90ms; }
.work-grid.is-visible .work-card:nth-child(3n),
.certifications-carousel.is-visible .certificate-card:nth-child(3n) { animation-delay: 160ms; }

@keyframes glassCardIn { from { opacity:0; transform:translateY(18px) scale(.94); filter:blur(12px); } to { opacity:1; transform:none; filter:blur(0); } }
@keyframes introLine { from { transform:translateX(-115%); } to { transform:translateX(235%); } }
@keyframes introAura { from { transform:scale(.92); opacity:.48; } to { transform:scale(1.06); opacity:.8; } }
@keyframes heroPieceIn { from { opacity:0; transform:translateY(22px); filter:blur(7px); } to { opacity:1; transform:none; filter:blur(0); } }
@keyframes metricRise { from { opacity:0; transform:translateY(20px) scale(.96); } to { opacity:1; transform:none; } }
@keyframes cardCascade { from { opacity:0; transform:translateY(26px) scale(.975); filter:blur(6px); } to { opacity:1; transform:none; filter:blur(0); } }

@media (prefers-reduced-motion:reduce) {
  #preloader { display:none; }
  [data-reveal],
  [data-reveal].is-visible,
  .hero-copy.is-visible > *,
  .hero-stats.is-visible article,
  .work-grid.is-visible .work-card,
  .certifications-carousel.is-visible .certificate-card,
  .timeline-carousel.is-visible .timeline-item { opacity:1; filter:none; transform:none; animation:none; transition:none; }
}

/* Centered legal footer */
footer {
  justify-content: center;
  text-align: center;
}

@media (max-width:620px) {
  footer {
    align-items: center;
    text-align: center;
  }
}

/* Ultra-clear liquid glass loader */
#preloader {
  background:
    radial-gradient(circle at 50% 46%,color-mix(in srgb,var(--teal) 7%,transparent),transparent 25rem),
    color-mix(in srgb,var(--bg) 48%,transparent);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

.monogram-glass {
  border-color: rgba(255,255,255,.38);
  background:
    linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.018) 62%,rgba(15,118,110,.035));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.58),
    inset 0 -1px 0 rgba(62,84,101,.08),
    0 22px 54px rgba(18,53,91,.12);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  backdrop-filter: blur(18px) saturate(190%);
}

.monogram-glass::before {
  inset: -42% 38% 48% -24%;
  background: rgba(255,255,255,.2);
  filter: blur(18px);
}

body.dark .monogram-glass {
  border-color: rgba(255,255,255,.16);
  background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.012) 65%,rgba(69,213,198,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 24px 58px rgba(0,0,0,.2);
}

/* Mobile: one compact desktop-style glass dock, including theme control */
@media (max-width:760px) {
  .site-header,
  body.dark .site-header {
    top: 10px;
    display: grid;
    width: calc(100% - 12px);
    min-height: 62px;
    grid-template-columns: minmax(0,1fr) 34px;
    align-items: center;
    gap: 3px;
    padding: 5px;
    border: 1px solid rgba(80,99,116,.34);
    border-top-color: rgba(255,255,255,.88);
    border-radius: 24px;
    background: linear-gradient(145deg,rgba(255,255,255,.72),rgba(245,250,250,.55));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92),0 12px 30px rgba(31,48,61,.14);
    -webkit-backdrop-filter: blur(24px) saturate(175%);
    backdrop-filter: blur(24px) saturate(175%);
  }

  body.dark .site-header {
    border-color: rgba(191,207,221,.3);
    background: linear-gradient(145deg,rgba(42,55,70,.88),rgba(21,33,47,.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18),0 14px 34px rgba(0,0,0,.28);
  }

  .mobile-menu-toggle { display:none; }

  .nav-links,
  body:not(.dark) .nav-links,
  body.dark .nav-links {
    position: static;
    display: grid;
    grid-column: 1;
    width: 100%;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 1px;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 19px;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-links a {
    width: auto;
    min-width: 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 1px;
    border-radius: 15px;
    text-align: center;
  }

  .nav-links a svg { width:18px; height:18px; }
  .nav-links a span {
    display:block;
    width:100%;
    overflow:hidden;
    font-size:clamp(.42rem,1.75vw,.56rem);
    line-height:1;
    letter-spacing:-.025em;
    text-overflow:clip;
    white-space:nowrap;
  }

  .theme-toggle,
  body.dark .theme-toggle {
    position:relative;
    z-index:3;
    grid-column:2;
    justify-self:center;
    width:32px;
    height:32px;
    border-radius:12px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45);
  }

  .theme-toggle .sun-icon { width:13px; height:13px; }
}

@media (max-width:370px) {
  .site-header,
  body.dark .site-header { width:calc(100% - 8px); gap:1px; padding:4px; }
  .nav-links a svg { width:17px; height:17px; }
  .nav-links a span { font-size:.41rem; }
  .theme-toggle,
  body.dark .theme-toggle { width:30px; height:30px; }
}

/* Desktop keeps its independent theme orb. */
.mobile-theme-toggle { display:none; }

/* Professional side drawer navigation for phones */
@media (max-width:760px) {
  body.mobile-nav-open { overflow:hidden; }

  .site-header,
  body.dark .site-header {
    top:12px;
    right:auto;
    left:12px;
    display:block;
    width:auto;
    min-height:0;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
    transform:none;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }

  .site-header[data-reveal],
  .site-header[data-reveal].is-visible { transform:none; }

  .mobile-menu-toggle,
  body.dark .mobile-menu-toggle {
    position:relative;
    z-index:12;
    display:inline-flex;
    width:48px;
    min-width:48px;
    height:48px;
    min-height:48px;
    padding:0;
    border:1px solid rgba(84,104,120,.32);
    border-top-color:rgba(255,255,255,.9);
    border-radius:17px;
    background:linear-gradient(145deg,rgba(255,255,255,.76),rgba(239,247,247,.58));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.92),0 12px 32px rgba(24,45,58,.15);
    color:var(--text);
    -webkit-backdrop-filter:blur(22px) saturate(180%);
    backdrop-filter:blur(22px) saturate(180%);
  }

  body.dark .mobile-menu-toggle {
    border-color:rgba(255,255,255,.22);
    background:linear-gradient(145deg,rgba(57,72,88,.88),rgba(23,34,48,.8));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 14px 34px rgba(0,0,0,.28);
  }

  .mobile-menu-toggle > span:last-child { display:none; }
  .menu-icon { gap:4px; width:18px; }
  .menu-icon i { width:18px; height:2px; }
  .menu-open .menu-icon i:first-child { transform:translateY(6px) rotate(45deg); }
  .menu-open .menu-icon i:last-child { transform:translateY(-6px) rotate(-45deg); }

  .nav-links,
  body:not(.dark) .nav-links,
  body.dark .nav-links {
    position:fixed;
    z-index:10;
    top:8px;
    right:auto;
    left:8px;
    display:flex;
    width:min(304px,calc(100vw - 28px));
    height:calc(100dvh - 16px);
    grid-template-columns:none;
    flex-direction:column;
    justify-content:flex-start;
    gap:7px;
    overflow-y:auto;
    padding:82px 12px 16px;
    border:1px solid rgba(86,106,123,.34);
    border-top-color:rgba(255,255,255,.9);
    border-radius:28px;
    background:linear-gradient(155deg,rgba(255,255,255,.84),rgba(241,247,247,.72));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.94),24px 0 70px rgba(20,38,51,.18),0 0 0 100vmax rgba(12,20,28,.28);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateX(calc(-100% - 24px)) scale(.985);
    transform-origin:left center;
    transition:opacity 240ms ease,transform 460ms cubic-bezier(.16,1,.3,1),visibility 240ms ease;
    -webkit-backdrop-filter:blur(30px) saturate(185%);
    backdrop-filter:blur(30px) saturate(185%);
  }

  body.dark .nav-links {
    border-color:rgba(188,207,220,.27);
    background:linear-gradient(155deg,rgba(48,63,79,.94),rgba(17,28,41,.88));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.16),24px 0 70px rgba(0,0,0,.34),0 0 0 100vmax rgba(0,0,0,.42);
  }

  .site-header.menu-open .nav-links {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateX(0) scale(1);
  }

  .nav-links a {
    flex:0 0 auto;
    width:100%;
    min-height:58px;
    display:grid;
    grid-template-columns:44px 1fr;
    align-items:center;
    justify-items:start;
    gap:12px;
    padding:8px 13px;
    border:1px solid transparent;
    border-radius:18px;
    text-align:left;
    opacity:0;
    transform:translateX(-22px);
    transition:opacity 300ms ease,transform 420ms cubic-bezier(.16,1,.3,1),background 220ms ease,border-color 220ms ease;
  }

  .site-header.menu-open .nav-links a { opacity:1; transform:none; }
  .site-header.menu-open .nav-links a:nth-child(1) { transition-delay:70ms; }
  .site-header.menu-open .nav-links a:nth-child(2) { transition-delay:105ms; }
  .site-header.menu-open .nav-links a:nth-child(3) { transition-delay:140ms; }
  .site-header.menu-open .nav-links a:nth-child(4) { transition-delay:175ms; }
  .site-header.menu-open .nav-links a:nth-child(5) { transition-delay:210ms; }
  .site-header.menu-open .nav-links a:nth-child(6) { transition-delay:245ms; }

  .nav-links a:hover,
  .nav-links a:focus-visible,
  .nav-links a.is-active {
    border-color:rgba(15,118,110,.2);
    background:linear-gradient(135deg,rgba(255,255,255,.58),rgba(59,201,189,.1));
  }

  body.dark .nav-links a:hover,
  body.dark .nav-links a:focus-visible,
  body.dark .nav-links a.is-active { background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(69,213,198,.09)); }

  .nav-links a svg { width:22px; height:22px; justify-self:center; }
  .nav-links a span {
    display:block;
    width:auto;
    overflow:visible;
    font-size:.8rem;
    font-weight:750;
    letter-spacing:0;
    text-overflow:unset;
  }

  .site-header > .theme-toggle:not(.mobile-theme-toggle) { display:none; }

  .nav-links .mobile-theme-toggle,
  body.dark .nav-links .mobile-theme-toggle {
    position:static;
    display:grid;
    width:100%;
    height:54px;
    min-height:54px;
    grid-template-columns:44px 1fr;
    justify-items:start;
    align-items:center;
    gap:12px;
    margin-top:auto;
    padding:8px 13px;
    border-radius:18px;
  }

  .nav-links .mobile-theme-toggle .sun-icon { justify-self:center; }
  .mobile-theme-label { display:block; font-size:.76rem; font-weight:750; color:var(--text); }
}

/* Refined section motion: varied entrances while preserving the current identity */
@media (min-width:761px) and (prefers-reduced-motion:no-preference) {
  main > .section:nth-of-type(even) > [data-reveal]:not(.section-heading):not(.section-kicker) {
    transform:translate3d(34px,28px,0) scale(.98);
  }
  main > .section:nth-of-type(odd) > [data-reveal]:not(.section-heading):not(.section-kicker) {
    transform:translate3d(-34px,28px,0) scale(.98);
  }
  main > .section > [data-reveal].is-visible { transform:translate3d(0,0,0) scale(1); }
}

.section-heading h2,
.section-kicker h2 { position:relative; }
.section-heading h2::after,
.section-kicker h2::after {
  content:"";
  display:block;
  width:54px;
  height:3px;
  margin-top:15px;
  border-radius:99px;
  background:linear-gradient(90deg,var(--teal),var(--gold));
  transform:scaleX(0);
  transform-origin:left;
  transition:transform 720ms cubic-bezier(.16,1,.3,1) 280ms;
}
.section-heading.is-visible h2::after,
.section-kicker.is-visible h2::after { transform:scaleX(1); }

/* Progressive signature loader */
#preloader {
  --load-percent: 0%;
  background:
    radial-gradient(circle at 50% 46%,color-mix(in srgb,var(--teal) 10%,transparent),transparent 27rem),
    color-mix(in srgb,var(--bg) 88%,transparent);
}

#preloader::before { content:none; }

.signature-loader {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: min(560px,calc(100vw - 40px));
  justify-items: center;
  gap: 18px;
}

.signature-wordmark {
  --signature-blur: 18px;
  --signature-opacity: .12;
  --signature-scale: .94;
  padding: 8px 22px 4px;
  color: var(--text);
  font-family: Allura,"Segoe Script","Brush Script MT",cursive;
  font-size: clamp(4rem,9vw,7.4rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: .01em;
  white-space: nowrap;
  opacity: var(--signature-opacity);
  filter: blur(var(--signature-blur));
  transform: scale(var(--signature-scale));
  transform-origin: center;
  text-shadow: 0 14px 35px color-mix(in srgb,var(--teal) 16%,transparent);
  will-change: filter,opacity,transform;
}

.signature-progress {
  display: grid;
  width: min(270px,70vw);
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

#loading-percent {
  min-width: 48px;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.signature-progress-track {
  display: block;
  width: 100%;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb,var(--line) 78%,transparent);
}

.signature-progress-track i {
  display: block;
  width: var(--load-percent);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--teal),var(--gold));
  box-shadow: 0 0 14px color-mix(in srgb,var(--teal) 38%,transparent);
}

#preloader.is-complete .signature-wordmark {
  text-shadow: 0 10px 30px color-mix(in srgb,var(--teal) 22%,transparent);
}

#preloader.is-leaving .signature-loader {
  opacity: 0;
  transform: translateY(-8px) scale(1.025);
  transition: opacity 520ms ease,transform 620ms cubic-bezier(.22,1,.36,1);
}

@media (max-width:620px) {
  .signature-loader { min-width: calc(100vw - 28px); gap: 15px; }
  .signature-wordmark { font-size: clamp(3.25rem,17vw,5.2rem); white-space: normal; text-align:center; }
}

@media (prefers-reduced-motion:reduce) {
  .signature-wordmark { opacity:1; filter:none; transform:none; }
}

/* Professional split signature mark */
.signature-wordmark {
  position: relative;
  display: grid;
  min-width: min(510px,88vw);
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: center;
  column-gap: 15px;
  padding: 4px 20px 24px;
  font-family: Inter,Arial,sans-serif;
  white-space: normal;
}

.signature-first {
  color: var(--text);
  font-family: Italianno,"Segoe Script",cursive;
  font-size: clamp(5.2rem,10vw,8.4rem);
  font-weight: 400;
  line-height: .68;
  letter-spacing: -.025em;
}

.signature-last {
  margin-bottom: 7px;
  color: var(--text);
  font-size: clamp(.76rem,1.45vw,1.05rem);
  font-weight: 700;
  letter-spacing: .3em;
  line-height: 1;
  text-transform: uppercase;
}

.signature-stroke {
  position: absolute;
  right: 5%;
  bottom: 0;
  width: 78%;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: .72;
}

.signature-stroke path {
  stroke-dasharray: 520;
  stroke-dashoffset: var(--stroke-offset,520px);
}

@media (max-width:620px) {
  .signature-wordmark {
    min-width: min(350px,92vw);
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 9px;
    padding-bottom: 22px;
  }

  .signature-first { font-size: clamp(5rem,25vw,7rem); }
  .signature-last { margin:0; font-size:.68rem; letter-spacing:.28em; }
  .signature-stroke { right:10%; width:80%; }
}

/* BA glass monogram loader */
.signature-loader {
  min-width: min(420px,calc(100vw - 36px));
  gap: 13px;
}

.monogram-glass {
  --monogram-blur: 10px;
  --monogram-opacity: .3;
  --monogram-scale: .9;
  --fill-level: 0%;
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 37px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.68),rgba(255,255,255,.2)),
    color-mix(in srgb,var(--surface) 40%,transparent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    inset 0 -1px 0 rgba(75,94,108,.1),
    0 24px 60px rgba(18,53,91,.22);
  opacity: var(--monogram-opacity);
  filter: blur(var(--monogram-blur));
  transform: scale(var(--monogram-scale));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  will-change: filter,opacity,transform;
}

.monogram-glass::before {
  content: "";
  position: absolute;
  inset: -35% 32% 42% -20%;
  border-radius: 50%;
  background: rgba(255,255,255,.48);
  filter: blur(16px);
  transform: rotate(-28deg);
  pointer-events: none;
}

body.dark .monogram-glass {
  border-color: rgba(255,255,255,.2);
  background: linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.025)),rgba(19,30,43,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2),0 26px 64px rgba(0,0,0,.3);
}

.monogram-letters {
  position: relative;
  color: transparent;
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -.09em;
  line-height: 1;
  -webkit-text-stroke: 1.25px color-mix(in srgb,var(--navy) 72%,var(--text));
}

.monogram-letters::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(145deg,var(--navy),var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0;
  clip-path: inset(calc(100% - var(--fill-level)) 0 0 0);
  text-shadow: 0 8px 22px color-mix(in srgb,var(--teal) 26%,transparent);
}

#preloader.is-complete .monogram-glass {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9),0 28px 70px color-mix(in srgb,var(--teal) 20%,transparent);
}

#preloader.is-leaving .monogram-glass {
  transform: translateY(-8px) scale(.82);
  transition: transform 620ms cubic-bezier(.22,1,.36,1);
}

@media (max-width:620px) {
  .monogram-glass { width:116px; height:116px; border-radius:33px; }
  .monogram-letters { font-size:2.85rem; }
}

/* Ultra-clear liquid glass loader */
#preloader {
  background:
    radial-gradient(circle at 50% 46%,color-mix(in srgb,var(--teal) 7%,transparent),transparent 25rem),
    color-mix(in srgb,var(--bg) 48%,transparent);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

.monogram-glass {
  border-color: rgba(255,255,255,.38);
  background: linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.018) 62%,rgba(15,118,110,.035));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.58),
    inset 0 -1px 0 rgba(62,84,101,.08),
    0 22px 54px rgba(18,53,91,.12);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  backdrop-filter: blur(18px) saturate(190%);
}

.monogram-glass::before {
  inset: -42% 38% 48% -24%;
  background: rgba(255,255,255,.2);
  filter: blur(18px);
}

body.dark .monogram-glass {
  border-color: rgba(255,255,255,.16);
  background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.012) 65%,rgba(69,213,198,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 24px 58px rgba(0,0,0,.2);
}
