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

:root {
  --bg: #121212;
  --bg-blue: #0a3040;
  --bg-elevated: #1a2a32;
  --text: #ffffff;
  --muted: #b3b3b3;
  --accent: #1db954;
  --content-gradient: linear-gradient(
    180deg,
    #0a3d52 0%,
    #0a3040 18%,
    #0d2830 45%,
    #151f24 70%,
    #121212 100%
  );
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Circular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.profile {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--content-gradient);
  padding-bottom: 4rem;
}

.profile-hero {
  position: relative;
  z-index: 1;
  min-height: 340px;
  background: center / cover no-repeat url("/static/header_2.jpg");
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 1.75rem;
  overflow: hidden;
}

.profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0.35) 62%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
}

.profile-content {
  position: relative;
  z-index: 1;
}

.profile-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.profile-hero__text {
  min-width: 0;
}

.profile-hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.profile-hero p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.profile-social {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.profile-social__link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.06);
}

.profile-social__link svg {
  width: 20px;
  height: 20px;
}

.section {
  padding: 1.5rem 1.5rem 0;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.track-row {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(18, 28, 34, 0.72);
}

.track-row__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.track-row__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.track-row__meta h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.track-row__meta p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.empty-state {
  color: var(--muted);
  padding: 2rem 0;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.upcoming-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(18, 28, 34, 0.72);
  box-sizing: border-box;
}

.upcoming-row__video {
  position: relative;
  flex: 0 0 11rem;
  width: 11rem;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.upcoming-row__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.upcoming-row__thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.upcoming-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upcoming-row__meta {
  flex: 0 0 13.5rem;
  width: 13.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.upcoming-row__meta-header {
  flex-shrink: 0;
}

.upcoming-row__meta h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.upcoming-row__date {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.upcoming-row__description-body {
  overflow: hidden;
  min-height: 0;
}

.upcoming-row__description {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.upcoming-row__more {
  display: none;
  flex-shrink: 0;
  margin: 0.35rem 0 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.upcoming-row.is-truncated .upcoming-row__more {
  display: block;
}

.description-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.description-modal[hidden] {
  display: none;
}

.description-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.description-modal__panel {
  position: relative;
  width: min(100%, 32rem);
  max-height: min(80vh, 36rem);
  overflow: auto;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: 12px;
  background: #1a2a32;
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.description-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.description-modal__close:hover {
  color: var(--text);
}

.description-modal__title {
  margin: 0 2rem 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.description-modal__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.about-project {
  display: none;
}

.about-project h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.about-project__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (min-width: 721px) {
  .profile {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
  }

  .upcoming-about-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.5rem 0;
  }

  .upcoming-about-row__upcoming,
  .about-project {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }

  .about-project {
    display: block;
  }

  .upcoming-about-row__upcoming .upcoming-row {
    width: 100%;
    max-width: 100%;
    gap: 0.75rem;
    padding: 0.65rem;
  }

  .upcoming-about-row__upcoming .upcoming-row__video {
    flex: 0 0 42%;
    width: 42%;
  }

  .upcoming-about-row__upcoming .upcoming-row__meta {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .upcoming-about-row__upcoming .upcoming-row__meta h3 {
    font-size: 1.1rem;
  }

  .upcoming-about-row__upcoming .upcoming-row__description {
    font-size: 0.85rem;
  }

  .upcoming-about-row--about-only .about-project {
    flex: 1 1 0;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .profile-hero {
    min-height: 260px;
  }

  .profile-hero__inner {
    align-items: flex-end;
  }

  .profile-social {
    justify-content: flex-end;
  }

  .track-row {
    grid-template-columns: 1fr;
  }

  .upcoming-row {
    width: 100%;
  }

  .upcoming-row__meta {
    flex: 1;
    width: auto;
    min-width: 0;
  }
}

/* Admin */
.admin-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.admin-wrap h1 {
  margin-top: 0;
}

.admin-wrap label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.admin-wrap input,
.admin-wrap textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #242424;
  color: var(--text);
  font: inherit;
}

.admin-wrap textarea {
  min-height: 120px;
  resize: vertical;
}

.btn,
.btn-outline {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn {
  background: var(--accent);
  color: #000;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid #555;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #333;
  vertical-align: top;
}

.admin-table .actions {
  white-space: nowrap;
}

.error {
  color: #ff6b6b;
}

.success {
  color: var(--accent);
}

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

.row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
