:root {
  --primary: #ff6b6b;
  --bg-dark: #09131a;
  --bg-darker: #111;
  --text-light: #fff;
  --text-muted: #777;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  scroll-behavior: smooth;
  position: relative;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Header */
header {
  background: var(--bg-darker);
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

nav {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--text-light);
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* Hero */
.hero {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: transparent;
  padding: 0 20px;
}

.hero img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 25px var(--primary);
  object-fit: cover;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero h2 {
  font-size: 2.5rem;
}

.hero span {
  color: var(--primary);
}

.hero .btn-group {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 25px;
  background: var(--primary);
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}

.btn:hover {
  background: #ff4040;
  box-shadow: 0 0 20px var(--primary);
}

/* About Section */
.about-box {
  border: 2px solid var(--primary);
  padding: 50px;
  border-radius: 20px;
  background: linear-gradient(145deg, #111, #1a1a1a);
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.about-box h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  font-size: 2rem;
  color: var(--primary);
  letter-spacing: 2px;
}

.about-photo {
  flex: 1 1 250px;
  text-align: center;
}

.about-photo img {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
  object-fit: cover;
  transition: transform 0.4s ease;
}

.about-photo img:hover {
  transform: scale(1.05);
}

.about-content {
  flex: 2 1 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.about-intro {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.about-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.about-content p i {
  color: var(--primary);
  margin-right: 6px;
}

.quick-facts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.fact {
  flex: 1;
  min-width: 140px;
  padding: 18px;
  border-radius: 15px;
  background: #1c2128;
  text-align: center;
  border: 1px solid var(--primary);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.fact h4 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.fact p {
  font-size: 0.95rem;
  color: #ddd;
}

.tagline {
  text-align: center;
  font-style: italic;
  margin-top: 15px;
  font-size: 1.05rem;
  color: #ccc;
}

/* Skills */
#skills {
  padding: 70px 10%;
  background: #141414;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  justify-items: center;
}

.skill-item {
  width: 100%;
  background: var(--bg-darker);
  border-radius: 20px;
  padding: 12px;
  position: relative;
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
}

.skill-item .skill-name {
  margin-bottom: 5px;
  font-weight: 500;
  text-align: center;
}

/* Certifications */
#certifications {
  padding: 70px 10%;
  background: var(--bg-dark);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 25px;
}

.cert-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.cert-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.cert-card:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.cert-card:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}

.cert-card:nth-child(5) {
  grid-column: 2;
  grid-row: 2;
}

.cert-card:nth-child(6) {
  grid-column: 3;
  grid-row: 2;
}

.cert-card {
  background: var(--bg-darker);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.9);
}

.cert-card h3 {
  color: var(--primary);
  font-size: 1.1rem;
}

.cert-card p {
  font-size: 0.95rem;
  color: #ddd;
}

/* Projects */
#projects {
  padding: 70px 10%;
  background: #141414;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.project-card {
  position: relative;
  padding: 25px;
  border-radius: 15px;
  background: var(--bg-darker);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
  border: 1px solid var(--primary);
  overflow: hidden;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 35px rgba(255, 107, 107, 0.9);
}

.project-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.project-card p {
  margin-bottom: 10px;
  color: #ddd;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tech-tags span {
  background: #222;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #fff;
}

/* Experience */
#experience {
  padding: 70px 10%;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.exp-card {
  background: var(--bg-darker);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
  transition: 0.3s;
}

.exp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.9);
}

.exp-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.exp-card p {
  margin-bottom: 5px;
  color: #ddd;
}

/* Contact */
#contact {
  padding: 70px 10%;
}

#contact form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contact input,
#contact textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: #222;
  color: #fff;
}

#contact button {
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
}

#contact button:hover {
  background: #ff4040;
  box-shadow: 0 0 20px var(--primary);
}

.socials {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.socials a {
  font-size: 1.1rem;
  color: #fff;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.socials a:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: var(--bg-darker);
  color: var(--text-muted);
}

/* Responsive */

/* Hamburger menu only on mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--bg-darker);
    position: absolute;
    top: 60px;
    left: 0;
    width: 100vw;
    padding: 20px 0;
    border-top: 1px solid var(--primary);
    margin: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links li {
    margin-bottom: 10px;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 10px;
    display: block;
  }

  /* Stack About box vertically on mobile */
  .about-box {
    flex-direction: column;
    align-items: center;
  }

  .quick-facts {
    flex-direction: column;
    gap: 15px;
  }

  .hero img {
    max-width: 140px;
    width: 60vw;
    height: auto;
  }
}

/* Grids responsive */
.skills-grid,
.cert-grid,
.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Canvas background */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* Buttons font nice on small */
@media (max-width: 480px) {
  footer {
    font-size: 0.9rem;
  }
}
