/* =========================================================
   Ahmed Ashraf — Portfolio
   ========================================================= */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --bg-3: #0f172a;
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #101a2e;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e6edf7;
  --muted: #94a3b8;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --grad: linear-gradient(120deg, #7c3aed 0%, #a855f7 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 58, 237, 0.16), rgba(34, 211, 238, 0.12));
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --nav-h: 72px;
  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 60rem at 85% -10%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(50rem 50rem at -10% 40%, rgba(34, 211, 238, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: rgba(124, 58, 237, 0.55); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--accent));
  border-radius: 10px;
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

/* ================= PRELOADER ================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: grid;
  place-content: center;
  gap: 22px;
  justify-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__logo {
  font-family: var(--font-head);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulseLogo 1.4s ease-in-out infinite;
}
.preloader__bar {
  width: 200px; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 40%;
  background: var(--grad);
  border-radius: 99px;
  animation: loadSlide 1.1s ease-in-out infinite;
}
@keyframes pulseLogo { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.75; } }
@keyframes loadSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ================= SCROLL PROGRESS ================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 1001; background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.8);
  transition: width 0.1s linear;
}

/* ================= CURSOR GLOW ================= */
.cursor-glow {
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.16), transparent 65%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease;
  opacity: 0;
  mix-blend-mode: screen;
}
@media (hover: hover) { .cursor-glow.on { opacity: 1; } }

/* ================= NAVBAR ================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex; align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}
/* Blur lives on a pseudo-element: a backdrop-filter on .navbar itself would
   turn it into a containing block and break the fixed mobile menu. */
.navbar::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.4s ease, border-color 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.navbar.scrolled {
  height: 62px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
.navbar.scrolled::before {
  opacity: 1;
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 20px; }
.nav__logo-badge {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-content: center;
  background: var(--grad); color: #fff;
  font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
  transition: transform 0.5s cubic-bezier(.2,1.6,.4,1);
}
.nav__logo:hover .nav__logo-badge { transform: rotate(-12deg) scale(1.08); }
.nav__logo-text em { font-style: normal; color: var(--accent); }

.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.nav__link::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 5px;
  height: 2px; border-radius: 99px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1);
}
.nav__link:hover { color: var(--text); transform: translateY(-2px); }
.nav__link:hover::after, .nav__link.active::after { transform: scaleX(1); }
.nav__link.active { color: #fff; }
.nav__link--cta {
  background: var(--grad-soft);
  border: 1px solid rgba(124, 58, 237, 0.45);
  color: #fff;
  margin-left: 6px;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { box-shadow: 0 10px 26px rgba(124,58,237,0.35); }
.nav__link--cta i { margin-right: 6px; }

.nav__burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer;
  padding: 8px; z-index: 1002;
}
.nav__burger span {
  width: 26px; height: 2.5px; border-radius: 99px;
  background: var(--text);
  transition: transform 0.35s ease, opacity 0.3s ease;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  overflow: hidden;
}
.hero__particles { position: absolute; inset: 0; z-index: 0; opacity: 0.75; }
.hero__orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; z-index: 0;
  animation: floatOrb 14s ease-in-out infinite;
}
.hero__orb--1 { width: 420px; height: 420px; background: #7c3aed; top: -120px; left: -120px; }
.hero__orb--2 { width: 340px; height: 340px; background: #0ea5e9; bottom: -100px; right: -60px; animation-delay: -5s; }
.hero__orb--3 { width: 260px; height: 260px; background: #22d3ee; top: 40%; right: 34%; animation-delay: -9s; opacity: 0.32; }
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -45px) scale(1.12); }
}

.hero__inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px; align-items: center;
}

.hero__hello {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255,255,255,0.03);
  font-size: 14.5px; color: var(--muted);
  animation: fadeUp 0.8s 0.15s both;
}
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(16deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(12deg); } }

