/* ==========================================================================
   home-atlas.css — Anasayfa "YÖK Atlas Veri Merkezi" (ATLAS-HUB) bölümü
   --------------------------------------------------------------------------
   index.html içindeki  <!-- ATLAS-HUB:START --> ... <!-- ATLAS-HUB:END -->
   bloğunu biçimlendirir. Tasarım tokenları homepage.css'ten gelir
   (--home-ink / --home-blue / --home-panel-solid ...). Bu dosya en son
   yüklendiği için eşit özgüllükteki kurallarda kazanır.

   İçerik:
     1. Bölüm kabuğu + aurora parıltısı
     2. Başlık / CTA yerleşimi
     3. Metrik kartları (animasyonlu sayaçlar)
     4. Araç kartları (3'lü grid)
     5. Popüler üniversite çipleri
     6. Koyu tema varyantları
     7. Duyarlı kırılımlar + hareket azaltma
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Kabuk */
body.home-dashboard .atlas-hub {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 104px 0 92px;
  border-block: 1px solid var(--home-line);
  background:
    radial-gradient(120% 92% at 12% 0%, color-mix(in srgb, var(--home-blue) 9%, transparent), transparent 62%),
    radial-gradient(92% 82% at 92% 16%, color-mix(in srgb, var(--home-cyan) 8%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--home-panel-solid) 60%, transparent), transparent 78%);
}

body.home-dashboard .atlas-hub-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--home-blue) 24%, transparent), transparent 72%) 12% 22% / 58% 78% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--home-cyan) 20%, transparent), transparent 72%) 88% 12% / 50% 70% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--home-amber) 12%, transparent), transparent 74%) 62% 96% / 46% 60% no-repeat;
  filter: blur(38px);
  opacity: 0.7;
  animation: atlasAurora 24s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes atlasAurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(0, -2.5%, 0) scale(1.07); }
}

/* ------------------------------------------------------- 2. Başlık / CTA */
body.home-dashboard .atlas-hub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 44px;
}

body.home-dashboard .atlas-hub .home-section-copy {
  max-width: 640px;
}

body.home-dashboard .atlas-hub-title {
  margin: 0;
  color: var(--home-ink);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.9rem, 6.2vw, 5.1rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.004em;
}

body.home-dashboard .atlas-hub-title .alt-font {
  display: inline-block;
  margin-top: 10px;
  color: var(--home-blue);
  font-family: "Instrument Serif", serif;
  font-size: 0.66em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: none;
}

body.home-dashboard .atlas-hub .section-desc {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--home-muted);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  line-height: 1.72;
}

body.home-dashboard .atlas-hub .section-desc strong {
  color: var(--home-ink);
  font-weight: 700;
}

body.home-dashboard .atlas-hub-cta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
  min-width: 250px;
}

body.home-dashboard .atlas-hub-cta .home-btn {
  width: 100%;
}

/* ------------------------------------------------- 3. Metrik kartları */
body.home-dashboard .atlas-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 54px;
}

body.home-dashboard .atlas-metric {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 24px 27px;
  border: 1px solid color-mix(in srgb, var(--home-blue) 16%, var(--home-line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--home-panel-solid) 82%, transparent);
  box-shadow: var(--home-shadow-sm);
  backdrop-filter: blur(12px);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease-out, border-color 220ms ease-out;
}

body.home-dashboard .atlas-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--home-blue), var(--home-cyan));
  content: "";
  opacity: 0.85;
}

body.home-dashboard .atlas-metric::after {
  position: absolute;
  inset: -46% -58% auto auto;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--home-blue) 20%, transparent), transparent);
  content: "";
  pointer-events: none;
}

body.home-dashboard .atlas-metric:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--home-blue) 40%, var(--home-line));
  box-shadow: var(--home-shadow);
}

body.home-dashboard .atlas-metric-num {
  display: block;
  color: var(--home-blue);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1;
}

body.home-dashboard .atlas-metric-label {
  display: block;
  margin-top: 8px;
  color: var(--home-ink);
  font: 750 0.76rem/1.2 "DM Sans", sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.home-dashboard .atlas-metric-note {
  display: block;
  margin-top: 6px;
  color: var(--home-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ---------------------------------------------------- 4. Araç kartları */
body.home-dashboard .atlas-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
}

body.home-dashboard .atlas-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 30px 28px 28px;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  color: inherit;
  background: color-mix(in srgb, var(--home-panel-solid) 86%, transparent);
  box-shadow: var(--home-shadow-sm);
  text-decoration: none;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms ease-out, border-color 240ms ease-out;
}

body.home-dashboard .atlas-tool::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--home-blue), var(--home-cyan));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.home-dashboard .atlas-tool:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--home-blue) 42%, var(--home-line));
  box-shadow: var(--home-shadow);
}

body.home-dashboard .atlas-tool:hover::before,
body.home-dashboard .atlas-tool:focus-visible::before {
  transform: scaleX(1);
}

