/* ===============================
   RESET & GLOBAL
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: Arial, sans-serif;
  background-color: #000;
  color: #fff;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

body.page-loaded {
  opacity: 1;
}

/* ===============================
   LOADER
================================ */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loader::after {
  content: '';
  width: 50px;
  height: 50px;
  border: 4px solid #fff;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===============================
   NAVBAR
================================ */
.futuristic-nav {
  width: 100%;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.7);
}

.futuristic-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  gap: 2rem;
}

.futuristic-nav ul li a {
  text-decoration: none;
  color: #fff;
  padding: 0.75rem 1rem;
  display: inline-block;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.futuristic-nav ul li a:hover,
.futuristic-nav ul li a.active {
  color: #fff;
  transform: scale(1.05);
}

.futuristic-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.4s ease;
}

.futuristic-nav ul li a:hover::after,
.futuristic-nav ul li a.active::after {
  width: 100%;
}

/* ===============================
   HEADER + PROFILE
================================ */
header {
  text-align: center;
  padding: 3rem 1rem;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.glitch-container {
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
}

.glitch-base,
.glitch {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.glitch {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.glitch-top {
  clip-path: inset(0 0 70% 0);
  animation: glitchTop 3s infinite;
  filter: brightness(1.8) grayscale(1);
  opacity: 0.6;
}

.glitch-bottom {
  clip-path: inset(70% 0 0 0);
  animation: glitchBottom 3s infinite;
  filter: brightness(1.8) grayscale(1);
  opacity: 0.6;
}

@keyframes glitchTop {
  0%,20%,40%,60%,80%,100% { transform: translate(0,0); }
  10% { transform: translate(-1px,-1px); }
  30% { transform: translate(1px,1px); }
  50% { transform: translate(0,0); }
  70% { transform: translate(1px,-1px); }
  90% { transform: translate(-1px,1px); }
}

@keyframes glitchBottom {
  0%,20%,40%,60%,80%,100% { transform: translate(0,0); }
  10% { transform: translate(1px,1px); }
  30% { transform: translate(-1px,-1px); }
  50% { transform: translate(0,0); }
  70% { transform: translate(-1px,1px); }
  90% { transform: translate(1px,-1px); }
}

.matrix-container {
  position: relative;
}

.matrix-text {
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-family: 'Courier New', monospace;
  position: relative;
  text-shadow: 0 0 8px #fff, 0 0 16px #fff;
  letter-spacing: 2px;
}

.matrix-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  animation: glitch 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-1px, -1px);
  color: #fff;
  text-shadow: 0 0 4px #fff;
}

@keyframes glitch {
  0%,100% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); transform: translate(0); }
  33% { clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%); transform: translate(-2px,-1px); }
  66% { clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0 100%); transform: translate(2px,1px); }
}

.rain {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(0deg, transparent 0px, rgba(255,255,255,0.03) 1px, transparent 2px);
  animation: rain 8s linear infinite;
  z-index: -1;
  pointer-events: none;
}

.job-title {
  font-size: 1.1rem;
  color: #bbb;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ===============================
   PROJECTS
================================ */
main {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-section h2 {
  text-align: center;
  margin: 0 0 3rem;
  font-size: 2rem;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

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

.project-card {
  background: #111;
  border: 2px solid #fff;
  padding: 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border-color: #fff;
}

.project-card:hover::before {
  left: 100%;
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: #fff;
}

.project-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #ccc;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .futuristic-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .glitch-container {
    width: 150px;
    height: 150px;
  }

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

  main {
    padding: 2rem 1rem;
  }
}

/* ===============================
   CERTIFICATES SECTION
================================ */
.certificates-section {
  padding: 4rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.certificates-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.2rem;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 0.5rem;
  color: #fff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.cert-item {
  position: relative;
  border: 2px solid #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: subtlePulse 4s infinite alternate;
}

.cert-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.cert-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.cert-item:hover img {
  transform: scale(1.05);
}

/* Glitch effect on hover (optional) */
.cert-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('img/cert1.jpg') center/cover; /* fallback, bisa dihapus */
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
  animation: glitchCert 0.5s ease;
}

.cert-item:hover::before {
  opacity: 0.3;
  background: inherit;
  animation: glitchCert 0.3s infinite;
}

@keyframes glitchCert {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes subtlePulse {
  0% { border-color: #fff; }
  100% { border-color: #ddd; }
}

/* Responsive */
@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .certificates-section h2 {
    font-size: 1.8rem;
  }
}

/* ===============================
   ABOUT PAGE STYLES 
================================ */
.about-section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.profile-glitch {
  text-align: center;
}

.profile-glitch .glitch-container {
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.bio {
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.2rem;
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.role {
  font-size: 1.3rem;
  color: cyan;
  text-align: center;
  margin: 1rem 0 2rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.typewriter-container {
  text-align: center;
  margin: 0 auto 1rem;
  font-family: 'Courier New', monospace;
}

.typewriter-animation {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.75);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: bold;
  vertical-align: bottom;
  animation: 
    typewriter 2.5s steps(var(--chars, 20)) 0.5s 1 normal both,
    blinkingCursor 750ms step-end infinite;
  will-change: width;
}

@keyframes typewriter {
  from { width: 0ch; }
  to { width: var(--chars, 20)ch; }
}

@keyframes blinkingCursor {
  from, to { border-color: transparent; }
  50% { border-color: rgba(255, 255, 255, 0.75); }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-item {
  background: #111;
  border: 2px solid #fff;
  padding: 1.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  animation: subtlePulse 4s infinite alternate;
}

.info-item:hover {
  transform: translateY(-5px);
  border-color: cyan; /* Pink neon biar match */
  box-shadow: 0 5px 15px rgba(255, 0, 255, 0.1);
}

.label {
  display: block;
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
}

.story {
  margin: 3rem 0;
  line-height: 1.8;
  font-size: 1.1rem;
}

.story p {
  margin-bottom: 1.5rem;
}

.story strong {
  color: cyan; /* Pink — biar standout */
}

.story em {
  color: #ddd;
  font-style: italic;
}

.philosophy {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  border-left: 4px solid cyan; /* Pink accent */
  background: #0a0a0a;
}

.philosophy blockquote {
  font-size: 1.3rem;
  color: #fff;
  font-style: normal;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .about-container {
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
  }

  .bio {
    text-align: left;
    margin: 0;
  }
}

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

  .profile-glitch .glitch-container {
    width: 180px;
    height: 180px;
  }

  .typewriter-animation {
    font-size: 2rem;
  }
}

 /* ===============================
   CERTIFICATES SECTION
================================ */
.certificates-section {
  padding: 4rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.certificates-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.2rem;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 0.5rem;
  color: #fff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.cert-item {
  position: relative;
  border: 2px solid #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: subtlePulse 4s infinite alternate;
}

.cert-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.cert-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.cert-item:hover img {
  transform: scale(1.05);
}

@keyframes subtlePulse {
  0% { border-color: #fff; }
  100% { border-color: #888; }
}

/* Responsive */
@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .certificates-section h2 {
    font-size: 1.8rem;
  }
}