/* ============================================
    VARIABLES & RESET
    ============================================ */

:root {
  --bg: #070807;
  --panel: #0f1411;
  --danger: #e63946;
  --business: #f4c430;
  --safe: #1fa766;

  --danger-glow: 0 0 35px rgba(230, 57, 70, 0.35);
  --business-glow: 0 0 35px rgba(244, 196, 48, 0.35);
  --safe-glow: 0 0 35px rgba(31, 167, 102, 0.35);

  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);

  --reggae-gradient: linear-gradient(
    90deg,
    var(--danger),
    var(--business),
    var(--safe)
  );
  --glow: 0 0 18px rgba(31, 167, 102, 0.18), 0 0 30px rgba(230, 57, 70, 0.08);
}

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

/* ============================================
    BASE STYLES
    ============================================ */

body {
  background: radial-gradient(circle at top, #0f1b14, #070807);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(31, 167, 102, 0.05),
    transparent 70%
  );
  animation: rlBreath 90s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes rlBreath {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    filter: hue-rotate(-5deg) brightness(1.02);
  }
  100% {
    filter: hue-rotate(5deg) brightness(0.98);
  }
}

.container {
  max-width: 1200px;
  padding: 0 24px;
  margin: 0 auto;
}

section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.6rem;
  margin-bottom: 40px;
  background: var(--reggae-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================
    NAVIGATION
    ============================================ */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(7, 8, 7, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 700;
  background: var(--reggae-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: 0.3s ease;
}

.logo:hover {
  filter: brightness(1.1);
  text-shadow: 0 0 18px rgba(31, 167, 102, 0.45);
}

.nav-links {
  display: flex;
  gap: clamp(8px, 3vw, 32px);
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: 0.3s;
  white-space: nowrap;
  padding: 6px 4px;
}

.nav-links a:hover {
  color: var(--safe);
}

.nav-cta {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--reggae-gradient);
  color: #000 !important;
  font-weight: 600;
  font-size: clamp(0.75rem, 3vw, 0.95rem);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 120px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  background: var(--reggae-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text h2 {
  color: var(--muted);
  margin: 10px 0 20px;
}

.hero-text p {
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-code {
  background: linear-gradient(
    180deg,
    rgba(31, 167, 102, 0.15),
    rgba(7, 8, 7, 1)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  line-height: 1.5;
  box-shadow: var(--glow);
  position: relative;
  overflow: hidden;
  height: fit-content;
  align-self: start;
  max-width: 550px;
  margin-left: auto;
}

.hero-code::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 6, 0.85);
  border-radius: 16px;
}

.hero-code code {
  position: relative;
  z-index: 1;
  color: #e5e7eb;
  font-size: clamp(0.7rem, 2.6vw, 1.1rem);
}

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

.btn {
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 12px;
  transition: 0.3s;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.primary {
  background: var(--reggae-gradient);
  color: #000;
}

.primary:hover {
  filter: brightness(0.95);
}

.outline {
  border: 1px solid var(--safe);
  color: var(--safe);
}

.outline:hover {
  background: rgba(31, 167, 102, 0.08);
}

/* ============================================
    PROJECTS
    ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
  gap: 30px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.project-card {
  background: linear-gradient(180deg, rgba(31, 167, 102, 0.04), var(--panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 20px rgba(31, 167, 102, 0.12),
    0 0 40px rgba(230, 57, 70, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: 0.4s ease;
  height: 100%;
}

.project-card h3 {
  margin-bottom: 10px;
}

.project-card p {
  margin-bottom: 10px;
}

.tech {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Card Color Variants */
.private-card {
  border-color: rgba(230, 57, 70, 0.65);
  background: radial-gradient(
      circle at top,
      rgba(230, 57, 70, 0.08),
      transparent 60%
    ),
    var(--panel);
  box-shadow: 0 0 25px rgba(230, 57, 70, 0.18);
  --accent: #ff4d4d;
}

.private-card h3,
.private-card .tech {
  color: var(--danger);
}

.business-card {
  border-color: rgba(244, 196, 48, 0.55);
  background: radial-gradient(
      circle at top,
      rgba(244, 196, 48, 0.12),
      transparent 60%
    ),
    var(--panel);
  box-shadow: 0 0 22px rgba(244, 196, 48, 0.15);
  --accent: var(--business);
}

.business-card h3,
.business-card .tech {
  color: var(--business);
}

.demo-card {
  border-color: rgba(31, 167, 102, 0.6);
  background: radial-gradient(
      circle at top,
      rgba(31, 167, 102, 0.08),
      transparent 60%
    ),
    var(--panel);
  --accent: var(--safe);
}

.demo-card h3,
.demo-card .tech {
  color: var(--safe);
}

/* ===== Project card footer spacing fix ===== */
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  margin-top: auto;
}

@media (max-width: 480px) {
  .project-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
}

/* Project Badges */
.badge {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  line-height: 1;
  opacity: 0.95;
}

.live-badge {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 30%, transparent);
}

.demo-badge {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent);
}

.private-badge {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Project Actions */
.project-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: 0.3s ease;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.project-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px currentColor;
}

.private-card .project-cta {
  border-color: rgba(230, 57, 70, 0.5);
  color: var(--danger);
}

.business-card .project-cta {
  border-color: rgba(244, 196, 48, 0.5);
  color: var(--business);
}

.demo-card .project-cta {
  border-color: rgba(31, 167, 102, 0.5);
  color: var(--safe);
}

.project-card:hover .project-cta {
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================
    SKILLS
    ============================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-box {
  background: linear-gradient(180deg, rgba(31, 167, 102, 0.04), var(--panel));
  border: 1px solid var(--border);
  padding: 26px 20px;
  border-radius: 16px;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  transition: 0.4s ease;
}

.skill-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(31, 167, 102, 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: 0.4s ease;
}

.skill-box:hover {
  transform: translateY(-6px);
  border-color: rgba(31, 167, 102, 0.6);
  box-shadow: 0 0 30px rgba(31, 167, 102, 0.25),
    0 0 50px rgba(230, 57, 70, 0.12);
  color: var(--safe);
}

.skill-box:hover::before {
  opacity: 1;
}

.skill-box h3 {
  color: var(--safe);
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.skill-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-box li {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0;
}

/* ============================================
    CONTACT
    ============================================ */

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 50px;
}

.contact-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 12px;
  color: var(--muted);
  transition: 0.4s ease;
}

.contact-icon i {
  font-size: 2.6rem;
  background: var(--reggae-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: 0.4s ease;
}

.contact-icon:hover i {
  transform: translateY(-4px) scale(1.05);
  filter: drop-shadow(0 0 25px rgba(31, 167, 102, 0.4));
}

.contact-icon:hover span {
  color: var(--safe);
}

/* ============================================
    FOOTER
    ============================================ */

.footer {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer .logo {
  font-size: 1.1rem;
}

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

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-container {
    height: 60px;
  }

  .container {
    padding: 0 12px;
  }

  .hero-code {
    max-width: 100%;
    margin-left: 0;
  }
}

@media (min-width: 420px) and (max-width: 900px) {
  .logo {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    margin-right: 8px;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 90px;
    padding-bottom: 60px;
  }

  .hero-code {
    padding: 16px;
  }

  .contact-icons {
    flex-direction: column;
    gap: 30px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Ultra-wide screen fix */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
}

/* Utility */
.project-card br {
  display: none;
}