body.home-dashboard .atlas-tool-featured {
  border-color: color-mix(in srgb, var(--home-blue) 34%, var(--home-line));
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--home-blue) 11%, transparent), transparent 62%),
    color-mix(in srgb, var(--home-panel-solid) 90%, transparent);
}

body.home-dashboard .atlas-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--home-blue) 22%, var(--home-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--home-blue) 10%, transparent);
  font-size: 1.35rem;
  line-height: 1;
}

body.home-dashboard .atlas-tool h3 {
  margin: 4px 0 0;
  color: var(--home-ink);
  font-size: 1.06rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

body.home-dashboard .atlas-tool p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.9rem;
  line-height: 1.66;
}

body.home-dashboard .atlas-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--home-blue);
  font-size: 0.82rem;
  font-weight: 750;
}

body.home-dashboard .atlas-tool-link span {
  transition: transform 220ms ease-out;
}

body.home-dashboard .atlas-tool:hover .atlas-tool-link span {
  transform: translateX(4px);
}

/* ---------------------------------------------- 5. Popüler çipler */
body.home-dashboard .atlas-populer {
  margin-top: 54px;
}

body.home-dashboard .atlas-populer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

body.home-dashboard .atlas-populer-head h3 {
  margin: 0;
  color: var(--home-ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

body.home-dashboard .atlas-populer-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--home-blue);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

body.home-dashboard .atlas-populer-all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.home-dashboard .atlas-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.home-dashboard .atlas-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  color: var(--home-ink);
  background: color-mix(in srgb, var(--home-panel-solid) 78%, transparent);
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease-out, background-color 200ms ease-out, box-shadow 200ms ease-out;
}

body.home-dashboard .atlas-chip strong {
  font-size: 0.85rem;
  font-weight: 700;
}

body.home-dashboard .atlas-chip span {
  color: var(--home-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

body.home-dashboard .atlas-chip:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--home-blue) 44%, var(--home-line));
  background: color-mix(in srgb, var(--home-blue) 8%, var(--home-panel-solid));
  box-shadow: var(--home-shadow-sm);
}

/* --------------------------------------------------------- 6. Koyu tema */
[data-theme="dark"] body.home-dashboard .atlas-hub {
  background:
    radial-gradient(120% 92% at 12% 0%, color-mix(in srgb, var(--home-blue) 17%, transparent), transparent 62%),
    radial-gradient(92% 82% at 92% 16%, color-mix(in srgb, var(--home-cyan) 13%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--home-panel-solid) 68%, transparent), transparent 78%);
}

[data-theme="dark"] body.home-dashboard .atlas-hub-glow {
  opacity: 0.48;
}

[data-theme="dark"] body.home-dashboard .atlas-metric,
[data-theme="dark"] body.home-dashboard .atlas-tool,
[data-theme="dark"] body.home-dashboard .atlas-chip {
  border-color: color-mix(in srgb, var(--home-blue) 26%, var(--home-line));
  background: color-mix(in srgb, var(--home-panel-solid) 72%, transparent);
}

[data-theme="dark"] body.home-dashboard .atlas-tool-featured {
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--home-blue) 20%, transparent), transparent 62%),
    color-mix(in srgb, var(--home-panel-solid) 82%, transparent);
}

[data-theme="dark"] body.home-dashboard .atlas-tool-icon {
  background: color-mix(in srgb, var(--home-blue) 18%, transparent);
}

/* ------------------------------------------------- 7. Duyarlı kırılımlar */
@media (max-width: 1100px) {
  body.home-dashboard .atlas-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home-dashboard .atlas-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home-dashboard .atlas-tool:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  body.home-dashboard .atlas-hub {
    padding: 76px 0 68px;
  }

  body.home-dashboard .atlas-hub-head {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  body.home-dashboard .atlas-hub-cta {
    flex-direction: row;
    min-width: 0;
  }

  body.home-dashboard .atlas-hub-cta .home-btn {
    width: auto;
    flex: 1 1 auto;
  }

  body.home-dashboard .atlas-tools {
    grid-template-columns: 1fr;
  }

  body.home-dashboard .atlas-tool:last-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  body.home-dashboard .atlas-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 40px;
  }

  body.home-dashboard .atlas-hub-cta {
    flex-direction: column;
  }

  body.home-dashboard .atlas-hub-cta .home-btn {
    width: 100%;
  }

  body.home-dashboard .atlas-populer-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  body.home-dashboard .atlas-chip {
    padding: 9px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-dashboard .atlas-hub-glow {
    animation: none;
  }

  body.home-dashboard .atlas-metric,
  body.home-dashboard .atlas-tool,
  body.home-dashboard .atlas-chip,
  body.home-dashboard .atlas-tool-link span,
  body.home-dashboard .atlas-tool::before {
    transition: none;
  }
}
