/* ============ SunDay — dark typography, soft (by yuno.su example) ============ */

:root {
  --bg: #0f1011;
  --surface: #17171a;
  --surface-hover: #1b1b1f;
  --text: #f4f4f5;
  --soft: #c2c2c8;
  --muted: #8a8a92;
  --faint: #57575f;
  --line: #232327;
  --line-hover: #3b3b42;
  --r: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--text); color: var(--bg); }

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  letter-spacing: 0.01em;
}

.grid { max-width: 860px; margin: 0 auto; padding: 40px 28px 48px; }

/* ---------- header ---------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color .3s ease;
}
.logo:hover { border-bottom-color: currentColor; }

.nav { display: flex; gap: 22px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .3s ease, border-color .3s ease;
}
.nav a:hover { color: var(--text); border-bottom-color: currentColor; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; z-index: 1; }
.hero > * { position: relative; z-index: 1; }

.hero::before {
  content: "";
  position: absolute;
  top: -110px; left: -120px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(96, 96, 128, 0.22), transparent 72%);
  filter: blur(70px);
  animation: breathe 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes breathe {
  from { transform: scale(0.94); opacity: 0.55; }
  to { transform: scale(1.1); opacity: 1; }
}

.hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }

.hero-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--soft);
  object-fit: cover;
}
img.hero-avatar { display: block; }

.hero-who { color: var(--muted); font-size: 0.85rem; }

.hero-title {
  font-family: "Bricolage Grotesque", "Golos Text", sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero-title .soft { color: var(--soft); }

.hero-sub {
  color: var(--soft);
  font-size: 1.08rem;
  max-width: 460px;
  margin-bottom: 10px;
  text-wrap: pretty;
}

.hero-note { color: var(--faint); font-size: 0.75rem; }

.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e8e8ea;
  box-shadow: 0 0 0 0 rgba(232, 232, 234, 0.4);
  animation: pulse 2.4s ease-out infinite;
  vertical-align: 1px;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 232, 234, 0.35); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.blink {
  display: inline-block;
  width: 8px; height: 13px;
  background: currentColor;
  vertical-align: -2px;
  margin-left: 7px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- dividers + sections ---------- */
.line { border: none; border-top: 1px solid var(--line); margin: 0; }

.section { padding: 28px 0 56px; }
.section-head { margin-bottom: 28px; }

.section-heading {
  font-family: "Bricolage Grotesque", "Golos Text", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.live-head, .dead-head {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  margin: 0 0 8px 2px;
}

/* ---------- rows ---------- */
.row {
  display: block;
  padding: 20px 22px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--text);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.row:hover {
  background: var(--surface-hover);
  border-color: var(--line-hover);
  transform: translateY(-2px);
}

.row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.row-top h3, .row-name {
  font-family: "Bricolage Grotesque", "Golos Text", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tag {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color .25s ease, border-color .25s ease;
}
.row:hover .tag { color: var(--soft); border-color: var(--line-hover); }

.row p { color: var(--muted); font-size: 0.93rem; }
.tags { display: block; margin-top: 10px; color: var(--faint) !important; font-size: 0.72rem !important; }
.ghost { opacity: .45; }

.inline-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .3s ease, border-color .3s ease;
}
.inline-link:hover { color: var(--soft); border-bottom-color: currentColor; }

/* contacts */
#contacts .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
#contacts .row .mono {
  color: var(--muted);
  transition: color .25s ease;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}
#contacts .row:hover .mono { color: var(--text); }
.email { cursor: pointer; }
.email .mono { transition: color .3s ease; }
.email.revealed .mono { color: var(--text); }
.email.revealed, .email.decoding { border-style: dashed; }
.email.decoding .mono { color: var(--soft); }

/* ---------- spotify now ---------- */
.spotify-now {
  display: flex;
  align-items: center;
  gap: 16px;
}
.spotify-art-wrap {
  width: 62px; height: 62px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.spotify-art {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .35s ease;
}
.spotify-art.loaded { opacity: 1; }
.spotify-meta { min-width: 0; flex: 1; }
.spotify-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.spotify-track {
  font-size: 0.98rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotify-artist {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotify-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  white-space: nowrap;
  transition: color .3s ease, border-color .3s ease;
}
.spotify-link:hover { color: var(--text); border-bottom-color: currentColor; }
.spotify-now.is-playing .tag { color: #1db954; border-color: rgba(29,185,84,0.35); }

/* ---------- game rows ---------- */
.game-row {
  position: relative;
  overflow: hidden;
}
.game-row > *:not(.game-bg) {
  position: relative;
  z-index: 1;
}
.game-bg {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(55%, 320px);
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.13;
  filter: saturate(0.85) brightness(0.95);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 35%, transparent 100%);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 35%, transparent 100%);
  transition: opacity .35s ease, transform .35s ease;
}
.game-row:hover .game-bg {
  opacity: 0.22;
  transform: scale(1.03);
}

/* ---------- friends marquee ---------- */
.friends {
  position: relative;
  overflow: hidden;
  -webkit-mask: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.friends-track {
  display: flex;
  width: max-content;
  animation: friends-roll 28s linear infinite;
}
.friends:hover .friends-track { animation-play-state: paused; }
@keyframes friends-roll { to { transform: translateX(-50%); } }

.friend-card {
  flex: 0 0 auto;
  width: 192px;
  margin-right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 16px 16px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r);
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
a.friend-card:hover {
  background: var(--surface-hover);
  border-color: var(--line-hover);
  transform: translateY(-2px);
}
.friend-avatar,
.friend-question {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.friend-avatar {
  object-fit: cover;
  display: block;
  background: var(--surface-hover);
}
.friend-question {
  border-style: dashed;
  border-color: var(--line-hover);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint);
  font-size: 1.2rem;
}
.friend-name { color: var(--text); font-size: 0.95rem; }
.friend-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 6px 0 12px;
  flex: 1;
}
.friend-site {
  color: var(--faint);
  font-size: 0.7rem;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.friend-card:hover .friend-site { color: var(--soft); }
.ghost-friend { border-style: dashed; background: transparent; }
.ghost-friend .friend-name { color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer .build { color: var(--faint); font-size: 0.75rem; letter-spacing: 0.06em; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(5px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1), filter .8s cubic-bezier(.22,.61,.36,1);
}
.reveal.visible { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .hero::before, .pulse-dot, .blink { animation: none; }
  .friends-track { animation: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .grid { padding: 26px 18px 36px; }
  .hero { padding: 44px 0 40px; }
  .hero-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .hero-sub { font-size: 1rem; }
  .section { padding: 42px 0; }
  .row { padding: 16px 16px; }
  .row-top { flex-direction: column; align-items: flex-start; gap: 5px; }
  #contacts .row { flex-wrap: wrap; }
  #contacts .row .mono { font-size: 0.78rem; }
  .spotify-now { flex-wrap: wrap; gap: 12px; }
  .spotify-art-wrap { width: 54px; height: 54px; }
  .spotify-link { width: 100%; }
  .row:hover { transform: none; }
  .header { padding-bottom: 16px; }
  .nav { gap: 14px; }
}
