/* ==========================================================================
   Iris — personal profile site
   Theme: preserved + extended from the original Carrd palette & textures
   ========================================================================== */

:root {
  /* background (original Carrd card gradient) */
  --bg-start: #384a41;
  --bg-end: #141e4f;
  --bg-fallback: #141e4f;
  --overlay-opacity: 0.85;

  /* surfaces */
  --surface: rgba(20, 30, 79, 0.68);
  --surface-hover: rgba(20, 30, 79, 0.82);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --divider: rgba(255, 255, 255, 0.16);

  /* text */
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.82);

  /* accents (original title gradient) */
  --accent: #c556b9;
  --accent-2: #a810de;
  --title-gradient: linear-gradient(302deg, #a810de 78%, #c556b9 100%);

  /* links */
  --link: #aa94ff;
  --link-hover: #d9cfff;

  /* periwinkle / blue family (original social buttons) */
  --c1: #896bff;
  --c2: #6b83ff;
  --c3: #6b9dff;
  --c4: #6bc1ff;

  /* identity */
  --profile-border: #c250eb;
  --shadow: 0 1.5rem 2.5rem rgba(17, 27, 61, 0.45);
  --shadow-soft: 0 0.75rem 1.5rem rgba(17, 27, 61, 0.35);

  /* layout */
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --content-max: 1080px;
  --nav-height: 4rem;
  --gap: 1.25rem;

  --font-display: 'Mochiy Pop P One', 'Baloo 2', 'Trebuchet MS', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  background-color: var(--bg-fallback);
  min-height: 100vh;
  overflow-x: hidden;
}

/* full-screen background image (original Carrd background) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('assets/images/background.png') center / cover no-repeat;
}

/* dark gradient overlay on top of the image (not fully opaque) + ambient glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(168, 16, 222, 0.14), transparent 60%),
    radial-gradient(50rem 36rem at 0% 110%, rgba(107, 193, 255, 0.10), transparent 60%),
    linear-gradient(314deg, rgb(56 74 65 / var(--overlay-opacity)) 0%, rgb(20 30 79 / var(--overlay-opacity)) 100%);
}

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

a {
  color: var(--link);
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-2);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 30, 79, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text);
}

.brand-name {
  background-image: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-link.is-active {
  color: var(--text);
  background: var(--surface);
}
.nav-gallery {
  background: transparent;
  border: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.15rem;
  transition: color 0.18s ease;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.is-active {
  color: var(--link-hover);
}
.lang-sep {
  color: var(--divider);
  user-select: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: clamp(3rem, 6vw, 4rem) 0;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.section + .section {
  border-top: 1px solid var(--divider);
}

.section-head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  flex: 0 0 2.25rem;
  height: 1px;
  background: var(--divider);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  line-height: 1.2;
  font-weight: 400;
  background-image: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---------- hero ---------- */
.hero {
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0 5rem;
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar {
  width: clamp(8rem, 30vw, 11rem);
  height: clamp(8rem, 30vw, 11rem);
  margin-bottom: 1.75rem;
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--profile-border);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-avatar:hover img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 2rem 3.5rem rgba(17, 27, 61, 0.55);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4.75rem);
  line-height: 1.05;
  font-weight: 400;
  background-image: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-intro {
  max-width: 34rem;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  margin-bottom: 1.75rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.hero-tag {
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--c1);
  border-radius: 999px;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}
.btn-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

/* cycle the original periwinkle family like the Carrd buttons */
.hero-links .btn:nth-child(1) { border-color: var(--c1); }
.hero-links .btn:nth-child(1) .btn-icon { color: var(--c1); }
.hero-links .btn:nth-child(2) { border-color: var(--c2); }
.hero-links .btn:nth-child(2) .btn-icon { color: var(--c2); }
.hero-links .btn:nth-child(3) { border-color: var(--c3); }
.hero-links .btn:nth-child(3) .btn-icon { color: var(--c3); }

.vrchat-links .btn:nth-child(1) { border-color: var(--c1); }
.vrchat-links .btn:nth-child(1) .btn-icon { color: var(--c1); }
.vrchat-links .btn:nth-child(2) { border-color: var(--c2); }
.vrchat-links .btn:nth-child(2) .btn-icon { color: var(--c2); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 1.6rem);
  box-shadow: 0 4px 18px rgba(17, 27, 61, 0.12);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.card-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.card-text {
  color: var(--text-muted);
}

