/* KellanTK portfolio — space theme taken from the KTK emblem (navy night, white line-work, logo blue) */
:root {
  --void: #02050d;
  --deep: #04102b;
  --navy: #0a2150;
  --logo: #1f6fb2;      /* the emblem's stroke blue */
  --sky: #5ab4ff;
  --ice: #d4ebff;
  --ink: #f4f8ff;
  --muted: #a3b8da;
  --panel: rgba(8, 22, 56, .58);
  --panel-2: rgba(14, 36, 86, .55);
  --stroke: rgba(150, 205, 255, .16);
  --stroke-2: rgba(150, 205, 255, .32);
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Manrope", system-ui, sans-serif;
  --m: clamp(16px, 3.2vw, 44px);
  --maxw: 1280px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r: 22px;

  /* planet skins: the floor textures from Gun Flip For Egg's hazard zones */
  --tx-games: url(../img/planets/floor_lava.png);
  --tx-ui: url(../img/planets/floor_syrup.png);
  --tx-systems: url(../img/planets/floor_toxic.png);
  --tx-models: url(../img/planets/floor_crystals.png);
  --tx-schedule: url(../img/planets/floor_thinice.png);
  --tx-contact: url(../img/planets/floor_moltengold.png);
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; color: var(--ink); font-family: var(--text);
  font-size: clamp(16px, 15px + .25vw, 18px); line-height: 1.6; overflow-x: hidden;
  background: transparent; /* the sky layers sit under the body, so it must not paint */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
::selection { background: var(--sky); color: var(--void); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--void); border-radius: 999px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------------- the sky ---------------- */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
.nebula { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 120%, #0d3a86 0%, #06204f 35%, #030b1f 70%, var(--void) 100%); }
.nebula::before, .nebula::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.nebula::before { width: 70vmax; height: 50vmax; left: -20vmax; top: -12vmax;
  background: radial-gradient(closest-side, rgba(31, 111, 178, .55), rgba(31, 111, 178, 0)); animation: neb-a 70s ease-in-out infinite alternate; }
.nebula::after { width: 60vmax; height: 45vmax; right: -18vmax; bottom: -10vmax;
  background: radial-gradient(closest-side, rgba(90, 180, 255, .30), rgba(90, 180, 255, 0)); animation: neb-b 90s ease-in-out infinite alternate; }
@keyframes neb-a { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); } }
@keyframes neb-b { to { transform: translate3d(-10vmax, -6vmax, 0) scale(1.1); } }

/* ---------------- planets (shared) ---------------- */
.pl {
  --s: 80px;
  display: block; width: var(--s); aspect-ratio: 1; border-radius: 50%; position: relative;
  background-image: var(--tx); background-size: 50% 50%; background-repeat: repeat; image-rendering: pixelated;
  animation: pl-spin var(--spin, 24s) linear infinite;
  box-shadow:
    inset calc(var(--s) * -.2) calc(var(--s) * -.14) calc(var(--s) * .32) rgba(0, 0, 0, .82),
    inset calc(var(--s) * .07) calc(var(--s) * .06) calc(var(--s) * .14) rgba(255, 255, 255, .28),
    0 0 calc(var(--s) * .45) var(--glow, rgba(90, 180, 255, .45));
}
.pl::after { /* soft atmosphere rim */
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  box-shadow: inset 0 0 calc(var(--s) * .12) var(--glow, rgba(90, 180, 255, .5));
  pointer-events: none;
}
@keyframes pl-spin { to { background-position: 100% 0; } }
.pl--games { --tx: var(--tx-games); --glow: rgba(255, 120, 40, .55); --spin: 22s; }
.pl--ui { --tx: var(--tx-ui); --glow: rgba(255, 90, 170, .5); --spin: 28s; }
.pl--systems { --tx: var(--tx-systems); --glow: rgba(140, 230, 60, .45); --spin: 18s; }
.pl--models { --tx: var(--tx-models); --glow: rgba(120, 140, 255, .55); --spin: 32s; }
.pl--schedule { --tx: var(--tx-schedule); --glow: rgba(190, 230, 255, .55); --spin: 36s; }
.pl--contact { --tx: var(--tx-contact); --glow: rgba(255, 190, 60, .55); --spin: 26s; }

/* a ringed planet: one ring behind, its front half drawn over the body */
.ringed { position: relative; display: inline-block; }
.ringed::before, .ringed::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 175%; height: 46%;
  border-radius: 50%; border: calc(var(--rw, 3px)) solid rgba(200, 220, 255, .55);
  transform: translate(-50%, -50%) rotate(-18deg); pointer-events: none;
}
.ringed::before { z-index: -1; }
.ringed::after { z-index: 2; clip-path: inset(50% 0 0 0); border-color: rgba(220, 235, 255, .8); }

