/* =========================
   CodexID Theme Variables
========================= */
html {
  scroll-behavior: smooth;
}

:root {
  --bg: #f4f7ff;
  --text: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.35);

  --primary: #2563eb;
  --accent: #22c55e;
}

body.dark-mode {
  --bg: #070b1d;
  --text: #f1f5f9;
  --glass-bg: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.1);

  --primary: #7c3aed;
  --accent: #06b6d4;
}

/* =========================
   Loading Screen
========================= */
#loadingScreen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: 0.5s ease;
}

.loader-box {
  text-align: center;
  padding: 30px;
}

.loader-logo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.loader-logo span {
  color: var(--primary);
}

.loader-bar {
  width: 220px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  margin: 0 auto 15px;
  position: relative;
}

.loader-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: var(--primary);
  animation: loadingMove 1s infinite linear;
  border-radius: 999px;
}

@keyframes loadingMove {
  from { left: -50%; }
  to { left: 100%; }
}

.loader-text {
  opacity: 0.75;
  font-weight: 600;
}

/* =========================
   Base
========================= */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  transition: 0.3s ease;
}

/* Glass effect */
.glass-navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
  font-size: 1.5rem;
}

.brand-text {
  color: var(--text);
}

.brand-id {
  color: var(--primary);
}

.nav-link {
  color: var(--text) !important;
  opacity: 0.8;
  font-weight: 500;
  transition: 0.2s;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--primary) !important;
}

/* Buttons */
.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-weight: 500;
  border-radius: 12px;
  padding: 8px 12px;
  transition: 0.2s;
}

.btn-glass:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-glass-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 12px;
  transition: 0.2s;
}

.btn-glass-icon:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Mobile icon */
.navbar-toggler i {
  color: var(--text);
}

/*HERO*/
/* =========================
   Hero Section
========================= */
.hero-section {
  padding: 80px 0;
}

.hero-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.85;
}

.btn-primary-custom {
  background: var(--primary);
  border: none;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-outline-custom {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.btn-outline-custom:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Stats */
.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-box {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
}

/* Visual Glass */
.hero-visual-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.code-preview {
  text-align: left;
  padding: 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 0.95rem;
  overflow-x: auto;
}

body.dark-mode .code-preview {
  background: rgba(0, 0, 0, 0.35);
}

/* Tags */
.tag-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
}

/* =========================
   HERO REMAKE (GACOR)
========================= */

.hero-section {
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  top: 10%;
  right: 10%;
  background: var(--primary);
  filter: blur(140px);
  opacity: 0.25;
  z-index: 0;
  animation: floatGlow 6s ease-in-out infinite;
}

.hero-section::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  bottom: 5%;
  left: 5%;
  background: var(--accent);
  filter: blur(150px);
  opacity: 0.25;
  z-index: 0;
  animation: floatGlow 7s ease-in-out infinite;
}

@keyframes floatGlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-25px); }
}

.hero-glass,
.hero-visual-glass {
  position: relative;
  z-index: 2;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--glass-border);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Glow Brand */
.hero-brand-glow {
  font-weight: 800;
  font-size: 3rem;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 0 15px rgba(37, 99, 235, 0.55);
}

.hero-brand-glow span {
  color: var(--primary);
  text-shadow: 0 0 18px rgba(37, 99, 235, 0.8);
}

body.dark-mode .hero-brand-glow {
  text-shadow: 0 0 18px rgba(124, 58, 237, 0.7);
}

body.dark-mode .hero-brand-glow span {
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.8);
}

/* Buttons */
.btn-ghost-custom {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.btn-ghost-custom:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Terminal header */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.75;
  font-weight: 600;
}

/* Code Highlight */
.code-preview {
  text-align: left;
  padding: 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--glass-border);
  font-size: 0.95rem;
  overflow-x: auto;
  line-height: 1.6;
}

body.dark-mode .code-preview {
  background: rgba(0, 0, 0, 0.40);
}

