/* ============ base ============ */
:root {
  --bg: #121218;
  --panel: #17171f;
  --panel2: #1d1d27;
  --text: #e8e8ee;
  --muted: #9d9daa;
  --faint: #66667a;
  --accent: #7c6cf0;
  --accent2: #8f7bff;
  --line: #2a2a38;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 17px; line-height: 1.6;
  overflow-x: hidden; cursor: none;
  animation: pagein .5s ease both;
}
@keyframes pagein { from { opacity: 0 } to { opacity: 1 } }
@view-transition { navigation: auto; }
a { color: inherit; text-decoration: none; cursor: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: -0.02em; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 36px; }

/* custom cursor */
.cursor { position: fixed; width: 10px; height: 10px; border-radius: 50%; background: var(--accent2);
  pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width .25s, height .25s, opacity .25s; }
.cursor.grow { width: 52px; height: 52px; opacity: .25; }
@media (hover: none) { .cursor { display: none; } body, a { cursor: auto; } }

.glow { position: fixed; inset: 0; pointer-events: none; z-index: -3;
  background: radial-gradient(600px 400px at 75% -5%, rgba(124,108,240,.16), transparent 60%),
              radial-gradient(500px 380px at 8% 110%, rgba(124,108,240,.08), transparent 60%); }
#stars { position: fixed; inset: 0; pointer-events: none; z-index: -1; }

/* constellation scroll story */
#constellation { position: fixed; left: 26px; top: 50%; transform: translateY(-50%); height: 62vh;
  width: auto; z-index: 40; pointer-events: none; opacity: 0.85; }
#constellation path { stroke: rgba(124, 108, 240, 0.5); stroke-width: 1.2; fill: none; }
#constellation .cnode { fill: #34344a; transition: fill 0.5s, filter 0.5s; }
#constellation .cnode.lit { fill: #8f7bff; filter: drop-shadow(0 0 6px rgba(143, 123, 255, 0.9)); }
#constellation .cnode.last.lit { animation: cpulse 2.4s ease-in-out infinite; }
@keyframes cpulse { 0%, 100% { filter: drop-shadow(0 0 5px rgba(143,123,255,.8)); }
  50% { filter: drop-shadow(0 0 14px rgba(143,123,255,1)); } }
@media (max-width: 1180px) { #constellation { display: none; } }

/* hero photo composition */
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; }
.hero-photo { position: relative; justify-self: center; width: min(100%, 400px); }
.hp-card { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: var(--panel2); z-index: 2; }
.hp-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(0.95); }
.hp-tag { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 18px; border-radius: 12px;
  background: rgba(23, 23, 31, 0.72); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.06); }