.hero__name {
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.04;
  margin: 18px 0 8px;
  letter-spacing: -1.5px;
}
.hero__name-line { display: block; animation: fadeUp 0.9s both; }
.hero__name-line:nth-child(1) { animation-delay: 0.25s; }
.hero__name-line:nth-child(2) { animation-delay: 0.4s; }
.hero__name-line--accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(124,58,237,0.35));
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(19px, 2.6vw, 30px);
  font-weight: 600;
  color: var(--accent);
  min-height: 1.5em;
  animation: fadeUp 0.9s 0.55s both;
}
.caret { color: var(--primary-2); animation: blink 0.9s steps(2) infinite; font-weight: 400; }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

.hero__desc {
  margin-top: 20px;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  animation: fadeUp 0.9s 0.7s both;
}
.hero__desc strong { color: var(--text); font-weight: 600; }

.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 34px;
  animation: fadeUp 0.9s 0.85s both;
}

.hero__socials {
  display: flex; gap: 12px; margin-top: 34px;
  animation: fadeUp 0.9s 1s both;
}
.hero__socials a {
  width: 44px; height: 44px;
  display: grid; place-content: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  transition: all 0.35s cubic-bezier(.2,1.4,.4,1);
}
.hero__socials a:hover {
  color: #fff; transform: translateY(-6px) rotate(-6deg);
  border-color: transparent;
  background: var(--grad);
  box-shadow: 0 14px 30px rgba(124,58,237,0.45);
}

/* Hero avatar */
.hero__visual { display: grid; place-items: center; animation: zoomIn 1.1s 0.5s both; }
.hero__avatar { position: relative; width: min(360px, 78vw); aspect-ratio: 1; }
.hero__avatar-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(168,85,247,0.55);
  animation: spin 26s linear infinite;
}
.hero__avatar-ring--2 {
  inset: -26px;
  border-color: rgba(34,211,238,0.4);
  animation-duration: 38s; animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero__avatar-core {
  position: absolute; inset: 34px;
  z-index: 2;
  border-radius: 50%;
  padding: 9px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(168,85,247,0.75), rgba(34,211,238,0.55), rgba(124,58,237,0.75));
  border: 1px solid rgba(168,85,247,0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 60px rgba(124,58,237,0.35);
  animation: breathe 5s ease-in-out infinite;
}

/* Rotating comet ring around the photo */
.hero__avatar-glow {
  position: absolute; inset: 24px;
  z-index: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 56%,
    rgba(34, 211, 238, 0.95) 67%,
    rgba(168, 85, 247, 0.95) 76%,
    transparent 85%
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.75));
  animation: spin 4.5s linear infinite;
  pointer-events: none;
}

.hero__avatar-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #0b1120;
  --s: 1; --rx: 0deg; --ry: 0deg;
  transform: perspective(750px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform 0.4s cubic-bezier(.2,.9,.3,1);
  cursor: pointer;
}
.hero__avatar:hover .hero__avatar-photo { --s: 1.05; }

.hero__avatar-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 9%;
  display: block;
  animation: photoIn 1.2s cubic-bezier(.2,1.2,.3,1) 0.55s both;
  transition: filter 0.45s ease;
}
.hero__avatar:hover .hero__avatar-photo img {
  filter: saturate(1.18) contrast(1.05) brightness(1.03);
}
/* Soft vignette so the photo blends into the circular frame */
.hero__avatar-photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, transparent 55%, rgba(7,11,20,0.35) 100%),
    linear-gradient(180deg, rgba(124,58,237,0.10), transparent 35%);
  pointer-events: none;
}
@keyframes photoIn {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }

