/* =========================================================
   DarkCodeIT — Python Roadmap
   ========================================================= */

:root {
  /* Colors */
  --bg: #050816;
  --card: #111827;
  --cyan: #00E5FF;
  --purple: #8B5CF6;
  --green: #22C55E;
  --text: #F8FAFC;
  --text-secondary: #94A3B8;

  --border: rgba(248, 250, 252, 0.08);
  --border-glow: rgba(0, 229, 255, 0.35);

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container: 1180px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

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

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--cyan); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--purple)); border-radius: 10px; }

/* =========================================================
   UTILITIES
   ========================================================= */

.text-accent { color: var(--cyan); }

.text-gradient {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.glass {
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
}

/* =========================================================
   BACKGROUND LAYERS
   ========================================================= */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  z-index: 0;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.35;
}

.bg-glow--one {
  top: -200px;
  left: -150px;
  background: var(--purple);
}

.bg-glow--two {
  top: 30%;
  right: -200px;
  background: var(--cyan);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, header { position: relative; z-index: 1; }

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  color: #050816;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.55);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(248, 250, 252, 0.03);
}

.btn--outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.18);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--outline.btn--full, .btn--ghost.btn--full { width: 100%; }

.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--lg { padding: 18px 40px; font-size: 1.05rem; }
.btn--full { width: 100%; }

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px 80px;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  animation: float-y 5s ease-in-out infinite;
}

.hero__logo {
  font-size: 3.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.45));
  z-index: 2;
}

.hero__logo-ring {
  position: absolute;
  inset: -14px;
  border: 1px solid var(--border-glow);
  border-radius: 50%;
  animation: spin 14s linear infinite;
}

.hero__logo-ring::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 18px;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 40px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.hero__stat span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  font-weight: 700;
}

/* floating code snippets */
.hero__code-float {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
  z-index: 1;
  opacity: 0.85;
  animation: float-y 7s ease-in-out infinite;
  pointer-events: none;
}

.tok-kw { color: var(--purple); }
.tok-fn { color: var(--cyan); }
.tok-str { color: var(--green); }
.tok-num { color: var(--cyan); }

.hero__code-float--1 { top: 18%; left: 6%; animation-delay: 0s; }
.hero__code-float--2 { bottom: 24%; right: 6%; animation-delay: 1.4s; }
.hero__code-float--3 { top: 62%; left: 10%; animation-delay: 2.6s; display: none; }

.hero__icons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.hero__icon {
  position: absolute;
  color: var(--text-secondary);
  opacity: 0.25;
  animation: float-y 6s ease-in-out infinite;
}

.hero__icon--1 { top: 12%; right: 14%; font-size: 2.4rem; color: var(--green); animation-delay: 0.2s; }
.hero__icon--2 { top: 68%; right: 20%; font-size: 1.8rem; animation-delay: 1s; }
.hero__icon--3 { bottom: 14%; left: 22%; font-size: 2rem; color: var(--cyan); animation-delay: 2s; }
.hero__icon--4 { top: 30%; left: 16%; font-size: 1.6rem; color: var(--purple); animation-delay: 2.8s; }
.hero__icon--5 { bottom: 30%; right: 10%; font-size: 1.6rem; animation-delay: 1.6s; }
.hero__icon--6 { top: 48%; right: 6%; font-size: 1.8rem; color: var(--green); animation-delay: 3.4s; }

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 20px;
  z-index: 2;
}

.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* =========================================================
   SECTION SHELL
   ========================================================= */

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px 24px;
}

.section--tight { padding-top: 60px; padding-bottom: 60px; }

.section__head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.section__head .eyebrow { justify-content: center; }

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* =========================================================
   TIMELINE
   ========================================================= */

.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.timeline__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 2px;
  background: var(--border);
}

.timeline__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  box-shadow: 0 0 16px var(--cyan);
  transition: height 0.2s linear;
}

.tl-card {
  position: relative;
  padding-left: 96px;
  margin-bottom: 56px;
}

.tl-card:last-child { margin-bottom: 0; }

.tl-card__node {
  position: absolute;
  left: 0;
  top: 6px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  z-index: 2;
  transition: all 0.4s var(--ease);
}

.tl-card.is-active .tl-card__node {
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.5);
}

.tl-card__body {
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.tl-card.is-active .tl-card__body {
  border-color: var(--border-glow);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.1);
}

