:root {
  --ground: #9bab8f;
  --paper: #eef1e7;
  --ink: #1f2b18;
  --muted: #56634d;
  --sky: #1a4fe0;
  --petal: #d8697f;
  --runner: #fbfdf6;
  --rain: #0943e3;
  --f-display: "Rubik", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-pixel: "Press Start 2P", ui-monospace, monospace;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; overflow-x: hidden; }

/* hero */
.hero {
  position: sticky;
  top: 0;
  height: min(max(62vw, 560px), 100vh);
  height: min(max(62vw, 560px), 100svh);
  overflow: hidden;
  background:
    linear-gradient(180deg, #0a45e1 0%, #2e60db 10%, #5178d5 25%, #6484d1 40%, #738ccc 55%, #8094c7 70%, #8a99c4 80%, #8a99c4 100%)
      0 var(--oy, 0) / 100% var(--sh, 100%) no-repeat,
    #8a99c4;
  z-index: 0;
}
.hero__rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero__stage {
  position: absolute; left: 0; top: 0;
  width: 2100px; height: 1500px;
  transform-origin: 0 0;
  z-index: 2;
  cursor: crosshair;
}
.hero__stage img { position: absolute; display: block; user-select: none; -webkit-user-drag: none; }
.hero__stage .lane-layer { z-index: auto; cursor: inherit; pointer-events: none; }

/* flower outline */
.hero--outline .fl {
  filter:
    drop-shadow(7px 0 0 #fff) drop-shadow(-7px 0 0 #fff) drop-shadow(0 7px 0 #fff) drop-shadow(0 -7px 0 #fff)
    drop-shadow(5px 5px 0 #fff) drop-shadow(-5px -5px 0 #fff) drop-shadow(5px -5px 0 #fff) drop-shadow(-5px 5px 0 #fff)
    drop-shadow(0 8px 12px rgba(10, 50, 10, .3));
}

.hero__title {
  position: absolute; z-index: 4;
  left: max(16px, 3vw, env(safe-area-inset-left, 0px));
  bottom: calc(14vh + 12px);
  margin: 0;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(28px, 5.4vw, 84px); line-height: 1;
  color: #fff; letter-spacing: -0.01em;
  text-shadow: 0 6px 22px rgba(10, 70, 10, .55);
}
.hero__title small { display: block; margin-top: 1.2em; font: 400 10px/1.6 var(--f-pixel); letter-spacing: 0; opacity: .95; text-shadow: 0 1px 0 rgba(10, 60, 10, .8), 0 0 10px rgba(10, 70, 10, .6); }
@media (min-width: 900px) { .hero__title small { font-size: 16px; } }
.hero__hint {
  position: absolute; z-index: 4;
  right: max(16px, env(safe-area-inset-right, 0px)); top: 4%;
  font: 400 10px/1.6 var(--f-pixel); color: #fff; opacity: .9;
  background: rgba(15, 45, 160, .35); padding: 6px 10px; border-radius: 4px;
}

.lane-layer { position: absolute; inset: 0; z-index: 1; cursor: crosshair; }
.runner {
  position: absolute; left: 0; top: 0;
  margin: 0;
  font-family: var(--f-mono); font-weight: 700;
  line-height: 1;
  white-space: pre;
  color: var(--runner);
  text-shadow: 0 1px 0 rgba(20, 45, 0, .55), 0 0 6px rgba(20, 45, 0, .25);
  transform-origin: 50% 100%;
  pointer-events: none;
  will-change: transform;
}


/* main */
.main {
  position: relative; z-index: 1;
  margin-top: -14vh;
  background:
    radial-gradient(rgba(31, 43, 24, .13) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    linear-gradient(to bottom,
      rgba(155,171,143,0) 0,
      var(--ground) 14vh,
      var(--paper) calc(14vh + 420px));
  padding-top: 14vh;
  pointer-events: none;
  overflow-x: clip;
}
.main .wrap { pointer-events: auto; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px 64px;
  display: grid; gap: 96px;
}
.intro { display: grid; gap: 20px; }
.intro h2 { margin: 0; font: 800 clamp(30px, 4.4vw, 52px)/1.12 var(--f-display); text-wrap: balance; }
.intro p { margin: 0; font-size: 19px; color: var(--ink); }
.tag { font: 400 10px/1.6 var(--f-pixel); color: var(--muted); }

.section { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.section > h3 { margin: 0; font: 400 10px/1.6 var(--f-pixel); color: var(--muted); padding-top: 8px; }
.section > div { min-width: 0; }


.px { font: 400 10px/1.6 var(--f-pixel); color: var(--muted); letter-spacing: .02em; }
.block-title { margin: 14px 0 0; font: 800 clamp(34px, 5.6vw, 64px)/1.05 var(--f-display); text-shadow: 2px 0 rgba(216, 105, 127, .55), -2px 0 rgba(26, 79, 224, .45); }
.block-title--s { font-size: clamp(30px, 4.6vw, 52px); margin-bottom: 24px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.block-runners { display: flex; gap: 26px; margin: 0 30px 6px 0; }
.block-runners pre { margin: 0; font: 700 18px/1 var(--f-mono); color: var(--ink); }
.projects-note { margin: 18px 0 0; color: var(--muted); font-size: 16px; }

/* projects */
.showcase { display: grid; gap: 0; }
.case { position: relative; border-radius: 28px; padding: 56px; margin-top: 48px; isolation: isolate; }
.case__num {
  position: absolute; z-index: -1; top: -40px;
  font: 800 clamp(120px, 20vw, 260px)/1 var(--f-display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px currentColor; opacity: .35; user-select: none;
}
.case__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; position: relative; }
.case__grid--flip { grid-template-columns: 1.25fr 1fr; }
.case h4 { margin: 12px 0 14px; font: 800 clamp(34px, 5vw, 56px)/1 var(--f-display); text-shadow: none; }
.case__lead { margin: 0 0 22px; font-size: 18px; }

.case--klav { background: radial-gradient(circle at 80% 10%, #4a3a6e, #1b1726 60%); color: #f3eefc; padding-bottom: 40px; overflow: visible; }
.case--klav .case__num { right: 30px; color: #baa0e6; }
.case--klav .px { color: #baa0e6; }
.case--klav .case__lead { color: #d9d1ec; }
.case--tutor { background: #e3ecd3; border: 2px dashed #7f9668; }
.case--tutor .case__num { left: 24px; color: #7f9668; }
.case--tutor h4 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.05; }

.stats { display: flex; gap: 34px; margin: 0 0 24px; }
.stat { display: grid; gap: 4px; }
.stat dt { font: 800 34px/1 var(--f-display); }
.stat dd { margin: 0; font: 400 10px/1.6 var(--f-pixel); opacity: .75; }
.kbds { display: flex; flex-wrap: wrap; gap: 8px 6px; margin-bottom: 22px; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 44px; padding: 0 12px;
  border-radius: 10px; font: 700 14px/1 var(--f-mono); color: var(--ink);
  border: 1.5px solid rgba(255,255,255,.8);
  box-shadow: inset 2px 2px 2px rgba(255,255,255,.7), 0 6px 0 rgba(31,43,24,.18);
}
.kbd--violet { background: linear-gradient(145deg, rgba(186,160,230,.95), rgba(186,160,230,.6)); }
.kbd--pink { background: linear-gradient(145deg, rgba(242,160,192,.95), rgba(242,160,192,.6)); }
.kbd--gold { background: linear-gradient(145deg, rgba(240,192,110,.95), rgba(240,192,110,.6)); }
.btn {
  display: inline-block; padding: 16px 26px; border-radius: 14px; background: #f0c06e; color: var(--ink);
  font: 700 16px/1 var(--f-mono); text-decoration: none; box-shadow: 0 0 30px rgba(240,192,110,.6);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(240,192,110,.85); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.case__media { position: relative; }
.browser { border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); background: #1b1726; transform: rotate(1.5deg); }
.browser__bar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; background: #2a2438; }
.browser__bar i { width: 12px; height: 12px; border-radius: 50%; background: #f2a0c0; }
.browser__bar i:nth-child(2) { background: #f0c06e; }
.browser__bar i:nth-child(3) { background: #96cd82; }
.browser__bar span { margin-left: 12px; flex: 1; background: #3a3350; border-radius: 8px; padding: 6px 12px; font: 500 13px/1 var(--f-mono); color: #cfc6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #1b1726; }
.note--quote {
  position: absolute; right: -24px; bottom: -56px; width: 270px; margin: 0; transform: rotate(-3deg);
  background: #fff8d6; color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 14px 16px;
  font: 500 15px/1.4 var(--f-mono); box-shadow: 5px 5px 0 rgba(0,0,0,.35);
}
.feats { display: flex; flex-wrap: wrap; gap: 8px; margin: 56px 0 0; padding: 24px 0 0; list-style: none; border-top: 1px solid rgba(255,255,255,.15); }
.feats li { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); font: 500 14px/1 var(--f-mono); }

.ticker { margin: 70px -40px 24px; transform: rotate(-2deg); background: var(--sky); color: #fff; border-block: 3px solid var(--ink); overflow: hidden; white-space: nowrap; font: 700 22px/1 var(--f-mono); padding: 16px 0; }
.ticker__track { display: inline-flex; animation: ticker 40s linear infinite; }
.ticker__track span { flex: none; padding-right: 0; }
@keyframes ticker { to { transform: translateX(-50%); } }

.stickies { position: relative; display: flex; flex-wrap: wrap; gap: 24px 22px; align-content: center; justify-content: center; padding: 20px 10px; }
.sticky { width: 150px; height: 150px; padding: 16px; display: flex; align-items: flex-end; font: 600 20px/1.2 var(--f-body); box-shadow: 6px 8px 0 rgba(31,43,24,.18); }
.sticky--yellow { background: #fff8d6; transform: rotate(-6deg); }
.sticky--pink { background: #fbdde4; transform: rotate(4deg); }
.sticky--blue { background: #d6e1ff; transform: rotate(-3deg); }
.sticky--white { background: #fff; transform: rotate(3deg); }
.sticky--yellow2 { background: #fff8d6; transform: rotate(-5deg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chips span { font: 500 14px/1 var(--f-mono); padding: 9px 12px; border: 1px solid var(--ink); border-radius: 99px; }
.tl { display: flex; align-items: flex-start; margin: 0; padding: 0; list-style: none; font: 500 13px/1.3 var(--f-mono); }
.tl__step { display: grid; justify-items: center; gap: 8px; width: 72px; text-align: center; }
.tl__step i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; }
.tl__step--done i { background: #96cd82; }
.tl__step--now i { background: #f0c06e; }
.tl__step small { opacity: .6; font: inherit; }
.tl__line { flex: 1; min-width: 24px; height: 3px; background: var(--ink); margin-top: 10px; }
.tl__line--dash { background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); }

.skills-block { display: grid; }
.skill-groups { display: grid; gap: 22px; }
.skill-group { display: grid; gap: 10px; }
.skill-group h4 { margin: 0; font: 600 15px/1.3 var(--f-body); color: var(--muted); }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skills li { font: 500 14px/1 var(--f-mono); padding: 9px 12px; border: 1px solid var(--ink); border-radius: 99px; }
.skills li.learning { border-style: dashed; color: var(--muted); }

.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  align-items: baseline;
  font-size: 19px;
  margin: 0;
}
.contact b { font-family: var(--f-mono); font-weight: 500; color: var(--petal); }
.contact dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.contact a { text-decoration: none; }
.contact .channel { font-weight: 600; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.contact a:hover b, .contact .channel:hover { color: var(--sky); }

/* footer */
.footer { position: relative; height: 120px; overflow: hidden; background: var(--paper); }
.footer .runner { color: var(--ink); text-shadow: none; }
.footer__ground {
  position: absolute; left: 0; right: 0; bottom: 22px;
  font: 500 14px/1 var(--f-mono); color: #8a9a7c; white-space: nowrap; overflow: hidden;
}

/* glitch */
.hero__title { text-shadow: 3px 0 rgba(255, 60, 120, .75), -3px 0 rgba(40, 220, 255, .75), 0 6px 22px rgba(10, 70, 10, .55); }
.intro h2, .case--tutor h4, .block-title { text-shadow: 2px 0 rgba(216, 105, 127, .55), -2px 0 rgba(26, 79, 224, .45); }
@media (prefers-reduced-motion: no-preference) {
  .hero__title { animation: glitch 3.2s steps(1) infinite; }
}
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }
@keyframes glitch {
  0%, 86%, 100% { transform: none; }
  88% { transform: translate(-3px, 1px) skewX(-6deg); clip-path: inset(10% 0 45% 0); }
  90% { transform: translate(3px, -1px); clip-path: inset(55% 0 5% 0); }
  92% { transform: translate(-1px, 0); clip-path: none; }
}

/* mobile */
@media (max-width: 860px) {
  .case { padding: 28px 22px 32px; border-radius: 22px; }
  .case__grid, .case__grid--flip { grid-template-columns: 1fr; gap: 32px; }
  .case__grid--flip .stickies { order: 2; }
  .note--quote { position: relative; right: auto; bottom: auto; width: auto; margin: 22px 8px 0 0; transform: rotate(-1.5deg); }
  .block-runners { display: none; }
  .ticker { margin-inline: -24px; font-size: 16px; }
  .stats { gap: 24px; }
  .feats { margin-top: 36px; }
  .sticky { width: 120px; height: 120px; font-size: 17px; padding: 12px; }
}
@media (max-width: 720px) {
  .hero { height: max(112vw, 460px); }
  .hero__title { bottom: calc(10vh + 14px); }
  .main {
    margin-top: -10vh;
    padding-top: 10vh;
    background:
      radial-gradient(rgba(31, 43, 24, .13) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
      linear-gradient(to bottom,
        rgba(155,171,143,0) 0,
        var(--ground) 10vh,
        var(--paper) calc(10vh + 260px));
  }
  .wrap { padding-top: 16px; gap: 64px; }
  .section { grid-template-columns: 1fr; gap: 12px; }
  .hero__hint { display: none; }
}

/* loader */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--rain); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.loader--done { transform: translateY(-100%); }
.loader__track { display: grid; gap: 4px; }
.loader__runner, .loader__bar { margin: 0; font: 700 16px/1 var(--f-mono); white-space: pre; }
.loader__label { font: 400 10px/1.6 var(--f-pixel); }
@media (prefers-reduced-motion: reduce) {
  .loader { transition: opacity .4s; }
  .loader--done { transform: none; opacity: 0; }
}

.hero__stage .depth-rain { position: absolute; left: 0; top: 0; width: 2100px; height: 1500px; pointer-events: none; }
