/* ==========================================================================
   Abdul Karim Taji: portfolio
   Dark cinematic. Tokens -> base -> layout -> components -> sections -> motion
   ========================================================================== */

:root {
  --bg: #07070b;
  --bg-2: #0c0c14;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09);
  --text: #ececf1;
  --muted: #9a9aae;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --warm: #ffb86b;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: 16px;
  --section: clamp(88px, 13vw, 168px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 22px;
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 clamp(1rem, .96rem + .2vw, 1.0625rem)/1.65 var(--font-body);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
.block { padding-block: var(--section); position: relative; }
.block-tight { padding-top: 0; }

/* ---------- type ---------- */
.h2 { font: 600 clamp(1.9rem, 1.1rem + 3.6vw, 4rem)/1.06 var(--font-display); letter-spacing: -.025em; max-width: 20ch; text-wrap: balance; }
.body { color: var(--muted); max-width: 60ch; margin-top: 1.2em; }
.body strong { color: var(--text); font-weight: 600; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 .75rem/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.4rem; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px var(--violet); }
.section-head { margin-bottom: clamp(36px, 6vw, 72px); }

/* ---------- ambient ---------- */
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; }
  .cursor i { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
  .cursor b { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s; }
  .cursor.is-hot b { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(124, 92, 255, .18); border-color: var(--violet); }
}

/* ---------- preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: none; place-items: center; align-content: center; gap: 22px; }
.js:not(.seen) .preloader { display: grid; }
.preloader.is-done { pointer-events: none; }
.js:not(.seen) .preloader { animation: preGone .01s linear 4s forwards; } /* safety net if scripts fail */
@keyframes preGone { to { visibility: hidden; opacity: 0; } }
.preloader-name { display: flex; gap: 6px; font: 700 clamp(2.4rem, 8vw, 4.5rem)/1 var(--font-display); letter-spacing: -.03em; }
.preloader-name span { display: inline-block; transform: translateY(40px); opacity: 0; animation: letter .6s var(--ease) forwards; }
.preloader-name span:nth-child(2) { animation-delay: .08s; }
.preloader-name span:nth-child(3) { animation-delay: .16s; }
.preloader-bar { width: min(220px, 50vw); height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.preloader-bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); animation: fill .9s var(--ease) .1s forwards; }
@keyframes letter { to { transform: none; opacity: 1; } }
@keyframes fill { to { transform: scaleX(1); } }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: transform .5s var(--ease), background .4s, backdrop-filter .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(7, 7, 11, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 12px; font: 600 1rem/1 var(--font-display); }
.nav-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a { padding: 10px 16px; border-radius: 999px; color: var(--muted); font-size: .92rem; transition: color .25s, background .25s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface); }
.nav-links .nav-cta { color: #fff; background: var(--surface-2); border: 1px solid var(--line); margin-left: 8px; }
.nav-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-content: center; gap: 6px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); transition: transform .35s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (min-width: 900px) { .nav-links { display: flex; } .nav-toggle { display: none; } }

.menu { position: fixed; inset: 0; z-index: 99; background: rgba(7, 7, 11, .97); backdrop-filter: blur(14px); padding: 100px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 4px; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; font: 600 clamp(2rem, 9vw, 3.2rem)/1.1 var(--font-display); letter-spacing: -.02em; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(18px); }
.menu.is-open nav a { animation: letter .6s var(--ease) forwards; }
.menu.is-open nav a:nth-child(2) { animation-delay: .05s; } .menu.is-open nav a:nth-child(3) { animation-delay: .1s; }
.menu.is-open nav a:nth-child(4) { animation-delay: .15s; } .menu.is-open nav a:nth-child(5) { animation-delay: .2s; }
.menu nav small { font: 500 .8rem var(--font-mono); color: var(--violet); }
.menu-foot { color: var(--muted); font-size: .9rem; margin-top: 32px; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 500; font-size: .98rem; border: 1px solid var(--line); transition: transform .4s var(--ease), background .3s, border-color .3s, box-shadow .3s; max-width: 100%; }
.btn span { overflow-wrap: anywhere; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 40px -10px rgba(124, 92, 255, .7); }
.btn-primary:hover { box-shadow: 0 14px 50px -8px rgba(34, 211, 238, .55); }
.btn-ghost { background: var(--surface); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .22); }
.btn-tag { font: 500 .66rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--muted); }
.btn-primary .btn-tag { color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; overflow: hidden; isolation: isolate; }
.hero-poster { position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 55% at 78% 22%, rgba(124, 92, 255, .38), transparent 70%),
    radial-gradient(50% 50% at 15% 80%, rgba(34, 211, 238, .22), transparent 70%),
    radial-gradient(40% 40% at 60% 90%, rgba(255, 184, 107, .08), transparent 70%); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 1.4s ease; display: block; touch-action: pan-y; }
