/* ===========================
   RESET & ROOT VARIABLES
=========================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:       #0a0a0f;
  --bg2:      #111118;
  --bg3:      #1a1a2e;
  --accent:   #7c5cfc;
  --accent2:  #a78bfa;
  --accent3:  #06b6d4;
  --text:     #f1f0ff;
  --text2:    #a8a3c9;
  --text3:    #6b6890;
  --card:     #16162a;
  --card2:    #1e1e35;
  --border:   #2a2a45;
  --green:    #10b981;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ===========================
   STAR BACKGROUND
=========================== */
.stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--d, 3s) var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.5); }
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent2);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 2rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 900px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-text {
  flex: 1;
  min-width: 260px;
}

.greeting {
  font-size: 0.9rem;
  color: var(--accent3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-name span {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: 1.1rem;
  color: var(--accent2);
  margin-bottom: 1.5rem;
  min-height: 1.5em;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent2);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s infinite;
}

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

.hero-bio {
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid;
}

.tag.coding  { color: var(--accent2); border-color: var(--accent);  background: rgba(124, 92, 252, 0.1); }
.tag.desain  { color: var(--accent3); border-color: var(--accent3); background: rgba(6, 182, 212, 0.1); }
.tag.status  { color: var(--green);   border-color: var(--green);   background: rgba(16, 185, 129, 0.1); }

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 0.7rem 1.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: linear-gradient(135deg, var(--accent), #5b3fd4);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 92, 252, 0.4);
}

.btn-sec {
  padding: 0.7rem 1.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text2);
  background: transparent;
  transition: all 0.2s;
}

.btn-sec:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* ===========================
   AVATAR
=========================== */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  width: 220px; height: 220px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: spin 8s linear infinite reverse;
}

.avatar-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-fallback {
  font-size: 5rem;
  line-height: 1;
  display: none;
}

.status-dot {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50%       { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ===========================
   SECTIONS (generic)
=========================== */
.sec {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.sec-label {
  font-size: 0.8rem;
  color: var(--accent3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.sec-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 3rem;
}

.sec-title span {
  color: var(--accent2);
}

/* ===========================
   HIDDEN SECTION (Tentangku)
=========================== */
.hidden-section {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 1;
}

.hidden-section.show {
  display: block;
}

/* About card */
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 200px;
}

.about-text p {
  color: var(--text2);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.about-text strong {
  color: var(--text);
}

.skills-wrap { min-width: 200px; }

.skills-label {
  font-size: 0.85rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.skill-item {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.skill-item span {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.skill-item p {
  font-size: 0.8rem;
  color: var(--text2);
}

/* Life journey */
.life-wrap {
  margin-top: 2.5rem;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.life-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.life-card:hover {
  border-color: var(--accent2);
  transform: translateY(-4px);
}

.life-icon  { font-size: 2.5rem; margin-bottom: 1rem; }
.life-phase { font-size: 0.75rem; color: var(--accent3); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.25rem; }
.life-name  { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.5rem; }
.life-desc  { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }

/* ===========================
   PROJECT CARDS
=========================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: block;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(124, 92, 252, 0.2);
}

.project-img {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.robot-bg { background: linear-gradient(135deg, #1a1a3e, #2d1b6b); }
.cafe-bg  { background: linear-gradient(135deg, #1a0e07, #3d1f0d); }

.project-body    { padding: 1.25rem; }
.project-tag     { font-size: 0.75rem; color: var(--accent3); margin-bottom: 0.4rem; }
.project-title   { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
.project-desc    { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }
.proj-link       { margin-top: 0.75rem; font-size: 0.8rem; color: var(--accent2); display: flex; align-items: center; gap: 0.25rem; }

/* ===========================
   ALAMAT / MAP
=========================== */
.map-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-link {
  display: block;
  position: relative;
  text-decoration: none;
}

.map-placeholder {
  height: 300px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text2);
  transition: background 0.2s;
}

.map-placeholder:hover { background: var(--card2); }

.map-pin {
  font-size: 3rem;
  animation: bounce 0.8s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

.map-addr        { font-size: 0.9rem; color: var(--text2); text-align: center; }
.map-addr strong { color: var(--text); display: block; margin-bottom: 0.25rem; }
.map-hint        { font-size: 0.8rem; color: var(--accent3); }

.map-badge {
  position: absolute;
  bottom: 1rem; right: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===========================
   FOOTER / KONTAK
=========================== */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-sub {
  color: var(--text2);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-wa {
  padding: 0.8rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.btn-gm {
  padding: 0.8rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #EA4335, #c1301f);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(234, 67, 53, 0.35);
}

.footer-note {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--text3);
}

/* ===========================
   RESPONSIVE / MOBILE
=========================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1rem; }
}

@media (max-width: 600px) {
  .navbar { padding: 0.75rem 1.25rem; }
  .hero   { padding: 5rem 1.25rem 2rem; }
  .hero-inner { gap: 2rem; }
  .avatar-ring { width: 160px; height: 160px; }
  .sec { padding: 3.5rem 1.25rem; }
  .hidden-section { padding: 0 1.25rem 3rem; }
  .about-card { padding: 1.5rem; gap: 1.5rem; }
}