/* grid children must be allowed to shrink (prevents horizontal overflow) */
.about-grid > *,
.interests-grid > *,
.vrchat-layout > *,
.setup-grid > *,
.links-grid > * {
  min-width: 0;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.card-about {
  grid-column: 1 / -1;
}

.lang-list {
  display: flex;
  flex-direction: column;
}
.lang-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.lang-list li:first-child {
  padding-top: 0;
}
.lang-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.lang-name {
  font-weight: 600;
}
.lang-level {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-list {
  display: flex;
  flex-direction: column;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.info-row:first-child {
  padding-top: 0;
}
.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.info-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.info-value {
  font-weight: 600;
  text-align: right;
}

/* ---------- interests ---------- */
.interests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
.interest-card .card-title {
  margin-bottom: 0.75rem;
}

/* ---------- vrchat ---------- */
.vrchat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.vrchat-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--surface);
}
.vrchat-figure img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.vrchat-figure:hover img {
  transform: scale(1.02);
}

.vrchat-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vrchat-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.meta-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.meta-icon {
  font-size: 1.5rem;
  flex: none;
}
.meta-label,
.meta-value {
  display: block;
}
.meta-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.meta-value {
  font-weight: 600;
}

.vrchat-worlds .card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.vrchat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- setup ---------- */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.setup-card {
  text-align: center;
}
.setup-icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.setup-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- links ---------- */
.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.link-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.link-icon {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--link);
  transition: color 0.18s ease;
}
.link-card:hover .link-icon {
  color: var(--link-hover);
}
.link-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}
.link-name {
  font-weight: 600;
}
.link-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.link-arrow {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.18s ease, color 0.18s ease;
  flex: none;
}
.link-card:hover .link-arrow {
  transform: translate(2px, -2px);
  color: var(--link-hover);
}

/* ---------- page end ---------- */
.page-end {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.25rem 4rem;
  border-top: 1px solid var(--divider);
}
.back-top {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.back-top:hover {
  color: var(--link-hover);
}
.made-with {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* visit counter */
.visit-counter {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.visit-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--text-muted);
}
.visit-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.05rem;
  color: var(--link);
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(137, 107, 255, 0.45);
  min-height: 1.4rem;
}
.visit-count-img {
  height: 2.4rem;
  width: auto;
  image-rendering: pixelated;
}

/* ---------- hero scroll hint ---------- */
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: color 0.18s ease;
}
.hero-scroll:hover {
  color: var(--text);
}
.hero-scroll span {
  display: inline-block;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- music player ---------- */
.music-player {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 0.9rem;
  background: rgba(20, 30, 79, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  box-shadow: var(--shadow-soft);
}

.music-disc {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.35) 0 1px, rgba(255, 255, 255, 0.03) 1px 3px),
    radial-gradient(circle at 50% 50%, #3a3550 0 18%, #171430 60%, #0d0b1f 100%);
  box-shadow: 0 0 0 1px var(--border-strong), inset 0 0 6px rgba(0, 0, 0, 0.6);
  animation: spin 5s linear infinite;
  animation-play-state: paused;
}
.music-player[data-state="playing"] .music-disc,
.music-player[data-state="loading"] .music-disc {
  animation-play-state: running;
}
.music-disc img {
  position: absolute;
  inset: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: cover;
}
.music-disc-hole {
  position: absolute;
  inset: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg-fallback);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.music-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  width: 12rem;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.65rem;
}

.music-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0.9rem;
}

.music-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  cursor: pointer;
  margin-top: 0.15rem;
}
.music-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--c3);
  transition: width 0.15s linear;
}

.music-controls {
  display: flex;
  gap: 0.35rem;
  margin-top: 0;
  grid-column: 2;
  grid-row: 1 / 4;
  align-items: center;
}

.music-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1.5px solid var(--c2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--c2);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.music-btn:hover:not(:disabled) {
  transform: scale(1.08);
  background: var(--surface-hover);
}
.music-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.music-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- entry overlay ---------- */
body.locked {
  overflow: hidden;
}

.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 30, 79, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.55s ease;
}
.entry-overlay.dismissed {
  opacity: 0;
  pointer-events: none;
}
.entry-overlay:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: -10px;
}