.hp-tag b { display: block; font-family: 'Space Grotesk'; font-size: 17px; color: #fff; }
.hp-tag span { font-size: 12.5px; color: var(--muted); }
.hp-shape { position: absolute; inset: 6% -7% -6% 7%; border-radius: 26px; background: var(--accent);
  opacity: 0.85; transform: rotate(-5deg); z-index: 1; }
.hp-orbit { position: absolute; inset: -14% -18%; border: 1px dashed rgba(124, 108, 240, 0.3);
  border-radius: 50%; transform: rotate(-14deg); z-index: 0; }
.hp-dot { position: absolute; border-radius: 50%; z-index: 3; }
.hp-dot.d1 { width: 12px; height: 12px; background: var(--accent2); top: -3%; right: 8%;
  box-shadow: 0 0 14px rgba(143, 123, 255, 0.8); }
.hp-dot.d2 { width: 7px; height: 7px; background: #cfc9ff; bottom: 10%; left: -9%; opacity: 0.8; }
.hp-cross { position: absolute; font-family: 'Space Grotesk'; color: var(--faint); z-index: 3; }
.hp-cross.c1 { top: 14%; left: -12%; font-size: 22px; }
.hp-cross.c2 { bottom: -4%; right: 16%; font-size: 16px; opacity: 0.7; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero { padding-top: 140px; }
  .hero-photo { width: min(78vw, 340px); }
}

/* footer black hole */
.foot-rel { position: relative; }
#blackhole { position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: min(36vw, 440px); aspect-ratio: 1; z-index: 0; opacity: 0.9; }
footer .big, footer .foot-row { position: relative; z-index: 1; }
@media (max-width: 900px) { #blackhole { display: none; } }

/* galaxy archive */
.galaxy-sec { position: relative; }
.galaxy-stage { height: 100vh; position: relative; display: flex; align-items: center;
  justify-content: center; overflow: hidden; }
.galaxy { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.gcard { position: absolute; left: 0; top: 0; border-radius: 3px; background: var(--panel2);
  border: 1px solid rgba(124, 108, 240, 0.22); will-change: transform, opacity; }
.galaxy-cap { position: relative; text-align: center; z-index: 1; pointer-events: none; }
.galaxy-cap b { display: block; font-family: 'Space Grotesk'; font-weight: 700;
  font-size: clamp(52px, 8vw, 110px); color: #fff; line-height: 1; }
.galaxy-cap b::after { content: ''; display: block; width: 64px; height: 3px; background: var(--accent);
  margin: 22px auto; }
.galaxy-cap span { color: var(--muted); font-size: 16px; letter-spacing: 0.5px; }

/* ============ nav ============ */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px); background: rgba(18,18,24,.72); border-bottom: 1px solid transparent;
  transition: border-color .3s; }
nav.scrolled { border-color: var(--line); }
.nav-in { max-width: 1280px; margin: 0 auto; padding: 20px 36px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: 'Space Grotesk'; font-weight: 700; font-size: 20px; }
.logo em { color: var(--accent2); font-style: normal; }
.nav-links { display: flex; gap: 36px; font-size: 15px; color: var(--muted); }
.nav-links a { position: relative; padding: 4px 0; transition: color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .3s cubic-bezier(.7,0,.3,1); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ============ hero ============ */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 60px; }
.kicker { font-size: 14px; letter-spacing: 4px; text-transform: uppercase; color: var(--accent2); font-weight: 600; margin-bottom: 24px; }
.hero h1 { font-size: clamp(52px, 9.5vw, 124px); line-height: 1.0; font-weight: 700; }
.hero h1 .accent { color: var(--accent2); }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero h1 .w i { display: inline-block; font-style: normal; }
.hero p.lead { max-width: 580px; margin-top: 32px; color: var(--muted); font-size: 19px; }
.hero .cta { margin-top: 40px; display: flex; gap: 20px; }
.btn { display: inline-block; padding: 14px 30px; border-radius: 32px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff; transition: transform .25s, box-shadow .25s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(124,108,240,.35); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); box-shadow: none; }

.hero-stats { display: flex; gap: 72px; margin-top: 84px; flex-wrap: wrap; }
.stat b { font-family: 'Space Grotesk'; font-weight: 700; font-size: 46px; color: #fff; display: block; line-height: 1.1; }
.stat b em { color: var(--accent2); font-style: normal; }
.stat > span { color: var(--faint); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }

/* legacy scroll reveal (inner pages) */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s } .reveal.d2 { transition-delay: .16s } .reveal.d3 { transition-delay: .24s }

/* ============ marquee ============ */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; overflow: hidden; }
.marquee + .marquee { border-top: 0; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 32s linear infinite; }
.marquee-track.rev { animation-direction: reverse; }
.marquee-track span { font-family: 'Space Grotesk'; font-size: 18px; color: var(--faint); white-space: nowrap; }
.marquee-track span i { color: var(--accent); font-style: normal; margin-right: 56px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ sections ============ */
section.block { padding: 130px 0; }
section.block.tight { padding: 90px 0; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 20px; }
.sec-head .num { font-family: 'Space Grotesk'; font-weight: 700; color: var(--accent); font-size: 22px; }
.sec-head h2 { font-size: clamp(34px, 4.8vw, 58px); }
.sec-sub { color: var(--faint); max-width: 560px; margin-bottom: 56px; }

/* ============ masonry work wall ============ */
.masonry { columns: 3; column-gap: 14px; }
.tile { break-inside: avoid; margin-bottom: 14px; position: relative; border-radius: 10px; overflow: hidden;
  background: var(--panel2); border: 1px solid var(--line); display: block; }
.tile .fill { display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--faint); font-size: 13px; letter-spacing: 1px; padding: 12px;
  transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile img { width: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img, .tile:hover .fill { transform: scale(1.045); }
.tile .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(10,10,14,.82)); transform: translateY(101%);
  transition: transform .38s cubic-bezier(.2,.7,.2,1); }
.tile:hover .ov { transform: none; }
.tile .ov b { font-family: 'Space Grotesk'; font-size: 16px; color: #fff; display: block; }
.tile .ov span { font-size: 12.5px; color: var(--muted); }

/* ============ services ============ */
.service { display: flex; justify-content: space-between; align-items: center; gap: 32px;
  padding: 38px 8px; border-bottom: 1px solid var(--line); }
.service:first-of-type { border-top: 1px solid var(--line); }
.service .s-left { display: flex; align-items: baseline; gap: 24px; }
.service .s-num { font-family: 'Space Grotesk'; color: var(--accent); font-size: 15px; font-weight: 600; }
.service h3 { font-size: clamp(26px, 4vw, 46px); font-weight: 600; color: var(--muted); transition: color .3s, transform .3s; }
.service:hover h3 { color: #fff; transform: translateX(10px); }
.service .s-desc { color: var(--faint); font-size: 14px; max-width: 300px; text-align: right; }
#svc-preview { position: fixed; width: 300px; aspect-ratio: 4/3; border-radius: 10px; pointer-events: none;
  z-index: 60; opacity: 0; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel2), #262637); display: flex; align-items: center;
  justify-content: center; color: var(--faint); font-size: 13px; letter-spacing: 1px; }

/* ============ about + blog teasers ============ */
.teaser { display: grid; grid-template-columns: 360px 1fr; gap: 72px; align-items: center; }
.teaser .t-photo { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.teaser p { color: var(--muted); font-size: 19px; margin-bottom: 16px; }
.teaser p b { color: var(--text); font-weight: 600; }

.post-list { display: flex; flex-direction: column; }
.post-item { display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 34px 8px; border-bottom: 1px solid var(--line); transition: background .25s, padding-left .3s; }
.post-item:first-child { border-top: 1px solid var(--line); }
.post-item:hover { background: var(--panel); padding-left: 24px; }
.post-item b { font-family: 'Space Grotesk'; font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; }
.post-item .pdate { color: var(--faint); font-size: 14px; white-space: nowrap; }
.post-body { max-width: 720px; }
.post-body p { color: var(--muted); margin-bottom: 18px; }
.post-body h2 { font-size: 28px; margin: 40px 0 14px; }
.post-body .post-date { color: var(--faint); font-size: 14px; margin-bottom: 40px; }

/* ============ footer ============ */
footer { border-top: 1px solid var(--line); padding: 110px 0 50px; }
footer .big { font-family: 'Space Grotesk'; font-weight: 700; font-size: clamp(40px, 7vw, 88px); line-height: 1.04; }
footer .big a { color: var(--accent2); position: relative; }
footer .big a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 10px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; margin-top: 70px; color: var(--faint); font-size: 14px; flex-wrap: wrap; gap: 16px; }
.foot-row .links { display: flex; gap: 24px; }
.foot-row .links a:hover { color: var(--text); }

/* ============ inner pages ============ */
.page-head { padding: 190px 0 70px; }
.page-head h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.08; }
.page-head p { color: var(--muted); max-width: 620px; margin-top: 20px; font-size: 19px; }

