:root {
  --bg: #000;
  --text: #fff;
  --muted: #8c8c8c;
  --line: rgba(255, 255, 255, .14);
  --accent: #fff;
  --grad: linear-gradient(120deg, #fff, #8c8c8c 55%, #fff);
  --font: 'Outfit', system-ui, sans-serif;
  --mono: 'Space Grotesk', monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --fast: .45s;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  overflow: hidden; -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #000; }

/* ---------- Layers ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.glow {
  position: fixed; z-index: 0; width: 640px; height: 640px; border-radius: 50%; left: 0; top: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04) 45%, transparent 70%);
  transform: translate(calc(50vw - 320px), calc(50vh - 320px)); pointer-events: none; filter: blur(20px);
}
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .5s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 1rem;
}
.intro__num { font-size: clamp(3.5rem, 12vw, 7rem); font-weight: 200; letter-spacing: -.04em; }
.intro__num b { font-weight: 600; }
.intro__bar { display: block; width: 180px; height: 2px; background: var(--line); overflow: hidden; }
.intro__bar u { display: block; height: 100%; width: 0; background: #fff; }
.intro.done { animation: curtain .55s var(--ease) forwards; pointer-events: none; }
@keyframes curtain { 0% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 100% 0); } }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none; border-radius: 50%; opacity: 0; }
.cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(255, 255, 255, .7); mix-blend-mode: difference; transition: width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease), background .2s; }
.cursor.hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: #fff; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.has-cursor, .has-cursor a { cursor: none; }
.has-cursor .cursor, .has-cursor .cursor-dot { opacity: 1; }

/* ---------- Frame ---------- */
.frame {
  position: relative; z-index: 2; height: 100svh; padding: clamp(1rem, 3vh, 2rem) clamp(1.2rem, 4vw, 3.5rem);
  display: grid; grid-template-rows: auto 1fr auto;
}

/* Top */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.top__brand { display: flex; align-items: center; gap: 1.5rem; justify-self: start; }
.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; }
.logo span { color: var(--muted); }
.top__nav { display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.nav-item { color: var(--muted); transition: color .2s; }
.nav-item.active { color: #fff; font-weight: 600; }
.nav-item:hover { color: #fff; }
.nav-item sup { font-size: .65em; color: #fff; background: rgba(255, 255, 255, .15); padding: 1px 5px; border-radius: 999px; margin-left: 2px; }
.nav-sep { color: var(--line); font-size: .85rem; }
.status { display: inline-flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(8px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
.top__right-actions { justify-self: end; display: flex; align-items: center; gap: 1.2rem; }
.projects-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .95rem; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; color: #fff; background: rgba(255, 255, 255, .04); transition: all .2s var(--ease); }
.projects-pill:hover { background: #fff; color: #000; border-color: #fff; }
.clock { text-align: right; font-family: var(--mono); font-size: .95rem; line-height: 1.2; }
.clock small { display: block; color: var(--muted); font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; }

/* Stage */
.stage { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 0; }

.giant {
  position: absolute; left: 0; right: 0; bottom: 1%; z-index: 6;
  display: flex; justify-content: center; align-items: baseline; gap: .26em; white-space: nowrap;
  font-size: min(8.4vw, 15vh); line-height: 1; letter-spacing: -.045em; pointer-events: none;
  mix-blend-mode: difference; /* inverts over the light parts of the photo */
}
.giant__row { display: block; overflow: hidden; padding: .12em .02em .1em; }
.giant__row:first-child { font-weight: 700; }
.giant__row--2 { font-weight: 200; }
.giant .char {
  display: inline-block; color: #fff; pointer-events: auto;
  transition: transform .3s var(--ease), opacity .3s;
  animation: rise .6s var(--ease) calc(var(--i) * 35ms + .15s) backwards; animation-play-state: paused;
}
.loaded .giant .char { animation-play-state: running; }
@keyframes rise { from { transform: translateY(115%); } }
.giant .char:hover { transform: translateY(-.07em); opacity: .65; }

/* Side columns */
.col { position: relative; z-index: 4; }
.col--left { justify-self: start; max-width: 380px; }
.col--right { justify-self: end; display: grid; gap: 1.6rem; }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.lead { font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 300; line-height: 1.5; color: #d4d4d4; }
.typed { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: #fff; margin-left: 2px; vertical-align: text-bottom; animation: caret .6s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.stat { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; text-align: right; }
.stat b { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 200; letter-spacing: -.04em; line-height: 1; transition: color .2s, text-shadow .2s; }
.stat span { font-size: .8rem; line-height: 1.3; color: var(--muted); text-align: left; padding-left: 1rem; border-left: 1px solid var(--line); transition: color .2s, border-left-color .2s; }
.stat--interactive { transition: transform .2s var(--ease); }
.stat--interactive:hover { transform: translateX(-4px); }
.stat--interactive:hover b { color: #fff; text-shadow: 0 0 16px rgba(255, 255, 255, .7); }
.stat--interactive:hover span { color: #fff; border-left-color: #fff; }
.stat-arrow { font-style: normal; display: inline-block; margin-left: 4px; font-family: var(--mono); color: var(--muted); transition: transform .2s var(--ease), color .2s; }
.stat--interactive:hover .stat-arrow { transform: translate(2px, -2px); color: #fff; }

/* Portrait */
.portrait { position: relative; z-index: 3; --h: min(66vh, 560px); width: calc(var(--h) * .8); height: var(--h); display: grid; place-items: center; transition: transform .12s ease-out; }
.photo {
  position: relative; width: 82%; height: 92%; overflow: hidden; background: #111;
  border-radius: 48% 52% 46% 54% / 40% 44% 56% 60%;
  animation: morph 4.5s ease-in-out infinite;
  clip-path: inset(100% 0 0 0 round 40%); transition: clip-path .7s var(--ease) .15s;
  box-shadow: 0 30px 80px -20px rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.loaded .photo { clip-path: inset(0 0 0 0 round 0); }
@keyframes morph {
  0%, 100% { border-radius: 48% 52% 46% 54% / 40% 44% 56% 60%; }
  33% { border-radius: 58% 42% 55% 45% / 52% 38% 62% 48%; }
  66% { border-radius: 42% 58% 40% 60% / 48% 56% 44% 52%; }
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.25); filter: grayscale(1) contrast(1.15); transition: transform .8s var(--ease) .2s, filter .25s; }
.loaded .photo img { transform: scale(1.02); }
.portrait:hover .photo img { filter: grayscale(1) contrast(1.3) brightness(1.1); transform: scale(1.08); }
.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .15), transparent 40%, rgba(0, 0, 0, .35)); pointer-events: none; }
.shine { position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-20deg); animation: shine 2.4s ease-in-out .8s infinite; }
@keyframes shine { 0% { left: -60%; } 40%, 100% { left: 150%; } }
/* Fallback when photo.jpg missing */
.silhouette { display: none; position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(255, 255, 255, .15); padding-top: 12%; }
.no-photo .silhouette { display: block; }
.no-photo .photo img { display: none; }
.no-photo .photo { background: linear-gradient(160deg, #1c1c1c, #3a3a3a 60%, #0e0e0e); }

/* Rings */
.ring { position: absolute; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .5s .3s; }
.loaded .ring { opacity: 1; }
.ring--1 { inset: -2%; border: 1px dashed rgba(255, 255, 255, .35); animation: spin 8s linear infinite; }
.ring--2 { inset: -12%; border: 1px solid rgba(255, 255, 255, .2); animation: spin 12s linear infinite reverse; }
.ring--3 { inset: -24%; border: 1px dashed rgba(255, 255, 255, .12); animation: spin 18s linear infinite; }
.ring i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 16px 3px rgba(255, 255, 255, .8); }
.ring--2 i { background: #bbb; box-shadow: 0 0 16px 3px rgba(255, 255, 255, .5); }
@keyframes spin { to { transform: rotate(360deg); } }
.aura { position: absolute; inset: 8%; border-radius: 50%; background: conic-gradient(from 0deg, #fff, #444, #bbb, #222, #fff); filter: blur(70px); opacity: .22; animation: spin 5s linear infinite; z-index: -1; }

/* Chips */
.chip {
  position: absolute; z-index: 5; padding: .5rem 1.1rem; border-radius: 999px; font-size: .8rem; font-weight: 500;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); opacity: 0; transform: scale(.6);
  transition: opacity .35s var(--ease), transform .45s var(--ease), background .2s, color .2s;
}
.chip:hover { background: #fff; color: #000; }
.loaded .chip { opacity: 1; transform: none; }
.chip::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: .5rem; vertical-align: middle; }
.chip--1 { top: 10%; left: -14%; transition-delay: .35s; animation: bob 2.4s ease-in-out infinite; }
.chip--2 { top: 38%; right: -18%; transition-delay: .43s; animation: bob 2.8s ease-in-out -1s infinite; }
.chip--3 { bottom: 20%; left: -20%; transition-delay: .5s; animation: bob 2.6s ease-in-out -1.5s infinite; }
.chip--4 { bottom: 6%; right: -8%; transition-delay: .58s; animation: bob 3s ease-in-out -.5s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* Bottom */
.bottom { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); align-items: center; }
.socials { display: flex; gap: 1.5rem; }
.socials a { position: relative; font-size: .85rem; color: var(--muted); padding: .3rem 0; transition: color .15s; }
.socials a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease); }
.socials a:hover { color: #fff; }
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }
.cta {
  position: relative; display: inline-flex; align-items: center; gap: .8rem; padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 500; font-size: .95rem; overflow: hidden; isolation: isolate; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px); transition: color .25s, border-color .25s;
}
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #fff; transform: translateY(101%); transition: transform .3s var(--ease); }
.cta:hover::before { transform: none; }
.cta:hover { color: #000; border-color: #fff; }
.cta__text { display: block; height: 1.4em; overflow: hidden; }
.cta__text em { display: block; font-style: normal; line-height: 1.4; transition: transform .3s var(--ease); }
.cta:hover .cta__text em { transform: translateY(-100%); }
.cta svg { transition: transform .25s var(--ease); }
.cta:hover svg { transform: rotate(45deg); }
.loc { justify-self: end; text-align: right; font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; display: grid; }

/* Entrance helper */
.fade { opacity: 0; transform: translateY(18px); transition: opacity .45s var(--ease), transform .55s var(--ease); }
.loaded .fade { opacity: 1; transform: none; transition-delay: var(--d, 0s); }
.top { opacity: 0; transform: translateY(-16px); transition: all .5s var(--ease) .05s; }
.loaded .top { opacity: 1; transform: none; }
.magnetic { will-change: transform; }

/* ---------- Responsive (still one screen) ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; justify-items: center; align-content: center; }
  .col--right { display: none; }
  .portrait { --h: min(46vh, 420px); grid-row: 1; }
  .col--left { grid-row: 3; justify-self: center; text-align: center; max-width: 340px; padding-bottom: .5rem; }
  .giant { position: static; grid-row: 2; margin-top: -2.4rem; font-size: min(12vw, 7vh); }
  .chip--1 { left: -6%; } .chip--3 { left: -8%; } .chip--2 { right: -8%; } .chip--4 { right: -2%; }
  .status { display: none; }
  .top { grid-template-columns: 1fr 1fr; }
  .bottom { grid-template-columns: 1fr; justify-items: center; }
  .loc, .socials { display: none; }
}
@media (max-height: 640px) and (min-width: 901px) { .col--right { gap: .8rem; } .lead { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
.phone { transition: color .15s; } .phone span:last-child { color: #fff; font-size: .85rem; letter-spacing: .08em; } .phone:hover span:first-child { color: #fff; }
