/* ==========================================================
   Mustafa Alasadi, portfolio
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #475569;
  --muted-2: #64748b;
  --border: #e5e7eb;
  --chip: #ffffff;
  --indigo: #4f46e5;
  --purple: #9333ea;
  --grad: linear-gradient(90deg, #4f46e5 0%, #9333ea 100%);
  --grad-text: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 50px -20px rgba(15, 23, 42, 0.22);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --tint-indigo: #eef2ff;
  --tint-purple: #f5f3ff;
  --tint-pink: #fdf2f8;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html.dark {
  --bg: #0b0f19;
  --bg-soft: #0f1524;
  --card: #111827;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #8391a7;
  --border: #1f2937;
  --chip: #111827;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 50px -20px rgba(0, 0, 0, 0.7);
  --nav-bg: rgba(11, 15, 25, 0.8);
  --tint-indigo: rgba(99, 102, 241, 0.14);
  --tint-purple: rgba(168, 85, 247, 0.14);
  --tint-pink: rgba(236, 72, 153, 0.14);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
::selection { background: #c7d2fe; color: #1e1b4b; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--indigo); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

svg { width: 18px; height: 18px; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 25px -10px rgba(79, 70, 229, 0.6);
}
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .7s ease;
}
.btn--primary:hover::after { left: 120%; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(124, 58, 237, 0.65); }
.btn--outline {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.btn--outline:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.btn--dark { background: #1f2937; color: #fff; }
.btn--dark:hover { background: #111827; transform: translateY(-2px); }
html.dark .btn--dark { background: #f1f5f9; color: #0f172a; }
html.dark .btn--dark:hover { background: #fff; }
.btn--block { width: 100%; }

.round-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-2);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
html.dark .round-btn { background: #1f2937; }
.round-btn:hover { background: var(--tint-indigo); color: var(--indigo); transform: translateY(-2px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--indigo);
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.15);
  cursor: pointer;
  transition: border-color .2s ease;
}
.icon-btn:hover { border-color: #c7d2fe; }
.icon-sun { display: none; }
html.dark .icon-sun { display: block; color: #fbbf24; }
html.dark .icon-moon { display: none; }

/* ---------- navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.navbar.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.navbar__inner { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; margin-right: auto; color: var(--text); }

.nav { display: none; gap: 4px; }
.nav__link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--text-2);
  transition: color .2s ease, background-color .2s ease;
}
.nav__link:hover { color: var(--indigo); }
.nav__link.is-active { color: var(--indigo); background: var(--tint-indigo); }

.navbar__actions { display: flex; gap: 10px; }
.mobile-menu {
  display: flex; flex-direction: column;
  margin: 0 16px 12px;
  padding: 8px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 12px 14px; border-radius: 10px; font-weight: 600; color: var(--text-2); }
.mobile-menu a:hover { background: var(--tint-indigo); color: var(--indigo); }

@media (min-width: 768px) {
  .nav { display: flex; margin-right: 12px; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 0 56px;
}
@media (min-width: 1024px) { .hero { padding: 40px 0 72px; } }
.hero__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero__text { text-align: center; }
.hero__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.hero__role {
  margin-top: 8px;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-2);
}
.hero__lead {
  margin: 20px auto 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.stack { margin-top: 28px; }
.stack__label {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
}
.stack__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.stack__list li {
  transition: transform .2s ease, border-color .2s ease;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-size: 0.8125rem; color: var(--text-2);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.stack__list li:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.stack__list svg { width: 14px; height: 14px; color: var(--indigo); }

/* portrait: the whole photo, framed */
.hero__photo { display: flex; justify-content: center; padding: 12px 24px 20px; }
.portrait { position: relative; margin: 0; width: 184px; }
.portrait__glow {
  position: absolute; inset: 8% -14% -6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.28), rgba(79, 70, 229, 0.12) 55%, transparent);
  filter: blur(28px);
  animation: glow 7s ease-in-out infinite alternate;
}
@keyframes glow { from { transform: scale(0.95) translateY(0); opacity: .85; } to { transform: scale(1.06) translateY(-10px); opacity: 1; } }
.portrait__frame {
  position: absolute; inset: 0;
  border-radius: 22px;
  transform: translate(10px, 10px);
  opacity: .9;
  padding: 1.5px;
  background: linear-gradient(140deg, rgba(99, 102, 241, .9), rgba(168, 85, 247, .55) 50%, rgba(236, 72, 153, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.portrait__img {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #1f2a1f;
  box-shadow:
    0 0 0 5px var(--card),
    0 30px 60px -24px rgba(49, 46, 129, 0.45),
    0 12px 24px -12px rgba(15, 23, 42, 0.25);
}
.portrait__img img { width: 100%; height: auto; aspect-ratio: 339 / 496; object-fit: contain; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.portrait:hover .portrait__img img { transform: scale(1.025); }

.badge {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 7px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.3);
  font-size: 0.8125rem; font-weight: 700; color: var(--text);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.badge--top { top: 9%; right: -52px; }
.badge--bottom { bottom: 10%; left: -64px; padding-left: 12px; animation-delay: -3s; }
.badge__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--tint-indigo); color: var(--indigo); }
.badge__icon svg { width: 14px; height: 14px; }
html.dark .badge__icon { color: #a5b4fc; }
.badge__dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.badge__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@media (max-width: 639px) {
  .badge { font-size: 0.75rem; }
  .badge--top { right: -44px; }
  .badge--bottom { left: -52px; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

@media (min-width: 640px) { .portrait { width: 210px; } }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 7fr 5fr; gap: 48px; }
  .hero__text { text-align: left; }
  .hero__lead { margin-left: 0; }
  .hero__actions, .stack__list { justify-content: flex-start; }
  .portrait { width: 232px; }
}


/* ---------- sections ---------- */
.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 72px 0; } }
#about { padding-top: 16px; }
@media (min-width: 1024px) { #about { padding-top: 24px; } }
.section--soft { background: var(--bg-soft); }
.section__head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 36px; }
.section__title {
  font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section__bar { width: 80px; height: 6px; margin-top: 14px; border-radius: 999px; background: var(--grad); }
.section__sub { margin-top: 16px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ---------- about ---------- */
.about { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .about { grid-template-columns: 5fr 7fr; gap: 48px; } }

.about__card { padding: 28px 28px; text-align: center; box-shadow: var(--shadow-lg); }
.about__avatar {
  width: 132px; margin: 0 auto;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px #c4b5fd, 0 16px 30px -14px rgba(79, 70, 229, 0.5);
}
.about__avatar img { width: 100%; height: auto; aspect-ratio: 339 / 496; }
.about__name { margin-top: 18px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.about__title { color: var(--indigo); font-weight: 600; font-size: 0.9375rem; }
html.dark .about__title { color: #a5b4fc; }

.facts { margin-top: 22px; display: grid; gap: 12px; text-align: left; }
.facts li, .contact__list li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-weight: 600; color: var(--text);
  font-size: 0.9375rem;
}
.facts small, .contact__list small {
  display: block;
  font-size: 0.75rem; font-weight: 500;
  color: var(--muted-2);
}
.facts__icon {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 12px;
}
.facts__icon--indigo { background: var(--tint-indigo); color: #4f46e5; }
.facts__icon--purple { background: var(--tint-purple); color: #9333ea; }
.facts__icon--pink { background: var(--tint-pink); color: #db2777; }
.facts__icon--amber { background: #fffbeb; color: #d97706; }
html.dark .facts__icon--amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
html.dark .facts__icon--indigo { color: #a5b4fc; }
html.dark .facts__icon--purple { color: #d8b4fe; }
html.dark .facts__icon--pink { color: #f9a8d4; }

.about__heading { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.3; }
.about__text > p { max-width: 62ch; }
.about__subhead {
  margin-top: 28px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
}
.about__text .about__subhead { margin-top: 28px; }
.expertise {
  display: grid; gap: 12px;
  margin-top: 12px;
}
@media (min-width: 560px) { .expertise { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.expertise li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.js [data-stagger].expertise > li { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), border-color .2s ease, box-shadow .2s ease; }
.expertise li:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.expertise__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; }
.expertise h4 { font-size: 0.9375rem; font-weight: 700; line-height: 1.3; }
.expertise p { margin-top: 2px; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.accent { color: var(--indigo); }
html.dark .accent { color: #a5b4fc; }
.about__text > p { margin-top: 14px; color: var(--muted); line-height: 1.75; }
/* ---------- projects ---------- */
.projects { display: grid; gap: 24px; }
@media (min-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }

.project { overflow: hidden; display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
html.dark .project:hover { border-color: #312e81; }

.project__media {
  position: relative;
  height: 280px;
  display: grid; place-items: center;
  overflow: hidden;
}
.project__media--led { background: radial-gradient(120% 90% at 50% 100%, #3b0764 0%, #111133 55%, #070a1a 100%); }
.project__media--life { background: radial-gradient(120% 90% at 50% 100%, #3a2a05 0%, #14182a 55%, #070a14 100%); }

.shots { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 100%; padding-top: 28px; }
.shots img {
  width: 132px; height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  background: #1e1b4b;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(38px);
  transition: transform .4s ease;
}
.shots img:nth-child(2) { width: 152px; transform: translateY(18px); position: relative; z-index: 1; }
.project:hover .shots img { transform: translateY(26px); }
.project:hover .shots img:nth-child(2) { transform: translateY(6px); }

@media (max-width: 479px) {
  .project__media { height: 270px; }
  .shots { gap: 10px; }
  .shots img { width: 96px; }
  .shots img:nth-child(2) { width: 118px; }
}

.project__body { display: flex; flex-direction: column; flex: 1; padding: 28px; }
.project__titlerow { display: flex; align-items: center; gap: 14px; }
.project__icon { width: 48px; height: 48px; border-radius: 12px; background: #e2e8f0; box-shadow: 0 0 0 1px var(--border); }
.project__title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.project__desc { margin-top: 14px; color: var(--muted); line-height: 1.65; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li {
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.8125rem; font-weight: 500; color: var(--text-2);
}
.project__actions { margin-top: auto; padding-top: 24px; }
.project__actions .btn { width: 100%; }

/* ---------- education ---------- */
.timeline { max-width: 720px; margin: 0 auto; }
.timeline__head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.timeline__head h3 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.01em; }
.timeline__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--tint-purple); color: #9333ea;
  box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15);
}
.timeline__item { position: relative; padding-left: 40px; }
.timeline__item + .timeline__item { margin-top: 24px; }
.timeline__item::before {
  content: ""; position: absolute; left: 7px; top: -8px; bottom: -8px; width: 2px;
  background: linear-gradient(#c4b5fd, rgba(196, 181, 253, 0.1));
}
.timeline__dot {
  position: absolute; left: 0; top: 26px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 4px solid #a855f7;
}
.timeline__card { padding: 24px 26px; }
.timeline__title { font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.35; }
.timeline__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; align-items: center; }
.timeline__org { font-weight: 600; color: var(--indigo); }
html.dark .timeline__org { color: #a5b4fc; }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.meta svg { width: 15px; height: 15px; }
.timeline__card > .meta { margin-top: 10px; }

/* ---------- contact ---------- */
.contact { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .contact { grid-template-columns: 1fr 1fr; gap: 48px; } }

.contact__heading { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); font-weight: 800; letter-spacing: -0.015em; line-height: 1.3; }
.contact__lead { margin-top: 12px; color: var(--muted); line-height: 1.7; }
.contact__list { display: grid; gap: 12px; margin-top: 28px; }
.contact__list a { transition: color .2s ease; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--indigo); }
.contact__social { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact__social-row { display: flex; gap: 10px; margin-top: 12px; }

.contact__form { padding: 28px; display: grid; gap: 18px; box-shadow: var(--shadow-lg); }
.field label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field input:focus, .field textarea:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.form__error { color: #dc2626; font-size: 0.875rem; font-weight: 500; }
.form__note { text-align: center; font-size: 0.8125rem; color: var(--muted-2); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 24px; }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; } }
.footer__logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer__logo span { color: var(--text); -webkit-text-fill-color: var(--text); }
.footer__text { margin-top: 10px; max-width: 22rem; color: var(--muted); font-size: 0.9375rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 500; color: var(--text-2); }
.footer__nav a:hover { color: var(--indigo); }
.footer__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--indigo); }
html.dark .footer__label { color: #a5b4fc; }
.footer__connect .footer__text { margin-top: 4px; }
@media (min-width: 900px) {
  .footer__nav { justify-content: center; padding-top: 6px; }
  .footer__connect { text-align: right; }
  .footer__connect .footer__text { margin-left: auto; }
  .footer__connect .contact__social-row { justify-content: flex-end; }
}
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem; color: var(--muted-2);
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed; left: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #475569; color: #fff;
  box-shadow: 0 10px 25px -8px rgba(15, 23, 42, 0.5);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease, background-color .2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--indigo); }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 3px;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- nav sliding pill ---------- */
.nav { position: relative; }
.nav__link { position: relative; z-index: 1; }
.nav__link.is-active { background: transparent; }
.nav__indicator {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 10px;
  background: var(--tint-indigo);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), width .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}

/* ---------- hero entrance ---------- */
.load { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * 110ms + 80ms); }
.load--photo { animation-name: photoIn; animation-duration: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes photoIn { from { opacity: 0; transform: translateY(24px) scale(.94); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0ms); }
.js .reveal--left { transform: translateX(-40px); }
.js .reveal--right { transform: translateX(40px); }
.js .reveal--scale { transform: scale(.96) translateY(20px); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js [data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .2s ease; }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-stagger].is-in > .project:hover { transform: translateY(-6px); }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px; }
.notfound__code { font-size: 4rem; font-weight: 800; line-height: 1; }
.notfound h1 { margin-top: 12px; font-size: 1.75rem; font-weight: 800; }
.notfound p { margin: 10px 0 28px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal, .js [data-stagger] > * { opacity: 1; transform: none; }
  .load { animation: none; }
}