.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.about-photo { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: sticky; top: 120px; }
.about-photo img { filter: saturate(.95); }
.about-copy h3 { font-size: 26px; margin: 40px 0 14px; }
.about-copy h3:first-child { margin-top: 0; }
.about-copy p { color: var(--muted); margin-bottom: 14px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tool-chips span { border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px; font-size: 14px; color: var(--muted);
  transition: border-color .25s, color .25s; }
.tool-chips span:hover { border-color: var(--accent); color: var(--text); }
.timeline { margin-top: 8px; border-left: 2px solid var(--line); padding-left: 28px; }
.timeline .t-item { position: relative; padding-bottom: 34px; }
.timeline .t-item::before { content: ''; position: absolute; left: -34.5px; top: 7px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--accent); }
.timeline .t-item .when { color: var(--accent2); font-size: 14px; font-weight: 600; }
.timeline .t-item b { display: block; font-family: 'Space Grotesk'; font-size: 19px; margin: 2px 0; }
.timeline .t-item span { color: var(--muted); font-size: 15px; }

.contact-big { padding: 40px 0 90px; }
.contact-big .mail { font-family: 'Space Grotesk'; font-weight: 700; font-size: clamp(30px, 5.5vw, 64px);
  color: var(--accent2); word-break: break-all; }
.contact-big .mail:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 70px; }
.c-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 30px;
  transition: transform .3s, border-color .3s; }
.c-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.c-card .lbl { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.c-card b { font-size: 17px; }

@media (max-width: 980px) {
  .masonry { columns: 2; }
  .teaser { grid-template-columns: 1fr; gap: 40px; }
  .teaser .t-photo { max-width: 360px; }
}
@media (max-width: 860px) {
  .contact-cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 340px; }
  .nav-links { gap: 20px; font-size: 14px; }
  .hero-stats { gap: 40px; }
  .service .s-desc { display: none; }
}
@media (max-width: 600px) {
  .masonry { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
