/* =========================================================
   RAMA — Portfolio Stylesheet
   Tema: Dark Hologram + Soft UI (Neumorphism ringan) + 3D Depth
   ========================================================= */

/* ---------- 1. CSS VARIABLES (mudah dimodifikasi) ---------- */
:root {
  /* Warna dasar */
  --bg: #05070d;
  --bg-elevated: #0b0f1d;
  --bg-card: #0e1224;

  /* Aksen hologram */
  --neon-cyan: #4fe3ff;
  --neon-blue: #5b8dff;
  --neon-purple: #a463ff;

  --gradient-holo: linear-gradient(120deg, var(--neon-cyan), var(--neon-blue) 50%, var(--neon-purple));

  /* Teks */
  --text-primary: #eef1fb;
  --text-secondary: #8d94b3;

  /* Kaca (glassmorphism) */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-blur: 16px;

  /* Bayangan Soft UI / Neumorphism gelap */
  --shadow-dark: rgba(0, 0, 0, 0.65);
  --shadow-light: rgba(255, 255, 255, 0.035);
  --shadow-neon: rgba(79, 227, 255, 0.25);

  /* Radius & transisi */
  --radius-md: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. RESET DASAR ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Latar belakang bertekstur hologram halus di seluruh halaman */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(164, 99, 255, 0.14), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(79, 227, 255, 0.12), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(91, 141, 255, 0.10), transparent 45%);
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* Fokus keyboard tetap terlihat (aksesibilitas) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- 3. NAVBAR (Glassmorphism) ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
  position: relative;
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

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

/* ---------- 4. LOGO HOLOGRAM (glow + floating) ---------- */
.logo-hologram {
  filter:
    drop-shadow(0 0 6px var(--neon-cyan))
    drop-shadow(0 0 14px rgba(164, 99, 255, 0.55));
  animation: float 4.5s ease-in-out infinite;
}

.logo-hologram--nav { width: 34px; height: 34px; animation-duration: 3.5s; }

.logo-hologram--hero {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

/* ---------- 5. HERO SECTION ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 620px; height: 620px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79, 227, 255, 0.16), rgba(164, 99, 255, 0.08) 45%, transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.hero-content { max-width: 640px; }

.hero-title { font-size: clamp(3.2rem, 10vw, 6rem); line-height: 1; margin-bottom: 20px; }

/* Efek teks hologram: gradient bergerak + glow */
.hero-title-text {
  background: var(--gradient-holo);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(79, 227, 255, 0.35));
  animation: holo-shift 6s ease-in-out infinite;
}

@keyframes holo-shift {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 6. TOMBOL — Soft UI 3D ---------- */
.btn {
  padding: 15px 32px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn--primary {
  background: linear-gradient(145deg, #1a2140, #0e1330);
  color: var(--text-primary);
  box-shadow:
    6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light),
    0 0 0 1px rgba(79, 227, 255, 0.18) inset;
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow:
    8px 8px 18px var(--shadow-dark),
    -8px -8px 18px var(--shadow-light),
    0 0 22px var(--shadow-neon);
}

.btn--primary:active { transform: translateY(0) scale(0.97); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-3px);
}

.btn--wide { width: 100%; }

/* Petunjuk gulir di hero */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.scroll-hint span {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--neon-cyan), transparent);
  animation: scroll-move 2s ease-in-out infinite;
}

@keyframes scroll-move {
  0%   { opacity: 0; transform: translateY(-6px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(6px); }
}

/* ---------- 7. SECTION HEAD (judul umum) ---------- */
.section-head {
  max-width: 560px;
  margin: 0 auto 56px;
  text-align: center;
  padding: 0 24px;
}

.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 10px; }
.section-head p { color: var(--text-secondary); }

/* ---------- 8. KARTU 3D DASAR (Soft UI + Glass) ---------- */
.card-3d {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    10px 10px 24px var(--shadow-dark),
    -8px -8px 20px var(--shadow-light);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- 9. ABOUT SECTION ---------- */
.about { padding: 100px 24px; }

.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card { padding: 32px 28px; }
.about-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.about-card p { color: var(--text-secondary); font-size: 0.94rem; }

.about-card:hover {
  transform: translateY(-6px) rotateX(3deg);
  box-shadow:
    14px 14px 30px var(--shadow-dark),
    -10px -10px 24px var(--shadow-light),
    0 0 20px var(--shadow-neon);
}

/* ---------- 10. PORTFOLIO SECTION ---------- */
.portfolio { padding: 60px 24px 120px; perspective: 1200px; }

.portfolio-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.proj-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.proj-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(79, 227, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.proj-card:hover .proj-card-glow { opacity: 1; }

.proj-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #141a33, #0a0d1c);
}

.proj-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.proj-card:hover .proj-thumb img { transform: scale(1.06); }

.proj-body { padding: 22px 24px 26px; }

.proj-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--neon-cyan);
  border: 1px solid rgba(79, 227, 255, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.proj-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.proj-body p { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- 11. CONTACT SECTION ---------- */
.contact { padding: 40px 24px 120px; display: flex; justify-content: center; }

.contact-card {
  max-width: 560px;
  width: 100%;
  padding: 44px;
  text-align: center;
}

.contact-card h2 { margin-bottom: 10px; }
.contact-card > p { color: var(--text-secondary); margin-bottom: 30px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  resize: vertical;
  box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
  transition: border-color 0.25s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--neon-cyan); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-secondary); }

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--neon-cyan);
  min-height: 1em;
}

/* ---------- 12. FOOTER ---------- */
.footer {
  text-align: center;
  padding: 28px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  border-top: 1px solid var(--glass-border);
}

/* ---------- 13. RESPONSIVE (mobile-friendly) ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.open { max-height: 260px; }

  .nav-links a { padding: 16px 0; width: 100%; text-align: center; }

  .nav-toggle { display: flex; }

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

@media (max-width: 480px) {
  .contact-card { padding: 30px 22px; }
}