/* ==========================================================================
   Kamran Danish: personal site
   Maroon on warm black. Grotesque display, clean sans body, mono labels.
   ========================================================================== */
:root {
    --bg: #18181b;
    --bg-2: #1e1e22;
    --surface: #232327;
    --surface-2: #2a2a2f;
    --ink: #f4f4f5;
    --muted: #b4b4bc;
    --dim: #82828c;
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.17);
    --rose: #ff6a6f;
    --rose-2: #ff5a60;
    --maroon: #c3232b;
    --maroon-2: #d92c35;
    --deep: #8c151b;
    --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --r: 22px;
    --wrap: 1180px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
button { font-family: inherit; }
::selection { background: var(--maroon); color: #fff; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--maroon); color: #fff; padding: 0.6rem 1rem; border-radius: 10px; z-index: 200; }
.skip:focus { left: 0.75rem; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 8px; }

/* Page furniture ----------------------------------------------------------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--maroon-2), var(--rose)); box-shadow: 0 0 12px rgba(255, 106, 111, 0.6); }
.grain { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0.055; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Header ------------------------------------------------------------------- */
.bar { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; pointer-events: none; }
.bar__inner { pointer-events: auto; position: relative; width: min(100% - 1.5rem, 62rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.55rem 0.5rem 0.9rem; border-radius: 999px; background: rgba(30, 30, 34, 0.55); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.bar.is-scrolled .bar__inner { background: rgba(30, 30, 34, 0.82); border-color: var(--line-2); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; }
.brand__mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #c22a48, var(--deep)); border: 1px solid rgba(255, 140, 145, 0.3); box-shadow: 0 6px 18px rgba(195, 35, 43, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a:not(.btn) { position: relative; padding: 0.5rem 0.85rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; border-radius: 999px; transition: color 0.25s, background 0.25s; }
.nav a:not(.btn):hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav a.is-active:not(.btn) { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.nav .btn { margin-left: 0.4rem; }
.menu { display: none; position: relative; width: 2.6rem; height: 2.6rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.04); cursor: pointer; }
.menu span { position: absolute; left: 0.8rem; right: 0.8rem; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.menu span:first-child { top: 1.0rem; }
.menu span:last-child { top: 1.5rem; }
.menu[aria-expanded="true"] span:first-child { top: 1.25rem; transform: rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { top: 1.25rem; transform: rotate(-45deg); }

/* Buttons ------------------------------------------------------------------ */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.95rem 1.55rem; border-radius: 999px; font-family: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; color: #fff; text-decoration: none; cursor: pointer; background: linear-gradient(180deg, #a8243f, #7a1830); border: 1px solid rgba(255, 140, 145, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 32px rgba(195, 35, 43, 0.42); transition: translate 0.35s var(--ease), box-shadow 0.35s, background 0.3s, border-color 0.3s; will-change: transform; }
.btn:hover { translate: 0 -2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 18px 44px rgba(217, 44, 53, 0.5); }
.btn .arr { display: inline-block; transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); box-shadow: none; color: var(--ink); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 106, 111, 0.45); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35); }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.88rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 22px rgba(195, 35, 43, 0.4); }
.btn--light { background: #fff; color: var(--deep); border-color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); }
.btn--light:hover { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }

/* Type helpers ------------------------------------------------------------- */
.label { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--rose-2); }
.label .num { color: var(--dim); }
.label--rule::before { content: ""; width: 2.2rem; height: 1px; background: linear-gradient(90deg, transparent, var(--rose-2)); }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.028em; line-height: 1.02; }
em { font-style: normal; }
.sub { color: var(--muted); font-size: 1.08rem; max-width: 40rem; }
.head { max-width: 52rem; margin-bottom: clamp(2.25rem, 5vw, 3.75rem); }
.head .display { font-size: clamp(2.2rem, 4.7vw, 3.8rem); margin-block: 1.1rem 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { display: inline-flex; align-items: center; padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section--alt { position: relative; background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }

/* Spotlight that follows the pointer on glass surfaces */
.spot { position: relative; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 106, 111, 0.13), transparent 60%); transition: opacity 0.4s; }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* Hero --------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(8rem, 15vw, 11rem); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%); opacity: 0.55; }
.aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6; animation: drift 24s ease-in-out infinite alternate; will-change: transform; }
.aurora i:nth-child(1) { width: 46rem; height: 46rem; left: -12rem; top: -18rem; background: radial-gradient(circle, #8a1c33, transparent 66%); }
.aurora i:nth-child(2) { width: 40rem; height: 40rem; right: -10rem; top: -8rem; background: radial-gradient(circle, #5d1428, transparent 66%); animation-delay: -9s; }
.aurora i:nth-child(3) { width: 30rem; height: 30rem; left: 34%; top: 14rem; background: radial-gradient(circle, rgba(242, 130, 152, 0.3), transparent 66%); animation-delay: -15s; opacity: 0.45; }
@keyframes drift { to { transform: translate3d(5rem, 3rem, 0) scale(1.12); } }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 5.1vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.02; margin-block: 1.5rem 1.75rem; }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.2rem); max-width: 34rem; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.25rem; }

/* Word-by-word headline reveal */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em 0.16em; margin: 0 -0.04em -0.16em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(112%) rotate(3deg); transform-origin: 0 100%; transition: transform 1s var(--ease) calc(var(--i, 0) * 60ms + 120ms); }
.js [data-split].is-in .w > span { transform: none; }