.hero__badge {
  position: absolute;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  border-radius: 14px;
  background: rgba(13, 20, 36, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  animation: floatBadge 5s ease-in-out infinite;
}
.hero__badge i { color: var(--accent); }
.hero__badge--1 { top: 6%; left: -14%; animation-delay: 0s; }
.hero__badge--2 { top: 26%; right: -18%; animation-delay: -1.4s; }
.hero__badge--3 { bottom: 24%; left: -20%; animation-delay: -2.6s; }
.hero__badge--4 { bottom: 4%; right: -8%; animation-delay: -3.8s; }
@keyframes floatBadge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: 12px; letter-spacing: 3px;
  z-index: 3;
  animation: fadeUp 1s 1.4s both;
}
.hero__scroll em { font-style: normal; text-transform: uppercase; }
.hero__scroll-mouse {
  width: 26px; height: 42px;
  border: 2px solid rgba(148,163,184,0.5);
  border-radius: 99px;
  display: flex; justify-content: center; padding-top: 7px;
}
.hero__scroll-mouse span {
  width: 4px; height: 8px; border-radius: 99px;
  background: var(--accent);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ================= TICKER ================= */
.ticker {
  border-block: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 16px 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex; align-items: center; gap: 26px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  font-family: var(--font-head);
  font-size: 17px; font-weight: 600;
  color: rgba(230,237,247,0.62);
  white-space: nowrap;
}
.ticker__track i { color: var(--accent); font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================= SECTIONS ================= */
.section { position: relative; padding: 100px 0; }
.section--alt {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.018) 18%, rgba(255,255,255,0.018) 82%, transparent);
}
.section__head { text-align: center; margin-bottom: 56px; }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 14px; letter-spacing: 2.5px;
  text-transform: lowercase;
  margin-bottom: 10px;
}
.section__title {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section__line {
  display: block; width: 0; height: 4px;
  margin: 16px auto 0;
  border-radius: 99px;
  background: var(--grad);
  transition: width 1s cubic-bezier(.2,.9,.3,1) 0.2s;
}
.section__head.in-view .section__line { width: 90px; }
.section__sub { color: var(--muted); margin-top: 16px; }

/* ================= REVEAL ANIMATIONS ================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s cubic-bezier(.2,.8,.3,1), transform 0.9s cubic-bezier(.2,.8,.3,1);
  will-change: opacity, transform;
}
[data-reveal].in-view { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: scale(1); } }

/* ================= BUTTONS ================= */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,1.4,.4,1), box-shadow 0.35s ease, background 0.35s ease;
}
.btn::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn:hover::after { left: 140%; }
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.4);
}
.btn--primary:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(124,58,237,0.55); }
.btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,0.5);
  box-shadow: 0 18px 38px rgba(0,0,0,0.4);
}
.btn--block { width: 100%; }

/* ================= ABOUT ================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 46px;
  align-items: start;
}
.about__lead {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.75;
  margin-bottom: 18px;
}
.about__lead strong { color: var(--accent); }
.about__text p:not(.about__lead) { color: var(--muted); }

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 30px;
}
.fact {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14.5px;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.fact:hover { transform: translateY(-5px); border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.05); }
.fact i { color: var(--accent); min-width: 18px; text-align: center; }
.fact a:hover { color: var(--accent); }
.about__actions { margin-top: 30px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat {
  position: relative;
  padding: 26px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,1.4,.4,1), border-color 0.4s ease;
}
.stat::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stat:hover { transform: translateY(-8px) scale(1.03); border-color: rgba(168,85,247,0.5); }
.stat:hover::before { opacity: 1; }
.stat__num {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { position: relative; color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.certs { display: grid; gap: 14px; margin-top: 20px; }
.cert {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.cert:hover { transform: translateX(8px); border-color: rgba(124,58,237,0.5); }
.cert i { color: var(--primary-2); font-size: 22px; margin-top: 4px; }
.cert h4 { font-family: var(--font-head); font-size: 16.5px; }
.cert p { color: var(--muted); font-size: 14px; }

/* ================= SKILLS ================= */
.skills__bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 26px 46px;
  margin-bottom: 60px;
}
.skillbar__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 9px;
  font-size: 15px; font-weight: 600;
}
.skillbar__head b { color: var(--accent); font-family: var(--font-head); }
.skillbar__track {
  height: 9px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.skillbar__track i {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: var(--grad);
  border-radius: 99px;
  transition: width 1.6s cubic-bezier(.2,.9,.3,1);
}
.skillbar__track i::after {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,0.9);
  animation: glowDot 1.8s ease-in-out infinite;
}
@keyframes glowDot { 0%,100% { box-shadow: 0 0 8px rgba(255,255,255,0.8); } 50% { box-shadow: 0 0 20px rgba(34,211,238,1); } }