.code-comment { color: #22c55e; }
.code-keyword { color: #3b82f6; font-weight: 700; }
.code-string { color: #f97316; font-weight: 600; }
.code-func { color: #a855f7; font-weight: 700; }

/* Animate Hero */
.hero-glass {
  animation: fadeUp 0.8s ease forwards;
}

.hero-visual-glass {
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hover Effect Stat Box (biar hidup) */
.stat-box {
  cursor: pointer;
  transition: 0.25s ease;
}

.stat-box:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Glow khusus dark mode biar makin gacor */
body.dark-mode .stat-box:hover {
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.35),
              0 0 28px rgba(6, 182, 212, 0.25);
}

.stat-box:active {
  transform: translateY(-2px) scale(0.98);
}

/* =========================
   Roadmap Section
========================= */
.roadmap-section {
  padding: 90px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
}

.section-subtitle {
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.8;
  font-size: 1rem;
}

/* Roadmap Card */
.roadmap-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.roadmap-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.06), transparent);
  opacity: 0;
  transition: 0.3s ease;
}

.roadmap-card:hover::before {
  opacity: 1;
}

.roadmap-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.18);
}

body.dark-mode .roadmap-card:hover {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.35),
              0 0 40px rgba(6, 182, 212, 0.18);
}

/* Icon */
.roadmap-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  transition: 0.25s ease;
}

.roadmap-icon i {
  font-size: 1.8rem;
  color: var(--primary);
  transition: 0.25s ease;
}

.roadmap-card:hover .roadmap-icon {
  transform: rotate(8deg) scale(1.05);
  border-color: var(--accent);
}

.roadmap-card h4 {
  font-weight: 800;
  margin-bottom: 10px;
}

.roadmap-card p {
  opacity: 0.85;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

/* Link */
.roadmap-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
  transition: 0.2s;
}

.roadmap-link:hover {
  gap: 14px;
  color: var(--accent);
}

/* =========================
   Courses Section
========================= */
.courses-section {
  padding: 90px 0;
}

.course-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.18);
}

body.dark-mode .course-card:hover {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.35),
              0 0 40px rgba(6, 182, 212, 0.18);
}

.course-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  transition: 0.25s ease;
}

.course-icon i {
  font-size: 1.8rem;
  color: var(--primary);
}

.course-card:hover .course-icon {
  transform: rotate(8deg) scale(1.05);
  border-color: var(--accent);
}

.course-card h4 {
  font-weight: 800;
  margin-bottom: 10px;
}

.course-card p {
  opacity: 0.85;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* Tags */
.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.course-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
}

/* Link */
.course-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
  transition: 0.2s;
}

.course-link:hover {
  gap: 14px;
  color: var(--accent);
}

/* =========================
   Projects Section
========================= */
.projects-section {
  padding: 90px 0;
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.18);
}

body.dark-mode .project-card:hover {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.35),
              0 0 40px rgba(6, 182, 212, 0.18);
}

/* Header */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.project-icon {
  font-size: 1.2rem;
  opacity: 0.8;
}

/* Badge */
.project-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--glass-border);
}

.badge-beginner {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-intermediate {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.badge-advanced {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* Title & text */
.project-card h4 {
  font-weight: 800;
  margin-bottom: 10px;
}

.project-card p {
  opacity: 0.85;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
}

/* Link */
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
  transition: 0.2s;
}

.project-link:hover {
  gap: 14px;
  color: var(--accent);
}

/* =========================
   Footer Section
========================= */
.footer-section {
  padding: 80px 0 40px;
}

.footer-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.footer-glass::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -60px;
  right: -60px;
  background: var(--primary);
  opacity: 0.18;
  filter: blur(100px);
}

.footer-glass::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  bottom: -60px;
  left: -60px;
  background: var(--accent);
  opacity: 0.18;
  filter: blur(110px);
}

.footer-brand {
  font-weight: 900;
  font-size: 1.8rem;
  position: relative;
  z-index: 2;
}

.footer-brand span {
  color: var(--primary);
}

.footer-title {
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.footer-text {
  opacity: 0.85;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text);
  opacity: 0.75;
  font-weight: 600;
  transition: 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}

/* Social */
.footer-social {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  transition: 0.2s;
}

.social-btn:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer line */
.footer-line {
  border-color: var(--glass-border);
  position: relative;
  z-index: 2;
}

/* Bottom */
.footer-bottom {
  position: relative;
  z-index: 2;
}

.dev-link {
  text-decoration: none;
  font-weight: 800;
  color: var(--primary);
}

.dev-link:hover {
  color: var(--accent);
}

/*revael*/
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Back To Top Button
========================= */
#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 1.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: 0.25s ease;
  z-index: 9999;
}

#backToTop:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-6px);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}