/* Hero stage: three floating screens */
.stage { position: relative; aspect-ratio: 1 / 1.03; perspective: 1500px; }
.layer { position: absolute; transform: translate3d(calc(var(--px, 0) * var(--d) * 1px), calc(var(--py, 0) * var(--d) * 1px), 0); transition: transform 0.35s ease-out; }
.layer--a { --d: -12; width: 88%; right: 0; top: 0; }
.layer--b { --d: 16; width: 66%; left: 0; bottom: 8%; }
.layer--c { --d: 30; width: 25%; right: 5%; bottom: -2%; }
.float { animation: float 9s ease-in-out infinite; }
.float--2 { animation-duration: 11s; animation-delay: -3s; }
.float--3 { animation-duration: 8s; animation-delay: -5s; }
@keyframes float { 50% { transform: translateY(-14px); } }
.chip-float { position: absolute; z-index: 3; padding: 0.55rem 0.95rem; border-radius: 999px; background: rgba(30, 30, 34, 0.7); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); white-space: nowrap; }
.chip-float--1 { left: 9%; top: -4.5%; animation: float 10s ease-in-out infinite; }
.chip-float--2 { left: 2%; bottom: -1%; animation: float 12s ease-in-out infinite -4s; }
.chip-float b { color: var(--rose); font-weight: 500; }

