/* =========================================================
   Mobina Noorani — Portfolio
   ========================================================= */

:root {
  --bg:        #0a0a12;
  --bg-alt:    #0e0e1a;
  --surface:   #14141f;
  --surface-2: #1b1b2b;
  --border:    rgba(255,255,255,.08);
  --text:      #e8e8f0;
  --muted:     #9a9ab0;
  --faint:     #6b6b82;
  --accent:    #7c5cff;
  --accent-2:  #20e3c8;
  --accent-3:  #ff5c9d;
  --grad:      linear-gradient(120deg, #7c5cff 0%, #20e3c8 100%);
  --grad-soft: linear-gradient(120deg, rgba(124,92,255,.15), rgba(32,227,200,.12));
  --radius:    16px;
  --maxw:      1120px;
  --ease:      cubic-bezier(.16,.84,.44,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124,92,255,.4); color: #fff; }

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

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

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.10), transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity .3s;
  will-change: left, top;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .95rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  font-family: inherit;
}
.btn--sm { padding: .6rem 1.15rem; font-size: .88rem; }
.btn--primary {
  background: var(--grad);
  color: #0a0a12;
  box-shadow: 0 8px 30px -8px rgba(124,92,255,.55);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 38px -8px rgba(124,92,255,.7); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); background: rgba(124,92,255,.08); transform: translateY(-3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1rem, 5vw, 3rem);
  transition: background .35s, backdrop-filter .35s, padding .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,18,.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding-top: .8rem; padding-bottom: .8rem;
}
.nav__logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.nav__logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--grad);
  color: #0a0a12;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
}
.nav__logo-text { font-family: 'Space Grotesk', sans-serif; letter-spacing: .2px; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { font-size: .92rem; color: var(--muted); transition: color .2s; position: relative; }
.nav__links a:not(.nav__cv):hover { color: var(--text); }
.nav__links a:not(.nav__cv)::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 2px; background: var(--grad); transition: width .25s var(--ease);
}
.nav__links a:not(.nav__cv):hover::after { width: 100%; }
.nav__cv {
  border: 1px solid var(--border);
  padding: .45rem 1rem; border-radius: 999px;
  color: var(--text) !important;
}
.nav__cv:hover { border-color: var(--accent); background: rgba(124,92,255,.1); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: .3s; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem clamp(1.2rem, 5vw, 3rem) 4rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 70% 20%, rgba(124,92,255,.18), transparent 55%),
              radial-gradient(ellipse at 10% 90%, rgba(32,227,200,.12), transparent 50%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; width: 100%; }
