/* Kiryl Yemelyanenka — rbhbokka.github.io. Hand-written, no build step. */

:root {
  --bg: #0a0a0c;
  --surface: #131317;
  --text: #e8e8ea;
  --secondary: #9a9aa3;
  --hairline: rgba(255, 255, 255, .08);
  --accent: #ffb454;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: 2rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration-color: rgba(255, 180, 84, .5); text-underline-offset: .2em; }
a:hover { color: var(--accent); }

::selection { background: rgba(255, 180, 84, .25); }

/* ---------- nav ---------- */

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 2.5rem);
  border-bottom: 1px solid var(--hairline);
}
.nav-name {
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
}
.nav nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.nav nav a {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--secondary);
  text-decoration: none;
}
.nav nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 110%, #16151a 0%, var(--bg) 60%);
}
@supports (min-height: 100svh) {
  .hero { min-height: 100svh; }
}

.hero-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.poster-globe {
  width: min(78vmin, 40rem);
  transform: translateY(28%);
  opacity: .8;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero.live #hero-canvas { opacity: 1; }

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: 6rem clamp(1.25rem, 5vw, 2rem) 8rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.tagline {
  margin-top: 1.2rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  max-width: 32ch;
  text-wrap: balance;
}
.subline {
  margin-top: .7rem;
  color: var(--secondary);
  font-size: clamp(.95rem, 1.6vw, 1.05rem);
}
.social-row {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: .85rem;
  display: flex;
  gap: .8rem;
  align-items: baseline;
}
.social-row a { color: var(--secondary); text-decoration: none; }
.social-row a:hover { color: var(--accent); }
.social-row span { color: var(--accent); }

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--secondary);
  text-decoration: none;
}
.cue-line {
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(var(--accent), transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .cue-line { animation: cue 2.4s ease-in-out infinite; }
  @keyframes cue {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(.4rem); opacity: .4; }
  }
}

/* ---------- sections ---------- */

.section {
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(4rem, 12vh, 8rem) clamp(1.25rem, 5vw, 2rem);
}
.section-label {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-intro {
  margin-top: .8rem;
  color: var(--secondary);
  max-width: 44rem;
}

.divider {
  border: none;
  height: 1px;
  background: var(--hairline);
  max-width: 56rem;
  margin-inline: auto;
  position: relative;
}
.divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* ---------- case studies ---------- */

.case { margin-top: clamp(3.5rem, 9vh, 6rem); }
.case > p, .case h2 { max-width: 44rem; }

.kicker {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.case h2 {
  margin-top: .6rem;
  font-size: clamp(1.6rem, 3.6vw, 2.25rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.case > p:not(.kicker):not(.stat):not(.stack):not(.case-link) {
  margin-top: 1.1rem;
}

.figs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.figs img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.figs-wide { grid-template-columns: 1fr; max-width: 34rem; }
@media (min-width: 44rem) {
  .figs:not(.figs-wide) { max-width: 30rem; }
}

.stat {
  margin-top: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}
.stat-num {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -.02em;
}
.stat-label {
  color: var(--secondary);
  font-size: .9rem;
  max-width: 34rem;
}

.stack {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--secondary);
}
.case-link { margin-top: .5rem; }
.case-link a {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--text);
}

/* ---------- lab ---------- */

.lab-item { margin-top: clamp(2.5rem, 6vh, 4rem); max-width: 44rem; }
.lab-item h3 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
.wip {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255, 180, 84, .35);
  border-radius: 99px;
  padding: .15rem .55rem;
  margin-left: .5rem;
  vertical-align: .18em;
  white-space: nowrap;
}
.lab-item p { margin-top: .8rem; }
.lab-item .stack { margin-top: .8rem; }

/* ---------- archive ---------- */

.archive { list-style: none; margin-top: 1.5rem; }
.archive li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--hairline);
}
.a-name { font-weight: 600; white-space: nowrap; }
.a-desc { color: var(--secondary); flex: 1; font-size: .95rem; }
.a-link {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--secondary);
  white-space: nowrap;
}
.a-link:hover { color: var(--accent); }
@media (max-width: 38rem) {
  .archive li { flex-wrap: wrap; gap: .25rem .6rem; }
  .a-desc { flex-basis: 100%; }
}

/* ---------- about ---------- */

.about-text { margin-top: 1.2rem; max-width: 44rem; font-size: 1.05rem; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(2rem, 6vh, 4rem);
  padding: clamp(3rem, 8vh, 5rem) clamp(1.25rem, 5vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-glyph { width: 30px; height: 30px; opacity: .9; }
.footer-mail a {
  font-family: var(--mono);
  font-size: .95rem;
}
.footer-social {
  font-family: var(--mono);
  font-size: .8rem;
  display: flex;
  gap: .8rem;
}
.footer-social a { color: var(--secondary); text-decoration: none; }
.footer-social a:hover { color: var(--accent); }
.footer-social span { color: var(--accent); }
.footer-fine { color: var(--secondary); font-size: .8rem; margin-top: .5rem; }
