:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #000000;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --soft: #71717a;
  --line: #27272a;
  --line-strong: #3f3f46;
  --media-bg: #050505;
  --radius: 8px;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-rounded: "SF Pro Rounded", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.label {
  margin: 0 0 8px;
  color: var(--soft);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.dossier {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.visual-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-rail {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  overflow: hidden;
}

.social-icon {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
}

.avatar-wrap {
  width: 104px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--media-bg);
  overflow: hidden;
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.identity h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-rounded);
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.04;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.profile-meta .label {
  margin: 0;
}

.view-count {
  color: var(--soft);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 600;
}

dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 16px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.description {
  margin-top: 22px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
}

.description p {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.media-tabs {
  display: grid;
  gap: 10px;
  padding-top: 22px;
}

.media-section summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-rounded);
  font-size: 1rem;
  font-weight: 600;
  list-style: none;
}

.media-section summary::-webkit-details-marker {
  display: none;
}

.media-title {
  color: var(--ink);
}

.media-count,
.media-toggle {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.media-toggle::before {
  content: "+";
}

.media-section[open] .media-toggle::before {
  content: "-";
}

.media-grid,
.circle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 4px 0 18px;
}

.media-grid figure,
.circle-grid figure {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--media-bg);
  overflow: hidden;
}

.media-figure {
  cursor: zoom-in;
}

.media-grid img,
.media-grid video {
  width: 100%;
  display: block;
  background: var(--media-bg);
}

.media-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-grid video {
  max-height: 520px;
}

.circle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.circle-figure {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 999px;
  background: #000000;
}

.circle-crop {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #000000;
}

.circle-media {
  width: 124%;
  height: 124%;
  display: block;
  object-fit: cover;
  transform: translate(-9.7%, -9.7%) scale(1.02);
  background: #000000;
}

.media-open {
  position: absolute;
  right: 8px;
  top: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.64);
  font: 600 0.78rem var(--font-rounded);
  cursor: zoom-in;
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 48px 14px 18px;
  background: rgba(0, 0, 0, 0.94);
}

.media-viewer-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.media-viewer-media {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.media-viewer-close {
  position: fixed;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.74);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.viewer-open {
  overflow: hidden;
}

.archive,
.not-found main {
  width: min(760px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 40px 0;
}

.archive h1,
.not-found h1 {
  margin: 0 0 24px;
  font-family: var(--font-rounded);
  font-size: clamp(2.1rem, 8vw, 4.8rem);
  line-height: 1;
}

.archive-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.archive-list > p {
  margin: 16px 0 0;
  color: var(--muted);
}

.archive-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.archive-item span {
  font-weight: 600;
}

.archive-item small {
  color: var(--muted);
}

@media (min-width: 680px) {
  .dossier {
    padding-top: 42px;
  }

  .hero {
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding-bottom: 26px;
  }

  .avatar-wrap {
    width: 148px;
  }

  dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
  }

  dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .circle-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
