*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #191919;
  --bg-elevated: #2f2f2f;
  --text: #ebebeb;
  --text-muted: #9a9a9a;
  --border: #4a4a4a;
  --fill: #c8c8c8;
  --check: #4a7fd4;
  --max: 720px;
  --side-photo: 240px;
  --catalog-size: 0.88rem;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

.bar {
  color: var(--text-muted);
  margin-right: 0.35em;
}

.top-greeting {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

/* Header */
.profile-header {
  margin-bottom: 0;
}

.banner {
  height: 210px;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0c10;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  filter: contrast(1.35) saturate(0.5) brightness(0.8) hue-rotate(10deg);
  transform: scale(1.12);
}

/* Username — Syne unchanged */
.username {
  margin: 1rem 0 1rem;
  font-family: "Syne", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.username .pipe {
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 0.15em;
}

@media (min-width: 561px) {
  .profile-header {
    margin-bottom: 1.25rem;
  }

  .username {
    margin: 0 0 1.35rem;
  }

  .quote {
    margin-top: 0.25rem;
  }

  .grid {
    align-items: stretch;
  }

  .col-left {
    min-height: 100%;
  }

  .col-right {
    display: flex;
    flex-direction: column;
  }

  .side-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 0;
  }

  .counter {
    padding-top: 0;
  }

  .counter-unit {
    padding-top: 0;
    padding-bottom: 0.25rem;
  }

  .side-photo {
    height: 300px;
    flex-shrink: 0;
  }

  .side-links {
    margin-top: auto;
    padding-top: 0.55rem;
  }

  .progress-group {
    margin-top: auto;
  }
}

/* Quote typewriter */
.quote {
  margin: 0 0 1.75rem;
  padding: 1rem 1.1rem;
  background: #3a3a3a;
  border-radius: 6px;
  border: none;
  min-height: 5.25rem;
}

.quote-text {
  margin: 0;
  font-size: var(--catalog-size);
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.quote-cursor {
  color: var(--text-muted);
  animation: blink 0.9s step-end infinite;
}

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

.quote-author-line {
  margin: 0.55rem 0 0;
  font-size: var(--catalog-size);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  min-height: 1rem;
}

.author-cursor {
  display: none;
}

.author-cursor.active {
  display: inline;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-photo);
  gap: 0 2rem;
  align-items: start;
}

.col-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.col-right {
  width: var(--side-photo);
  justify-self: end;
  align-self: start;
}

/* Counter */
.counter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  padding-top: 0.25rem;
}

.counter-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.25rem 0.15rem;
  text-align: center;
}

.counter-value {
  display: block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.55rem, 4.8vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
  min-height: 2rem;
}

.counter-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.56rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.balance-slot {
  display: inline-block;
  vertical-align: bottom;
  height: 1.25em;
  overflow: hidden;
  min-width: 2.4em;
  text-align: center;
  position: relative;
  top: 0.05em;
}

.balance-reel {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.55s cubic-bezier(0.22, 0.85, 0.3, 1);
}

.balance-reel.is-old {
  transform: translateY(-1.25em);
  transition: none;
}

.balance-num {
  display: block;
  height: 1.25em;
  line-height: 1.25em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Links */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.link-item {
  font-size: var(--catalog-size);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.link-item a {
  color: var(--text);
  text-decoration: none;
  font: inherit;
}

.link-item a:hover {
  text-decoration: underline;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: var(--catalog-size);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.todo-block {
  margin-top: 0.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.todo-item {
  display: grid;
  grid-template-columns: 16px auto;
  justify-items: start;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--catalog-size);
  font-weight: 500;
  letter-spacing: -0.01em;
  min-height: 1.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  position: relative;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.checkbox.checked {
  background: var(--check);
  border-color: var(--check);
}

.checkbox.checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  animation: check-pop 0.25s ease forwards;
}

.checkbox:not(.checked)::after {
  content: none;
}

@keyframes check-pop {
  to {
    transform: rotate(45deg) scale(1);
  }
}

.todo-text {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  transition: color 0.35s ease;
}

.todo-text::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  width: 0;
  background: var(--text-muted);
  transform: translateY(-50%);
  transition: width 0.35s ease;
}

.todo-item.done .todo-text {
  color: var(--text-muted);
}

.todo-item.done .todo-text::after {
  width: 100%;
}

/* Progress — bottom */
.progress-group {
  margin-top: auto;
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.progress-item {
  width: 100%;
}

.progress-track {
  height: 14px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: transparent;
}

.progress-fill {
  height: 100%;
  background: var(--fill);
  border-radius: 1px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-label {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--catalog-size);
  font-weight: 500;
  color: var(--text-muted);
  text-align: right;
  letter-spacing: -0.01em;
  white-space: nowrap;
  width: 100%;
}

/* Photo — right column */
.side-column {
  width: var(--side-photo);
  padding-top: 0;
}

.side-photo {
  margin: 0;
  width: 100%;
  height: 300px;
  border-radius: 6px;
  overflow: hidden;
  background: #141414;
}

.side-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 32%;
  filter: contrast(1.05) saturate(0.06) brightness(0.65) grayscale(0.5);
}

.side-links li {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  font-size: var(--catalog-size);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.side-links {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  text-align: left;
}

.side-links li::before {
  content: none;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .col-right {
    width: 100%;
    justify-self: stretch;
  }

  .side-column {
    width: 100%;
    max-width: 280px;
  }

  .side-photo {
    height: auto;
    min-height: 280px;
  }

  .side-photo img {
    min-height: 280px;
  }
}