.hero__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; color: var(--accent-2);
  letter-spacing: 1px; margin-bottom: 1.2rem;
}
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; font-family: 'Space Grotesk', sans-serif; }
.hero__subtitle {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 600; margin-top: .6rem; color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}
.rotator { color: var(--accent); border-right: 2px solid var(--accent-2); padding-right: 3px; }
.hero__lead { margin-top: 1.6rem; max-width: 620px; color: var(--muted); font-size: 1.08rem; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero__social { display: flex; gap: 1.6rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero__social a {
  font-size: .9rem; color: var(--muted);
  position: relative; transition: color .2s;
  font-family: 'JetBrains Mono', monospace;
}
.hero__social a:hover { color: var(--accent-2); }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--faint); border-radius: 20px; z-index: 2;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 4px; background: var(--accent-2);
  animation: scroll 1.6s infinite;
}
@keyframes scroll { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 24px; } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.section {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem clamp(1.2rem, 5vw, 2rem);
}
.section--alt { max-width: none; overflow: hidden; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3rem; }
.section__num { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 1rem; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; font-family: 'Space Grotesk', sans-serif; letter-spacing: -.5px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3.5rem; }
.about__text p { color: var(--muted); margin-bottom: 1.2rem; }
.about__text strong { color: var(--text); }
.about__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2rem; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  transition: transform .3s var(--ease), border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(124,92,255,.4); }
.stat__num { font-size: 2rem; font-weight: 800; font-family: 'Space Grotesk', sans-serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__suffix { font-size: 1.4rem; font-weight: 800; color: var(--accent-2); }
.stat__label { display: block; font-size: .82rem; color: var(--faint); margin-top: .3rem; }

.about__edu-title { font-family: 'Space Grotesk', sans-serif; margin-bottom: 1.5rem; font-size: 1.2rem; }
.timeline { list-style: none; position: relative; padding-left: 1.6rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.timeline__item { position: relative; padding-bottom: 1.8rem; }
.timeline__item::before {
  content: ''; position: absolute; left: -1.6rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline__date { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--accent-2); }
.timeline__item h4 { font-size: 1.02rem; margin-top: .2rem; }
.timeline__item p { color: var(--muted); font-size: .9rem; }
.timeline__tag { display: inline-block; font-size: .76rem; color: var(--faint); margin-top: .35rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124,92,255,.45); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card__icon {
  width: 50px; height: 50px; border-radius: 13px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--accent-2);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s, transform .35s var(--ease);
}
.card__icon svg { width: 25px; height: 25px; display: block; }
.card:hover .card__icon { background: var(--grad); color: #0a0a12; border-color: transparent; transform: translateY(-2px); }
.card h3 { font-size: 1.1rem; margin-bottom: .5rem; font-family: 'Space Grotesk', sans-serif; }
.card p { color: var(--muted); font-size: .92rem; }

/* ---------- Experience ---------- */
.exp { display: flex; flex-direction: column; gap: 2rem; }
.exp__item { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.exp__item:last-child { border-bottom: none; }
.exp__meta { display: flex; flex-direction: column; gap: .25rem; }
.exp__date { font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: var(--accent-2); }
.exp__loc { font-size: .82rem; color: var(--faint); }
.exp__body h3 { font-size: 1.2rem; font-family: 'Space Grotesk', sans-serif; }
.exp__org { color: var(--accent); font-weight: 600; margin-bottom: .8rem; font-size: .95rem; }
.exp__body ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.exp__body li { position: relative; padding-left: 1.3rem; color: var(--muted); font-size: .95rem; }
.exp__body li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-2); }
.exp__body strong { color: var(--text); }

/* ---------- Publications ---------- */
.pubs { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.pub {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  transition: transform .3s var(--ease), border-color .3s;
}
.pub:hover { transform: translateX(6px); border-color: rgba(32,227,200,.4); }
.pub__venue { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem; }
.pub h3 { font-size: 1.08rem; font-family: 'Space Grotesk', sans-serif; line-height: 1.35; }
.pub__authors { color: var(--muted); font-size: .9rem; margin-top: .3rem; }
.pub__authors strong { color: var(--text); }
.pub__link { display: inline-block; margin-top: .7rem; color: var(--accent); font-size: .88rem; font-weight: 600; transition: color .2s; }
.pub__link:hover { color: var(--accent-2); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  transition: transform .35s var(--ease), border-color .35s;
  display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-6px); border-color: rgba(124,92,255,.45); }
.project--feature {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(32,227,200,.06)), var(--surface);
  border-color: rgba(124,92,255,.3);
}
.project__tag { font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .6rem; }
.project h3 { font-size: 1.25rem; font-family: 'Space Grotesk', sans-serif; margin-bottom: .7rem; }
.project p { color: var(--muted); font-size: .94rem; flex-grow: 1; }
.project em { color: var(--text); font-style: italic; }
.project__tech { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.project__tech span { font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: .25rem .65rem; border-radius: 6px; }
.project__links { display: flex; gap: .8rem; margin-top: 1.3rem; flex-wrap: wrap; }

/* ---------- Demo ---------- */
.demo-wrap { width: 100%; box-sizing: border-box; }
.demo__intro { max-width: 760px; color: var(--muted); margin-bottom: 2.2rem; }
.demo__intro a { color: var(--accent); }
.demo__intro a:hover { color: var(--accent-2); }
.demo { display: grid; grid-template-columns: 1fr 320px; gap: 1.6rem; align-items: start; }
.demo__canvas-wrap {
  position: relative;
  background: #07070f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
#somCanvas { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.demo__hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: .78rem; color: var(--faint);
  background: rgba(7,7,15,.8); padding: .3rem .8rem; border-radius: 999px;
  border: 1px solid var(--border); pointer-events: none; transition: opacity .4s;
}
.demo__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.demo__control { margin-bottom: 1.1rem; }
.demo__control label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.demo__control label span { color: var(--accent-2); font-family: 'JetBrains Mono', monospace; }
.demo__control input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 5px;
  background: var(--surface-2); outline: none;
}
.demo__control input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #0a0a12;
  box-shadow: 0 0 0 3px rgba(124,92,255,.25);
}
.demo__control input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #0a0a12;
}
.demo__control--row { display: flex; gap: 1rem; }
.demo__checkbox { display: flex; align-items: center; gap: .4rem; font-size: .82rem; cursor: pointer; }
.demo__checkbox input { accent-color: var(--accent); }
.demo__buttons { display: flex; gap: .6rem; margin-bottom: .7rem; flex-wrap: wrap; }
.demo__buttons .btn { flex: 1; justify-content: center; }
.demo__stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin-top: 1.2rem; text-align: center; }
.demo__stats div { background: var(--surface-2); border-radius: 10px; padding: .7rem .4rem; }
.demo__stats span { display: block; font-size: 1.2rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: var(--accent-2); }
.demo__stats small { font-size: .68rem; color: var(--faint); }
.demo__note { font-size: .76rem; color: var(--faint); margin-top: 1.1rem; line-height: 1.5; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.skills__group h3 { font-size: 1rem; margin-bottom: .9rem; font-family: 'Space Grotesk', sans-serif; color: var(--accent-2); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chips span {
  font-size: .85rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  padding: .45rem .9rem; border-radius: 999px;
  transition: transform .2s, border-color .2s, background .2s;
}
.chips span:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(124,92,255,.1); }

/* ---------- Contact ---------- */
.contact__inner { text-align: center; max-width: 780px; margin: 0 auto; }
.contact__badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--accent-2);
  border: 1px solid rgba(32,227,200,.3); background: rgba(32,227,200,.06);
  padding: .4rem .95rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #20e3c8;
  box-shadow: 0 0 0 0 rgba(32,227,200,.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(32,227,200,.5); }
  70% { box-shadow: 0 0 0 7px rgba(32,227,200,0); }
  100% { box-shadow: 0 0 0 0 rgba(32,227,200,0); }
}
.contact__lead { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto; }
.contact__lead strong { color: var(--text); font-weight: 600; }

