/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
* {
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0b0f19;
  color: #ffffff;
  overflow-x: hidden;
}

/* ============================================================
   🔧 NAVBAR STICKY — FIXED & SHRINK SAAT SCROLL
   ============================================================ */
nav.navbar-sticky {
  position: fixed !important;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999 !important;
  will-change: transform, top, background;
  transition: top 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5),
              0 0 15px rgba(59, 130, 246, 0.2);
}

nav.navbar-sticky.scrolled {
  top: 12px;
  background: rgba(11, 19, 41, 0.95) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7),
              0 0 25px rgba(59, 130, 246, 0.4) !important;
}

nav.navbar-sticky.scrolled .nav-link {
  color: #cbd5e1;
}

nav.navbar-sticky.scrolled .nav-link.active {
  color: #ffffff;
  background-color: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.7);
}

/* ============================================================
   CANVAS BACKGROUND (Space + Rockets)
   ============================================================ */
#space-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#spider-canvas {
  filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.3));
}

/* ============================================================
   TYPING CURSOR
   ============================================================ */
.typing-cursor::after {
  content: '|';
  animation: blink 0.8s infinite;
  color: #60a5fa;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   GLASS CARD (dipakai di berbagai tempat)
   ============================================================ */
.glass-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   GLOW EFFECT untuk judul di Home & About
   ============================================================ */
#home h1,
#about h2,
#about h3,
#about p.text-blue-400 {
  position: relative !important;
  display: inline-block;
  width: 100%;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

#home h1::before,
#about h2::before,
#about h3::before,
#about p.text-blue-400::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 100%;
  background: rgba(59, 130, 246, 0.35);
  filter: blur(45px);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.btn-glow {
  position: relative;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

/* ============================================================
   PORTFOLIO SECTION
   ============================================================ */
.portfolio-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  color: #fff;
}

.portfolio-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.portfolio-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 24px;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6),
               0 0 20px rgba(37, 99, 235, 0.8);
}

/* ============================================================
   TAB BUTTONS
   ============================================================ */