.hero-canvas.is-on { opacity: 1; }
.hero-vignette { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 60%, var(--bg)), radial-gradient(90% 70% at 30% 50%, rgba(7, 7, 11, .55), transparent); pointer-events: none; }
.hero-inner { position: relative; }
.hero-title { font: 700 clamp(2.9rem, 1.2rem + 9.2vw, 8.6rem)/.98 var(--font-display); letter-spacing: -.045em; margin: 0 0 clamp(20px, 3vw, 34px); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line:last-child .line-in { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .line-in { display: inline-block; }
.hero-lead { max-width: 56ch; color: #c4c4d2; font-size: clamp(1.02rem, .95rem + .45vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4vw, 40px); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 4vw, 44px); }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px); font: 500 .8rem var(--font-mono); color: var(--muted); }
.chip b { color: var(--text); font-weight: 500; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 0 rgba(255, 184, 107, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 184, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 184, 107, 0); } }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 14px; display: none; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (min-width: 768px) and (min-height: 600px) { .scroll-cue { display: block; } }

/* ---------- marquee ---------- */
.marquee { padding: 28px 0; border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; display: grid; gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee-row.rev .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 14px; padding-right: 14px; }
.marquee li { white-space: nowrap; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 clamp(.9rem, .85rem + .3vw, 1.05rem) var(--font-display); color: #c9c9d8; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- about ---------- */
.about-grid { display: grid; gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: .85fr 1.15fr; } }
.portrait { position: relative; max-width: 440px; width: 100%; margin: 0 auto; }
.portrait-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.portrait-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, rgba(124, 92, 255, .28), transparent 45%, rgba(34, 211, 238, .18)); mix-blend-mode: screen; pointer-events: none; }
.portrait-frame img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.portrait-badge { position: absolute; right: -8px; bottom: -22px; padding: 16px 20px; border-radius: 18px; background: rgba(12, 12, 20, .85); backdrop-filter: blur(14px); border: 1px solid var(--line); font-size: .82rem; line-height: 1.35; color: var(--muted); }
.portrait-badge b { display: block; font: 700 1.9rem/1.1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 480px) { .portrait-badge { right: 8px; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: clamp(64px, 9vw, 110px); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { padding: clamp(18px, 3vw, 30px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(8px); }
.stat-n { display: block; font: 700 clamp(2.2rem, 1.4rem + 3.4vw, 4rem)/1 var(--font-display); letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-l { display: block; margin-top: 10px; color: var(--muted); font-size: .88rem; }

/* ---------- cards & bento ---------- */
.card { position: relative; padding: clamp(22px, 3vw, 34px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: border-color .3s, transform .5s var(--ease); }
.spot::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 92, 255, .2), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.spot:hover::before { opacity: 1; }
.card:hover { border-color: rgba(255, 255, 255, .2); }
.card-head { display: flex; align-items: center; gap: 14px; }
.card h3 { font: 600 clamp(1.15rem, 1.05rem + .5vw, 1.45rem)/1.25 var(--font-display); letter-spacing: -.01em; }
.icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--grad); color: #fff; font-size: 1.05rem; box-shadow: 0 8px 24px -8px rgba(124, 92, 255, .8); }
.card-sum { margin-top: 14px; color: var(--muted); font-size: .95rem; }
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(6, 1fr); } .bento-lg { grid-column: span 3; } .bento-sm { grid-column: span 2; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li { display: inline-flex; }
.skill, .chips span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: .84rem; color: #d2d2e0; transition: background .25s, border-color .25s, color .25s; min-height: 36px; display: inline-flex; align-items: center; }
.skill:hover, .skill.is-on { background: rgba(124, 92, 255, .22); border-color: var(--violet); color: #fff; }
.chips-sm span { min-height: 0; padding: 5px 11px; font-size: .76rem; color: var(--muted); cursor: default; }
.fact { min-height: 0; margin-top: 0; font: 400 .85rem/1.5 var(--font-mono); color: var(--cyan); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--ease), opacity .3s, margin .3s; }
.fact.is-on { max-height: 90px; opacity: 1; margin-top: 16px; }

/* ---------- selected work ---------- */
/* Stacking cards: normal downward scroll; each card slides up and settles on top of the last. */
.stack { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 28px; }
.stack-rail { display: none; }
/* --hold = how long (in scroll) a card stays on screen before the next one arrives */
.stack { --hold: 62svh; }
.stack-item { position: sticky; top: calc(84px + var(--i) * 12px); padding-bottom: var(--hold); }
.stack-item:last-child { padding-bottom: 0; }
.slide { display: flex; flex-direction: column; border-radius: 28px; border: 1px solid var(--line); background: #0d0d15; overflow: hidden; box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .8); transform-origin: top center; will-change: transform; }
.slide-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); flex: none; }
@media (min-width: 900px) {
  .stack { grid-template-columns: 170px 1fr; gap: clamp(24px, 3vw, 48px); align-items: start; }
  .stack-rail { display: block; position: sticky; top: 120px; }
  .stack { --hold: 78svh; }
  .stack-item { top: calc(96px + var(--i) * 16px); }
  .slide { flex-direction: row; height: min(520px, 70svh); }
  .slide-media { aspect-ratio: auto; width: 52%; height: 100%; }
  .slide-body { flex: 1; align-content: center; overflow: hidden; }
}
/* very short screens (phones in landscape): plain list, no stacking */
@media (max-height: 560px) { .stack-item { position: relative; top: auto; } .slide { height: auto; } }
/* scroll-typed description */
.t-off { color: transparent; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin: 0 1px; vertical-align: -.15em; background: var(--cyan); opacity: 0; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rail-count { font: 700 clamp(2.4rem, 3vw, 3.2rem)/1 var(--font-display); letter-spacing: -.04em; display: flex; align-items: baseline; gap: 4px; }
.rail-count b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail-count span { font: 500 .9rem var(--font-mono); color: var(--muted); }
.rail-name { margin-top: 12px; color: var(--muted); font-size: .92rem; min-height: 2.9em; }
.rail-dots { display: grid; gap: 10px; margin-top: 22px; }
.rail-dot { width: 28px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .16); transition: width .4s var(--ease), background .3s; }
.rail-dot:hover { background: rgba(255, 255, 255, .4); }
.rail-dot.is-on { width: 54px; background: var(--grad); }
.rail-dot { position: relative; }
.rail-dot::after { content: ""; position: absolute; inset: -9px -6px; } /* bigger tap target */
.slide-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.slide:hover .slide-media img { transform: scale(1.05); }
.slide-body { padding: clamp(22px, 4vw, 40px); display: grid; gap: 14px; align-content: start; }
.slide-n { font: 500 .8rem var(--font-mono); color: var(--violet); letter-spacing: .1em; }
.slide-n i { color: var(--muted); font-style: normal; }
.slide h3 { font: 600 clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem)/1.1 var(--font-display); letter-spacing: -.025em; }
.slide p { color: var(--muted); }
.tag { align-self: start; justify-self: start; padding: 6px 12px; border-radius: 999px; font: 500 .7rem/1 var(--font-mono); letter-spacing: .06em; color: var(--cyan); border: 1px solid rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); }
.link { display: inline-flex; align-items: center; gap: 10px; align-self: start; font-weight: 500; color: #fff; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .25); transition: gap .3s var(--ease), border-color .3s; width: max-content; max-width: 100%; }
.link:hover { gap: 16px; border-color: var(--cyan); }
.link i { font-size: .75rem; }
.muted { color: var(--muted); font-size: .9rem; }

/* ---------- more projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.pill { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; color: var(--muted); min-height: 44px; transition: all .3s; }
.pill small { opacity: .6; margin-left: 4px; }
.pill:hover { color: var(--text); }
.pill.is-on { background: var(--grad); border-color: transparent; color: #fff; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.pcard { display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: transform .5s var(--ease), border-color .3s, opacity .35s; }
.pcard:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, .2); }
.pcard.is-off { display: none; }
.pcard-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pcard:hover .pcard-media img { transform: scale(1.06); }
.pcard-body { padding: 22px; display: grid; gap: 12px; align-content: start; flex: 1; }
.pcard h3 { font: 600 1.2rem/1.25 var(--font-display); letter-spacing: -.01em; }
.pcard p { color: var(--muted); font-size: .92rem; }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 34px; }
.tl-line { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-line i { display: block; width: 100%; height: 100%; background: var(--grad); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 14px var(--violet); }
.no-js .tl-line i { transform: none; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -34px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--violet); transition: background .4s, box-shadow .4s; }
.tl-item.is-lit .tl-dot, .tl-item.is-current .tl-dot { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-period { font: 500 .8rem var(--font-mono); color: var(--violet); letter-spacing: .06em; }
.badge { padding: 5px 12px; border-radius: 999px; background: rgba(255, 184, 107, .14); color: var(--warm); font: 500 .68rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; border: 1px solid rgba(255, 184, 107, .35); }
.tl-company { color: var(--muted); margin: 8px 0 14px; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.tl-item .card > p:not(.tl-company) { color: #b9b9ca; font-size: .96rem; }
@media (min-width: 900px) {
  .timeline { padding-left: 0; gap: 34px; }
  .tl-line { left: 50%; margin-left: -1px; }
  .tl-item { width: calc(50% - 40px); }
  .tl-item:nth-of-type(even) { margin-left: calc(50% + 40px); }
  .tl-item:nth-of-type(odd) { margin-right: auto; }
  .tl-dot { left: auto; right: -49px; }
  .tl-item:nth-of-type(even) .tl-dot { right: auto; left: -49px; }
}

/* ---------- contact ---------- */
.contact { text-align: center; overflow: hidden; }
.contact .wrap { display: flex; flex-direction: column; align-items: center; }
.contact-glow { position: absolute; left: 50%; top: 50%; width: min(900px, 140vw); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(124, 92, 255, .28), rgba(34, 211, 238, .08) 60%, transparent); pointer-events: none; filter: blur(10px); }
.contact-title { position: relative; font: 700 clamp(2.4rem, 1rem + 7.4vw, 7rem)/1 var(--font-display); letter-spacing: -.045em; max-width: 14ch; text-wrap: balance; }
.contact-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact .body { text-align: center; position: relative; }
.contact-actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(28px, 4vw, 44px); width: 100%; }
.contact-note { position: relative; margin-top: 22px; font-size: .88rem; color: var(--muted); }
.contact-note a { border-bottom: 1px solid var(--line); }
.contact-note a:hover { color: var(--text); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0 36px; background: var(--bg-2); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-name { font: 600 1.3rem var(--font-display); }
.footer-sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.footer-links { display: flex; gap: 10px; }
.footer-links a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); transition: background .3s, transform .4s var(--ease); }
.footer-links a:hover { background: var(--surface-2); transform: translateY(-3px); }
.footer-links .to-top { background: var(--grad); border-color: transparent; }
.footer-copy { margin-top: 30px; color: var(--muted); font-size: .82rem; }
.footer-copy i { color: #ff5d7a; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 250; transform: translate(-50%, 30px); opacity: 0; padding: 12px 22px; border-radius: 999px; background: #fff; color: #07070b; font-weight: 500; font-size: .9rem; pointer-events: none; transition: all .45s var(--ease); max-width: calc(100vw - 32px); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js:not(.seen) [data-hero="up"], .js:not(.seen) [data-hero="line"] { opacity: 0; }
.js.seen [data-hero="line"] { opacity: 1; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal, .js [data-hero] { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
  .hero-canvas { display: none; }
  .tl-line i { transform: none; }
  .preloader { display: none !important; }
}