.contact__email-card {
  display: inline-flex; align-items: center; gap: 1.6rem;
  margin: 2rem 0; padding: .85rem .85rem .85rem 1.7rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  transition: border-color .3s;
}
.contact__email-card:hover { border-color: rgba(124,92,255,.4); }
.contact__email-label { display: block; font-size: .7rem; color: var(--faint); font-family: 'JetBrains Mono', monospace; text-align: left; margin-bottom: .15rem; }
.contact__email { display: inline-block; font-size: clamp(1.2rem, 3.4vw, 1.9rem); font-weight: 800; font-family: 'Space Grotesk', sans-serif; transition: opacity .2s; }
.contact__email:hover { opacity: .85; }
.contact__copy {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: inherit; font-size: .85rem; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .65rem 1.05rem; border-radius: 11px; cursor: pointer; white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.contact__copy:hover { border-color: var(--accent); color: var(--accent-2); }
.contact__copy.copied { color: #20e3c8; border-color: rgba(32,227,200,.5); background: rgba(32,227,200,.08); }
.contact__copy svg { width: 16px; height: 16px; }

.contact__methods { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-method {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  width: 112px; padding: 1.25rem .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  color: var(--muted);
  transition: transform .3s var(--ease), border-color .3s, color .3s, background .3s;
}
.contact-method:hover { transform: translateY(-5px); border-color: rgba(124,92,255,.45); color: var(--text); background: rgba(124,92,255,.05); }
.contact-method svg { width: 24px; height: 24px; color: var(--accent-2); }
.contact-method span { font-size: .82rem; font-weight: 500; }

@media (max-width: 540px) {
  .contact__email-card { flex-direction: column; gap: 1rem; padding: 1.2rem; align-items: stretch; }
  .contact__email-label, .contact__email { text-align: center; }
  .contact__copy { justify-content: center; }
}

/* ---------- Demo: tabs & live app embed ---------- */
.demo-tabs {
  display: inline-flex; gap: .35rem; padding: .35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; margin-bottom: 2rem;
}
.demo-tab {
  font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; padding: .6rem 1.4rem; border-radius: 999px;
  cursor: pointer; transition: color .25s, background .25s;
}
.demo-tab:hover { color: var(--text); }
.demo-tab.is-active { color: #0a0a12; background: var(--grad); }
.demo-panel { display: none; }
.demo-panel.is-active { display: block; animation: demoFade .4s var(--ease); }
@keyframes demoFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#tab-live .demo__intro { margin-top: 0; }

.demo__app {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.demo__app-bar {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.demo__dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.demo__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.demo__dots i:nth-child(1) { background: #ff5f57; }
.demo__dots i:nth-child(2) { background: #febc2e; }
.demo__dots i:nth-child(3) { background: #28c840; }
.demo__app-url {
  flex: 1; text-align: center; font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo__app-open { font-size: .8rem; font-weight: 600; color: var(--accent-2); flex-shrink: 0; transition: color .2s; }
.demo__app-open:hover { color: var(--accent); }
.demo__iframe { width: 100%; height: 700px; border: 0; display: block; background: #fff; }
@media (max-width: 600px) {
  .demo__iframe { height: 560px; }
  .demo__app-url { display: none; }
}

/* ---------- Video panel ---------- */
.demo__video-wrap {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 40px rgba(0,0,0,.45);
}
.demo__video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 2.5rem 1rem; color: var(--faint); font-size: .85rem; border-top: 1px solid var(--border); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .75s var(--ease), transform .75s var(--ease); transition-delay: var(--d, 0s); will-change: transform, opacity; }
.reveal.in { opacity: 1; transform: none; }
.reveal--left  { transform: translateX(-48px); }
.reveal--right { transform: translateX(48px); }
.reveal--scale { transform: scale(.9); }
.reveal--blur  { filter: blur(10px); transition: opacity .75s var(--ease), transform .75s var(--ease), filter .75s var(--ease); }
.reveal--left.in, .reveal--right.in, .reveal--scale.in { transform: none; }
.reveal--blur.in { filter: blur(0); }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 100;
  box-shadow: 0 0 12px rgba(124,92,255,.6);
  transition: width .1s linear;
}

/* ---------- Parallax section watermark numbers ---------- */
.section { isolation: isolate; }
.section__ghost {
  position: absolute; top: 2rem; right: 2rem;
  font-family: 'Space Grotesk', sans-serif; font-weight: 800;
  font-size: clamp(5rem, 16vw, 13rem); line-height: 1;
  color: rgba(255,255,255,.022); z-index: -1; pointer-events: none;
  user-select: none; will-change: transform;
}

/* ---------- Magnetic / floating hover on cards ---------- */
.card, .project, .pub, .stat { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .projects { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .exp__item { grid-template-columns: 1fr; gap: .6rem; }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(75vw, 300px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem; padding: 2rem;
    background: rgba(14,14,26,.97); backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__toggle { display: flex; z-index: 60; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .about__stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal, .reveal--left, .reveal--right, .reveal--scale, .reveal--blur { opacity: 1; transform: none; filter: none; }
  .section__ghost { transform: none !important; }
}