.tab-container {
  background: rgba(11, 19, 41, 0.8);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.icon {
  width: 16px;
  height: 16px;
}

/* ============================================================
   TAB CONTENT
   ============================================================ */
.tab-content {
  display: none;
}

.tab-content.active {
  display: grid;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.grid-tech {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 14px;
}

/* ============================================================
   CARD (Project)
   ============================================================ */
.card {
  background: rgba(11, 19, 41, 0.6);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
              0 0 12px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
}

.card h3 {
  margin: 12px 0 6px;
  font-size: 1.1rem;
}

.card p {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.btn-detail {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-detail:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

/* ============================================================
   CARD CERTIFICATE
   ============================================================ */
.card-cert img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
              0 0 10px rgba(37, 99, 235, 0.2);
}

/* ============================================================
   TECH ITEM
   ============================================================ */
.tech-item {
  background: rgba(11, 19, 41, 0.6);
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
              0 0 10px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

.tech-item img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

.tech-item span {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

/* ============================================================
   COVERFLOW GALLERY
   ============================================================ */
.gallery-wrapper {
  width: 100%;
  margin: 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 20px 0;
}

.coverflow-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.coverflow-track {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 280px;
}

.coverflow-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 180px;
  height: 250px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  border: 1px solid rgba(59, 130, 246, 0.3);
  opacity: 0;
  pointer-events: none;
}

.coverflow-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coverflow-card.active {
  transform: translateX(-50%) scale(1.1) rotateY(0deg);
  opacity: 1;
  z-index: 10;
  filter: brightness(1);
  pointer-events: auto;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
}

.coverflow-card.prev-1 {
  transform: translateX(calc(-50% - 110px)) scale(0.85) rotateY(25deg);
  opacity: 0.75;
  z-index: 5;
  filter: brightness(0.7);
  pointer-events: auto;
}

.coverflow-card.next-1 {
  transform: translateX(calc(-50% + 110px)) scale(0.85) rotateY(-25deg);
  opacity: 0.75;
  z-index: 5;
  filter: brightness(0.7);
  pointer-events: auto;
}

.coverflow-card.prev-2 {
  transform: translateX(calc(-50% - 190px)) scale(0.7) rotateY(35deg);
  opacity: 0.35;
  z-index: 2;
  filter: brightness(0.5);
  pointer-events: auto;
}

.coverflow-card.next-2 {
  transform: translateX(calc(-50% + 190px)) scale(0.7) rotateY(-35deg);
  opacity: 0.35;
  z-index: 2;
  filter: brightness(0.5);
  pointer-events: auto;
}

/* ============================================================
   SPOTIFY PLAYER CARD
   ============================================================ */
.spotify-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin-top: 24px;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6),
              0 0 15px rgba(37, 99, 235, 0.2);
  color: #fff;
}

.spotify-logo-top {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
}

.spotify-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.spotify-header p {
  font-size: 0.8rem;
  color: #b3b3b3;
  margin: 2px 0 14px;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.album-art {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.song-details {
  flex: 1;
}

.song-details h4 {
  margin: 0;
  font-size: 1rem;
}

.song-details p {
  margin: 2px 0 4px;
  font-size: 0.8rem;
  color: #b3b3b3;
}

.spotify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #1ed760;
  font-weight: 600;
  cursor: pointer;
}

.btn-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1ed760;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-play:hover {
  transform: scale(1.08);
}

.btn-play svg {
  width: 22px;
  height: 22px;
  fill: #000;
}

.progress-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin-top: 14px;
  cursor: pointer;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #1ed760;
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.section-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7),
               0 0 20px rgba(255, 255, 255, 0.4),
               0 0 30px rgba(255, 255, 255, 0.2);
}

.contact-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.contact-subtitle {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  color: #f8fafc;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.btn-submit {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

/* ============================================================
   COMMENTS CARD
   ============================================================ */
.comments-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  margin-top: 24px;
}

.comments-header h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form .input-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.comment-form label {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  outline: none !important;
  transition: all 0.3s ease;
  font-family: inherit;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

.comment-form input[type="text"]::placeholder,
.comment-form textarea::placeholder {
  color: #64748b !important;
}

.divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  border-radius: 12px;
}

.avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-author {
  color: #f8fafc;
  font-weight: 600;
  font-size: 14px;
}

.comment-date {
  color: #64748b;
  font-size: 11px;
}

.comment-text {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

/* ============================================================
   FIND ME CARD
   ============================================================ */
.find-me-card {
  width: 100%;
  max-width: 550px;
  margin: 24px auto;
  box-sizing: border-box;
}

.find-me-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.find-me-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.find-me-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.find-me-item:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.find-me-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.icon-linkedin {
  background: #0077b5;
}

.icon-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.icon-github {
  background: #181717;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.find-me-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.find-me-label {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.find-me-username {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.7s ease-out;
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.7s ease-out;
}

.reveal-left.show,
.reveal-right.show {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   NAV LINK ACTIVE
   ============================================================ */
.nav-link.active {
  color: #ffffff;
  background-color: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 9999px;
  font-weight: 700;
}

/* ============================================================
   🔧 SCROLL OFFSET — biar gak ketutup navbar
   ============================================================ */
section[id],
div[id^="tab-"] {
  scroll-margin-top: 100px;
}

/* ============================================================
   SCROLLBAR UTILITIES
   ============================================================ */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.custom-blue-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-blue-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}

.custom-blue-scrollbar::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.custom-blue-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
  box-shadow: 0 0 14px rgba(96, 165, 250, 1);
}

.custom-blue-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 rgba(255, 255, 255, 0.05);
}

/* ============================================================
   MARQUEE ANIMATION
   ============================================================ */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee-loop {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.animate-marquee-loop:hover {
  animation-play-state: paused;
}
