/* Night sky + dark dashboard theme */
:root {
  --bg: #06060b;
  --panel: #10101a;
  --ink: #f4f4fb;
  --ink-2: #a4a4ba;
  --accent: #7b61ff;
  --accent-2: #a898ff;
  --blue: #3d4bff;
  --cyan: #45b8e8;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --card: linear-gradient(180deg, rgba(24, 24, 38, .78), rgba(11, 11, 19, .82));
  --sky: linear-gradient(180deg, #ffffff 0%, #ddd8ff 52%, #8f7bff 100%);
  --radius: 24px;
  --display: "Plus Jakarta Sans", "Readex Pro", sans-serif;
  --display-ar: "Readex Pro", "Plus Jakarta Sans", sans-serif;
  --body: "Plus Jakarta Sans", "Readex Pro", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --spring: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --px: 0;
  --py: 0;
  --cx: 50vw;
  --cy: 30vh;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
html.modal-open { overflow: hidden; }
body { margin: 0; color: var(--ink); font-family: var(--body); font-weight: 400; line-height: 1.7; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
::selection { background: rgba(123, 97, 255, .45); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-2); }

/* Icons */
.ico { display: inline-block; flex: none; width: 1.2em; height: 1.2em; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-pen { --m: url("../assets/icons/pen.svg"); }
.ico-film { --m: url("../assets/icons/film.svg"); }
.ico-box { --m: url("../assets/icons/box.svg"); }
.ico-package { --m: url("../assets/icons/package.svg"); }
.ico-spark { --m: url("../assets/icons/spark.svg"); }
.ico-arrow { --m: url("../assets/icons/arrow.svg"); }
.ico-back { --m: url("../assets/icons/back.svg"); }
.ico-phone { --m: url("../assets/icons/phone.svg"); }
.ico-mail { --m: url("../assets/icons/mail.svg"); }
[dir="rtl"] .ico-back, [dir="rtl"] .ico-arrow { scale: -1 1; }

/* ---------- Night sky backdrop (moves against the mouse) ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; contain: strict; background: radial-gradient(140% 100% at 50% 110%, #12123a 0%, #070712 55%, #040408 100%); }
.sky { position: absolute; border-radius: 50%; filter: blur(48px); will-change: transform; }
.sky-a { width: 70vmax; height: 50vmax; left: -18vmax; bottom: -22vmax; background: radial-gradient(closest-side, #c9c2ff 0%, #6f5cff 45%, rgba(61, 75, 255, 0) 100%); opacity: .6; translate: calc(var(--px) * -40px) calc(var(--py) * -30px); animation: auroraA 18s ease-in-out infinite alternate; }
.sky-b { width: 60vmax; height: 44vmax; right: -20vmax; top: 10vmax; background: radial-gradient(closest-side, #9fe6ff 0%, #2f8fd0 45%, rgba(20, 60, 140, 0) 100%); opacity: .35; translate: calc(var(--px) * -60px) calc(var(--py) * -40px); animation: auroraB 22s ease-in-out infinite alternate; }
.sky-c { width: 50vmax; height: 36vmax; left: 30%; top: -24vmax; background: radial-gradient(closest-side, #3d4bff 0%, rgba(20, 20, 90, 0) 100%); opacity: .55; translate: calc(var(--px) * 30px) calc(var(--py) * 20px); animation: auroraA 26s ease-in-out infinite alternate-reverse; }
.bg-follow { position: absolute; left: 0; top: 0; width: 46vmax; height: 46vmax; margin: -23vmax 0 0 -23vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(150, 130, 255, .28), rgba(123, 97, 255, .08) 55%, transparent); translate: var(--cx) var(--cy); pointer-events: none; }
.stars { position: absolute; inset: -6%; background-position: center; background-size: cover; background-repeat: no-repeat; }
.stars-a { background-image: url("../assets/stars-a.svg"); opacity: .75; translate: calc(var(--px) * -10px) calc(var(--py) * -8px); animation: twinkleA 5s ease-in-out infinite alternate; }
.stars-b { background-image: url("../assets/stars-b.svg"); translate: calc(var(--px) * -26px) calc(var(--py) * -20px); animation: twinkleB 3.4s ease-in-out infinite alternate; }
.stars-b::after { content: ""; position: absolute; top: 18%; left: 70%; width: 160px; height: 1.5px; background: linear-gradient(90deg, #fff, transparent); border-radius: 2px; rotate: -32deg; opacity: 0; animation: shoot 9s ease-in 3s infinite; }
.bg-grain { position: absolute; inset: 0; background: url("../assets/grain.svg"); opacity: .05; }

/* Navigation veil used for page transitions */
.veil { position: fixed; inset: 0 -100%; z-index: 150; pointer-events: none; background: linear-gradient(100deg, transparent 0%, rgba(123, 97, 255, .95) 24%, #cbc4ff 50%, rgba(61, 75, 255, .95) 76%, transparent 100%); translate: -110% 0; }
[dir="rtl"] .veil { translate: 110% 0; }

/* Mouse follower */
.cursor-ring { position: fixed; left: 0; top: 0; z-index: 210; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid rgba(200, 190, 255, .7); border-radius: 50%; pointer-events: none; translate: var(--rx-c, -100px) var(--ry-c, -100px); transition: width .3s var(--spring), height .3s var(--spring), margin .3s var(--spring), background .3s, border-color .3s, opacity .3s; mix-blend-mode: screen; }
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(123, 97, 255, .14); border-color: rgba(200, 190, 255, .95); }
.cursor-ring.is-down { width: 24px; height: 24px; margin: -12px 0 0 -12px; background: rgba(123, 97, 255, .5); }
.cursor-ring.is-hidden { opacity: 0; }

/* Click particles */
.fx { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.fx-ring, .fx-spark, .fx-confetti { position: absolute; border-radius: 50%; translate: 0 0; }
.fx-ring { width: 90px; height: 90px; margin: -45px 0 0 -45px; border: 2px solid var(--accent-2); box-shadow: 0 0 24px rgba(123, 97, 255, .6); }
.fx-spark { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.fx-spark.fx-white { background: #fff; box-shadow: 0 0 12px #c9c2ff; }
.fx-confetti { width: 7px; height: 12px; margin: -6px 0 0 -4px; border-radius: 2px; }

/* Surfaces */
.glass { background: rgba(14, 14, 22, .62); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 50px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(16, 16, 26, .96); } }

/* Mouse spotlight on card borders */
.b-card, .cat, .contact, .quote { position: relative; isolation: isolate; }
.b-card::before, .cat::before, .contact::before, .quote::before { content: ""; position: absolute; inset: 0; z-index: 2; padding: 1px; border-radius: inherit; background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(190, 175, 255, .95), rgba(123, 97, 255, .35) 40%, transparent 70%); -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); opacity: 0; transition: opacity .35s; pointer-events: none; }
.b-card:hover::before, .cat:hover::before, .contact:hover::before, .quote:hover::before { opacity: 1; }

/* Shared motion hooks */
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); transition: transform .6s var(--spring), box-shadow .4s, border-color .4s; }
[data-tilt].tilting { --lift: -6px; transition: transform .12s linear, box-shadow .4s, border-color .4s; }
[data-magnet] { transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform .45s var(--spring), background .25s, color .25s, border-color .25s, box-shadow .25s; }
[data-reveal] { opacity: 0; translate: 0 40px; filter: blur(8px); scale: .98; transition: opacity .9s var(--spring) var(--d, 0ms), translate .9s var(--spring) var(--d, 0ms), filter .9s var(--spring) var(--d, 0ms), scale .9s var(--spring) var(--d, 0ms), transform .6s var(--spring), box-shadow .4s, border-color .4s; }
[data-reveal].is-in { opacity: 1; translate: 0 0; filter: none; scale: 1; }

/* Nav */
.preview-strip { position: sticky; top: 0; z-index: 60; padding: 6px 16px; text-align: center; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; }
.nav { position: sticky; top: 12px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px var(--gutter) 0; padding: 8px 10px 8px 18px; border-radius: 18px; animation: drop .9s var(--spring) both; }
[dir="rtl"] .nav { padding: 8px 18px 8px 10px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: letter-spacing .4s var(--spring), color .3s; }
.nav-brand::before { content: ""; width: 30px; height: 30px; border-radius: 9px; background: radial-gradient(circle at 30% 30%, #fff, #b8adff 35%, var(--accent) 70%); box-shadow: 0 0 18px rgba(123, 97, 255, .6); transition: rotate .6s var(--bounce); }
.nav-brand:hover { letter-spacing: .08em; color: var(--accent-2); }
.nav-brand:hover::before { rotate: 135deg; }
.nav-links { display: flex; gap: 6px; font-size: 14px; }
.nav-links a { display: inline-block; padding: 7px 14px; border-radius: 10px; text-decoration: none; color: var(--ink-2); transition: color .25s, background .25s, translate .35s var(--bounce); }
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); translate: 0 -2px; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; color: var(--ink-2); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: ping 2s ease-out infinite; }
.badge.off::before { background: #8a8a90; box-shadow: none; animation: none; }
.lang { min-height: 38px; padding: 2px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: rgba(255, 255, 255, .04); cursor: pointer; font-size: 13px; font-weight: 600; }
.lang:hover { background: #fff; color: #0b0b12; }

/* Headings */
.duo { display: inline-grid; direction: ltr; margin: 0; font-size: clamp(48px, 7vw, 92px); font-weight: 800; letter-spacing: -.035em; line-height: 1; cursor: default; }
.duo-en { font-family: var(--display); color: transparent; background: var(--sky); -webkit-background-clip: text; background-clip: text; transition: letter-spacing .5s var(--spring); }
.duo-ar { justify-self: end; margin-top: -.3em; font-family: var(--display-ar); font-size: .56em; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--accent-2); direction: rtl; opacity: .85; transition: translate .5s var(--bounce); }
.duo:hover .duo-en { letter-spacing: -.01em; }
.duo:hover .duo-ar { translate: -14px 6px; }
.duo-sm { font-size: clamp(32px, 3.6vw, 46px); }
.art-head { position: relative; display: inline-block; margin: 0; cursor: default; }
.heading-art { display: block; height: clamp(70px, 8.4vw, 112px); width: auto; overflow: visible; filter: drop-shadow(0 0 22px rgba(123, 97, 255, .35)); }
.art-sm .heading-art { height: clamp(50px, 5vw, 66px); }
.heading-art .h-en { fill: #fff; }
.heading-art .h-ar { fill: var(--accent); }
.heading-art .h-en, .heading-art .h-ar { transition: translate .6s var(--bounce), opacity .6s; }
[data-reveal]:not(.is-in) .heading-art .h-ar { translate: 30px 0; opacity: 0; }
[data-reveal]:not(.is-in) .heading-art .h-en { translate: 0 26px; }
.art-head:hover .h-en { translate: 0 -6px; }
.art-head:hover .h-ar { translate: -10px 4px; }
.sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(26px, 4vw, 44px); }
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, .1)); scale: 0 1; transform-origin: right; transition: scale 1.1s var(--spring) .2s; }
[dir="ltr"] .sec-line { transform-origin: left; background: linear-gradient(90deg, rgba(255, 255, 255, .1), var(--accent)); }
.sec-head.is-in .sec-line { scale: 1 1; }
.sec-arrow { width: 20px; fill: var(--accent-2); animation: bob 1.8s ease-in-out infinite; }