/* Shared screen mockups */
.mock { border-radius: 16px; overflow: hidden; background: #1d1d21; border: 1px solid var(--line-2); box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 80px rgba(195, 35, 43, 0.18); }
.mock__bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.85rem; background: rgba(255, 255, 255, 0.045); border-bottom: 1px solid var(--line); }
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.mock__url { flex: 1; max-width: 22rem; margin-inline: auto; padding: 0.22rem 0.8rem; border-radius: 999px; background: rgba(0, 0, 0, 0.4); font-family: var(--mono); font-size: 0.68rem; color: var(--dim); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #141416; }
.mock__screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 10s linear; }
.phone { border-radius: 2.1rem; padding: 0.38rem; background: linear-gradient(160deg, #31232a, #130d10); border: 1px solid var(--line-2); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(195, 35, 43, 0.2); }
.phone__screen { position: relative; aspect-ratio: 9 / 19; overflow: hidden; border-radius: 1.75rem; background: #141416; }
.phone__screen::after { content: ""; position: absolute; top: 0.42rem; left: 50%; width: 28%; height: 0.38rem; transform: translateX(-50%); border-radius: 99px; background: rgba(0, 0, 0, 0.75); z-index: 2; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 10s linear; }
.autoscroll img { animation: pagescroll 18s ease-in-out infinite alternate; }
@keyframes pagescroll { from { object-position: 50% 0; } to { object-position: 50% 100%; } }

/* Stats -------------------------------------------------------------------- */
.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.7rem; padding: 1.75rem 1.5rem 2rem 0; }
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.stat dt { color: var(--muted); font-size: 0.9rem; line-height: 1.45; max-width: 15rem; }
.stat dd { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 4vw, 3.5rem); letter-spacing: -0.028em; line-height: 1; background: linear-gradient(180deg, #fff, var(--rose-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }

/* Tools marquee ------------------------------------------------------------ */
.marquee { position: relative; border-block: 1px solid var(--line); padding-block: 1.15rem; overflow: hidden; background: rgba(255, 255, 255, 0.015); -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: slide 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span { padding-inline: 1.6rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; transition: color 0.3s; }
.marquee span::after { content: "/"; margin-left: 3.2rem; color: rgba(195, 35, 43, 0.8); }
.marquee span:hover { color: var(--rose); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Work: product feature ---------------------------------------------------- */
.feature { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.25rem); border-radius: 30px; border: 1px solid var(--line-2); background: radial-gradient(80% 110% at 0% 0%, rgba(195, 35, 43, 0.38), rgba(30, 10, 17, 0.35) 55%, rgba(30, 30, 34, 0.5)); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4); overflow: hidden; }
.feature h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -0.028em; line-height: 1.04; margin-block: 1rem 1rem; }
.feature p.copy { color: var(--muted); font-size: 1.02rem; }
.feature .chips { margin-top: 1.4rem; }
.feature .btn { margin-top: 1.75rem; }

/* Work: project viewer ----------------------------------------------------- */
.showcase { margin-top: clamp(3.5rem, 8vw, 6.5rem); display: grid; grid-template-columns: minmax(0, 18.5rem) minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
.index { display: none; list-style: none; gap: 0.2rem; position: sticky; top: 6.25rem; }
.index__title { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.9rem; }
.js .index { display: grid; }
.index button { display: grid; grid-template-columns: 2.1rem 1fr; align-items: baseline; gap: 0 0.5rem; width: 100%; padding: 0.75rem 1rem; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: background 0.35s, border-color 0.35s, color 0.3s, translate 0.35s var(--ease); }
.index .n { font-family: var(--mono); font-size: 0.7rem; color: var(--dim); }
.index .t { font-weight: 600; font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; }
.index .k { grid-column: 2; font-size: 0.8rem; color: var(--dim); line-height: 1.4; margin-top: 0.1rem; transition: color 0.3s; }
.index button:hover { background: rgba(255, 255, 255, 0.04); translate: 4px 0; }
.index button[aria-selected="true"] { background: linear-gradient(90deg, rgba(195, 35, 43, 0.38), rgba(195, 35, 43, 0.04)); border-color: rgba(255, 106, 111, 0.22); translate: 6px 0; }
.index button[aria-selected="true"] .n { color: var(--rose); }
.index button[aria-selected="true"] .k { color: var(--muted); }

.panel { display: grid; gap: clamp(3.5rem, 8vw, 5rem); min-width: 0; }
.js .panel { gap: 0; }
.proj { min-width: 0; }
.js .proj { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.8s var(--ease), visibility 0s 0.5s; }
.js .proj.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.proj__media { position: relative; padding-bottom: 2.5rem; padding-right: 1.5rem; }
.proj__media .mock { box-shadow: 0 50px 110px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 120px rgba(195, 35, 43, 0.22); }
.proj__media .phone { position: absolute; right: 0; bottom: 0; width: 19%; min-width: 5.5rem; transition: translate 0.8s var(--ease); }
.proj__media:hover .mock__screen img, .proj__media:hover .phone__screen img { object-position: 50% 100%; }
.proj__media:hover .phone { translate: 0 -10px; }
.hint { position: absolute; left: 1rem; bottom: 3.4rem; z-index: 3; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(24, 24, 27, 0.72); border: 1px solid var(--line-2); backdrop-filter: blur(8px); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); transition: opacity 0.4s; pointer-events: none; }
.proj__media:hover .hint { opacity: 0; }
.proj--still .mock__screen img, .proj--still .phone__screen img { object-position: 50% 0; }
.proj--still .proj__media:hover .mock__screen img { object-position: 50% 0; }
.proj--still .hint { display: none; }
.proj__info { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem); margin-top: 1.75rem; }
.proj__head { grid-column: 1 / -1; }
.proj__kind { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose-2); }
.proj h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -0.028em; line-height: 1.04; margin-top: 0.55rem; }
.proj__desc { color: var(--muted); font-size: 1.05rem; }
.ticks { list-style: none; display: grid; gap: 0.7rem; align-content: start; }
.ticks li { position: relative; padding-left: 1.7rem; color: var(--ink); font-size: 0.95rem; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.42rem; width: 0.75rem; height: 0.4rem; border-left: 2px solid var(--rose-2); border-bottom: 2px solid var(--rose-2); transform: rotate(-45deg) scale(0.9); }
.proj__aside { display: grid; gap: 1.25rem; align-content: start; }
.proj__aside .btn { justify-self: start; }

