/* Kainz — le1f.io
 *
 * Dark, violet, game-adjacent, same family as the websim original. The changes
 * are the ones that make it read as designed rather than assembled: the pixel
 * face is used only for the wordmark and section labels (it is unreadable as
 * body copy), everything else is a real type scale, spacing runs on one rhythm,
 * and the violet glow is used once per surface instead of on everything.
 */

@font-face {
  font-family: 'MinecraftSeven';
  src: url('/assets/minecraft-seven.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg:        #0A0810;
  --bg-2:      #0E0B16;
  --panel:     #15111F;
  --panel-2:   #1B1629;
  --line:      #271F3B;
  --line-lit:  #3A2E57;

  --violet:    #8B5CF6;
  --violet-lt: #A78BFA;
  --violet-dim:#6D4AD1;
  --gold:      #F5C542;
  --grass:     #5FA855;

  --text:      #F0ECFA;
  --muted:     #9A92B4;
  --faint:     #6B6383;

  --rail: 244px;
  --gap: clamp(56px, 7vw, 92px);

  color-scheme: dark;
}

* { box-sizing: border-box }

html { scroll-behavior: smooth; scroll-padding-top: 24px }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto }
a { color: inherit }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em }

/* the pixel face, used sparingly and never below 15px or it turns to mush */
.pixel {
  font-family: 'MinecraftSeven', 'Courier New', monospace;
  letter-spacing: .04em;
  font-weight: 400;
  text-transform: none;
}

.dim { color: var(--faint); font-size: 13px }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--violet); color: #fff; padding: 12px 18px;
  border-radius: 0 0 12px 0; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0 }

/* ------------------------------------------------------------------ shell -- */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) }

main {
  max-width: 940px;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 48px) 80px;
}

/* -------------------------------------------------------------------- rail -- */

.rail {
  position: sticky; top: 0; align-self: start;
  height: 100dvh; padding: 26px 18px 22px;
  display: flex; flex-direction: column; gap: 26px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
}

.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 8px }
.mark img { border-radius: 12px; box-shadow: 0 0 0 1px var(--line-lit), 0 6px 20px -8px rgba(139,92,246,.6) }
.mark span { font-size: 23px }

.railnav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
.railnav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  text-decoration: none; color: var(--muted);
  font-size: 15px; font-weight: 500;
  transition: background .18s, color .18s;
  position: relative;
}
.railnav a:hover { background: rgba(139,92,246,.1); color: var(--text) }
.railnav a.on { background: rgba(139,92,246,.16); color: var(--text) }
.railnav a.on::before {
  content: ''; position: absolute; left: -18px; top: 50%; translate: 0 -50%;
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--violet);
  box-shadow: 0 0 14px var(--violet);
}
.railnav svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }

.railfoot { margin-top: auto; display: grid; gap: 14px; padding: 0 8px }
.socials { display: flex; gap: 8px }
.socials a {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  transition: color .18s, border-color .18s, transform .18s;
}
.socials a:hover { color: var(--text); border-color: var(--line-lit); transform: translateY(-2px) }
.socials svg { width: 18px; height: 18px; fill: currentColor }

/* -------------------------------------------------------------------- hero -- */

.panel {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--panel);
}

.hero { padding: 0 }
.herobg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(139,92,246,.4), transparent 62%),
    radial-gradient(90% 70% at 0% 100%, rgba(93,168,85,.14), transparent 60%),
    url('/assets/banner.webp') center/cover;
  opacity: .5;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,8,16,.5), rgba(10,8,16,.9));
}

.heroinner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px); align-items: center;
  padding: clamp(26px, 3.4vw, 40px);
}

.herofig img {
  width: clamp(122px, 15vw, 178px); height: auto;
  border-radius: 18px;
  image-rendering: pixelated;              /* it is pixel art; keep it crisp */
  border: 2px solid rgba(167,139,250,.55);
  box-shadow: 0 0 0 5px rgba(139,92,246,.1), 0 20px 50px -18px rgba(139,92,246,.75);
}

.herotext h1 { font-size: clamp(42px, 7vw, 74px); line-height: .95; margin-bottom: 16px }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0 }
.tags li {
  font-family: 'MinecraftSeven', monospace; font-size: 13px; letter-spacing: .06em;
  padding: 7px 13px; border-radius: 9px;
  border: 1px solid var(--line-lit); background: rgba(139,92,246,.12); color: var(--violet-lt);
}

.bio { max-width: 54ch; color: #CFC7E4; display: grid; gap: 10px }
.bio p { margin: 0 }

.herocta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 13px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn svg { width: 19px; height: 19px; fill: currentColor; flex: none }
.btn.primary {
  background: linear-gradient(180deg, var(--violet), var(--violet-dim)); color: #fff;
  box-shadow: 0 10px 26px -12px rgba(139,92,246,.95);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(139,92,246,1) }
.btn.ghost { background: rgba(255,255,255,.04); border-color: var(--line-lit); color: var(--text) }
.btn.ghost:hover { border-color: var(--violet); transform: translateY(-2px) }
.btn:focus-visible { outline: 3px solid var(--violet-lt); outline-offset: 3px }

.subline { margin: 16px 0 0; font-size: 13.5px; color: var(--muted) }
.subline b { color: var(--text) }

/* ------------------------------------------------------------------ blocks -- */

.block { margin-top: var(--gap) }
.blockhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px }
.blockhead h2 { font-size: clamp(21px, 2.6vw, 27px); position: relative; padding-left: 18px }
.blockhead h2::before {
  content: ''; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 8px; height: 8px; border-radius: 2px; background: var(--violet);
  box-shadow: 0 0 12px var(--violet);
}
.ghostlink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 11px; text-decoration: none;
  border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 550;
  transition: color .18s, border-color .18s;
}
.ghostlink:hover { color: var(--text); border-color: var(--line-lit) }

