@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

:root {
  --bg-primary: #080c0a;
  --bg-secondary: #0d1410;
  --bg-card: #0f1a14;
  --amber: #f5a623;
  --amber-dim: #c47d10;
  --amber-glow: rgba(245, 166, 35, 0.15);
  --green-phosphor: #39ff8a;
  --green-dim: #1a8040;
  --green-glow: rgba(57, 255, 138, 0.12);
  --red-warn: #ff3b3b;
  --text-primary: #e8f5ec;
  --text-secondary: #7a9e84;
  --text-dim: #3d5c45;
  --border-color: #1f3526;
  --border-bright: #2d5038;
  --scanline: rgba(0, 0, 0, 0.08);
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    var(--scanline) 2px,
    var(--scanline) 4px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* Screen flicker effect */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* ============ NAVBAR ============ */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo .logo-amine {
  color: var(--text-primary);
}

.nav-logo .logo-bitwise {
  color: var(--amber);
  text-shadow: 0 0 20px var(--amber), 0 0 40px rgba(245,166,35,0.4);
}

.nav-logo .logo-bracket {
  color: var(--green-phosphor);
  font-size: 1.3rem;
  text-shadow: 0 0 12px var(--green-phosphor);
  animation: blink 2.5s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 0.4rem 1rem;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.nav-cta:hover {
  background: var(--amber);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--amber);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(57,255,138,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(245,166,35,0.05) 0%, transparent 60%);
}

/* Circuit grid background */
.circuit-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
}

.hero-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--green-phosphor);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--green-phosphor);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-tag::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--green-phosphor);
  box-shadow: 0 0 6px var(--green-phosphor);
}

.hero-title {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-title .line1 {
  color: var(--text-primary);
  display: block;
}

.hero-title .line2 {
  color: var(--amber);
  text-shadow: 0 0 40px rgba(245,166,35,0.5), 0 0 80px rgba(245,166,35,0.2);
  display: block;
  position: relative;
}

.hero-title .line2::after {
  content: '_';
  animation: blink 1.2s step-end infinite;
  color: var(--green-phosphor);
  text-shadow: 0 0 20px var(--green-phosphor);
}

.hero-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 300;
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 1.5rem 0 3rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}

.stat {
  position: relative;
}

.stat-number {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 2rem;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(245,166,35,0.4);
  line-height: 1;
}

.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--amber);
  color: var(--bg-primary);
  padding: 0.85rem 2rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(245,166,35,0.6), 0 0 60px rgba(245,166,35,0.2);
  transform: translateY(-2px);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-secondary {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--border-bright);
  transition: all 0.2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.btn-secondary:hover {
  border-color: var(--green-phosphor);
  color: var(--green-phosphor);
  background: var(--green-glow);
  text-shadow: 0 0 10px var(--green-phosphor);
}

/* ============ TERMINAL WIDGET ============ */
.terminal-float {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  box-shadow: 0 0 60px rgba(57,255,138,0.06), inset 0 0 40px rgba(0,0,0,0.3);
  display: none;
}

@media (min-width: 1200px) {
  .terminal-float { display: block; }
  .hero-content { max-width: 600px; }
}

.terminal-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #28ca41; }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.terminal-body {
  padding: 1rem;
  color: var(--green-phosphor);
  line-height: 1.8;
  min-height: 220px;
}

.t-line { display: flex; gap: 0.5rem; }
.t-prompt { color: var(--amber); }
.t-cmd { color: var(--text-primary); }
.t-output { color: var(--text-secondary); padding-left: 0; }
.t-success { color: var(--green-phosphor); text-shadow: 0 0 6px var(--green-phosphor); }
.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green-phosphor);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--green-phosphor);
}

/* ============ SECTIONS ============ */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(245,166,35,0.4);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '//';
  color: var(--text-dim);
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.section-title span { color: var(--amber); }

/* ============ TOPICS GRID ============ */
.topics-intro {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 4rem;
  line-height: 1.7;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5px;
  background: var(--border-color);
}

.topic-card {
  background: var(--bg-card);
  padding: 2rem;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--amber);
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--amber);
}

.topic-card:hover {
  background: #111a14;
}

.topic-card:hover::before {
  height: 100%;
}

.topic-icon {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.8rem;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(245,166,35,0.5);
  margin-bottom: 1rem;
  line-height: 1;
}

.topic-num {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.topic-name {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.topic-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--green-dim);
  border: 1px solid var(--green-dim);
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
}

/* ============ LEARNING PATH ============ */
.path-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  max-width: 100%;
  padding: 6rem 0;
}

.path-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.path-timeline {
  position: relative;
  margin-top: 3rem;
}

.path-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--amber), var(--green-phosphor), transparent);
  box-shadow: 0 0 10px rgba(245,166,35,0.3);
}

.path-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-left: 0;
  position: relative;
  animation: fadeInLeft 0.6s ease both;
}

.path-item:nth-child(1) { animation-delay: 0.1s; }
.path-item:nth-child(2) { animation-delay: 0.2s; }
.path-item:nth-child(3) { animation-delay: 0.3s; }
.path-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.path-dot {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border: 2px solid var(--amber);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber);
  box-shadow: 0 0 15px rgba(245,166,35,0.2);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
  z-index: 2;
}

.path-body {
  padding-top: 0.6rem;
  flex: 1;
  max-width: 500px;
}

.path-phase {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.path-title-item {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.path-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  padding: 2rem;
  border: 1px solid var(--border-color);
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
  background: 
    linear-gradient(135deg, rgba(57,255,138,0.02) 0%, transparent 100%);
}

.feature-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 30px rgba(57,255,138,0.04);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--green-phosphor);
  text-shadow: 0 0 15px var(--green-phosphor);
}

.feature-title {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============ CTA SECTION ============ */
.cta-section {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  max-width: 100%;
  border-top: 1px solid var(--border-color);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(245,166,35,0.06) 0%, transparent 70%);
}

.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.cta-section .section-label {
  justify-content: center;
}

.cta-section .section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.cta-section p {
  color: var(--text-secondary);
  margin: 1rem 0 2.5rem;
  font-size: 1.05rem;
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
}

.footer-brand .amber { color: var(--amber); }
.footer-brand p {
  font-family: 'Share Tech Mono', monospace;
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* ============ ANIMATIONS ============ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-bright); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.5rem; }
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .hero { padding: 80px 1.5rem 3rem; }
  .path-timeline::before { left: 20px; }
  .path-dot { width: 42px; height: 42px; }
}