.entry-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  max-width: 32rem;
  text-align: center;
}

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  line-height: 1.25;
  background-image: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);

}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .entry-title {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

.entry-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.entry-btn {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.8rem 2.1rem;
  background: var(--surface);
  border: 2px solid var(--c2);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.entry-btn:nth-child(2) {
  border-color: var(--c1);
}
.entry-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: var(--surface-hover);
  border-color: var(--link-hover);
  box-shadow: 0 0.5rem 1.25rem rgba(17, 27, 61, 0.45);
}
.entry-btn:active {
  transform: scale(0.95);
}
.entry-btn.selected {
  animation: entrySelected 0.45s ease forwards;
}

@keyframes entrySelected {
  0% { transform: scale(1); }
  40% { transform: scale(0.93); box-shadow: 0 0 0 10px rgba(137, 107, 255, 0.3); }
  100% { transform: scale(1.06); box-shadow: 0 0 0 22px rgba(137, 107, 255, 0); }
}

@keyframes entryPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ---------- gallery ---------- */
.gallery-cta {
  border-color: var(--c4);
  align-self: center;
}
.gallery-cta:hover {
  border-color: var(--link-hover);
}
.gallery-cta-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.vrchat-media {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.gallery {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(168, 16, 222, 0.14), transparent 60%),
    linear-gradient(314deg, rgb(56 74 65 / var(--overlay-opacity)) 0%, rgb(20 30 79 / var(--overlay-opacity)) 100%), var(--bg-fallback);
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.gallery[hidden] {
  display: none;
}

.gallery.is-open {
  opacity: 1;
  transform: none;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  background-image: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .gallery-title {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

.gallery-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  font-size: 1.1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.gallery-close:hover {
  transform: rotate(90deg) scale(1.06);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.5rem auto 2rem;
}

.gallery-tab {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.55rem 1.4rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.gallery-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.gallery-tab.is-active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--c3);
  box-shadow: 0 0 0.75rem rgba(107, 157, 255, 0.25);
}

.gallery-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.25rem 6rem;
}

.gallery-grid {
  column-count: 1;
  column-gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  z-index: 0;
  display: block;
  margin: 0 0 1.5rem;
  break-inside: avoid;
}

/* the offset square behind each photo */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate(7px, 8px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.gallery-item img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease;
}

.gallery-item:hover::before {
  transform: translate(11px, 12px);
  background: rgba(255, 255, 255, 0.10);
}
.gallery-item:hover img {
  transform: translate(-4px, -5px);
}

.gallery-empty {
  column-span: all;
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 4.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.gallery-empty span {
  font-size: 2.2rem;
}

@media (min-width: 560px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    column-count: 3;
  }
}

@media (min-width: 1400px) {
  .gallery-grid {
    column-count: 4;
  }
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 480px) {
  .hero {
    padding: 1.25rem 0 2rem;
  }
  .hero-avatar {
    width: 6.5rem;
    height: 6.5rem;
    margin-bottom: 1.25rem;
  }
  .hero-title {
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    margin-bottom: 0.5rem;
  }
  .hero-subtitle {
    margin-bottom: 0.75rem;
  }
  .hero-intro {
    margin-bottom: 1.25rem;
  }
  .hero-tags {
    margin-bottom: 1.5rem;
  }
  .hero-scroll {
    position: static;
    transform: none;
    margin-top: 1.5rem;
  }
}

@media (min-width: 600px) {
  .setup-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-about {
    grid-column: auto;
  }
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .vrchat-layout {
    grid-template-columns: 1.05fr 1fr;
    gap: 2.5rem;
  }
}

@media (min-width: 1080px) {
  .setup-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* mobile nav (collapsed) */
@media (max-width: 479px) {
  .vrchat-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: rgba(20, 30, 79, 0.97);
    border-bottom: 1px solid var(--divider);
    padding: 0.75rem 1.25rem 1.25rem;
    display: none;
  }
  .nav-links.nav-open {
    display: flex;
  }
  .nav-link {
    padding: 0.7rem 0.8rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 359px) {
  .music-body {
    width: 8.5rem;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .music-disc {
    animation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-scroll span {
    animation: none;
  }
}

/* Keep the floating player compact without shrinking its controls. */
.music-title,
.music-status,
.music-progress {
  grid-column: 1;
}

.page-end {
  padding-bottom: 7rem;
}

@media (max-width: 599px) {
  .hero-links {
    gap: 0.6rem;
  }
  .hero-links .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
  .section-head {
    margin-bottom: 1.5rem;
  }
  .music-player {
    left: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    padding: 0.55rem 0.65rem;
    gap: 0.6rem;
  }
  .music-body {
    width: 12rem;
  }
}