/* ------------------------------------------------------------------ videos -- */

.vidgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px }
.vidcard {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--panel); text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.vidcard:hover { transform: translateY(-4px); border-color: var(--line-lit); box-shadow: 0 18px 36px -22px rgba(139,92,246,.8) }
.vidthumb { position: relative; aspect-ratio: 16/9; background: var(--panel-2) }
.vidthumb img { width: 100%; height: 100%; object-fit: cover }
.vidthumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(transparent 40%, rgba(10,8,16,.55)); opacity: 0; transition: opacity .2s;
}
a.vidcard:hover .play { opacity: 1 }
.vidthumb .play span {
  width: 48px; height: 48px; border-radius: 50%; background: var(--violet);
  display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(0,0,0,.7);
}
.vidthumb .play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px }
.vidmeta { padding: 14px 15px 16px }
.vidmeta h3 {
  font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vidmeta time { display: block; margin-top: 7px; font-size: 12.5px; color: var(--faint) }

.skeleton { min-height: 230px; position: relative; overflow: hidden }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: sweep 1.4s infinite;
}
@keyframes sweep { from { transform: translateX(-100%) } to { transform: translateX(100%) } }

.emptybox {
  grid-column: 1 / -1; padding: 28px; border-radius: 16px; text-align: center;
  border: 1px dashed var(--line-lit); color: var(--muted);
}

/* ---------------------------------------------------------------- projects -- */

.projgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px }
.proj {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--panel); display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s;
}
.proj:hover { transform: translateY(-3px); border-color: var(--line-lit) }
.projshot { aspect-ratio: 16/9; background: var(--panel-2); overflow: hidden }
.projshot img { width: 100%; height: 100%; object-fit: cover }
.projbody { padding: 16px 17px 18px; display: grid; gap: 8px; align-content: start; flex: 1 }
.projkind {
  font-family: 'MinecraftSeven', monospace; font-size: 11.5px; letter-spacing: .08em;
  color: var(--violet-lt);
}
.proj h3 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 18px; font-weight: 600 }
.proj p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55 }
.wip {
  align-self: start; margin-top: 2px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  padding: 4px 10px; border-radius: 7px;
  background: rgba(245,197,66,.14); color: var(--gold); border: 1px solid rgba(245,197,66,.3);
}
.projlink { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--violet-lt); text-decoration: none }
.projlink:hover { text-decoration: underline; text-underline-offset: 3px }

/* ------------------------------------------------------------------- plays -- */

/* exactly four of them, so a 2x2 beats auto-fit leaving an orphan row */
.playgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px }
.play {
  padding: 18px 19px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel);
  border-top: 3px solid var(--c);
}
.play h3 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 17px; font-weight: 600; margin-bottom: 7px }
.play p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55 }

/* ------------------------------------------------------------------- about -- */

.aboutgrid { display: grid; gap: 12px; max-width: 760px }
.qa { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 18px 20px }
.qa h3 {
  font-family: 'MinecraftSeven', monospace; font-size: 14px; letter-spacing: .05em;
  color: var(--violet-lt); margin-bottom: 8px; font-weight: 400;
}
.qa p { margin: 0; color: #C9C1DF; font-size: 15px }

/* -------------------------------------------------------------------- join -- */

.joingrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px }
.join {
  display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--panel); text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
}
.join:hover { transform: translateY(-3px); border-color: var(--line-lit); background: var(--panel-2) }
.join .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(139,92,246,.14) }
.join .ic svg { width: 22px; height: 22px; fill: var(--violet-lt) }
.join h3 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 17px; font-weight: 600 }
.join p { margin: 0; font-size: 14px; color: var(--muted) }
.join code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  background: rgba(255,255,255,.05); padding: 3px 8px; border-radius: 6px; color: var(--text);
}

/* ------------------------------------------------------------------ footer -- */

.foot {
  margin-top: var(--gap); padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center;
  font-size: 14px; color: var(--muted);
}
.foot p { margin: 0 }
.footlinks { display: flex; gap: 18px; margin-right: auto }
.footlinks a { color: var(--muted); text-decoration: none }
.footlinks a:hover { color: var(--text) }

/* ------------------------------------------------------------------ tabbar -- */

.tabbar { display: none }

/* ------------------------------------------------------------------ motion -- */

.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.25,1) }
.rise.in { opacity: 1; transform: none }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none }
  .skeleton::after { animation: none }
  html { scroll-behavior: auto }
}

/* -------------------------------------------------------------- responsive -- */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr }
  .rail {
    position: static; height: auto; flex-direction: row; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 14px 18px; gap: 14px;
  }
  .railnav { display: none }
  .railfoot { margin: 0 0 0 auto; padding: 0 }
  .railfoot .dim { display: none }
  main { padding-bottom: 104px }

  .heroinner { grid-template-columns: 1fr; text-align: center; justify-items: center }
  .tags, .herocta { justify-content: center }
  .bio { text-align: left }

  /* thumb-reachable section nav */
  .tabbar {
    display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    grid-auto-flow: column; grid-auto-columns: 1fr;
    background: rgba(14,11,22,.93); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 3px; padding: 6px 2px;
    text-decoration: none; color: var(--faint); font-size: 10.5px; font-weight: 600;
  }
  .tabbar a.on { color: var(--violet-lt) }
  .tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
}

@media (max-width: 560px) {
  .playgrid { grid-template-columns: 1fr }
  .herotext h1 { font-size: clamp(38px, 13vw, 54px) }
  .herocta .btn { flex: 1; justify-content: center }
  .foot { flex-direction: column; align-items: flex-start }
  .footlinks { margin: 0 }
}
