:root {
  --bg-color: #030303;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --theme-color: #007aff;
  --text-primary: #ffffff;
  --text-secondary: #a1a1a6;
  --transition-smooth: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  width: 100%;
}

html {
  overflow-x: hidden;
  width: 100%;
}

/* Noise Texture Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

/* --- BUBBLE BACKGROUND LAYER (Restored Images) --- */
.bubble-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a0a0a 0%, #030303 100%);
  opacity: 0.5;
}

.bubble {
  top: 5rem;
  left: -15rem;
  position: absolute;
  height: 5rem;
  z-index: 1;
  animation: bubble 30s infinite linear;
  opacity: 0.8;
}

.bubble1 {
  top: 50rem;
  right: -5rem;
  position: absolute;
  z-index: 5;
  height: 10rem;
  animation: bubble1 35s infinite linear;
  opacity: 0.7;
}

.bubble2 {
  top: -20rem;
  right: -10rem;
  position: absolute;
  z-index: 5;
  height: 19rem;
  animation: bubble2 50s infinite linear;
  opacity: 0.9;
}

.bubble3 {
  top: -8rem;
  left: 5rem;
  position: absolute;
  z-index: 2;
  height: 9rem;
  animation: bubble3 20s infinite linear;
  opacity: 0.7;
}

.bubble4 {
  top: 55rem;
  left: -8rem;
  position: absolute;
  height: 19rem;
  animation: bubble4 45s infinite linear;
  opacity: 0.6;
}

@keyframes bubble {
  to {
    top: 35rem;
    left: 35rem;
    transform: rotate(180deg);
    opacity: 0;
  }
}

@keyframes bubble1 {
  to {
    top: 3rem;
    right: 50rem;
    transform: rotate(-200deg);
    opacity: 0;
  }
}

@keyframes bubble2 {
  to {
    top: 60rem;
    right: 60rem;
    transform: rotate(-360deg);
    opacity: 0;
  }
}

@keyframes bubble3 {
  to {
    top: 20rem;
    left: 20rem;
    transform: rotate(200deg);
    opacity: 0;
  }
}

@keyframes bubble4 {
  to {
    top: 10rem;
    left: 20rem;
    transform: rotate(200deg);
    opacity: 0;
  }
}

/* --- Custom Cursor (Restored Original Style) --- */
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.3s, height 0.3s, transform 0.1s;
  transform: translate(-50%, -50%);
}

.cursor-expanded {
  width: 60px !important;
  height: 60px !important;
}

/* --- Scroll Progress --- */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--theme-color);
  z-index: 2000;
  width: 0%;
  box-shadow: 0 0 10px var(--theme-color);
}

/* --- Layout --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-smooth);
  overflow-x: clip;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #fff;
}

.content-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
  overflow-x: clip;
}

/* --- Sections --- */
section {
  padding: 120px 0;
  overflow-x: clip;
}

h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 3rem;
  letter-spacing: -1.5px;
  font-weight: 700;
}

h2 span {
  color: var(--theme-color);
}

.card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-8px);
}

/* --- Hero --- */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 700;
  letter-spacing: -3px;
  margin-bottom: 20px;
  line-height: 1;
}

.hero h1 span {
  display: block;
  color: var(--text-secondary);
  font-weight: 300;
}

.hero p {
  color: var(--text-secondary);
  max-width: 600px;
  font-size: 1.1rem;
  font-weight: 300;
}

.instruction {
  margin-top: 30px;
  font-size: 0.7rem;
  color: var(--theme-color);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
}

/* --- Skills --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
}

.grid > * {
  min-width: 0;
}

.grid > a {
  display: block;
  width: 100%;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.skill-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

/* --- Projects --- */
.project-card h3 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.4rem;
}

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

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  font-size: 0.65rem;
  color: var(--theme-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Certificates --- */
.certificate-subtitle {
  margin-top: -1.8rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.certificate-grid > * {
  min-width: 0;
}

.certificate-grid > a {
  display: block;
  width: 100%;
}

.certificate-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  min-height: 230px;
}

.certificate-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.certificate-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.88) 100%);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.certificate-card:hover img {
  transform: scale(1.05);
}

img {
  max-width: 100%;
}

/* --- ADVANCED REVEAL EFFECTS --- */
.reveal {
  opacity: 0;
  transition: var(--transition-smooth);
}

.reveal-up {
  transform: translateY(50px);
}

.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.reveal-zoom {
  transform: scale(0.9);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* --- Contact --- */
.contact-box {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border-radius: 40px;
  border: 1px solid var(--card-border);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1.2rem 3.5rem;
  background: #fff;
  color: #000;
  text-decoration: none;
  border-radius: 100px;
  font-weight: 700;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1);
}

.contact-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-actions .btn {
  margin-top: 0;
}

.whatsapp-link {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  font-size: 1.8rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-link:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.4);
}

footer {
  padding: 80px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.4;
}

@media (max-width: 1024px) {
  .certificate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  #cursor {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-content {
    padding: 0 1rem;
  }

  .content-container {
    padding: 0 1rem;
  }

  section {
    padding: 90px 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 80px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .reveal-left,
  .reveal-right {
    transform: translateY(35px);
  }

  .certificate-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .certificate-card {
    min-height: 200px;
  }

  .contact-box {
    padding: 3.5rem 1rem;
    border-radius: 28px;
  }

  .btn {
    width: 100%;
    max-width: 270px;
    padding: 1rem 1.5rem;
    text-align: center;
  }
}

a {
  text-decoration: none;
  color: inherit;
}
