:root {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000000;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  overflow-x: hidden;
}

.page {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  animation: fade-in 0.9s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Entry gate: covers the page until the visitor clicks, which also lets the music start. */
.enter {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  border: 0;
  background: #000000;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.enter:hover,
.enter:focus-visible {
  color: var(--muted);
  outline: none;
}

/* Parallax layers: each child moves by its data-depth factor (set by app.js). */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-style: preserve-3d;
}

.profile > * {
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.links {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-top: 1px solid var(--line);
}

.links a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  text-align: center;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--muted);
  letter-spacing: 0.04em;
  outline: none;
}

.links button {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.links button:hover,
.links button:focus-visible {
  color: var(--muted);
  letter-spacing: 0.04em;
  outline: none;
}

.projects {
  width: min(360px, calc(100% - 48px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000000;
  color: var(--text);
  font-family: inherit;
}

.projects::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.projects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.projects-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.projects-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.projects-close:hover,
.projects-close:focus-visible {
  color: var(--text);
  outline: none;
}

.projects-list {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.projects-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease;
}

.projects-list a:hover,
.projects-list a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.project-name {
  font-size: 15px;
  font-weight: 500;
}

.project-desc {
  color: var(--muted);
  font-size: 13px;
}

.projects[open] {
  animation: fade-in 0.2s ease both;
}

.views {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .profile > * {
    transform: none !important;
  }
}
