/* === Theme Variables === */
:root {
  --text: #ffffff;
  --accent: #33ff99;
  --highlight: #ff66cc;
  --footer-bg: #111;
  --nav-bg: rgba(152, 247, 209, 0.05);
  --matrix-back: rgba(21, 1, 26, 0.123);
  --body-bg:rgba(0, 0, 0, 0.459);
  --ts2: #ff99dd;
  --avatar-shadow: rgba(0,0,0,0.6);
  --glass-header: rgba(0, 255, 128, 0.05); /* Light green glass effect */
  --toggle-bg: rgba(0, 255, 128, 0.05);
  --badge-glow: #ff99cc;
  --badge-glow1: #ff99cc;
  --CertText: white;
}

/*Certificate Section*/
.cert-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 25px;
  margin-bottom: 10px;
}
.cert-badge {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  /*pretty*/
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--glass-header);
  color: var(--CertText);
  text-decoration: none;
  box-shadow: 0 0 12px var(--badge-glow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(3px);
  font-weight: bold;
  background-color: var(--glass-header);
}

.cert-badge:hover {
  transform: rotateX(6deg) rotateY(-6deg) scale(1.05);
}

.cert-svg {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 0 5px var(--badge-glow1));
  transition: transform 0.3s ease;
  margin-top: 10px;
  margin-bottom: 10px;
}

.cert-badge:hover .cert-svg {
  transform: scale(1.05);
}

.cert-badge span {
  line-height: 1.5;
  font-size: clamp(0.8rem, 3vw, 0.9rem);
  margin-bottom: 0.5rem;
}

/* ===== Base Styles ===== */
body {
  font-family: 'Fira Code', monospace; /* Monospace hacker-style font */
  overflow-x: hidden; /* Prevents horizontal scrollbars */
  background: var(--bg);
  color: var(--text);
}

.theme-toggle-container {
  display: flex;
  justify-content: flex-end; /* aligns to the right */
  padding: 0.5rem 0.5rem 0.5rem 0;     /* space above and right */
}

.theme-toggle {
  background: none;
  color: var(--highlight);
  border: 2px solid var(--highlight);
  border-radius: 50%;
  padding: 0.5rem;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  cursor: pointer;
  box-shadow: 0 0 8px var(--highlight);
  transition: all 0.3s ease;
  background-color: var(--toggle-bg);
  backdrop-filter: blur(5px);  
}

.theme-toggle:hover {
  background: var(--highlight);
  color: #fff;
}

html {
  scroll-behavior: smooth; /* Smooth scroll when clicking anchor links */
  background-color: var(--toggle-bg);
}

* {
  -webkit-font-smoothing: antialiased; /* Improves font rendering */
}

/* ===== Layout Container ===== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Full viewport height */
}

html, body {
height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg); /* double check this is set */
  overflow-x: hidden; /* Prevent side-scrolling */
}

/* Make main content grow and push footer down */
main {
  flex: 1;
}

/* ===== Matrix Rain Background Canvas ===== */
#matrixRain {
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: -1;             /* Sends it behind everything */
  pointer-events: none;    /* Prevents interaction */
}

/* ===== Header Navigation ===== */
.header {
  background: var(--glass-header);
  backdrop-filter: blur(5px);         /* Glassmorphism blur */
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--text);
}


/* Navigation styles */
nav {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap; /* allow wrapping if needed */
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-size: clamp(1rem, 5vw, 1.3rem); /* auto scales */
}

.nav-menu li {
  list-style: none;
}

.nav-menu a {
  flex: 1 1 auto; /* grow/shrink freely */
  min-width: 80px;
  text-align: center;
  padding: 0.4rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 12px; /* full pill shape */
  background: var(--glass-header); /* glassy backdrop */
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 0 8px var(--accent);
  transition: all 0.3s ease;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  font-weight: bold;
}

nav a:hover {
  background: var(--avatar-shadow);
  color: var(--text);
  animation: neonFlicker 1.2s infinite alternate;
  transform: scale(1.05);
}

.nav-menu a.active {
  background: var(--avatar-shadow);
  color: var(--text);
  box-shadow: 0 0 5px var(--highlight);
  animation: neonFlicker 1.2s infinite alternate;
}

/* ===== Neon Text Flicker Animation ===== */
@keyframes neonFlicker {
  0% {
    text-shadow:
      0 0 2px var(--highlight),
      0 0 4px var(--ts2),
      0 0 6px var(--highlight);
  }
  100% {
    text-shadow:
      0 0 5px var(--highlight),
      0 0 10px var(--ts2),
      0 0 20px var(--highlight);
  }
}

/* ===== Hero Section ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 40px;
}

/* Profile Picture */
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: url('images/avatar.png') center/cover no-repeat;
  border: 3px solid var(--accent);
  box-shadow: 0 0 15px var(--accent);
  margin-bottom: 2rem;
  background-color: var(--avatar-shadow); /* Overlay tint */
}

/* Introduction Text */
.intro-text {
  background-color: var(--body-bg); /* Soft black overlay */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  padding: 5px 20px 20px 20px;
  font-weight: bold;
  border: 3px solid var(--text);
  margin-bottom: 1rem;
}

.intro-text h2 span {
  display: block;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  color: var(--highlight);; /* Accent color */
}

/* ===== Social Media Section ===== */
.socials {
  margin-top: 1.5rem;
}

.social-links {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allows wrap on mobile */
}

.social-links a {
  color: var(--accent);
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  transition: color 0.2s;
}

.social-links a:hover {
  animation: neonFlicker 1.2s infinite alternate;
}

/* Icon size for social logos */
.icon {
  width: 32px;
  height: 32px;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: #666;
  background: var(--footer-bg);
  padding: 10px;
}

/* ===== Cursor Animation ===== */

.pixel {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 1;
  pointer-events: none;
  animation: fadeOut 0.6s forwards;
  transition: transform 0.2s ease;
}

/* sparkles use theme colors */
.pink-sparkle {
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent), 0 0 12px #0b07f7;
}

.green-sparkle {
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent), 0 0 12px #e5ff00;
}

/*Sprinkles fade out aon text*/
@keyframes fadeOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(20deg);
    opacity: 0.6;
  }
  100% {
    transform: scale(0.4);
    opacity: 0;
  }
}


/* ===== Responsive Layouts ===== */

/* Tablets */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  main{
    flex: none;
    width: auto;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .nav-menu {
    justify-content: center;
  }

  .hero {
    margin: 2rem 1rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .intro-text {
    padding: 1rem;
  }

  .slogan {
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  }

  .socials a {
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    padding: 0.4rem 0.8rem;
  }

  .cert-badge {
    width: 100px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 2em auto;
    box-sizing: border-box; 
    flex-wrap: wrap;
  }

  .cert-badge img {
    width: 80px;
    height: auto;
  }

  .cert-badge span {
    text-align: center;
    line-height: 1.2;
  }
}

/* Phones */
@media (max-width: 480px) {

  nav ul {
    flex-direction: row;
    justify-content: center;
  }

  .nav-menu {
    justify-content: center;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }



  .socials a {
    padding: 0.4rem 0.6rem;
  }

  .cert-badge {
    width: auto;
    max-width: 90%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    margin: 1rem auto;
  }

  .cert-badge img {
    width: 60px;
    height: auto;
  }

  .cert-badge span {
    text-align: center;
    line-height: 1.2;
  }

  footer {
    padding: 1rem;
  }
}
@media (max-width: 420px) {
  .nav-menu {
    gap: 1rem;
  }
}
nav {
  max-width: 900px;
  margin: 0 auto;
}
