/*
  Muhammad Usman Portfolio 2026
  Core style system: premium cyan/white SaaS UI with glass cards, soft blobs, wave sections, and dark navy footer.
*/
:root {
  --primary: #42C8FF;
  --secondary: #8ED8FF;
  --accent: #0F172A;
  --background: #F8FBFF;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 16px 40px rgba(66, 200, 255, 0.16);
  --navy: #0b2f4a;
  --navy-2: #08263d;
  --radius-lg: 34px;
  --radius-md: 24px;
  --radius-sm: 16px;
  --max-width: 1180px;
  --header-height: 70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text);
  overflow-x: clip;
  cursor: auto;
}

body.dark-mode {
  --background: #071421;
  --surface: rgba(10, 31, 51, 0.72);
  --surface-solid: #0b1f33;
  --text: #e5f4ff;
  --muted: #a6bdd1;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 16px 40px rgba(66, 200, 255, 0.12);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button, a, .tilt-card { cursor: pointer; }
::selection { background: rgba(66, 200, 255, 0.35); color: var(--accent); }

h1, h2, h3, h4 {
  font-family: 'Poppins', system-ui, sans-serif;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0;
}

p { margin: 0; line-height: 1.75; color: var(--muted); }
strong { color: var(--text); }

.site-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eaf9ff 0%, #ffffff 55%, #ccefff 100%);
  transition: opacity .55s ease, visibility .55s ease;
  animation: loaderFailsafe 1ms linear 2.5s forwards;
}
.site-loader.hide { opacity: 0; visibility: hidden; }
.loader-orb {
  width: 92px; height: 92px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.loader-orb::before {
  content: ""; position: absolute; inset: -8px;
  border-radius: inherit;
  border: 4px solid rgba(66, 200, 255, .18);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
.loader-orb span { font-weight: 800; color: var(--accent); letter-spacing: -.06em; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9998;
  box-shadow: 0 0 16px rgba(66,200,255,.65);
}

.container { width: min(var(--max-width), calc(100% - 40px)); margin-inline: auto; }
.section { padding: 80px 0; position: relative; }
.section.compact { padding: 58px 0; }
.section-heading { max-width: 700px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(66, 200, 255, .35);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #0878a4;
  font-size: .82rem; font-weight: 700;
  box-shadow: 0 14px 36px rgba(66, 200, 255, .10);
  backdrop-filter: blur(15px);
}
.dark-mode .eyebrow { background: rgba(255,255,255,.08); color: #b8ecff; }
.eyebrow i { color: var(--primary); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.8rem); line-height: 1.1; margin-top: 14px; }
.section-subtitle { margin-top: 16px; font-size: 1.02rem; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent), #0b88b8, var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dark-mode .gradient-text { background: linear-gradient(90deg, #ffffff, #b8ecff, var(--primary)); -webkit-background-clip: text; background-clip: text; }

.site-header {
  position: sticky; top: 0; left: 0; width: 100%; z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 14px 42px rgba(15, 23, 42, .07);
  backdrop-filter: blur(24px);
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 55px rgba(15, 23, 42, .10);
}
.dark-mode .site-header { background: rgba(7, 20, 33, .82); border-color: rgba(255,255,255,.10); }
.dark-mode .site-header.scrolled { background: rgba(7, 20, 33, .94); }
.nav-shell {
  height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.dark-mode .nav-shell { background: transparent; border-color: transparent; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.04em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: #0F172A;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.dark-mode .brand-mark {
  background: #FFFFFF;
  color: #0F172A;
}
.brand small { display: block; color: var(--muted); font-weight: 700; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.nav-links a {
  display: inline-flex; padding: 10px 12px; border-radius: 12px;
  color: var(--muted); font-size: .86rem; font-weight: 800;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: rgba(66, 200, 255, .13); transform: translateY(-1px); }
.dark-mode .nav-links a:hover, .dark-mode .nav-links a.active { color: white; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .menu-toggle {
  width: 42px; height: 42px; border-radius: 14px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  color: var(--accent);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.dark-mode .icon-btn, .dark-mode .menu-toggle { background: rgba(255,255,255,.08); color: white; }
.icon-btn:hover, .menu-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.menu-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-weight: 900; font-size: .94rem;
  position: relative; overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: transform .55s ease;
}
.btn:hover::after { transform: translateX(120%) skewX(-18deg); }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 18px 42px rgba(15, 23, 42, .22); }
.btn-primary:hover { box-shadow: 0 22px 50px rgba(15, 23, 42, .28); }
.btn-light { background: rgba(255, 255, 255, .72); color: var(--accent); border: 1px solid rgba(255,255,255,.8); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.dark-mode .btn-outline, .dark-mode .btn-light { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .82rem; }

.hero {
  min-height: calc(100vh - var(--header-height));
  padding: 60px 0 60px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(66, 200, 255, .25), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(142, 216, 255, .30), transparent 26%),
    linear-gradient(180deg, #dbf8ff 0%, var(--background) 74%);
}
.dark-mode .hero { background: radial-gradient(circle at 20% 20%, rgba(66,200,255,.16), transparent 30%), linear-gradient(180deg, #081d30 0%, var(--background) 74%); }
.hero::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 125px;
  background: var(--background);
  clip-path: ellipse(62% 72% at 50% 100%);
  z-index: 1;
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr .9fr; gap: 56px; align-items: center; }
.hero-content { max-width: 620px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: .97; margin-top: 14px; }
.hero-title-line { display: block; }
.hero-roles {
  margin-top: 18px;
  min-height: 38px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  font-weight: 800; color: #075e82;
}
.dark-mode .hero-roles { color: #b8ecff; }
.hero-copy { max-width: 560px; margin-top: 16px; font-size: .97rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.stat-card {
  padding: 14px 12px; border-radius: 18px;
  background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 12px 36px rgba(66,200,255,.12);
  backdrop-filter: blur(20px);
}
.dark-mode .stat-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.stat-card b { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; color: var(--accent); }
.dark-mode .stat-card b { color: white; }
.stat-card span { display: block; color: var(--muted); font-weight: 700; font-size: .74rem; margin-top: 3px; }

.hero-visual { position: relative; min-height: 460px; display: flex; align-items: center; justify-content: center; }
.photo-orbit {
  width: min(380px, 74vw); height: min(380px, 74vw);
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.50);
  box-shadow: 0 35px 100px rgba(66, 200, 255, .25);
  position: relative;
}
.photo-orbit::before, .photo-orbit::after {
  content: ""; position: absolute; border-radius: inherit; pointer-events: none;
}
.photo-orbit::before { inset: 28px; border: 16px solid rgba(255,255,255,.76); box-shadow: inset 0 0 30px rgba(66,200,255,.12); }
.photo-orbit::after { inset: -20px; border: 1px solid rgba(66,200,255,.30); animation: spin 18s linear infinite; border-left-color: transparent; }
.hero-photo {
  position: relative; z-index: 2;
  width: 76%; aspect-ratio: 1 / 1;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 34%;
  box-shadow: 0 30px 70px rgba(15,23,42,.22);
}
.orbit-item {
  position: absolute; top: 50%; left: 50%; z-index: 4;
  width: 0; height: 0; pointer-events: none;
  display: grid; place-items: center;
}
.floating-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 16px 35px rgba(15,23,42,.12);
  color: var(--text); font-size: .86rem; font-weight: 800;
  white-space: nowrap;
}
.orbit-item-one { animation: orbitOne 20s linear infinite; }
.orbit-item-two { animation: orbitTwo 24s linear infinite; }
.orbit-item-three { animation: orbitThree 28s linear infinite; }
.orbit-item-four { animation: orbitFour 25s linear infinite; }
.orbit-item-five { animation: orbitFive 31s linear infinite; }
.orbit-item-one .floating-badge { animation: counterOrbitOne 20s linear infinite; }
.orbit-item-two .floating-badge { animation: counterOrbitTwo 24s linear infinite; }
.orbit-item-three .floating-badge { animation: counterOrbitThree 28s linear infinite; }
.orbit-item-four .mini-avatar { animation: counterOrbitFour 25s linear infinite; }
.orbit-item-five .mini-avatar { animation: counterOrbitFive 31s linear infinite; }
.dark-mode .floating-badge { background: rgba(7,20,33,.80); border-color: rgba(255,255,255,.12); }
.floating-badge i { color: var(--primary); }
.mini-avatar { width: 54px; height: 54px; border-radius: 999px; object-fit: cover; border: 4px solid white; box-shadow: 0 14px 32px rgba(15,23,42,.15); }

/* Legacy class support for older cached markup. */
.hero-visual > .floating-badge {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 18px 50px rgba(15,23,42,.10);
  backdrop-filter: blur(18px);
  font-weight: 900; font-size: .82rem;
  width: fit-content;
  top: 50%; left: 50%;
  margin-left: -60px;
  margin-top: -20px;
  transform-origin: 60px 20px;
}

.blob { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .75; pointer-events: none; }
.blob-1 { width: 310px; height: 230px; background: rgba(66,200,255,.34); left: -95px; top: 210px; animation: blobMove 12s ease-in-out infinite; }
.blob-2 { width: 260px; height: 260px; background: rgba(142,216,255,.42); right: -86px; top: 420px; animation: blobMove 14s ease-in-out infinite reverse; }
.blob-3 { width: 140px; height: 140px; background: rgba(66,200,255,.26); left: 55%; bottom: 16%; animation: floatY 8s ease-in-out infinite; }

.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.cards-grid.two { grid-template-columns: repeat(2, 1fr); }
.glass-card, .project-card, .timeline-item, .certificate-card, .contact-card, .skill-panel {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  position: relative;
  overflow: hidden;
}
.dark-mode .glass-card, .dark-mode .project-card, .dark-mode .timeline-item, .dark-mode .certificate-card, .dark-mode .contact-card, .dark-mode .skill-panel {
  border-color: rgba(255,255,255,.10);
}
.glass-card::before, .project-card::before, .certificate-card::before, .skill-panel::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(66,200,255,.18), transparent 42%);
  opacity: 0; transition: opacity .35s ease;
}
.glass-card:hover::before, .project-card:hover::before, .certificate-card:hover::before, .skill-panel:hover::before { opacity: 1; }
.service-card { min-height: 185px; padding: 26px; }
.service-card.featured { background: linear-gradient(135deg, #0d6085, #117ea9); color: #fff; }
.service-card.featured p, .service-card.featured h3 { color: #fff; }
.card-icon {
  width: 48px; height: 48px; border-radius: 17px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.20);
  margin-bottom: 18px;
}
.service-card.featured .card-icon { background: rgba(255,255,255,.24); }
.card-title { font-size: 1.08rem; margin-bottom: 8px; }
.card-copy { font-size: .92rem; }

.split-grid { display: grid; grid-template-columns: .92fr 1fr; gap: 58px; align-items: center; }
.image-collage { position: relative; min-height: 480px; }
.circle-photo {
  position: absolute; border-radius: 999px; object-fit: cover;
  border: 8px solid rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  transition: left 1.05s cubic-bezier(.22, 1, .36, 1), top 1.05s cubic-bezier(.22, 1, .36, 1), right 1.05s cubic-bezier(.22, 1, .36, 1), bottom 1.05s cubic-bezier(.22, 1, .36, 1), width 1.05s cubic-bezier(.22, 1, .36, 1), height 1.05s cubic-bezier(.22, 1, .36, 1), border-radius 1.05s ease;
}
.circle-photo.main { width: 280px; height: 280px; left: 22%; top: 88px; }
.circle-photo.small-a { width: 150px; height: 150px; left: 0; top: 24px; }
.circle-photo.small-b { width: 150px; height: 150px; right: 18px; bottom: 40px; }
.circle-photo.small-c { width: 112px; height: 112px; left: 70px; bottom: 34px; }
.feature-list { display: grid; gap: 22px; margin-top: 28px; }
.feature-row { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.feature-row i { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: white; box-shadow: var(--shadow-soft); }
.feature-row h3 { font-size: 1.05rem; margin-bottom: 4px; }

.wave-section {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(228, 248, 255, .72), transparent);
}
.dark-mode .wave-section { background: linear-gradient(180deg, transparent, rgba(10, 31, 51, .7), transparent); }
.wave-blob {
  position: absolute; width: 420px; height: 320px; border-radius: 44% 56% 65% 35% / 38% 42% 58% 62%;
  background: rgba(66, 200, 255, .42); z-index: 0;
}
.wave-left { left: -150px; top: 80px; }
.wave-right { right: -145px; bottom: 45px; }
.section > .container { position: relative; z-index: 1; }

.program-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.program-card { padding: 34px; min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.program-stack { position: relative; min-height: 420px; }
.program-tile { position: absolute; width: 250px; min-height: 310px; padding: 30px; border-radius: 28px; box-shadow: var(--shadow); }
.program-tile.primary { left: 60px; top: 34px; background: linear-gradient(160deg, #43c8ff, #7cdcff); color: white; }
.program-tile.primary h3, .program-tile.primary p { color: white; }
.program-tile.secondary { right: 20px; top: 110px; background: rgba(255,255,255,.8); }
.dark-mode .program-tile.secondary { background: rgba(255,255,255,.08); }
.program-tile i { font-size: 2rem; margin-bottom: 26px; }

.page-hero {
  padding: 40px 0 100px;
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 18% 20%, rgba(66,200,255,.28), transparent 30%), linear-gradient(180deg, #e6f9ff 0%, var(--background) 100%);
}
.dark-mode .page-hero { background: radial-gradient(circle at 18% 20%, rgba(66,200,255,.14), transparent 30%), linear-gradient(180deg, #081d30 0%, var(--background) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(3rem, 6vw, 5.6rem); line-height: .95; max-width: 850px; margin-top: 18px; }
.page-hero p { max-width: 720px; margin-top: 20px; font-size: 1.08rem; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; font-weight: 800; }
.breadcrumb a { color: #0878a4; }

.project-card { padding: 0; transition: transform .3s ease, box-shadow .3s ease; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(66,200,255,.20); }
.project-media {
  min-height: 210px; padding: 24px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.8), transparent 32%), linear-gradient(135deg, rgba(66,200,255,.75), rgba(15,23,42,.90));
  position: relative; overflow: hidden;
}
.project-media::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 999px; background: rgba(255,255,255,.13); right: -54px; bottom: -54px; }
.project-media i { font-size: 3.8rem; color: rgba(255,255,255,.86); position: relative; z-index: 1; }
.project-body { padding: 26px; }
.project-body h3 { font-size: 1.36rem; margin-bottom: 10px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.tag {
  display: inline-flex; padding: 7px 10px; border-radius: 999px;
  background: rgba(66,200,255,.12); color: #077aa8;
  font-weight: 800; font-size: .76rem;
}
.dark-mode .tag { color: #b8ecff; background: rgba(66,200,255,.16); }
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-btn {
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px;
  background: rgba(255,255,255,.60); color: var(--muted); font-weight: 900;
  transition: .25s ease;
}
.dark-mode .filter-btn { background: rgba(255,255,255,.06); }
.filter-btn.active, .filter-btn:hover { color: white; background: var(--accent); transform: translateY(-2px); }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 10000; padding: 12px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; transition: top .2s ease; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid #007cae; outline-offset: 3px; }

.timeline { position: relative; display: grid; gap: 24px; max-width: 920px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 24px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--primary), transparent); }
.timeline-item { padding: 26px 28px 26px 78px; }
.timeline-dot { position: absolute; left: 13px; top: 30px; width: 24px; height: 24px; border-radius: 999px; background: var(--primary); border: 6px solid var(--background); box-shadow: 0 0 0 8px rgba(66,200,255,.16); }
.timeline-date { display: inline-flex; color: #0878a4; font-weight: 900; font-size: .82rem; margin-bottom: 8px; }
.timeline h3 { font-size: 1.35rem; margin-bottom: 8px; }
.timeline ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }

.skill-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.skill-panel { padding: 28px; }
.skill-panel h3 { font-size: 1.34rem; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.skill-panel h3 i { color: var(--primary); }
.skill-row { margin-bottom: 20px; }
.skill-meta { display: flex; justify-content: space-between; font-weight: 900; font-size: .88rem; margin-bottom: 9px; }
.skill-track { height: 10px; border-radius: 999px; background: rgba(15,23,42,.08); overflow: hidden; }
.dark-mode .skill-track { background: rgba(255,255,255,.10); }
.skill-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--secondary)); width: 0; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.skill-chip { padding: 10px 13px; border-radius: 999px; background: rgba(66,200,255,.12); color: #0878a4; font-weight: 900; font-size: .83rem; }
.dark-mode .skill-chip { color: #b8ecff; }

.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.certificate-card { display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.certificate-card:hover { transform: translateY(-8px); box-shadow: 0 34px 80px rgba(66,200,255,.17); }
.cert-thumb { height: 205px; overflow: hidden; background: #ecf8ff; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .45s ease; }
.certificate-card:hover .cert-thumb img { transform: scale(1.06); }
.cert-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cert-body h3 { font-size: 1.05rem; line-height: 1.22; }
.cert-meta { color: var(--muted); font-size: .84rem; font-weight: 700; }
.cert-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cert-code { font-family: 'Space Grotesk', monospace; font-size: .75rem; font-weight: 900; color: #0878a4; }

.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; align-items: start; }
.contact-card { padding: 32px; }
.contact-list { display: grid; gap: 18px; margin-top: 28px; }
.contact-item { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; }
.contact-item i { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: white; }
.contact-item span { display: block; color: var(--muted); font-size: .84rem; font-weight: 800; }
.contact-item a, .contact-item b { font-weight: 900; color: var(--text); word-break: break-word; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-field { display: grid; gap: 8px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
label { font-weight: 900; font-size: .86rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 15px; background: rgba(255,255,255,.70); color: var(--text);
  outline: none; transition: border .25s ease, box-shadow .25s ease, background .25s ease;
}
.dark-mode input, .dark-mode textarea, .dark-mode select { background: rgba(255,255,255,.07); }
input:focus, textarea:focus, select:focus { border-color: rgba(66,200,255,.8); box-shadow: 0 0 0 4px rgba(66,200,255,.14); }
textarea { min-height: 150px; resize: vertical; }
.form-message { margin-top: 14px; font-weight: 800; }
.form-message.success { color: #059669; }
.form-message.error { color: #dc2626; }

.footer {
  position: relative;
  padding: 90px 0 30px;
  background: var(--navy);
  color: white;
  overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: -1px; height: 115px;
  background: var(--background);
  clip-path: ellipse(62% 72% at 50% 0%);
}
.footer::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 999px; right: -170px; bottom: -170px; background: rgba(66,200,255,.07); }
.footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .75fr .75fr 1fr; gap: 34px; padding-top: 40px; }
.footer h3, .footer h4 { color: white; }
.footer p, .footer a, .footer li { color: rgba(255,255,255,.70); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; margin-bottom: 16px; }
.footer-brand span { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.footer ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.footer a:hover { color: white; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
.copyright { position: relative; z-index: 1; margin-top: 58px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.10); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.62); font-size: .9rem; }

.back-to-top {
  position: fixed; right: 20px; bottom: 22px; z-index: 998;
  width: 50px; height: 50px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: white; border: 0;
  box-shadow: 0 20px 50px rgba(15,23,42,.25);
  transform: translateY(100px); opacity: 0;
  transition: .3s ease;
}
.back-to-top.show { transform: translateY(0); opacity: 1; }

.custom-cursor, .cursor-dot { display: none !important; }

.placeholder-note { border: 1px dashed rgba(66,200,255,.55); background: rgba(66,200,255,.08); color: #0878a4; border-radius: 18px; padding: 14px 16px; font-weight: 800; font-size: .9rem; }
.dark-mode .placeholder-note { color: #b8ecff; }

/* Seamless headline ribbon and liquid motion additions */
.headline-ribbon {
  position: relative;
  overflow: hidden;
  padding: 38px 0 42px;
  background:
    radial-gradient(circle at 14% 28%, rgba(66,200,255,.22), transparent 24%),
    radial-gradient(circle at 88% 72%, rgba(142,216,255,.26), transparent 26%),
    linear-gradient(180deg, var(--background) 0%, rgba(228,248,255,.82) 100%);
  border-block: 1px solid rgba(66,200,255,.12);
}
.dark-mode .headline-ribbon {
  background:
    radial-gradient(circle at 14% 28%, rgba(66,200,255,.12), transparent 24%),
    radial-gradient(circle at 88% 72%, rgba(142,216,255,.10), transparent 26%),
    linear-gradient(180deg, var(--background) 0%, rgba(10,31,51,.72) 100%);
}
.headline-ribbon::before,
.headline-ribbon::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 3;
  pointer-events: none;
}
.headline-ribbon::before { left: 0; background: linear-gradient(90deg, var(--background), transparent); }
.headline-ribbon::after { right: 0; background: linear-gradient(270deg, var(--background), transparent); }
.headline-track { position: relative; z-index: 2; display: flex; width: 100%; overflow: hidden; margin: 8px 0; }
.headline-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  min-width: max-content;
  animation: seamlessMarquee 19s linear infinite;
  will-change: transform;
}
.headline-track.reverse .headline-strip { animation: seamlessMarqueeReverse 21s linear infinite; }
.headline-strip span {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(66,200,255,.22);
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 18px 45px rgba(66,200,255,.12);
  backdrop-filter: blur(18px);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  letter-spacing: -.02em;
}
.dark-mode .headline-strip span { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.10); }
.headline-strip i { color: var(--primary); }
.liquid-shape {
  position: absolute;
  pointer-events: none;
  border-radius: 48% 52% 61% 39% / 47% 35% 65% 53%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.72), transparent 22%),
    linear-gradient(135deg, rgba(66,200,255,.46), rgba(142,216,255,.22));
  filter: blur(.2px);
  opacity: .78;
  animation: liquidMorph 13s ease-in-out infinite;
  will-change: transform, border-radius;
}
.liquid-one { width: 210px; height: 160px; left: -70px; top: 14px; }
.liquid-two { width: 180px; height: 210px; right: -54px; bottom: -70px; animation-delay: -4s; }
.liquid-skills-a { width: 360px; height: 300px; left: -155px; top: 120px; opacity: .45; }
.liquid-skills-b { width: 260px; height: 320px; right: -120px; bottom: 80px; opacity: .50; animation-delay: -5s; }
.liquid-edu-a { width: 360px; height: 280px; left: -150px; top: 40px; opacity: .44; }
.liquid-edu-b { width: 310px; height: 360px; right: -130px; bottom: 130px; opacity: .48; animation-delay: -6s; }
.wave-blob { animation: liquidMorph 15s ease-in-out infinite; }
.blob { animation-name: blobMove, floatSoft; animation-duration: 14s, 8s; animation-timing-function: ease-in-out, ease-in-out; animation-iteration-count: infinite, infinite; }

/* Graphical animated skills */
.skills-visual-section { overflow: hidden; background: linear-gradient(180deg, var(--background), rgba(228,248,255,.62), var(--background)); }
.dark-mode .skills-visual-section { background: linear-gradient(180deg, var(--background), rgba(10,31,51,.72), var(--background)); }
.skills-dashboard {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.skill-graphic-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 178px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 30px;
  background: rgba(255,255,255,.70);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  transition: transform .38s cubic-bezier(.16,1,.3,1), box-shadow .38s cubic-bezier(.16,1,.3,1), border-color .38s ease;
}
.dark-mode .skill-graphic-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.11); }
.skill-graphic-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent, rgba(66,200,255,.22), transparent);
  opacity: 0;
  transform: translateX(-80%);
  transition: opacity .35s ease;
}
.skill-graphic-card:hover { transform: translateY(-8px); box-shadow: 0 34px 85px rgba(66,200,255,.20); border-color: rgba(66,200,255,.30); }
.skill-graphic-card:hover::before { opacity: 1; animation: shinePass 1.15s ease; }
.skill-orb {
  --value: 0%;
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--primary) var(--value), rgba(15,23,42,.08) 0),
    radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,.46));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.70), 0 18px 44px rgba(66,200,255,.18);
  animation: pulseRing 3.5s ease-in-out infinite;
}
.dark-mode .skill-orb { background: conic-gradient(var(--primary) var(--value), rgba(255,255,255,.10) 0), radial-gradient(circle, rgba(13,37,58,.90), rgba(13,37,58,.54)); }
.skill-orb::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: var(--surface-solid);
  box-shadow: inset 0 0 28px rgba(66,200,255,.10);
}
.skill-value {
  position: relative;
  z-index: 2;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--text);
}
.orbit-dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  margin: -5px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(66,200,255,.9);
  animation: orbitSkill 5.6s linear infinite;
}
.orbit-dot.second { width: 7px; height: 7px; margin: -3.5px; animation-duration: 7.2s; animation-direction: reverse; opacity: .65; }
.skill-info { position: relative; z-index: 1; }
.skill-info i { color: var(--primary); font-size: 1.55rem; margin-bottom: 12px; }
.skill-info h3 { font-size: 1.16rem; margin-bottom: 6px; }
.skill-info p { font-size: .88rem; line-height: 1.58; }
.skill-cloud {
  margin: 34px auto 0;
  max-width: 980px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.skill-cloud span {
  padding: 11px 15px;
  border-radius: 16px;
  background: rgba(66,200,255,.12);
  color: #0878a4;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(66,200,255,.08);
  animation: floatSoft 6s ease-in-out infinite;
}
.skill-cloud span:nth-child(2n) { animation-delay: -1.5s; }
.skill-cloud span:nth-child(3n) { animation-delay: -3s; }
.dark-mode .skill-cloud span { color: #b8ecff; background: rgba(66,200,255,.14); }

/* Redesigned education page */
.education-canvas {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(66,200,255,.16), transparent 28%),
    radial-gradient(circle at 86% 46%, rgba(142,216,255,.20), transparent 30%),
    linear-gradient(180deg, var(--background), rgba(228,248,255,.58), var(--background));
}
.dark-mode .education-canvas { background: linear-gradient(180deg, var(--background), rgba(10,31,51,.72), var(--background)); }
.edu-highlight-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  margin-bottom: 82px;
}
.edu-focus-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 34px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.dark-mode .edu-focus-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.11); }
.edu-focus-card::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 48% 52% 61% 39% / 47% 35% 65% 53%;
  right: -70px; bottom: -70px;
  background: rgba(66,200,255,.14);
  animation: liquidMorph 12s ease-in-out infinite;
}
.edu-focus-card.primary { background: linear-gradient(145deg, rgba(66,200,255,.95), rgba(142,216,255,.72)); color: white; }
.edu-focus-card.primary h2, .edu-focus-card.primary p, .edu-focus-card.primary .edu-kicker, .edu-focus-card.primary .edu-meta-row { color: white; }
.edu-kicker { display: inline-flex; align-items: center; gap: 9px; color: #0878a4; font-weight: 900; margin-bottom: 18px; }
.edu-focus-card h2 { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.04; margin-bottom: 12px; }
.edu-meta-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; color: var(--text); font-weight: 900; }
.edu-meta-row span { padding: 10px 13px; border-radius: 14px; background: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.35); }
.edu-visual-meter { position: relative; z-index: 1; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(15,23,42,.08); }
.edu-visual-meter span { display: block; height: 100%; width: var(--meter); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--primary)); animation: meterSweep 1.5s cubic-bezier(.16,1,.3,1) both; }
.edu-focus-card.primary .edu-visual-meter { background: rgba(255,255,255,.34); }
.edu-focus-card.primary .edu-visual-meter span { background: white; }
.learning-roadmap {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}
.learning-roadmap::before {
  content: "";
  position: absolute;
  left: 50%; top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  transform: translateX(-50%);
}
.edu-roadmap-item {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 18px;
  align-items: start;
  width: calc(50% + 44px);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  background: rgba(255,255,255,.70);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.dark-mode .edu-roadmap-item { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.11); }
