:root {
  --body-bg: #000;
  --body-fg: #fff;
  --radius: 0.25rem;

  --font: Inter, system-ui, sans-serif;
  --text-light: rgb(255, 255, 255);
  --text-dim: rgba(255, 255, 255, 0.6);

  --accent: rgb(255, 175, 0);
  --accent-light: rgba(255, 175, 0, 0.5);
  --accent-dark: rgba(90, 45, 0, 0.25);
  --glass: rgba(255, 125, 0, 0.20);
  --border: rgba(255, 125, 0, 0.75);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-count: 5;
  --nav-bg: rgba(50, 50, 50, 0.75);

  --card-accent: rgba(255, 200, 0, 0.12);
  --card-bg: linear-gradient(180deg, var(--glass), var(--card-accent));
  --card-blur: 0.3rem;
}

* {
  box-sizing: border-box;
}

/* #region Base styles */
body {
  margin: 0;
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--body-fg);
}

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

a:hover {
  text-decoration: underline;
}

/* #endregion */

/* #region Background video */
.bg-anim {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.bg-anim video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: blur(0.5rem) brightness(2.5);
}

/* #endregion */

/* #region Navigation */
.nav {
  position: static;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.nav-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  padding: 0.25rem;
  background: var(--nav-bg);
  border: var(--border);
  border-radius: var(--radius);
}

.nav-indicator {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(100% / var(--nav-count) - 1px);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.nav button {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  padding: 0.45rem 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.5s ease;
}

.nav button:hover {
  color: var(--text-light);
}

.nav button.active {
  color: var(--accent);
}
/* #endregion */

/* #region Hero */
header {
  text-align: center;
  padding: 4rem 2rem 3rem;
}

header h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  margin: 0;
  letter-spacing: -0.04em;
  text-shadow: 0 0 25px rgb(0, 0, 0);
  color: var(--text-light);
}

header h1 sup {
  text-shadow: 0 0 25px rgba(255, 200, 0, 0.45);
  color: var(--accent);
}

header p {
  max-width: 620px;
  margin: 1rem auto 0;
  color: var(--text-dim);
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

header div {
  margin: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--nav-bg);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-light);
}
/* #endregion */

/* #region Layout */
main {
  max-width: 75rem;
  margin: auto;
  padding: 4rem 2rem 6rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
/* #endregion */

/* #region Published cards & badges*/
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

/* Card Base */
.card {
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-light);
}

/* Cover Section */
.card-cover {
  padding: 1.5rem;
  background: var(--accent-dark);
  border-bottom: 1px solid var(--border);
}

.cover-image-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 12px;
}

.cover-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.card:hover .cover-image-container img {
  transform: scale(1.05);
}

.cover-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
}

.resource-badge {
  background: var(--accent);
  color: var(--text-light);

  font-size: 0.7rem;
  padding: 0.25rem 0.25rem;
  border-radius: var(--radius);

  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cover-content {
  text-align: center;
}

.cover-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.3;
}

.cover-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Body */
.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background: var(--glass);
  border-radius: var(--radius);
  transition: var(--transition);
}

.stat-item:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.view-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.views-icon {
  font-size: 1rem;
}

/* Author Section */
.card-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}

.card-author a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  transition: var(--transition);
}

.card-author:hover .author-avatar {
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: var(--transition);
}

.author-link:hover {
  transform: translateY(-2px);
}

.author-link:hover {
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .card-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cover-title {
    font-size: 1.125rem;
  }

  .card {
    border-radius: 12px;
  }
}

/* #endregion */

/* #region Drafts */
.drafts-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

.drafts-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.draft-card {
  position: relative;
  padding: 1.25rem;
  background: var(--nav-bg);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: default;
}

.draft-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.draft-badge {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--accent);
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.draft-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.3;
}

.draft-description {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .drafts-grid {
    grid-template-columns: 1fr;
  }
}

/* #endregion */

/* #region Pages */
.page {
  max-width: 900px;
  margin: auto;
  line-height: 1.7;
}

.page h2,
.page h3 {
  color: var(--accent);
  margin-top: 2rem;
}

.page.maintenance {
  text-align: center;
  background: rgba(255 255 255 /.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* #endregion */

/* #region Footer */
.footer {
  padding: 2.5rem;
  background: var(--nav-bg);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--accent-light);
}

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

.link-group h4 {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-group a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  position: relative;
  width: fit-content;
}

.link-group a:hover {
  color: var(--text-light);
  transform: translateX(4px);
}

.footer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--accent-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* #endregion */

/* #region Transitions */
.page-enter-active,
.page-leave-active {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-enter-from {
  opacity: 0;
  transform: translateY(6px);
}

.page-leave-to {
  opacity: 0;
  transform: translateY(-4px);
}
/* #endregion */