/* Reset dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: all 0.3s ease;
  overflow-x: hidden;
  position: relative;
}

:root {
  --bg: #fafafa;
  --text: #222;
  --card: #fff;
  --accent: #8c2a1a;
}

body.dark {
  --bg: #121212;
  --text: #f5f5f5;
  --card: #1e1e1e;
  --accent: #d4af37;
}

/* Background Blocks */
#background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.block {
  position: absolute;
  top: -60px;
  background: #8c2a1a;
  opacity: 0.8;
  animation: fall linear forwards;
  border: none;
  border-radius: 25px 0 25px 0;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(180deg);
    opacity: 0;
  }
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.container.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid rgba(0,0,0,0.1);
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

#loader p {
  font-size: 0.95rem;
  opacity: 0.8;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--card);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.theme-toggle:hover {
  transform: rotate(20deg);
}

/* Profile */
.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.name {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.bio {
  font-size: 0.95rem;
  color: gray;
  margin-bottom: 25px;
}

/* Links */
.links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.link {
  display: block;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.link.show {
  opacity: 1;
  transform: translateY(0);
}

.link:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

footer {
  margin-top: 25px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Responsif */
@media (max-width: 500px) {
  .name {
    font-size: 1.3rem;
  }
  .bio {
    font-size: 0.85rem;
  }
  .link {
    font-size: 0.9rem;
    padding: 12px;
  }
}
