/* ==========================================================================
   dytth.xyz — Minimalist Clean Light Hub
   Tối giản, thân thiện, thanh lịch, ưu tiên tông sáng, ít màu mè.
   ========================================================================== */

:root {
  --bg-page: #fafafa;
  --bg-card: #ffffff;
  --bg-subtle: #f4f4f5;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-dark: #18181b;

  --text-main: #111827;
  --text-sub: #4b5563;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;

  --accent-blue: #2563eb;
  --accent-blue-soft: #eff6ff;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 20px -4px rgba(0, 0, 0, 0.06);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Main Container */
.site-container {
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.badge-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.hero-title .highlight {
  color: var(--accent-blue);
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.65;
  max-width: 580px;
}

.link-inline {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.link-inline:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Sections Common
   ========================================================================== */

.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-main);
  box-shadow: var(--shadow-hover);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.project-url {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  transition: color 0.18s var(--ease);
}

.project-card:hover .project-url {
  color: var(--text-main);
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* ==========================================================================
   Game Ranks Section
   ========================================================================== */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.rank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 6px 14px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.rank-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.rank-image {
  width: 82px;
  height: 82px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #0b0f19 url('../assets/ranks_board.png') no-repeat;
  background-size: 955px 618px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.rank-image.radiant {
  background-image: url('../assets/rank_valorant_radiant.jpg');
  background-size: cover;
  background-position: center;
}

.lol    { background-position: -266px -244px; }
.tft    { background-position: -418px -244px; }
.delta  { background-position: -568px -254px; }
.csgo   { background-position: -718px -252px; }
.pubg   { background-position: -116px -451px; }
.marvel { background-position: -267px -447px; }
.geo    { background-position: -418px -449px; }
.chess  { background-position: -569px -455px; }

.rank-tier {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.rank-game {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Link Card in Grid */
.rank-link-card {
  cursor: pointer;
}

.rank-link-box {
  width: 82px;
  height: 82px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.rank-link-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}

.rank-link-card:hover .rank-link-box {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
}

.rank-link-card:hover .rank-link-arrow {
  color: var(--accent-blue);
  transform: translate(2px, -2px);
}

.rank-link-card:hover .rank-tier {
  color: var(--accent-blue);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-legal {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.footer-nav a {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s var(--ease);
}

.footer-nav a:hover {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav .dot {
  color: var(--text-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 620px) {
  .site-container {
    padding: 36px 16px 48px;
    gap: 28px;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rank-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .rank-card {
    padding: 10px 6px 12px;
  }
}

@media (min-width: 480px) and (max-width: 620px) {
  .rank-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