/* Work: more designs ------------------------------------------------------- */
.more-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(5rem, 11vw, 9rem); margin-bottom: 2rem; }
.more-head h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.2vw, 2.7rem); letter-spacing: -0.028em; line-height: 1.04; }
.more-head .sub { max-width: 28rem; font-size: 0.98rem; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.shot { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #1a1a1d; cursor: zoom-in; text-decoration: none; transition: translate 0.55s var(--ease), border-color 0.4s, box-shadow 0.55s; }
.shot[hidden] { display: none; }
.shot.is-new { animation: shot-in 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 9s linear, scale 0.8s var(--ease); }
.shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48%; background: linear-gradient(to top, rgba(24, 24, 27, 0.94), transparent); pointer-events: none; }
.shot__cap { position: absolute; left: 1.05rem; right: 1.05rem; bottom: 0.95rem; z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 0.6rem; }
.shot__cap b { font-weight: 600; font-size: 0.95rem; line-height: 1.25; letter-spacing: -0.01em; }
.shot__cap i { flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(24, 24, 27, 0.5); font-style: normal; font-size: 0.85rem; transition: background 0.3s, transform 0.4s var(--ease); }
.shot:hover { translate: 0 -8px; border-color: rgba(255, 106, 111, 0.4); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(195, 35, 43, 0.2); }
.shot:hover img { object-position: 50% 100%; }
.shot:hover .shot__cap i { background: var(--maroon); transform: rotate(45deg); }
@keyframes shot-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.more { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.textlink { color: var(--rose); text-decoration: none; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); padding-bottom: 2px; }
.textlink:hover { background-size: 100% 1px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; padding: 1rem; background: rgba(12, 12, 14, 0.84); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.lb.is-open { display: grid; animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; } }
.lb__box { width: min(100%, 62rem); max-height: calc(100dvh - 2rem); display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; animation: pop 0.55s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.lb__view { max-height: calc(100dvh - 2rem); overflow: auto; border-radius: 22px; border: 1px solid var(--line-2); background: #1a1a1d; box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--maroon) transparent; }
.lb__view img { width: 100%; height: auto; }
.lb__info { display: grid; gap: 1.1rem; align-content: center; }
.lb__count { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rose-2); }
.lb__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.028em; line-height: 1.05; }
.lb__note { color: var(--muted); font-size: 0.95rem; max-width: 22rem; }
.lb__nav { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.4rem; }
.lb__nav .btn { padding: 0.7rem 1.2rem; }
.lb__close { position: absolute; top: 1rem; right: 1rem; z-index: 3; width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(30, 30, 34, 0.7); color: var(--ink); font-size: 1.2rem; cursor: pointer; transition: background 0.3s, transform 0.4s var(--ease); }
.lb__close:hover { background: var(--maroon); transform: rotate(90deg); }

/* What I do ---------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tile { display: flex; flex-direction: column; padding: 1.75rem; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)); transition: translate 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s; }
.tile:hover { translate: 0 -6px; border-color: rgba(255, 106, 111, 0.3); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.tile__art { position: relative; height: 12.5rem; margin: -0.25rem -0.25rem 1.6rem; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(90% 90% at 50% 0%, rgba(195, 35, 43, 0.28), rgba(24, 24, 27, 0.6)); overflow: hidden; }
.tile__num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--rose-2); }
.tile h3 { font-family: var(--display); font-weight: 650; font-size: 1.55rem; letter-spacing: -0.024em; line-height: 1.1; margin-block: 0.7rem 0.8rem; }
.tile p { color: var(--muted); font-size: 0.97rem; }
.tile .chips { margin-top: auto; padding-top: 1.4rem; }

/* tile art: website */
.art-site { position: absolute; inset: 1.1rem 1.1rem 0; border-radius: 12px 12px 0 0; border: 1px solid var(--line-2); border-bottom: 0; background: #1d1d21; padding: 0.7rem 0.8rem; }
.art-site i { display: block; border-radius: 99px; background: rgba(255, 255, 255, 0.12); height: 6px; margin-bottom: 0.5rem; }
.art-site i:nth-child(1) { width: 38%; background: rgba(255, 106, 111, 0.5); }
.art-site i:nth-child(2) { width: 82%; height: 9px; margin-top: 0.7rem; }
.art-site i:nth-child(3) { width: 66%; height: 9px; }
.art-site i:nth-child(4) { width: 52%; }
.art-site b { display: block; width: 6.2rem; height: 1.7rem; margin-top: 0.8rem; border-radius: 99px; background: linear-gradient(180deg, #a8243f, #7a1830); animation: press 5s ease-in-out infinite; }
.art-site .toast { position: absolute; right: 0.7rem; top: 0.7rem; padding: 0.4rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.95); color: var(--deep); font-size: 0.68rem; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: toast 5s ease-in-out infinite; }
@keyframes press { 0%, 38% { transform: scale(1); } 44% { transform: scale(0.93); } 52%, 100% { transform: scale(1); } }
@keyframes toast { 0%, 46% { opacity: 0; transform: translateY(-8px) scale(0.95); } 54%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-8px) scale(0.95); } }
/* tile art: funnel */
.art-funnel { position: absolute; inset: 1.4rem 1.3rem; display: grid; align-content: center; gap: 0.7rem; }
.art-funnel div { display: grid; grid-template-columns: 4.4rem 1fr; align-items: center; gap: 0.8rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.art-funnel span { display: block; height: 0.7rem; border-radius: 99px; background: linear-gradient(90deg, var(--maroon-2), var(--rose)); width: 0; transition: width 1.4s var(--ease) calc(var(--i) * 150ms + 200ms); box-shadow: 0 0 18px rgba(255, 106, 111, 0.25); }
.is-in .art-funnel span, .art-funnel.is-in span { width: var(--w); }
/* tile art: automation */
.art-flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-flow rect { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.2); }
.art-flow text { fill: #d9cbcf; font: 500 9px var(--mono); letter-spacing: 0.06em; text-anchor: middle; }
.art-flow path { fill: none; stroke: var(--rose-2); stroke-width: 1.5; stroke-dasharray: 4 7; animation: flow 1.6s linear infinite; opacity: 0.85; }
@keyframes flow { to { stroke-dashoffset: -22; } }

/* Process ------------------------------------------------------------------ */
.process { margin-top: clamp(4rem, 9vw, 7rem); }
.process__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.3vw, 2.6rem); letter-spacing: -0.028em; line-height: 1.05; margin-bottom: 2.5rem; }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem; list-style: none; }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; top: 0.6rem; height: 2px; border-radius: 2px; }
.steps::before { right: 0; background: var(--line-2); }
.steps::after { width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--maroon-2), var(--rose)); box-shadow: 0 0 14px rgba(255, 106, 111, 0.5); }
.steps li { position: relative; padding-top: 2.4rem; }
.steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); transition: border-color 0.5s, background 0.5s, box-shadow 0.5s; z-index: 1; }
.steps li.is-lit::before { border-color: var(--rose); background: var(--maroon); box-shadow: 0 0 0 5px rgba(195, 35, 43, 0.3); }
.steps .n { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--rose-2); }
.steps h4 { font-family: var(--display); font-weight: 650; font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.15; margin-block: 0.5rem 0.55rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* Experience --------------------------------------------------------------- */
.exp { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.exp__intro { position: sticky; top: 7rem; }
.exp__intro .head { margin-bottom: 0; }
.tl { position: relative; list-style: none; padding-left: 2.4rem; }
.tl::before, .tl::after { content: ""; position: absolute; left: 0.5rem; top: 0.4rem; width: 2px; border-radius: 2px; }
.tl::before { bottom: 0.4rem; background: var(--line-2); }
.tl::after { height: calc((100% - 0.8rem) * var(--p, 0)); background: linear-gradient(180deg, var(--maroon-2), var(--rose)); box-shadow: 0 0 14px rgba(255, 106, 111, 0.5); }
.tl li { position: relative; padding-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -2.4rem; top: 0.3rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); transition: border-color 0.5s, background 0.5s, box-shadow 0.5s; }
.tl li.is-lit::before { border-color: var(--rose); background: var(--maroon); box-shadow: 0 0 0 5px rgba(195, 35, 43, 0.3); }
.when { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.tl h3 { font-family: var(--display); font-weight: 650; font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: -0.024em; line-height: 1.12; margin-block: 0.5rem 0.2rem; }
.tl .org { color: var(--rose); font-weight: 500; font-size: 0.98rem; }
.tl p.copy { color: var(--muted); margin-top: 0.8rem; max-width: 36rem; }
.tl .chips { margin-top: 1rem; }
.tl .chip { color: var(--ink); border-color: rgba(255, 106, 111, 0.3); background: rgba(195, 35, 43, 0.2); }

/* CV ----------------------------------------------------------------------- */
.cv-wrap { display: grid; justify-items: center; }
.cv { width: min(100%, 52rem); background: #fafaf9; color: #1b1b1d; border-radius: 6px; padding: clamp(1.6rem, 5vw, 3.5rem); border-top: 6px solid var(--maroon); box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04); }
.cv h3 { font-family: var(--display); font-weight: 700; font-size: 2.3rem; letter-spacing: -0.028em; line-height: 1; }
.cv__role { color: #b5202a; font-weight: 600; margin-top: 0.35rem; }
.cv__contact { color: #5a5a60; font-size: 0.85rem; margin-top: 0.6rem; }
.cv h4 { margin-top: 1.9rem; padding-bottom: 0.4rem; border-bottom: 1.5px solid #b5202a; color: #b5202a; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; }
.cv p { margin-top: 0.7rem; font-size: 0.95rem; }
.cv__job p { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.cv__job p span { color: #5a5a60; font-size: 0.85rem; white-space: nowrap; }
.cv ul { margin-top: 0.4rem; padding-left: 1.2rem; font-size: 0.93rem; }
.cv li { margin-top: 0.25rem; }

/* Contact ------------------------------------------------------------------ */
.contact__card { position: relative; overflow: hidden; text-align: center; padding: clamp(3rem, 8vw, 6.5rem) clamp(1.5rem, 5vw, 4rem); border-radius: 36px; border: 1px solid rgba(255, 106, 111, 0.28); background: radial-gradient(70% 90% at 50% 0%, rgba(195, 35, 43, 0.7), rgba(61, 12, 25, 0.45) 55%, rgba(30, 30, 34, 0.6)); box-shadow: 0 60px 140px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.contact__card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 80%); mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 80%); }
.contact__card > * { position: relative; }
.contact h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 5rem); letter-spacing: -0.03em; line-height: 1; margin-block: 1.3rem 1.4rem; }
.contact .sub { margin-inline: auto; color: #d6c6ca; }
.contact .actions { justify-content: center; margin-top: 2.4rem; }
.mail { display: inline-block; margin-top: 2rem; font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 2.8vw, 2rem); letter-spacing: -0.03em; color: #fff; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 0.2rem; transition: background-size 0.5s var(--ease), color 0.3s; }
.mail:hover { color: var(--rose); background-size: 0 1px; background-position: 100% 100%; }

/* Footer ------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding-block: 3rem 2rem; color: var(--dim); font-size: 0.9rem; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.6fr)); gap: 2rem; }
.foot__name { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--ink); letter-spacing: -0.024em; line-height: 1.1; }
.foot__tag { margin-top: 0.5rem; max-width: 22rem; }
.foot h5 { margin: 0 0 0.8rem; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.foot ul { list-style: none; display: grid; gap: 0.5rem; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.25s; }
.foot a:hover { color: var(--rose); }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Reveal on scroll --------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Tablet and phone --------------------------------------------------------- */
@media (max-width: 1000px) {
    .hero__grid { grid-template-columns: 1fr; }
    .stage { width: min(100%, 34rem); margin-inline: auto; margin-top: 2.5rem; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { padding-left: 0; border-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .feature { grid-template-columns: 1fr; }
    .showcase { grid-template-columns: 1fr; }
    .js .index { display: flex; position: static; overflow-x: auto; gap: 0.5rem; padding-bottom: 0.4rem; margin-inline: -1.25rem; padding-inline: 1.25rem; scroll-snap-type: x proximity; scrollbar-width: none; }
    .js .index::-webkit-scrollbar { display: none; }
    .index__title { display: none; }
    .index li { flex: none; }
    .index button { width: auto; grid-template-columns: auto; padding: 0.6rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; scroll-snap-align: center; }
    .index .n, .index .k { display: none; }
    .index button:hover, .index button[aria-selected="true"] { translate: 0 0; }
    .index button[aria-selected="true"] { background: var(--maroon); border-color: rgba(255, 140, 145, 0.4); }
    .index button[aria-selected="true"] .t { color: #fff; }
    .bento { grid-template-columns: 1fr; }
    .tile__art { height: 13rem; }
    .exp { grid-template-columns: 1fr; }
    .exp__intro { position: static; }
    .steps { grid-template-columns: 1fr; gap: 0; padding-left: 2.2rem; }
    .steps::before, .steps::after { top: 0.6rem; left: 0.58rem; width: 2px; height: auto; }
    .steps::before { right: auto; bottom: 0.6rem; }
    .steps::after { height: calc((100% - 1.2rem) * var(--p, 0)); width: 2px; }
    .steps li { padding: 0 0 2rem; }
    .steps li:last-child { padding-bottom: 0; }
    .steps li::before { left: -2.2rem; top: 0.1rem; }
    .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .foot__grid { grid-template-columns: 1fr 1fr; }
    .foot__grid > div:first-child { grid-column: 1 / -1; }
    .lb__box { grid-template-columns: 1fr; overflow: auto; }
    .lb__view { max-height: 62dvh; }
}
@media (max-width: 760px) {
    .menu { display: block; }
    .nav { position: absolute; top: calc(100% + 0.6rem); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0.6rem 1.1rem 1.1rem; border-radius: 26px; background: rgba(30, 30, 34, 0.96); border: 1px solid var(--line-2); backdrop-filter: blur(20px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); display: none; }
    .nav.is-open { display: flex; animation: pop 0.4s var(--ease) both; }
    .nav a:not(.btn) { padding: 0.95rem 0.4rem; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
    .nav a:not(.btn):hover, .nav a.is-active:not(.btn) { background: transparent; }
    .nav .btn { margin: 1rem 0 0; }
    .hero h1 { font-size: clamp(2.5rem, 11.2vw, 3.3rem); }
    .actions .btn { flex: 1 1 100%; }
    .layer--c { width: 28%; }
    .chip-float--2 { display: none; }
    .proj__media { padding-right: 0.9rem; padding-bottom: 1.6rem; }
    .proj__media .phone { width: 22%; min-width: 4.4rem; }
    .hint { display: none; }
    .proj__info { grid-template-columns: 1fr; }
    .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
    .shot { border-radius: 16px; }
    .shot__cap { left: 0.8rem; right: 0.8rem; bottom: 0.75rem; }
    .shot__cap b { font-size: 0.85rem; }
    .shot__cap i { display: none; }
    .stat { padding-right: 1rem; }
    .stat + .stat { padding-left: 1rem; }
    .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
    .cv__job p { flex-direction: column; gap: 0.1rem; }
    .cv h3 { font-size: 2.2rem; }
    .contact__card { border-radius: 26px; }
    .foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
    .brand__name { display: none; }
}
@media (hover: none) {
    .proj .mock:not(.mock--still) .mock__screen img, .proj .phone__screen img { animation: pagescroll 16s ease-in-out infinite alternate; }
    .proj--still .mock__screen img, .proj--still .phone__screen img { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal, .js [data-split] .w > span { opacity: 1; transform: none; transition: none; }
    .aurora i, .float, .chip-float, .marquee__track, .autoscroll img, .art-flow path, .art-site b, .art-site .toast { animation: none; }
    .art-site .toast { opacity: 1; }
    .mock__screen img, .phone__screen img, .shot img { transition: none; }
    .shot.is-new, .lb.is-open, .lb__box, .nav.is-open { animation: none; }
    .art-funnel span { transition: none; width: var(--w); }
    .layer { transition: none; }
}

/* Save as PDF: print only the CV sheet ------------------------------------- */
@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #fff; }
    body.print-cv .bar, body.print-cv .foot, body.print-cv .progress, body.print-cv .grain, body.print-cv .lb, body.print-cv .skip, body.print-cv main > *:not(#cv), body.print-cv #cv .head, body.print-cv #cv .cv-actions { display: none !important; }
    body.print-cv #cv { background: none; border: 0; padding: 0; }
    body.print-cv #cv .wrap { width: 100%; margin: 0; }
    body.print-cv .cv { box-shadow: none; padding: 0; max-width: none; border-radius: 0; border-top: 0; width: 100%; }
    body.print-cv .reveal { opacity: 1 !important; transform: none !important; }
    .cv__job { break-inside: avoid; }
}


/* ==========================================================================
   Round two: ambient light, glowing edges, tilt, viewer controls
   ========================================================================== */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }

.ambient { position: fixed; left: 0; top: 0; z-index: 55; width: 44rem; height: 44rem; margin: -22rem 0 0 -22rem; border-radius: 50%; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(circle, rgba(217, 44, 53, 0.2), rgba(195, 35, 43, 0.07) 40%, transparent 68%); transition: opacity 0.6s; will-change: transform; }
.ambient.is-on { opacity: 1; }

.edge { position: relative; }
.edge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 2; background: conic-gradient(from var(--ang), transparent 0 62%, rgba(255, 106, 111, 0) 66%, rgba(255, 255, 255, 0.95) 80%, rgba(226, 86, 111, 0) 94%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude; animation: spin 7s linear infinite; }

.hero__copy { opacity: calc(1 - var(--hy, 0) * 0.55); }
.stage { translate: 0 calc(var(--hy, 0) * -46px); }
.aurora { translate: 0 calc(var(--hy, 0) * 90px); }

.proj__media { perspective: 1500px; }
.proj__media .mock { transform: rotateY(calc(var(--tx, 0) * 7deg)) rotateX(calc(var(--ty, 0) * -5deg)); transition: transform 0.6s var(--ease), box-shadow 0.5s; }
.proj__media .phone { transform: translate3d(calc(var(--tx, 0) * -16px), calc(var(--ty, 0) * -12px), 40px) rotateY(calc(var(--tx, 0) * 9deg)); transition: transform 0.6s var(--ease), translate 0.8s var(--ease); }

.viewer { min-width: 0; }
.vnav { display: none; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.js .vnav { display: flex; }
.vnav__count { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--dim); }
.vnav__count b { color: var(--rose); font-weight: 500; }
.vnav__btns { display: flex; gap: 0.5rem; }
.vnav button { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--ink); font-size: 1.05rem; cursor: pointer; transition: background 0.3s, border-color 0.3s, translate 0.4s var(--ease); }
.vnav button:hover { background: var(--maroon); border-color: rgba(255, 140, 145, 0.4); }
.vnav button:first-child:hover { translate: -3px 0; }
.vnav button:last-child:hover { translate: 3px 0; }

@media (max-width: 1000px) { .stage { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .edge::after { animation: none; }
    .ambient { display: none; }
    .hero__copy { opacity: 1; }
    .stage, .aurora { translate: 0 0; }
    .proj__media .mock, .proj__media .phone { transform: none; transition: none; }
}


/* ==========================================================================
   Flat system: dark gray and one red. No gradients, glows or grain.
   ========================================================================== */
body { background: var(--bg); }
.grain, .ambient, .aurora, .hero::before, .spot::before, .edge::after, .contact__card::before, .shot::after { display: none !important; }

em { font-style: normal; color: var(--maroon-2); }

.progress i { background: var(--rose-2); box-shadow: none; }
.bar__inner { background: rgba(30, 30, 34, 0.82); box-shadow: none; }
.bar.is-scrolled .bar__inner { background: rgba(30, 30, 34, 0.96); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.brand__mark { background: var(--maroon); border: 0; box-shadow: none; overflow: hidden; }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }

.btn { background: var(--maroon); border: 1px solid var(--maroon); box-shadow: none; }
.btn:hover { background: var(--maroon-2); border-color: var(--maroon-2); box-shadow: none; }
.btn--ghost { background: transparent; border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.4); box-shadow: none; }
.btn--sm { box-shadow: none; }
.btn--light { background: #fff; color: #18181b; border-color: #fff; box-shadow: none; }
.btn--light:hover { background: #f1f1f2; border-color: #f1f1f2; box-shadow: none; }

.label--rule::before { background: var(--rose-2); }
.section--alt { background: var(--bg-2); }

/* hero: flat red disc behind the floating screens */
.stage::before { content: ""; position: absolute; z-index: -1; right: -3%; top: -7%; width: 78%; aspect-ratio: 1; border-radius: 50%; background: var(--maroon); }
.mock { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.proj__media .mock { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.phone { background: #2c2c31; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.chip-float { background: #232327; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }

.stat dd { background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
.marquee { background: var(--bg-2); -webkit-mask-image: none; mask-image: none; }
.marquee span::after { color: var(--maroon-2); }

.feature { background: var(--surface); box-shadow: none; }
.index button[aria-selected="true"] { background: rgba(195, 35, 43, 0.18); border-color: rgba(255, 106, 111, 0.35); }
.shot__cap { left: 0; right: 0; bottom: 0; padding: 0.8rem 1rem; background: #18181b; border-top: 1px solid var(--line); }
.shot__cap i { background: transparent; }
.shot:hover { box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5); }
.shot:hover .shot__cap i { background: var(--maroon); }

.tile { background: var(--surface); }
.tile:hover { box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4); }
.tile__art { background: #1a1a1d; }
.art-site b { background: var(--maroon); }
.art-funnel span { background: var(--maroon-2); box-shadow: none; }
.steps::after, .tl::after { background: var(--rose-2); box-shadow: none; }
.steps li.is-lit::before, .tl li.is-lit::before { background: var(--maroon); border-color: var(--rose); box-shadow: none; }
.tl .chip { background: rgba(195, 35, 43, 0.18); border-color: rgba(255, 106, 111, 0.35); }

.cv { border-top-color: var(--maroon); }

.contact__card { background: var(--maroon); border: 0; box-shadow: none; }
.contact h2 em { color: #18181b; }
.contact .label { color: #ffe3e3; }
.contact .label .num { color: #ffc2c4 !important; }
.contact .label--rule::before { background: #ffe3e3; }
.contact .sub { color: #ffe9e9; }
.contact .btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.contact .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.contact .btn--light { color: var(--deep); }
.mail { color: #fff; }
.mail:hover { color: #18181b; }

.hero__copy { opacity: 1; }
.stage { translate: 0 calc(var(--hy, 0) * -30px); }

.lb { background: rgba(12, 12, 14, 0.9); backdrop-filter: none; -webkit-backdrop-filter: none; }
.lb__close { background: #232327; }
.lb__close:hover { background: var(--maroon); }

/* picture slots (filled when assets/kamran.png exists) */
.avatar { display: block; border-radius: 50%; object-fit: cover; background: var(--maroon); }
.hero__id { display: flex; align-items: center; gap: 1rem; }
.hero__id .avatar { width: 3.6rem; height: 3.6rem; flex: none; }
.contact__card .avatar { width: 6.5rem; height: 6.5rem; margin: 0 auto 1.6rem; border: 4px solid #fff; }
.foot__id { display: flex; align-items: center; gap: 0.9rem; }
.foot__id .avatar { width: 2.8rem; height: 2.8rem; }

@media (max-width: 1000px) { .stage { translate: 0 0; } .stage::before { right: 2%; top: -3%; } }


/* ==========================================================================
   Header at content width, menu centred; type-led hero
   ========================================================================== */
.bar { top: 16px; }
.bar__inner { width: min(100% - 2.5rem, var(--wrap)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0.8rem 0.8rem 0.8rem 1.3rem; }
.brand { justify-self: start; gap: 0.85rem; font-size: 1rem; }
.brand__mark { width: 2.8rem; height: 2.8rem; font-size: 0.8rem; }
.nav { justify-self: center; gap: 0.35rem; }
.nav a:not(.btn) { padding: 0.65rem 1.1rem; font-size: 0.95rem; }
.nav .nav__cta { display: none; }
.bar__end { justify-self: end; display: flex; align-items: center; gap: 0.6rem; }
.bar__cta { padding: 0.8rem 1.4rem; font-size: 0.92rem; }


@media (max-width: 760px) {
    .bar__inner { width: min(100% - 1.5rem, var(--wrap)); grid-template-columns: 1fr auto; padding: 0.65rem 0.65rem 0.65rem 1rem; }
    .bar__cta { display: none; }
    .nav { justify-self: stretch; }
    .nav .nav__cta { display: inline-flex; }
}

/* refinements */
.bar__inner { padding-inline: 1rem; }
@media (max-width: 760px) { .nav { background: #1e1e22; } .bar__inner { padding-inline: 1rem 0.65rem; } }

/* no decorative disc behind the hero screens */
.stage::before { content: none !important; }