.tl-card__body:hover { transform: translateY(-4px); }

.tl-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tl-card__level {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
}

.tl-card__badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.tl-card__badge--green { color: var(--green); }
.tl-card__badge--cyan { color: var(--cyan); }
.tl-card__badge--purple { color: var(--purple); }

.tl-card__title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.tl-card__desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.tl-card__topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  margin-bottom: 24px;
}

.tl-card__topics li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.tl-card__topics i {
  color: var(--green);
  font-size: 0.72rem;
}

.tl-card__progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: rgba(248, 250, 252, 0.08);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 4px;
  transition: width 1.2s var(--ease);
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* =========================================================
   ECOSYSTEM MAP
   ========================================================= */

.ecosystem {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.ecosystem__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.eco-line {
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  transition: stroke 0.4s var(--ease);
}

.eco-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(64px, 15vw, 120px);
  height: clamp(64px, 15vw, 120px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.7rem, 5vw, 3rem);
  background: radial-gradient(circle, rgba(0,229,255,0.12), transparent 70%);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.25);
  z-index: 2;
}

.eco-center i {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eco-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1.5vw, 10px);
  width: clamp(72px, 16vw, 128px);
  padding: clamp(8px, 2.4vw, 18px) clamp(4px, 1.5vw, 10px);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 1.7vw, 0.78rem);
  line-height: 1.25;
  text-align: center;
  transition: all 0.35s var(--ease);
  z-index: 2;
}

.eco-node i { font-size: clamp(0.85rem, 3vw, 1.4rem); color: var(--text); }

.eco-node:hover,
.eco-node:focus-visible {
  color: var(--text);
  border-color: var(--cyan);
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.eco-node:hover i { color: var(--cyan); }

/* =========================================================
   LIBRARY CARDS
   ========================================================= */

.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.lib-card {
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

.lib-card:hover {
  transform: translateY(-6px);
  border-color: var(--lib-color, var(--cyan));
}

.lib-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.lib-card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--lib-color, var(--cyan));
  background: color-mix(in srgb, var(--lib-color, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--lib-color, var(--cyan)) 40%, transparent);
}

.lib-card__name {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.lib-card__purpose {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.lib-card__steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  padding-left: 2px;
}

.lib-card__steps li {
  position: relative;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  counter-increment: step;
}

.lib-card__steps { counter-reset: step; }

.lib-card__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
}

/* =========================================================
   CAREER TREE
   ========================================================= */

.career-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.career-root {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,229,255,0.12), rgba(139,92,246,0.12));
  border: 1px solid var(--border-glow);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.career-root i { color: var(--cyan); font-size: 1.4rem; }

.career-branch-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--cyan), var(--border));
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.career-card {
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

.career-card:hover {
  transform: translateY(-6px);
  border-color: var(--purple);
}

.career-card i {
  font-size: 1.6rem;
  color: var(--purple);
  margin-bottom: 14px;
}

.career-card h4 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.career-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* =========================================================
   FINAL SECTION
   ========================================================= */

.final {
  position: relative;
  text-align: center;
  padding: 160px 24px;
  overflow: hidden;
}

.final__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
  filter: blur(40px);
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.final__icon {
  position: relative;
  font-size: 4rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.5));
}

.final__title {
  position: relative;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.final__desc {
  position: relative;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border-glow);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s var(--ease);
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .lib-grid, .career-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__code-float, .hero__icons { display: none; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .section { padding: 90px 20px; }
  .section--tight { padding-top: 40px; padding-bottom: 40px; }
  .lib-grid, .career-grid, .project-grid { grid-template-columns: 1fr; }
  .tl-card { padding-left: 76px; }
  .tl-card__node { width: 54px; height: 54px; font-size: 1.1rem; }
  .timeline__line { left: 27px; }
  .tl-card__topics { grid-template-columns: 1fr; }
  .ecosystem { transform: scale(0.82); margin-top: -40px; margin-bottom: -60px; }
  .hero { padding-top: 120px; }
  .hero__stats { gap: 24px; }
}

@media (max-width: 480px) {
  .eco-node { width: 96px; padding: 12px 6px; font-size: 0.68rem; }
  .eco-node i { font-size: 1.1rem; }
  .eco-center { width: 88px; height: 88px; font-size: 2.1rem; }
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; }
}