.edu-roadmap-item:nth-child(even) { margin-left: calc(50% - 44px); }
.edu-roadmap-item::after {
  content: attr(data-step);
  position: absolute;
  right: 22px; top: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.3rem;
  font-weight: 900;
  color: rgba(66,200,255,.13);
  line-height: 1;
}
.roadmap-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-soft);
}
.edu-roadmap-item h3 { font-size: 1.26rem; margin: 4px 0 8px; }
.edu-roadmap-item p { font-size: .94rem; }
.education-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 42px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  background: rgba(255,255,255,.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.dark-mode .education-metrics { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.11); }
.education-metrics div { padding: 18px; text-align: center; border-radius: 20px; background: rgba(66,200,255,.08); }
.education-metrics b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 2rem; color: var(--text); }
.education-metrics span { display: block; margin-top: 4px; color: var(--muted); font-weight: 900; font-size: .84rem; }


/* --- MOBILE GPU OPTIMIZATION --- */
@media (max-width: 768px) {
  :root {
    --surface: rgba(255, 255, 255, 0.98);
  }
  body.dark-mode {
    --surface: rgba(10, 31, 51, 0.98);
  }
  * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .stat-card, .floating-badge, .filter-btn, .edu-focus-card, .edu-roadmap-item, .certfx-card, .pj-card {
    background: var(--surface) !important;
  }
  .site-header, .site-header.scrolled {
    background: var(--surface) !important;
  }
}
