*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #050816;
  --bg-card: rgba(15, 23, 42, 0.9);
  --accent: #22d3ee;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-xl: 24px;
}

/* Background animasi */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #0f172a 0%, #020617 45%, #000 100%);
  min-height: 100vh;
}

.bg-animation {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.18), transparent 60%),
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.16), transparent 60%);
  filter: blur(2px);
  opacity: 0.9;
  z-index: -2;
  animation: bgMove 18s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(0, -20px, 0);
  }
}

/* Layout dasar */
.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* HEADER & NAV */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
}

.accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
}

/* HERO */
.hero {
  padding-top: 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.hero-title {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #020617;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.3);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}

/* Hero photo */
.hero-photo {
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  padding: 0.4rem;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, #22d3ee, transparent 60%),
    radial-gradient(circle at 100% 100%, #a855f7, transparent 60%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.8);
  animation: float 5.5s ease-in-out infinite;
}

.photo-circle {
  width: 220px;
  height: 220px;
  border-radius: 999px;
  overflow: hidden;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  border: 1px solid var(--accent-soft);
}

/* About */
.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.skill-tag {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, background 0.15s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.skill-tag.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.skill-tag.clicked {
  animation: pop 0.25s ease;
}

.skill-message {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.project-card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  padding: 1.3rem 1.2rem 1.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.project-card p {
  color: var(--text-muted);
}

.project-tag {
  display: inline-flex;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-soft);
}

.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
  border-color: var(--accent);
}

.project-card.pop {
  animation: popCard 0.22s ease;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 1.6rem 1.4rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 0.55rem 0.8rem;
  font-size: 0.88rem;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.form-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-info ul {
  list-style: none;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.contact-info li {
  margin-bottom: 0.4rem;
}

.contact-info span {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.contact-pill {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
}

/* Footer */
.footer {
  padding: 1.4rem 0 1.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  text-align: center;
}

/* Reveal animation (scroll masuk) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Ripple effect */
[data-ripple] {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s linear;
  background-color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

/* Animasi keyframes */
@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes popCard {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes ripple {
  to {
    transform: scale(3.4);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    right: 1.5rem;
    top: 3.1rem;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.97);
    border-radius: 16px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-subtle);
    transform-origin: top right;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .nav-link {
    padding: 0.2rem 0.1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-photo {
    order: -1;
    margin-bottom: 1.8rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 0;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .photo-circle {
    width: 190px;
    height: 190px;
  }
}
