/* Neo Brutalism CSS */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff6b9d;
  --secondary: #c084fc;
  --accent-yellow: #fbbf24;
  --accent-blue: #60a5fa;
  --accent-green: #4ade80;
  --accent-orange: #fb923c;
  --background: #fef7cd;
  --foreground: #1a1a2e;
  --card: #ffffff;
  --border: #1a1a2e;
  --shadow: #1a1a2e;
  --border-width: 3px;
  --shadow-offset: 6px;
}

.dark {
  --background: #0f0f1a;
  --foreground: #fef7cd;
  --card: #1c1c2b;
  --border: #fef7cd;
  --shadow: #fef7cd;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--foreground);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;

  /* Background grid kotak kecil */
  background-color: var(--background);

  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);

  background-size: 30px 30px;

  /* efek glow halus */
  position: relative;
}

/* Efek cahaya interaktif */
body::before {
  content: "";
  position: fixed;
  inset: 0;

  background:
    radial-gradient(
      circle at var(--x, 50%) var(--y, 50%),
      rgba(255,255,200,0.12),
      transparent 300px
    );

  pointer-events: none;
  z-index: 0;
}
/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Brutalism Card */
.brutal-card {
  background: var(--card);
  border: var(--border-width) solid var(--border);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow);
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.brutal-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 var(--shadow);
}

/* Brutal Button */
.brutal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: var(--border-width) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.brutal-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
}

.brutal-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.brutal-btn.primary {
  background: var(--primary);
  color: white;
}

.brutal-btn.secondary {
  background: var(--secondary);
  color: white;
}

.brutal-btn.yellow {
  background: var(--accent-yellow);
  color: var(--foreground);
}

.brutal-btn.blue {
  background: var(--accent-blue);
  color: white;
}

.brutal-btn.green {
  background: var(--accent-green);
  color: var(--foreground);
}

/* Floating Navbar */
.navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--card);
  border: var(--border-width) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar a {
  padding: 0.5rem 1rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  border-radius: 9999px;
  transition: background 0.2s;
}

.navbar a:hover {
  background: var(--primary);
  color: white;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--accent-yellow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.theme-toggle:hover {
  transform: rotate(180deg);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--foreground);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: var(--border-width) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  border-radius: 1rem;
  padding: 1rem;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 0.75rem 1.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  border-radius: 0.5rem;
  text-align: center;
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: var(--primary);
  color: white;
}

@media (max-width: 768px) {
  .navbar a:not(.theme-toggle) {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 8s ease-in-out infinite;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 10%;
  left: 10%;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background: var(--accent-blue);
  top: 50%;
  right: 10%;
  animation-delay: -2s;
}

.blob-3 {
  width: 200px;
  height: 200px;
  background: var(--accent-yellow);
  bottom: 10%;
  left: 30%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
  text-align: center;
  max-width: 600px;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--border);
  box-shadow: 6px 6px 0 var(--shadow);
  object-fit: cover;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.typing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
  min-height: 2.5rem;
}

.cursor {
  width: 3px;
  height: 1.5rem;
  background: var(--primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-tagline {
  font-size: 1.125rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Section Styles */
section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-card {
  padding: 2rem;
}

.about-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.about-card p {
  line-height: 1.7;
  opacity: 0.9;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.5rem;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
}

.skill-name {
  font-weight: 600;
  font-size: 1.125rem;
}

.skill-bar {
  width: 100%;
  height: 12px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: var(--border-width) solid var(--border);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Social Links Section */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--foreground);
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--border);
}

.social-info h4 {
  font-weight: 600;
}

.social-info span {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Contact Section */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  border: var(--border-width) solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--foreground);
  transition: box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--shadow);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: var(--border-width) solid var(--border);
  margin-top: 2rem;
}

footer p {
  opacity: 0.8;
}

footer .quote {
  font-style: italic;
  margin-top: 0.5rem;
  color: var(--primary);
}

/* Scroll Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .typing-container {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}