/* drk1rd — one screen. Same language as suryansh.one: mono, near-black, one hot accent. */

:root {
  --bg: #050505;
  --fg: #ececec;
  --dim: #7a7a7a;
  --faint: #3c3c3c;
  --line: #232323;
  --acc: #ff2e00;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: var(--acc);
  border-color: var(--acc);
}

::selection {
  background: var(--acc);
  color: #000;
}

.acc {
  color: var(--acc);
}

/* ---------------------------------------------------------------- ascii field */
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* everything above the field */
.ticker,
.hud,
.main,
.foot {
  position: fixed;
  z-index: 1;
}

/* ---------------------------------------------------------------- ticker */
.ticker {
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.82);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  line-height: 28px;
  animation: tick 60s linear infinite;
}

@keyframes tick {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------------- hud */
.hud {
  top: 48px;
  right: var(--pad);
  text-align: right;
  font-size: 12px;
  line-height: 1.7;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.hud span {
  color: var(--fg);
}

#clock {
  color: var(--fg);
}

/* ---------------------------------------------------------------- main */
.main {
  left: var(--pad);
  right: var(--pad);
  top: 50%;
  transform: translateY(-54%);
  pointer-events: none;
}

.main a {
  pointer-events: auto;
}

.name {
  margin: 0 0 clamp(28px, 5vh, 52px);
  display: flex;
  align-items: flex-end;
  font: 800 clamp(64px, 17vw, 260px) / 0.82 var(--mono);
  letter-spacing: -0.06em;
  color: var(--fg);
}

.cursor {
  display: inline-block;
  width: 0.42em;
  height: 0.74em;
  margin-left: 0.06em;
  margin-bottom: 0.02em;
  background: var(--acc);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* key / value lines, like a terminal readout */
.kv {
  margin: 0;
  width: min(560px, 100%);
}

.kv > div {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  padding: 4px 0;
}

.kv .gap {
  margin-top: 18px;
}

.kv dt {
  color: var(--dim);
}

.kv dd {
  margin: 0;
}

.kv dd.r {
  color: var(--faint);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  background: var(--acc);
  animation: blink 1.6s steps(1) infinite;
  vertical-align: 1px;
}

/* ---------------------------------------------------------------- footer */
.foot {
  left: var(--pad);
  right: var(--pad);
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 28px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.7);
  font-size: 12px;
  color: var(--dim);
}

.socials a:hover {
  color: var(--fg);
  border-color: var(--acc);
  background: rgba(255, 46, 0, 0.12);
}

.end {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- boot-in */
.name,
.kv > div,
.foot,
.hud {
  animation: in 0.6s steps(6) both;
}

.kv > div:nth-child(1) { animation-delay: 0.45s; }
.kv > div:nth-child(2) { animation-delay: 0.55s; }
.kv > div:nth-child(3) { animation-delay: 0.65s; }
.kv > div:nth-child(4) { animation-delay: 0.75s; }
.kv > div:nth-child(5) { animation-delay: 0.85s; }
.foot { animation-delay: 1s; }
.hud { animation-delay: 0.3s; }

@keyframes in {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 640px) {
  body {
    font-size: 13px;
  }
  .hud {
    top: 40px;
    font-size: 11px;
  }
  .hud > div:nth-child(2) {
    display: none;
  }
  .kv > div {
    grid-template-columns: 76px 1fr;
  }
  .kv dd.r {
    display: none;
  }
  .end {
    display: none;
  }
}