.skills__cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.skillcat {
  position: relative;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(.2,1.3,.4,1), border-color 0.45s ease, box-shadow 0.45s ease;
}
.skillcat::before {
  content: "";
  position: absolute; top: -60%; left: -60%;
  width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 60%);
  opacity: 0; transition: opacity 0.5s ease;
  pointer-events: none;
}
.skillcat:hover { transform: translateY(-10px); border-color: rgba(168,85,247,0.55); box-shadow: 0 26px 54px rgba(0,0,0,0.45); }
.skillcat:hover::before { opacity: 1; }
.skillcat__icon {
  width: 54px; height: 54px;
  display: grid; place-content: center;
  border-radius: 16px;
  background: var(--grad-soft);
  border: 1px solid rgba(168,85,247,0.35);
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 16px;
  transition: transform 0.5s cubic-bezier(.2,1.6,.4,1);
}
.skillcat:hover .skillcat__icon { transform: rotate(-10deg) scale(1.1); }
.skillcat h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 14px; }
.skillcat--glow {
  background: linear-gradient(160deg, rgba(124,58,237,0.12), rgba(34,211,238,0.06));
  border-color: rgba(124,58,237,0.35);
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips li {
  padding: 6px 13px;
  font-size: 13px; font-weight: 500;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.3s ease;
  cursor: default;
}
.chips li:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 26px rgba(124,58,237,0.4);
}

/* ================= PROJECTS ================= */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 26px;
}
.project {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.5s cubic-bezier(.2,1.2,.4,1), border-color 0.5s ease, box-shadow 0.5s ease;
}
.project:hover {
  transform: translateY(-12px);
  border-color: rgba(34,211,238,0.5);
  box-shadow: 0 34px 70px rgba(0,0,0,0.55);
}
.project--featured { grid-column: span 1; border-color: rgba(124,58,237,0.45); }