/* Pills (like dashboard tags) */
.eyebrow, .corner { display: inline-block; width: fit-content; padding: 2px 12px; border-radius: 999px; background: #fff; color: #0b0b12; font-size: 12px; font-weight: 600; letter-spacing: .01em; }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; min-height: calc(100svh - 80px); padding: clamp(40px, 5vw, 64px) var(--gutter) 40px; overflow: hidden; }
.moon { position: absolute; top: clamp(30px, 6vw, 70px); left: 50%; width: clamp(70px, 8vw, 120px); aspect-ratio: 1; margin-left: calc(clamp(70px, 8vw, 120px) / -2); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e6e8f5 30%, #a9acc8 70%, #7d80a3 100%); box-shadow: 0 0 60px rgba(200, 205, 255, .55), 0 0 160px rgba(123, 97, 255, .35); translate: calc(var(--px) * 22px) calc(var(--py) * 16px); animation: moonIn 1.8s var(--spring) both; opacity: .9; }
.corner { position: absolute; top: 18px; animation: fade 1s .6s both; }
.corner-start { inset-inline-start: var(--gutter); }
.corner-end { inset-inline-end: var(--gutter); }
.deco { position: absolute; width: clamp(64px, 9vw, 120px); fill: none; stroke: rgba(200, 190, 255, .55); stroke-width: 2.5; stroke-dasharray: 22 14; stroke-linecap: round; animation: float 7s ease-in-out infinite, march 6s linear infinite; translate: calc(var(--px) * 30px) calc(var(--py) * 24px); }
.deco-a { top: 14%; inset-inline-start: 7%; }
.deco-b { bottom: 24%; inset-inline-end: 6%; animation-delay: -3s; translate: calc(var(--px) * -30px) calc(var(--py) * -24px); }
.deco-cursor { position: absolute; bottom: calc(24% + clamp(60px, 9vw, 120px)); inset-inline-end: calc(6% + clamp(60px, 9vw, 120px)); width: 28px; fill: #fff; animation: float 7s ease-in-out -3s infinite; }
.hero-title { position: relative; z-index: 2; width: min(980px, 92vw); margin: clamp(60px, 7vw, 90px) 0 0; cursor: pointer; translate: calc(var(--px) * -10px) calc(var(--py) * -8px); }
.hero-art { width: 100%; height: auto; user-select: none; filter: hue-rotate(250deg) saturate(1.15) drop-shadow(0 0 40px rgba(123, 97, 255, .45)); animation: heroIn 1.3s var(--spring) .15s both; }
.hero-glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 30%), rgba(255, 255, 255, .8), transparent 32%); -webkit-mask: url("../assets/cover.webp") center / 100% 100% no-repeat; mask: url("../assets/cover.webp") center / 100% 100% no-repeat; mix-blend-mode: overlay; opacity: 0; transition: opacity .4s; }
.hero-title.tilting .hero-glare { opacity: 1; }
.hero-title::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(220, 210, 255, .7) 50%, transparent 60%) -150% 0 / 250% 100% no-repeat; -webkit-mask: url("../assets/cover.webp") center / 100% 100% no-repeat; mask: url("../assets/cover.webp") center / 100% 100% no-repeat; animation: sweep 1.6s ease-in-out 1.2s both; }