/* ---------------- header (inner pages) ---------------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px;
  padding: 12px var(--m); background: rgba(2, 6, 18, .6); backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--stroke);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 22px rgba(90, 180, 255, .45); transition: transform .7s var(--ease); }
.brand:hover img { transform: rotate(-25deg) scale(1.06); }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background-color .25s, color .25s;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(90, 180, 255, .16); }
.nav .pl { --s: 16px; box-shadow: inset -3px -2px 4px rgba(0, 0, 0, .7), 0 0 8px var(--glow); animation-duration: 8s; }
.nav .pl::after { display: none; }
@media (max-width: 860px) {
  .top { flex-wrap: wrap; row-gap: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; margin: 0 calc(var(--m) * -1); padding: 0 var(--m); }
  .nav a { padding: 8px 12px; }
}

/* ---------------- page layout ---------------- */
.wrap { width: min(100% - var(--m) * 2, var(--maxw)); margin-inline: auto; }
.hero {
  position: relative; min-height: min(78svh, 760px); display: grid; align-items: center;
  grid-template-columns: 1.1fr .9fr; gap: var(--m); padding-block: clamp(48px, 8vw, 110px) clamp(32px, 5vw, 64px);
}
.hero h1 { font-size: clamp(48px, 9vw, 132px); font-weight: 800; letter-spacing: -.045em; line-height: .92; }
.hero__lead { margin-top: 26px; font-size: clamp(18px, 16px + .6vw, 24px); line-height: 1.45; max-width: 30ch; color: var(--ice); }
.hero__planet { justify-self: center; position: relative; display: grid; place-items: center; }
.hero__planet .pl { --s: clamp(220px, 34vw, 460px); }
.hero__planet::before { /* slow orbiting moon */
  content: ""; position: absolute; width: clamp(16px, 2vw, 26px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ice); box-shadow: inset -4px -3px 6px rgba(0, 0, 0, .55), 0 0 18px rgba(212, 235, 255, .6);
  offset-path: ellipse(62% 18% at 50% 50%); animation: moon 14s linear infinite; z-index: 3;
}
@keyframes moon { to { offset-distance: 100%; } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero__planet { order: -1; justify-self: end; margin-bottom: -8px; }
  .hero__planet .pl { --s: 46vw; }
}

.section { padding-block: clamp(56px, 8vw, 120px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head h2 { font-size: clamp(30px, 4vw, 56px); }
.section-head p { color: var(--muted); max-width: 42ch; }

.glass {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--r);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--void); font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(90, 180, 255, .5); transition: transform .2s var(--ease), box-shadow .3s, background-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px -6px rgba(90, 180, 255, .7); background: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--stroke-2); }
.btn--ghost:hover { background: rgba(255, 255, 255, .06); }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--sky); }
.link span { transition: transform .25s var(--ease); }
.link:hover span { transform: translateX(5px); }

.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(90, 180, 255, .12); color: var(--ice); border: 1px solid var(--stroke);
}
.tag--live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5dff9a; box-shadow: 0 0 10px #5dff9a; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* framed media + empty video frames */
.frame { border-radius: var(--r); overflow: hidden; border: 1px solid var(--stroke); background: var(--deep); position: relative; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.frame:hover img { transform: scale(1.035); }
.slot { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border-radius: var(--r); border: 1px solid var(--stroke); background: var(--deep); }
.slot__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; transition: opacity .5s, transform 1s var(--ease); }
.slot:hover .slot__poster { opacity: .55; transform: scale(1.03); }
.slot__play {
  position: relative; z-index: 1; width: clamp(60px, 6vw, 84px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(244, 248, 255, .14); border: 1px solid rgba(244, 248, 255, .4); backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: transform .35s var(--ease), background-color .3s;
}
.slot__play::after { content: ""; width: 30%; aspect-ratio: 1; background: var(--ink); margin-left: 8%; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.slot:hover .slot__play { transform: scale(1.1); background: rgba(244, 248, 255, .24); }
.slot__note { position: absolute; left: 16px; bottom: 14px; z-index: 1; font-size: 13px; font-weight: 600; color: var(--ice); opacity: .8; }
.slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------- pills + online status (shared) ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: rgba(8, 22, 56, .6); border: 1px solid var(--stroke); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .25s, border-color .25s, transform .2s var(--ease);
}
.pill:hover { background: rgba(14, 40, 92, .75); border-color: var(--stroke-2); transform: translateY(-1px); }
.pill b { font-weight: 800; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 10px #ffb547; flex: none; }
.is-on .status-dot { background: #5dff9a; box-shadow: 0 0 12px #5dff9a; animation: blink 2s ease-in-out infinite; }

/* ---------------- footer ---------------- */
.foot { margin-top: clamp(40px, 6vw, 90px); border-top: 1px solid var(--stroke); background: rgba(2, 6, 18, .55); backdrop-filter: blur(10px); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 28px; }
.foot__home { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; }
.foot__home img { width: 48px; border-radius: 50%; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--muted); }
.foot__links a { text-decoration: none; }
.foot__links a:hover { color: var(--ink); }
.foot__legal { width: 100%; font-size: 13px; color: var(--muted); opacity: .8; }

/* ---------------- motion ---------------- */
.js [data-rise] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].in { opacity: 1; transform: none; }
.warp-out { position: fixed; z-index: 200; border-radius: 50%; pointer-events: none; transition: transform .75s cubic-bezier(.6, 0, .9, .4), opacity .75s; }
body.leaving main, body.leaving .top, body.leaving .foot { transition: opacity .45s, filter .45s; opacity: 0; filter: blur(6px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .js [data-rise] { opacity: 1; transform: none; }
}
