/*
  Developer Portfolio - Stylesheet
  Credit: lautandigital.id
*/

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --secondary: #ec4899;
  --accent: #22d3ee;
  --accent-2: #f59e0b;
  --bg: #0f0f1a;
  --bg-alt: #16162a;
  --surface: #1c1c33;
  --text: #f1f1f8;
  --text-muted: #a3a3c2;
  --border: rgba(255, 255, 255, 0.08);
  --gradient-1: linear-gradient(135deg, #7c3aed, #ec4899);
  --gradient-2: linear-gradient(135deg, #22d3ee, #7c3aed);
  --gradient-3: linear-gradient(135deg, #ec4899, #f59e0b);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light {
  --bg: #f6f6fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #1c1c33;
  --text-muted: #5a5a72;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gradient-1);
  border-radius: 10px;
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.55);
}

.btn-outline {
  border: 2px solid var(--primary-light);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-3px);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  box-shadow: var(--shadow);
}

body.light .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.logo span {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  z-index: 0;
  animation: float 10s ease-in-out infinite;
}

.blob-1 {
  width: 380px;
  height: 380px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 320px;
  height: 320px;
  background: var(--secondary);
  bottom: -80px;
  right: -60px;
  animation-delay: 2s;
}

.blob-3 {
  width: 260px;
  height: 260px;
  background: var(--accent);
  top: 40%;
  right: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-greet {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
  animation: fadeInUp 0.8s ease both;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-role {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.cursor-blink {
  animation: blink 0.8s infinite;
  color: var(--secondary);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-btns {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 34px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-socials a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  background: var(--gradient-1);
  transform: translateY(-5px);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

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

/* ===== Sections ===== */
.section {
  padding: 110px 0;
  position: relative;
}

.section-tag {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 60px;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: center;
}

.about-img-card {
  background: var(--gradient-1);
  border-radius: var(--radius);
  padding: 6px;
}

.avatar {
  background: var(--surface);
  border-radius: 12px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
}

.about-stats {
  display: flex;
  gap: 30px;
  margin: 30px 0;
}

.stat-box h3 {
  font-size: 2.2rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.skill-card h3 {
  margin-bottom: 16px;
}

.bar {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 10px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gradient-1);
  border-radius: 10px;
  transition: width 1.2s ease;
}

/* ===== Projects ===== */
.filter-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.project-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.thumb-1 { background: var(--gradient-1); }
.thumb-2 { background: var(--gradient-2); }
.thumb-3 { background: var(--gradient-3); }
.thumb-4 { background: linear-gradient(135deg, #22d3ee, #ec4899); }
.thumb-5 { background: linear-gradient(135deg, #f59e0b, #7c3aed); }
.thumb-6 { background: linear-gradient(135deg, #ec4899, #22d3ee); }

.project-body {
  padding: 24px;
}

.project-body h3 {
  margin-bottom: 10px;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tags span {
  background: var(--bg-alt);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-card.hide {
  display: none;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 50px;
}

.info-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.info-item span {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.info-item h4 {
  margin-bottom: 4px;
}

.info-item p {
  color: var(--text-muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  gap: 18px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-status {
  color: var(--accent);
  font-weight: 500;
  min-height: 20px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer .credit a {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-1);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 500;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .avatar {
    height: 280px;
    font-size: 6rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-alt);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .form-row {
    flex-direction: column;
  }

  .about-stats {
    flex-wrap: wrap;
  }
}

/* Credit: lautandigital.id */