.ring-nav { position: absolute; top: 50%; z-index: 5; width: 46px; height: 46px; margin-top: -23px; border-radius: 14px; cursor: pointer; font-size: 22px; line-height: 1; }
.ring-nav:hover { background: #fff; color: #0b0b12; }
.ring-prev { left: max(16px, 4vw); }
.ring-next { right: max(16px, 4vw); }
.hero-foot { z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; width: 100%; margin-top: 18px; animation: rise 1s var(--spring) .8s both; }
.statement { flex: 1 1 340px; margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 24px; overflow: hidden; border: 1px solid transparent; border-radius: 14px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .4) 50%, transparent 70%) -120% 0 / 250% 100% no-repeat; transition: background-position .7s var(--spring); }
.btn:hover::before { background-position: 120% 0; }
.btn-red { background: linear-gradient(135deg, #9583ff, var(--accent) 45%, #4b3bd6); color: #fff; box-shadow: 0 10px 30px rgba(123, 97, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-red:hover { box-shadow: 0 14px 44px rgba(123, 97, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.glass:hover { border-color: var(--accent-2); }
.btn-sm { min-height: 40px; padding: 4px 16px; font-size: 13px; white-space: nowrap; }

/* ---------- About bento ---------- */
.section { padding: clamp(60px, 8vw, 110px) var(--gutter); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.b-card { grid-column: span 12; padding: clamp(18px, 2.4vw, 28px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.b-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(123, 97, 255, .14), transparent 60%); opacity: 0; transition: opacity .4s; }
.b-card:hover::after { opacity: 1; }

.b-photo { grid-column: 1 / span 5; grid-row: span 2; align-self: start; aspect-ratio: 1122 / 1402; padding: 0; background: #1b2a52; cursor: pointer; }
.portrait { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--spring), filter .9s; filter: saturate(.9); }
.b-photo:hover .portrait { scale: 1.035; filter: saturate(1.05); }
.b-photo::after { z-index: 0; background: linear-gradient(180deg, transparent 55%, rgba(6, 6, 14, .55)), radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(150, 130, 255, .22), transparent 60%); opacity: 1; }
.photo-frame { position: absolute; top: 7%; inset-inline-end: 7%; z-index: 1; width: 24%; fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 22 14; stroke-linecap: round; opacity: .75; animation: march 6s linear infinite; transition: rotate .8s var(--spring), scale .8s var(--spring); }
.b-photo:hover .photo-frame { rotate: 18deg; scale: 1.1; }
.photo-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.photo-tag { position: absolute; bottom: 16px; inset-inline-start: 16px; z-index: 1; padding: 6px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; transition: translate .5s var(--bounce); }
.b-photo:hover .photo-tag { translate: 0 -6px; }

/* Bachelor's seal: silver rosette, violet enamel, laurel and ribbons */
.b-degree { grid-column: 6 / span 4; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: radial-gradient(90% 60% at 50% 28%, rgba(123, 97, 255, .2), transparent 70%), var(--card); }
.b-degree .eyebrow { margin-inline: auto; }
.degree-badge { width: min(260px, 100%); aspect-ratio: 1; margin-top: -6px; padding: 0; border: 0; background: none; cursor: pointer; }
.degree-badge svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .55)); }
.b-glow { fill: #9b88ff; opacity: 0; filter: blur(18px); transform-box: fill-box; transform-origin: center; }
.b-seal { transform-box: view-box; transform-origin: 150px 136px; scale: 0; rotate: -140deg; }
.b-rosette { fill: url(#bRim); stroke: rgba(255, 255, 255, .7); stroke-width: .8; }
.b-band { fill: url(#bBand); stroke: url(#bGold); stroke-width: 1.4; }
.b-ring { fill: none; stroke: url(#bGold); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--spring) .55s; }
.b-text-wrap { transform-box: view-box; transform-origin: 150px 136px; opacity: 0; transition: opacity .8s 1.5s; }
.b-text { fill: #e6e1ff; font: 700 10.5px var(--body); letter-spacing: .14em; }
.b-disc { fill: url(#bEnamel); stroke: url(#bGold); stroke-width: 2.2; transform-box: fill-box; transform-origin: center; scale: 0; transition: scale .8s var(--bounce) .75s; }
.b-dots { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.3; stroke-dasharray: .4 5; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .6s 1.2s; }
.b-ribbon { fill: #5b45e0; stroke: url(#bGold); stroke-width: 1.4; stroke-linejoin: round; transform-box: fill-box; transform-origin: 50% 0; scale: 1 0; }
.b-ribbon-r { fill: #3a2aa8; }
.b-stem { fill: none; stroke: url(#bGold); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--spring) .6s; }
.b-leaf { fill: url(#bGold); stroke: rgba(40, 30, 90, .4); stroke-width: .5; transform-box: fill-box; transform-origin: center; scale: 0; }
.b-cap { transform-box: view-box; transform-origin: 100px 100px; opacity: 0; translate: 0 -190px; rotate: -40deg; }
.cap-skull { fill: #0e0d1c; stroke: #2a2850; stroke-width: 1.5; }
.cap-top { fill: url(#capTop); stroke: rgba(255, 255, 255, .6); stroke-width: 1; }
.cap-knot { fill: url(#bGold); }
.b-tassel { transform-box: view-box; transform-origin: 100px 92px; }
.tassel-cord { fill: none; stroke: #d9d3ff; stroke-width: 2.6; stroke-linecap: round; }
.tassel-end { fill: url(#bGold); }
.b-shine { fill: url(#bShine); opacity: .7; }
.b-sparks path { fill: #fff; transform-box: fill-box; transform-origin: center; scale: 0; }
.degree-badge.play .b-seal { animation: sealIn 1.1s var(--bounce) .1s forwards; }
.degree-badge.play .b-ring, .degree-badge.play .b-stem { stroke-dashoffset: 0; }
.degree-badge.play .b-disc { scale: 1; }
.degree-badge.play .b-dots { opacity: 1; animation: spin 40s linear 1.8s infinite reverse; }
.degree-badge.play .b-text-wrap { opacity: 1; animation: spin 30s linear 2s infinite; }
.degree-badge.play .b-ribbon { animation: unfurl .7s var(--bounce) .55s forwards; }
.degree-badge.play .b-ribbon-r { animation-delay: .68s; }
.degree-badge.play .b-leaf { animation: leafPop .5s var(--bounce) calc(.75s + var(--i, 0) * 45ms) forwards; }
.degree-badge.play .b-cap { animation: capDrop 1.15s var(--spring) 1.15s forwards; }
.degree-badge.play .b-tassel { animation: swing 2.4s ease-out 2.1s both; }
.degree-badge.play .b-shine { animation: shine 5.5s ease-in-out 2.3s infinite; }
.degree-badge.play .b-glow { animation: glowPulse 3.8s ease-in-out 2s infinite; }
.degree-badge.play .b-sparks path { animation: twinkle 1.6s var(--bounce) 2.1s both, sparkle 2.6s ease-in-out 3.8s infinite; }
.degree-badge.play .b-sparks path:nth-child(2) { animation-delay: 2.25s, 4.4s; }
.degree-badge.play .b-sparks path:nth-child(3) { animation-delay: 2.4s, 5s; }
.degree-badge.play .b-sparks path:nth-child(4) { animation-delay: 2.55s, 5.6s; }
.degree-badge.play:hover .b-shine { animation-duration: 1.5s; }
.degree-badge.play:hover .b-text-wrap { animation-duration: 8s; }
.degree-badge.play:hover .b-glow { animation-duration: 1.4s; }
.degree-text h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.3; }
.degree-text p { margin: 2px 0 0; color: var(--ink-2); }

.b-years { grid-column: 10 / span 3; display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
.years-num { display: flex; align-items: flex-start; direction: ltr; font-family: var(--display); line-height: .9; }
.years-num span { margin-top: .12em; font-size: clamp(36px, 3.6vw, 52px); font-weight: 700; color: var(--accent-2); }
.years-num b { font-size: clamp(110px, 12vw, 170px); font-weight: 800; letter-spacing: -.05em; color: transparent; background: var(--sky); -webkit-background-clip: text; background-clip: text; font-variant-numeric: tabular-nums; }
.years-label { margin: 8px 0 0; font-size: 17px; font-weight: 600; }

.b-bio { grid-column: 6 / span 7; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.about-text { margin: 0; color: #d6d6e6; font-size: clamp(15px, 1.35vw, 18px); }
.b-bio .btn { align-self: flex-start; }

/* Signal bars (the purple chart bars of the dashboard) */
.fluted { display: block; height: 30px; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 12px); -webkit-mask: linear-gradient(90deg, #000, rgba(0, 0, 0, .25)); mask: linear-gradient(90deg, #000, rgba(0, 0, 0, .25)); border-radius: 4px; transform-origin: bottom; animation: bars 2.6s ease-in-out infinite alternate; }
:hover > .fluted { animation-duration: .7s; }
.cat .fluted { height: 22px; margin: 4px 0 2px; }

.b-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.tools { display: flex; flex-wrap: wrap; gap: 12px; }
.tool { --c: var(--accent-2); position: relative; display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid var(--line-2); border-radius: 18px; background: rgba(255, 255, 255, .03); cursor: pointer; transition: translate .45s var(--bounce), rotate .45s var(--bounce), border-color .3s, box-shadow .3s, background .3s; }
.tool-ico { width: 34px; height: 34px; background: #e9e8f5; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; transition: background .3s, scale .45s var(--bounce); }
.ico-ps { --m: url("../assets/icons/ps.svg"); }
.ico-ai { --m: url("../assets/icons/ai.svg"); }
.ico-ae { --m: url("../assets/icons/ae.svg"); }
.ico-pr { --m: url("../assets/icons/pr.svg"); }
.ico-lr { --m: url("../assets/icons/lr.svg"); }
.ico-blender { --m: url("../assets/icons/blender.svg"); }
.tool-abbr { font-family: var(--display); font-size: 22px; font-weight: 800; transition: color .3s, scale .45s var(--bounce); }
.tool-name { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 3; padding: 2px 10px; border-radius: 999px; background: #fff; color: #0b0b12; font-size: 11px; font-weight: 600; white-space: nowrap; translate: -50% -4px; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; }
.tool:hover, .tool:focus-visible { translate: 0 -8px; rotate: -6deg; border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 40%, transparent); }
.tool:hover .tool-ico, .tool:focus-visible .tool-ico { background: var(--c); scale: 1.12; }
.tool:hover .tool-abbr, .tool:focus-visible .tool-abbr { color: var(--c); scale: 1.12; }
.tool:hover .tool-name, .tool:focus-visible .tool-name { opacity: 1; translate: -50% 0; }

.b-skills { grid-column: 1 / span 7; }
.b-exper { grid-column: 8 / span 5; }
.b-skills .art-head, .b-exper .art-head, .b-lang .duo, .b-hobby .duo { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 7px 15px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .25s, border-color .25s, color .25s, translate .4s var(--bounce), rotate .4s var(--bounce), box-shadow .25s; }
.chip:nth-child(odd):hover { rotate: -4deg; }
.chip:nth-child(even):hover { rotate: 4deg; }
.chip:hover, .chip:focus-visible { translate: 0 -5px; background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(123, 97, 255, .45); }
.exp-list li { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 8px; border-bottom: 1px solid var(--line); cursor: pointer; isolation: isolate; transition: padding .4s var(--spring), color .3s; }
.exp-list li::before { content: ""; position: absolute; inset: 2px 0; z-index: -1; border-radius: 10px; background: linear-gradient(90deg, rgba(123, 97, 255, .3), transparent); scale: 0 1; transform-origin: right; transition: scale .45s var(--spring); }
[dir="ltr"] .exp-list li::before { transform-origin: left; background: linear-gradient(270deg, rgba(123, 97, 255, .3), transparent); }
.exp-list li:hover, .exp-list li:focus-visible { padding-inline-start: 18px; }
.exp-list li:hover::before, .exp-list li:focus-visible::before { scale: 1 1; }
.exp-num { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--accent-2); }
.b-lang, .b-hobby { grid-column: span 6; }
.b-lang.wide, .b-hobby.wide { grid-column: span 12; }
.lang-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); transition: padding .4s var(--spring); }
.lang-list li:hover { padding-inline-start: 14px; }
.lang-list span { color: var(--ink-2); }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cat { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: clamp(360px, 34vw, 440px); padding: clamp(20px, 2.6vw, 30px); overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); text-align: start; cursor: pointer; }
.cat-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px circle at var(--gx, 80%) var(--gy, 10%), rgba(123, 97, 255, .3), transparent 60%); opacity: .5; transition: opacity .4s; }
.cat:hover { border-color: rgba(168, 152, 255, .4); box-shadow: 0 30px 80px rgba(60, 40, 180, .35); }
.cat:hover .cat-glow { opacity: 1; }
.cat-stack { position: absolute; top: 26px; inset-inline-end: 26px; z-index: -1; width: 40%; aspect-ratio: 808 / 632; }
.cat-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 16px 36px rgba(0, 0, 0, .55); rotate: calc((var(--i) - 1) * 7deg); translate: calc(var(--i) * -10px) calc(var(--i) * 8px); z-index: calc(3 - var(--i)); transition: rotate .6s var(--bounce), translate .6s var(--bounce), scale .6s var(--bounce); }
.cat:hover .cat-stack img { rotate: calc((var(--i) - 1) * 16deg); translate: calc(var(--i) * -46px) calc(var(--i) * 14px - 10px); scale: 1.04; }
.cat-num { position: absolute; top: 20px; inset-inline-start: 24px; font-family: var(--display); font-size: clamp(44px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .3); transition: color .4s, translate .5s var(--bounce); }
.cat:hover .cat-num { color: var(--accent); -webkit-text-stroke-color: var(--accent); translate: 0 -4px; }
.cat-ico { box-sizing: content-box; width: 22px; height: 22px; padding: 9px; border: 1px solid var(--line-2); border-radius: 11px; color: var(--accent-2); background-clip: content-box; transition: rotate .5s var(--bounce), scale .5s var(--bounce), border-color .3s; }
.cat:hover .cat-ico { rotate: -12deg; scale: 1.12; border-color: var(--accent); }
.cat-title { font-family: var(--display-ar); font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; line-height: 1.15; }
[lang="en"] .cat-title { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; }
.cat-text { position: relative; max-width: 44ch; color: var(--ink-2); }
.cat-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cat-count { padding: 2px 12px; border-radius: 999px; background: #fff; color: #0b0b12; font-size: 12px; font-weight: 700; }
.cat-go { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #9583ff, var(--accent) 50%, #4b3bd6); color: #fff; font-size: 20px; box-shadow: 0 10px 26px rgba(123, 97, 255, .45); transition: rotate .5s var(--bounce), scale .5s var(--bounce); }
.cat:hover .cat-go { rotate: -45deg; scale: 1.12; }
[dir="ltr"] .cat:hover .cat-go { rotate: 45deg; }
.cat.is-empty .cat-stack { display: grid; place-items: center; border: 2px dashed rgba(168, 152, 255, .35); border-radius: 20px; }
.cat.is-empty .cat-count { background: rgba(123, 97, 255, .2); color: var(--accent-2); }

/* Category view */
.cat-view { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; color: var(--ink); background: radial-gradient(120% 80% at 80% 0%, #2a1f7a 0%, #0b0b1c 45%, #050509 100%); }
.cat-view[open] { display: flex; flex-direction: column; }
.cat-view::backdrop { background: transparent; }
.cat-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px var(--gutter) 0; padding: 8px; border-radius: 18px; }
.cat-back { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 16px; border: 0; border-radius: 12px; background: #fff; color: #0b0b12; cursor: pointer; font-weight: 700; }
.cat-count-lg { padding-inline-end: 12px; color: var(--ink-2); font-size: 14px; }
.cat-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 4vw, 48px) var(--gutter) 60px; }
.cat-duo { margin-bottom: 8px; font-size: clamp(52px, 8.6vw, 120px); animation: rise .8s var(--spring) .25s both; }
.cat-lead { max-width: 60ch; margin: 0 0 clamp(26px, 4vw, 44px); color: var(--ink-2); font-size: 17px; animation: rise .8s var(--spring) .35s both; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.cat-empty { display: grid; place-items: center; gap: 14px; padding: 60px 16px; color: var(--ink-2); text-align: center; }
.soon-ico { width: 100px; height: 100px; border: 3px dashed var(--accent-2); border-radius: 28px; animation: spin 9s linear infinite; }

/* Project cards */
.card { position: relative; padding: 0; border: 0; background: none; text-align: start; cursor: pointer; }
.card-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); transition: border-color .3s, box-shadow .3s; }
.card:hover .card-img { border-color: rgba(168, 152, 255, .5); box-shadow: 0 24px 60px rgba(60, 40, 180, .35); }
.card-wide { grid-column: 1 / -1; }
.card-wide .card-img { aspect-ratio: 21 / 9; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .7s var(--spring); }
.card:hover .card-img img, .card:focus-visible .card-img img { scale: 1.07; }
.card-frame { position: absolute; top: 10px; left: 10px; width: calc(100% - 20px); height: calc(100% - 20px - 54px); opacity: 0; fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 16 10; stroke-linecap: round; transition: opacity .25s; pointer-events: none; animation: march 6s linear infinite; }
.card-frame rect { vector-effect: non-scaling-stroke; }
.card-cursor { position: absolute; top: 14%; inset-inline-end: 8%; width: 26px; fill: #fff; opacity: 0; transform: translate(14px, 14px); transition: opacity .25s, transform .4s var(--bounce); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); pointer-events: none; }
.card:hover .card-frame, .card:focus-visible .card-frame { opacity: .9; }
.card:hover .card-cursor, .card:focus-visible .card-cursor { opacity: 1; transform: none; }
.card-title { display: block; margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.4; transition: color .25s; }
.card:hover .card-title { color: var(--accent-2); }
.card-meta { display: block; min-height: 1.5em; font-size: 13px; color: var(--ink-2); }

/* Proof */
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 34px; margin-bottom: 30px; }
.logos img { height: 44px; width: auto; filter: grayscale(1) brightness(1.8); opacity: .8; transition: filter .3s, opacity .3s, scale .4s var(--bounce); }
.logos img:hover { filter: none; opacity: 1; scale: 1.1; }
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.quote { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.quote p { margin: 0; }
.quote cite { display: block; margin-top: 12px; font-style: normal; color: var(--accent-2); font-size: 14px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 70px); padding: clamp(22px, 4vw, 54px); border-radius: 30px; }
.contact .duo { margin-bottom: 18px; }
.contact .fluted { margin-bottom: 8px; }
.contact-lead { margin: 0 0 18px; font-size: 17px; color: var(--ink-2); }
.contact-list { display: grid; gap: 10px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; }
.contact-list a:hover { border-color: var(--accent); background: rgba(123, 97, 255, .16); }
.contact-list .ico { color: var(--accent-2); }
.form { display: grid; gap: 14px; align-content: start; }
.field { position: relative; display: block; }
.field input, .field textarea { width: 100%; min-height: 54px; padding: 22px 16px 8px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .03); resize: vertical; transition: border-color .3s, box-shadow .3s, background .3s; }
.field textarea { min-height: 120px; padding-top: 26px; }
.field span { position: absolute; top: 15px; inset-inline-start: 16px; color: var(--ink-2); font-size: 14px; pointer-events: none; transition: top .25s var(--spring), font-size .25s var(--spring), color .25s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(123, 97, 255, .08); box-shadow: 0 0 0 4px rgba(123, 97, 255, .22); }
.field input:focus + span, .field input:not(:placeholder-shown) + span, .field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { top: 5px; font-size: 11px; color: var(--accent-2); }
.form-error { margin: 0; color: #ff8fa0; font-size: 14px; }

/* Footer */
.footer { padding: 30px var(--gutter) 34px; border-top: 1px solid var(--line); }
.footer-word { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 0 20px; font-family: var(--display); font-size: clamp(60px, 13vw, 200px); font-weight: 800; letter-spacing: -.04em; line-height: 1; direction: ltr; }
.footer-word.is-ar { gap: 0 .28em; font-family: var(--display-ar); font-weight: 700; letter-spacing: 0; direction: rtl; }
.footer-word span { display: inline-block; color: transparent; -webkit-text-stroke: 1.5px rgba(200, 190, 255, .35); cursor: default; transition: color .3s, translate .45s var(--bounce), rotate .45s var(--bounce), -webkit-text-stroke-color .3s, text-shadow .3s; }
.footer-word span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); text-shadow: 0 0 40px rgba(123, 97, 255, .7); translate: 0 -16px; rotate: calc((var(--i) % 2 * 2 - 1) * 6deg); }
.footer-word.is-ar span { -webkit-text-stroke-width: 0; color: rgba(200, 190, 255, .16); }
.footer-word.is-ar span:hover { color: var(--accent); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--ink-2); font-size: 13px; }
.top-btn { min-height: 40px; padding: 4px 16px; border-radius: 12px; cursor: pointer; }
.top-btn:hover { background: #fff; color: #0b0b12; }

.wa-float { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-end: 18px; z-index: 40; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #25d366; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); animation: ping-shadow 2.6s ease-out infinite; transition: scale .4s var(--bounce), rotate .4s var(--bounce); }
.wa-float:hover { scale: 1.12; rotate: -8deg; }
.wa-float svg { width: 30px; fill: #fff; }

/* Project window */
.modal { width: min(1040px, 100vw); max-width: 100vw; height: min(92dvh, 1200px); max-height: 100dvh; padding: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: 24px; color: var(--ink); background: rgba(12, 12, 20, .9); -webkit-backdrop-filter: blur(26px) saturate(140%); backdrop-filter: blur(26px) saturate(140%); box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 80px rgba(123, 97, 255, .2); }
.modal[open] { display: flex; flex-direction: column; animation: pop-in .55s var(--bounce); }
.modal::backdrop { background: rgba(4, 4, 10, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
.modal-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 18px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; unicode-bidi: plaintext; }
.modal-close { flex: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .04); cursor: pointer; font-size: 16px; transition: background .25s, color .25s, rotate .4s var(--bounce); }
.modal-close:hover { background: #fff; color: #0b0b12; rotate: 90deg; }
.modal-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(14px, 3vw, 30px); }
.case { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; margin-bottom: 22px; }
.case h3 { margin: 0 0 4px; color: var(--accent-2); font-size: 14px; font-weight: 700; }
.case p, .modal-desc { margin: 0; white-space: pre-line; }
.modal-desc { margin-bottom: 20px; color: var(--ink-2); }
.media { display: grid; gap: 12px; }
.media > * { animation: rise .7s var(--spring) both; }
.media img { width: 100%; height: auto; border-radius: 12px; background: var(--panel); }
.media-video { position: relative; justify-self: center; width: min(100%, calc(76dvh * var(--ar, 1.778))); aspect-ratio: var(--ar, 1.778); overflow: hidden; border-radius: 12px; background: #000; }
.media-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-more { display: flex; justify-content: center; margin-top: 22px; }
.empty, .noscript { padding: 56px 16px; text-align: center; color: var(--ink-2); }

/* Language switch crossfade */
::view-transition-old(root) { animation: vt-out .35s ease-in both; }
::view-transition-new(root) { animation: vt-in .5s var(--spring) both; }

/* Keyframes */
@keyframes float { 50% { translate: 0 -14px; rotate: 3deg; } }
@keyframes march { to { stroke-dashoffset: -144; } }
@keyframes rise { from { opacity: 0; translate: 0 26px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { opacity: 0; translate: 0 -30px; } }
@keyframes pop-in { from { opacity: 0; scale: .9; translate: 0 30px; filter: blur(8px); } }
@keyframes heroIn { from { opacity: 0; scale: 1.12; filter: blur(14px) hue-rotate(250deg); } }
@keyframes moonIn { from { opacity: 0; translate: 0 60px; scale: .6; } }
@keyframes sweep { to { background-position: 150% 0; } }
@keyframes bob { 50% { translate: 0 6px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); } 100% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }
@keyframes ping-shadow { 0% { box-shadow: 0 10px 28px rgba(0, 0, 0, .5), 0 0 0 0 rgba(37, 211, 102, .55); } 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, .5), 0 0 0 16px rgba(37, 211, 102, 0); } }
@keyframes auroraA { to { scale: 1.15 1.05; rotate: 8deg; } }
@keyframes auroraB { to { scale: .9 1.15; rotate: -10deg; } }
@keyframes twinkleA { to { opacity: .4; } }
@keyframes twinkleB { 0% { opacity: 1; } 100% { opacity: .35; } }
@keyframes shoot { 0%, 88% { opacity: 0; translate: 0 0; } 90% { opacity: 1; } 100% { opacity: 0; translate: -420px 260px; } }
@keyframes bars { 0% { scale: 1 .35; } 50% { scale: 1 .9; } 100% { scale: 1 .55; } }
@keyframes vt-out { to { opacity: 0; filter: blur(10px); scale: .98; } }
@keyframes vt-in { from { opacity: 0; filter: blur(10px); scale: 1.02; } }
@keyframes capDrop {
  0% { opacity: 0; translate: 0 -170px; rotate: -40deg; }
  55% { opacity: 1; translate: 0 10px; rotate: 8deg; }
  75% { translate: 0 -10px; rotate: -4deg; }
  90% { translate: 0 3px; rotate: 1deg; }
  100% { opacity: 1; translate: 0 0; rotate: 0deg; }
}
@keyframes swing { 0% { rotate: 0deg; } 15% { rotate: 28deg; } 32% { rotate: -18deg; } 50% { rotate: 11deg; } 68% { rotate: -6deg; } 84% { rotate: 3deg; } 100% { rotate: 0deg; } }
@keyframes twinkle { 0% { scale: 0; } 40% { scale: 1.5; } 70% { scale: .8; } 100% { scale: 1; } }
@keyframes sparkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: .45; rotate: 45deg; } }
@keyframes sealIn { from { scale: 0; rotate: -140deg; } to { scale: 1; rotate: 0deg; } }
@keyframes unfurl { to { scale: 1 1; } }
@keyframes leafPop { to { scale: 1; } }
@keyframes shine { 0% { translate: 0 0; } 35%, 100% { translate: 380px 0; } }
@keyframes glowPulse { 0%, 100% { opacity: .18; scale: .94; } 50% { opacity: .5; scale: 1.08; } }

/* Responsive */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-card { grid-column: 1 / -1; }
  .b-photo { grid-column: 1; grid-row: span 2; }
  .b-degree, .b-years { grid-column: 2; }
  .b-lang, .b-hobby { grid-column: span 1; }
  .b-lang.wide, .b-hobby.wide { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .contact { grid-template-columns: 1fr; }
  .modal { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .ring-nav { display: none; }
  .hero { min-height: auto; }
  .deco-a { top: 6%; }
  .deco-b, .deco-cursor { display: none; }
  .cats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .b-photo, .b-degree, .b-years, .b-lang, .b-hobby { grid-column: 1; grid-row: auto; }
  .cat-grid { grid-template-columns: 1fr; }
  .card-wide .card-img { aspect-ratio: 1 / 1; }
  .cat { min-height: 380px; }
  .cat-stack { width: 50%; }
}
@media (max-width: 480px) {
  .hero { padding-top: 54px; }
  .badge { font-size: 0; gap: 0; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 130px; padding-inline: 12px; white-space: nowrap; }
  .tool { width: 60px; height: 60px; border-radius: 16px; }
  .tool-ico { width: 28px; height: 28px; }
}
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }
/* Installed app: keep the nav clear of the phone's status bar and notch */
@media (display-mode: standalone) {
  .nav { top: max(12px, env(safe-area-inset-top)); margin-top: max(12px, env(safe-area-inset-top)); }
  .cat-bar { margin-top: max(12px, env(safe-area-inset-top)); }
}
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

/* Nav: even inner spacing, the language button nests inside the bar's curve */
.nav, [dir="rtl"] .nav { padding: 8px; gap: 10px; }
.nav-brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-brand::before { flex: none; }
.nav-end { flex: none; gap: 8px; }
.lang { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 38px; min-height: 0; min-width: 52px; padding: 0 12px; border-radius: 10px; font-size: 13px; line-height: 1; white-space: nowrap; }
@media (max-width: 480px) {
  .nav { margin-inline: 12px; }
  .nav-brand { font-size: 14px; gap: 8px; }
  .nav-brand::before { width: 26px; height: 26px; border-radius: 8px; }
  .badge::before { margin: 0 2px; }
}

/* Section headers wrap instead of pushing past the screen edge on phones */
.sec-head { flex-wrap: wrap; row-gap: 14px; min-width: 0; }
.sec-line { min-width: 40px; }
.about-toggle { max-width: 100%; white-space: nowrap; }
@media (max-width: 560px) {
  #about .sec-head .sec-line { display: none; }
  #about .sec-head { justify-content: space-between; }
  .heading-art { height: clamp(56px, 16vw, 74px); }
  .art-sm .heading-art { height: clamp(44px, 12vw, 56px); }
  .duo { font-size: clamp(42px, 13vw, 60px); }
  .footer-word { font-size: clamp(48px, 15vw, 90px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; translate: none; filter: none; scale: 1; }
  .cursor-ring, .veil { display: none; }
}

/* ---------- Opening intro ---------- */
:root { --intro: 2.3s; }
.intro { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(70% 55% at 50% 50%, #1d1556 0%, #07070f 70%); clip-path: inset(0 0 0 0); cursor: pointer; animation: introOut 1s cubic-bezier(.76, 0, .24, 1) 2.25s forwards; }
.intro.skip { animation: introOut .55s cubic-bezier(.76, 0, .24, 1) forwards; }
.intro-name { display: flex; overflow: hidden; padding: .06em .04em; font-family: var(--display); font-size: clamp(40px, 9vw, 128px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; direction: ltr; }
.intro-name span { display: inline-block; color: transparent; background: var(--sky); -webkit-background-clip: text; background-clip: text; translate: 0 115%; rotate: 8deg; animation: letterIn .9s var(--spring) forwards; }
.intro-name .intro-gap { width: .28em; }
.intro-name span:nth-child(2) { animation-delay: 55ms; }
.intro-name span:nth-child(3) { animation-delay: 110ms; }
.intro-name span:nth-child(4) { animation-delay: 165ms; }
.intro-name span:nth-child(5) { animation-delay: 220ms; }
.intro-name span:nth-child(7) { animation-delay: 330ms; }
.intro-name span:nth-child(8) { animation-delay: 385ms; }
.intro-name span:nth-child(9) { animation-delay: 440ms; }
.intro-name span:nth-child(10) { animation-delay: 495ms; }
.intro-name span:nth-child(11) { animation-delay: 550ms; }
.intro-name span:nth-child(12) { animation-delay: 605ms; }
.intro-sub { font-size: clamp(10px, 1.2vw, 13px); font-weight: 600; letter-spacing: .42em; color: var(--ink-2); opacity: 0; animation: fadeUp .8s var(--spring) .85s forwards; }
.intro-bar { width: min(240px, 60vw); height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.intro-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #d3ccff); box-shadow: 0 0 12px var(--accent); scale: 0 1; transform-origin: left; animation: barFill 1.7s cubic-bezier(.6, 0, .2, 1) .35s forwards; }
@keyframes letterIn { to { translate: 0 0; rotate: 0deg; } }
@keyframes fadeUp { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes barFill { to { scale: 1 1; } }
@keyframes introOut { 0% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 100% 0); visibility: hidden; } }

/* The hero plays after the intro */
.nav { animation-delay: var(--intro); }
.moon { animation-delay: var(--intro); }
.hero-art { animation-delay: calc(var(--intro) + .1s); }
.hero-title::after { animation-delay: calc(var(--intro) + 1s); }
.corner { animation-delay: calc(var(--intro) + .5s); }

/* ---------- Hero layout: title, line, buttons, then the curved banner ---------- */
.hero { min-height: auto; padding-bottom: 24px; }
.hero-title { width: min(600px, 80vw); margin-top: clamp(30px, 3.4vw, 54px); }
.hero-foot { flex-direction: column; justify-content: center; max-width: 640px; margin-top: 6px; gap: 16px; text-align: center; animation: rise 1s var(--spring) calc(var(--intro) + .45s) both; }
.statement { flex: none; font-size: clamp(16px, 1.6vw, 20px); font-weight: 400; color: var(--ink-2); }
.hero-foot .cta-row { justify-content: center; }

/* ---------- Curved banner ---------- */
.stage { position: relative; width: 100vw; height: clamp(280px, 29vw, 420px); margin-top: clamp(4px, 1.2vw, 18px); perspective: 1000px; perspective-origin: 50% 50%; direction: ltr; touch-action: pan-y; user-select: none; cursor: grab; animation: stageIn 1.3s var(--spring) calc(var(--intro) + .6s) both; }
.stage.dragging { cursor: grabbing; }
.track { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s var(--spring); }
.cv-card { position: absolute; top: 50%; left: 50%; width: var(--cw, 180px); aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); box-shadow: 0 22px 50px rgba(0, 0, 0, .55); cursor: pointer; will-change: transform; transition: box-shadow .3s, border-color .3s; }
.cv-card > img, .cv-mono img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cv-mono { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--cut, 0%)) 0 0); }
.cv-mono img { filter: grayscale(1) contrast(1.5) brightness(.92); }
.cv-dots { position: absolute; inset: 0; background: radial-gradient(circle, rgba(0, 0, 0, .7) 1.1px, transparent 1.7px) 0 0 / 5px 5px; }
.cv-cap { position: absolute; inset-inline: 0; bottom: 0; padding: 28px 10px 9px; color: #fff; font-size: 12px; font-weight: 700; text-align: start; background: linear-gradient(transparent, rgba(5, 5, 14, .88)); opacity: 0; translate: 0 8px; transition: opacity .3s, translate .35s var(--spring); }
.cv-card:hover { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2), 0 30px 80px rgba(123, 97, 255, .55); }
.cv-card:hover .cv-cap, .cv-card:focus-visible .cv-cap { opacity: 1; translate: 0 0; }
.beam { position: absolute; top: 4%; bottom: 4%; left: 50%; z-index: 4; width: 3px; margin-left: -1.5px; border-radius: 3px; background: linear-gradient(180deg, transparent, #fff 18%, #cfc8ff 50%, #fff 82%, transparent); box-shadow: 0 0 16px 3px rgba(123, 97, 255, .95), 0 0 60px 16px rgba(123, 97, 255, .5); pointer-events: none; animation: beamPulse 2.4s ease-in-out infinite; }
.curve-glow { position: absolute; left: 50%; top: 50%; width: 46vw; height: 80%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(123, 97, 255, .5), rgba(61, 75, 255, .15) 60%, transparent); filter: blur(30px); pointer-events: none; }
.ring-nav { z-index: 6; }
@keyframes stageIn { from { opacity: 0; scale: .85; filter: blur(12px); } }
@keyframes beamPulse { 50% { opacity: .7; scale: 1 .94; } }

/* ---------- About opens from the arrow ---------- */
.about-toggle { display: inline-flex; flex: none; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px 6px 18px; border-radius: 14px; cursor: pointer; font-size: 14px; font-weight: 700; }
[dir="rtl"] .about-toggle { padding: 6px 18px 6px 10px; }
.about-toggle:hover { border-color: var(--accent-2); }
.toggle-arrow { width: 32px; height: 32px; padding: 6px; border-radius: 10px; background: linear-gradient(135deg, #9583ff, var(--accent) 50%, #4b3bd6); box-shadow: 0 0 18px rgba(123, 97, 255, .6); fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .6s var(--bounce); animation: bob 1.6s ease-in-out infinite; }
.about-toggle[aria-expanded="true"] .toggle-arrow { rotate: 180deg; animation: none; }
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 1.1s cubic-bezier(.65, 0, .25, 1); }
.collapse.open { grid-template-rows: 1fr; }
.collapse-inner { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .6s .15s; }
.collapse.open .collapse-inner { opacity: 1; }
.collapse.opened .collapse-inner { overflow: visible; }
#about { padding-bottom: clamp(16px, 3vw, 40px); }
#about .sec-head { margin-bottom: 0; }
#about .collapse.open { margin-top: clamp(26px, 4vw, 44px); }
.collapse { transition: grid-template-rows 1.1s cubic-bezier(.65, 0, .25, 1), margin-top 1.1s cubic-bezier(.65, 0, .25, 1); }

/* ---------- Stronger entrance for every panel on scroll ---------- */
[data-reveal] { transition: opacity 1.1s var(--spring) var(--d, 0ms), translate 1.1s var(--spring) var(--d, 0ms), filter 1.1s var(--spring) var(--d, 0ms), scale 1.1s var(--spring) var(--d, 0ms), rotate 1.1s var(--spring) var(--d, 0ms), transform .6s var(--spring), box-shadow .4s, border-color .4s; }
[data-reveal]:not(.is-in) { translate: 0 80px; scale: .9; filter: blur(12px); }
.bento > [data-reveal]:not(.is-in) { translate: 0 100px; scale: .84; rotate: -2deg; }
.bento > [data-reveal]:nth-child(even):not(.is-in) { rotate: 2deg; }
.cats > .cat:nth-child(odd):not(.is-in) { translate: -120px 60px; rotate: -6deg; }
.cats > .cat:nth-child(even):not(.is-in) { translate: 120px 60px; rotate: 6deg; }
.contact[data-reveal]:not(.is-in) { scale: .8; translate: 0 60px; }
.sec-head[data-reveal]:not(.is-in) { translate: 0 40px; scale: 1; }

@media (max-width: 640px) {
  .stage { height: 82vw; min-height: 300px; }
  .curve-glow { width: 80vw; }
  .cats > .cat:nth-child(odd):not(.is-in), .cats > .cat:nth-child(even):not(.is-in) { translate: 0 80px; rotate: 0deg; }
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .collapse { transition: none; }
}