.project__cover {
  position: relative;
  height: 180px;
  display: grid; place-content: center;
  font-size: 54px; color: rgba(255,255,255,0.92);
  overflow: hidden;
}
.project__cover i { position: relative; z-index: 2; transition: transform 0.6s cubic-bezier(.2,1.6,.4,1); }
.project:hover .project__cover i { transform: scale(1.25) rotate(-8deg); }
.project__cover--1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.project__cover--2 { background: linear-gradient(135deg, #059669, #10b981); }
.project__cover--3 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.project__cover--4 { background: linear-gradient(135deg, #dc2626, #7c3aed); }
.project__cover--5 { background: linear-gradient(135deg, #7c3aed, #22d3ee); }
.project__cover--6 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.project__cover::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 12px, transparent 12px 24px);
  opacity: 0.5;
}
.project__shine {
  position: absolute; top: -50%; left: -80%;
  width: 55%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-22deg);
  z-index: 3;
  transition: left 0.85s ease;
}
.project:hover .project__shine { left: 140%; }

.project__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 12px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
  border-radius: 99px;
  background: var(--grad);
  color: #fff;
}
.tag--soft {
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.35);
  color: var(--accent);
}
.project__body h3 { font-family: var(--font-head); font-size: 21px; line-height: 1.35; }
.project__body p { color: var(--muted); font-size: 14.5px; }
.project__feats { display: grid; gap: 7px; margin-top: 2px; }
.project__feats li { font-size: 13.8px; color: rgba(230,237,247,0.85); }
.project__feats i { color: #34d399; margin-right: 8px; font-size: 12px; }
.project__link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14.5px;
  color: var(--accent);
  padding-top: 12px;
  transition: gap 0.3s ease, color 0.3s ease;
}
.project__link:hover { gap: 15px; color: #fff; }

/* ================= TIMELINE ================= */
.timeline { position: relative; max-width: 900px; margin-inline: auto; }
.timeline::before {
  content: "";
  position: absolute; left: 26px; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
  transform-origin: top;
  transform: scaleY(var(--line, 0));
  transition: transform 0.25s linear;
  border-radius: 99px;
}
.timeline__item {
  position: relative;
  padding-left: 78px;
  padding-bottom: 42px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: 0; top: 4px;
  width: 55px; height: 55px;
  display: grid; place-content: center;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid rgba(168,85,247,0.6);
  color: var(--accent);
  font-size: 19px;
  box-shadow: 0 0 0 8px rgba(124,58,237,0.08);
  transition: transform 0.5s cubic-bezier(.2,1.6,.4,1), box-shadow 0.5s ease;
  z-index: 2;
}
.timeline__item:hover .timeline__dot {
  transform: scale(1.15) rotate(-8deg);
  box-shadow: 0 0 0 12px rgba(124,58,237,0.16), 0 0 28px rgba(34,211,238,0.5);
}
.timeline__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform 0.45s cubic-bezier(.2,1.2,.4,1), border-color 0.45s ease, box-shadow 0.45s ease;
}
.timeline__item:hover .timeline__card {
  transform: translateX(10px);
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 26px 54px rgba(0,0,0,0.45);
}
.timeline__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.timeline__card h3 { font-family: var(--font-head); font-size: 21px; }
.timeline__card h4 { color: var(--accent); font-size: 15.5px; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.timeline__date { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.timeline__card ul { margin-top: 14px; display: grid; gap: 9px; }
.timeline__card li {
  position: relative;
  padding-left: 22px;
  color: rgba(230,237,247,0.86);
  font-size: 14.5px;
}
.timeline__card li::before {
  content: "▸";
  position: absolute; left: 0; top: 0;
  color: var(--primary-2);
  animation: blinkArrow 2.4s ease-in-out infinite;
}
@keyframes blinkArrow { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.timeline__card strong { color: #fff; }

.badge {
  padding: 5px 13px;
  font-size: 12px; font-weight: 700;
  border-radius: 99px;
  background: rgba(34,211,238,0.12);
  border: 1px solid rgba(34,211,238,0.4);
  color: var(--accent);
  white-space: nowrap;
}
.badge--now {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52,211,153,0.5);
  color: #34d399;
}
.badge--now::before {
  content: "●"; margin-right: 6px;
  animation: blinkDot 1.4s ease-in-out infinite;
}
@keyframes blinkDot { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ================= EDUCATION ================= */
.edu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  max-width: 950px; margin-inline: auto;
}
.edu__card {
  position: relative;
  padding: 34px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(.2,1.3,.4,1), border-color 0.45s ease, box-shadow 0.45s ease;
}
.edu__card::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(.2,.9,.3,1);
}
.edu__card:hover { transform: translateY(-10px); border-color: rgba(168,85,247,0.5); box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.edu__card:hover::after { transform: scaleX(1); }
.edu__icon {
  width: 70px; height: 70px;
  margin: 0 auto 16px;
  display: grid; place-content: center;
  border-radius: 20px;
  background: var(--grad-soft);
  border: 1px solid rgba(168,85,247,0.4);
  font-size: 28px; color: var(--accent);
  transition: transform 0.6s cubic-bezier(.2,1.6,.4,1);
}
.edu__card:hover .edu__icon { transform: rotate(10deg) scale(1.1); }
.edu__year {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 99px;
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.35);
  color: var(--accent);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.edu__card h3 { font-family: var(--font-head); font-size: 20px; }
.edu__card h4 { color: var(--primary-2); font-size: 16px; margin: 6px 0 12px; }
.edu__card p { color: var(--muted); font-size: 14.5px; }

/* ================= CONTACT ================= */
.section--contact { overflow: hidden; }
.contact__bg-orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.4; pointer-events: none; }
.contact__bg-orb--1 { width: 380px; height: 380px; background: var(--primary); top: -60px; left: -80px; animation: floatOrb 16s ease-in-out infinite; }
.contact__bg-orb--2 { width: 320px; height: 320px; background: var(--accent); bottom: -80px; right: -60px; animation: floatOrb 19s ease-in-out infinite reverse; }

.contact__grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: start;
}
.contact__info { display: grid; gap: 16px; }
.contact__item {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.4s cubic-bezier(.2,1.3,.4,1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.contact__item:hover {
  transform: translateX(10px);
  border-color: rgba(34,211,238,0.5);
  box-shadow: 0 20px 44px rgba(0,0,0,0.45);
}
.contact__icon {
  width: 52px; height: 52px;
  flex: 0 0 52px;
  display: grid; place-content: center;
  border-radius: 16px;
  background: var(--grad-soft);
  border: 1px solid rgba(168,85,247,0.4);
  color: var(--accent);
  font-size: 20px;
  transition: transform 0.5s cubic-bezier(.2,1.6,.4,1), background 0.4s ease;
}
.contact__item:hover .contact__icon { transform: rotate(-10deg) scale(1.08); background: var(--grad); color: #fff; }
.contact__item small { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; }
.contact__item b { font-size: 15.5px; font-weight: 600; word-break: break-word; }

.contact__form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.field { position: relative; margin-bottom: 22px; }
.field input, .field textarea {
  width: 100%;
  padding: 18px 16px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  resize: vertical;
}
.field textarea { min-height: 130px; }
.field label {
  position: absolute; left: 16px; top: 15px;
  color: var(--muted);
  font-size: 14.5px;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(.2,.9,.3,1);
}
.field input:focus, .field textarea:focus {
  border-color: rgba(34,211,238,0.65);
  background: rgba(34,211,238,0.05);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.12);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: -8px; left: 12px;
  font-size: 11.5px;
  color: var(--accent);
  background: var(--card-solid);
  padding: 0 8px;
  border-radius: 6px;
}
.form__note { margin-top: 14px; font-size: 14.5px; color: #34d399; min-height: 22px; text-align: center; }

/* ================= FOOTER ================= */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 30px 0;
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.footer p { color: var(--muted); font-size: 14.5px; }
.footer p strong { color: var(--text); }
.footer__socials { display: flex; gap: 12px; }
.footer__socials a {
  width: 42px; height: 42px;
  display: grid; place-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.35s cubic-bezier(.2,1.4,.4,1);
}
.footer__socials a:hover { color: #fff; background: var(--grad); transform: translateY(-6px); border-color: transparent; }
.footer__top {
  width: 44px; height: 44px;
  display: grid; place-content: center;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(124,58,237,0.45);
  transition: transform 0.4s cubic-bezier(.2,1.6,.4,1);
  animation: bounceTop 2.6s ease-in-out infinite;
}
.footer__top:hover { transform: translateY(-7px) scale(1.1); }
@keyframes bounceTop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; text-align: center; }
  .hero__desc { margin-inline: auto; }
  .hero__actions, .hero__socials { justify-content: center; }
  .hero__badge--1 { left: -4%; }
  .hero__badge--2 { right: -6%; }
  .hero__badge--3 { left: -8%; }
  .hero__badge--4 { right: -2%; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__menu {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center;
    gap: 8px;
    background: rgba(7, 11, 20, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateY(-110%);
    transition: transform 0.55s cubic-bezier(.6,.05,.3,1);
    z-index: 1001;
  }
  .nav__menu.open { transform: translateY(0); }
  .nav__link { font-size: 22px; font-family: var(--font-head); padding: 12px 22px; }
  .nav__link--cta { margin-left: 0; margin-top: 12px; font-size: 18px; }
  .nav__burger { display: flex; }

  .skills__bars { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
}

@media (max-width: 640px) {
  .hero__badge { font-size: 11.5px; padding: 7px 11px; }
  .hero__avatar { width: min(280px, 80vw); }
  .hero__actions .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: 1fr; }
  .timeline::before { left: 18px; }
  .timeline__item { padding-left: 56px; }
  .timeline__dot { width: 40px; height: 40px; font-size: 15px; }
  .contact__form { padding: 24px 18px; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
