/* ============================================
   RAFIF ROHADIATAMA — PORTFOLIO 2025
   Theme: Hitam · Kuning · Putih
   Font: Poppins
   Responsive: Mobile-first
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-light: #1a1a1a;
  --black-card: #111111;
  --yellow: #facc15;
  --yellow-hover: #eab308;
  --yellow-dim: rgba(250, 204, 21, 0.1);
  --yellow-glow: rgba(250, 204, 21, 0.2);
  --white: #ffffff;
  --white-muted: #a0a0a0;
  --white-dim: #6b6b6b;
  --border-color: #2a2a2a;
  --font: 'Poppins', sans-serif;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
  color: inherit;
}

canvas {
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--yellow);
  border-radius: 3px;
}

/* ========== PRELOADER ========== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s, visibility 0.6s;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

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

.preloader-letter {
  font-size: 3rem;
  font-weight: 900;
  color: var(--yellow);
  animation: pulseLetter 1s infinite alternate;
}

.preloader-bar {
  width: 120px;
  height: 3px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.preloader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--yellow);
  border-radius: 2px;
  animation: loadBar 1.2s infinite ease-in-out;
}

@keyframes pulseLetter {
  to {
    opacity: 0.5;
  }
}

@keyframes loadBar {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(350%);
  }
}

/* ========== CURSOR ========== */
.cursor {
  display: none;
}

.cursor-follower {
  display: none;
}

/* ========== NAVBAR ========== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.98);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
}

.logo-dot {
  color: var(--yellow);
}

.nav-links {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--black-light);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: right 0.4s ease;
  z-index: 999;
  border-left: 1px solid var(--border-color);
}

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

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--yellow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width var(--transition);
}

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

.nav-cta {
  display: none;
  padding: 8px 20px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--yellow-hover);
  transform: translateY(-2px);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

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

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== HERO ========== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0 20px;
}

@media (max-width: 768px) {
  #hero {
    align-items: flex-start;
    padding-top: 90px;
    padding-bottom: 20px;
  }
}

.hero-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
}

#particleCanvas {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.title-line {
  display: block;
}

.title-word {
  display: inline-block;
  margin-right: 12px;
}

.title-accent {
  color: var(--yellow);
  display: inline-block;
  margin-right: 12px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--white-muted);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  line-height: 1.8;
}

.hero-desc strong {
  color: var(--white);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--yellow-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--yellow-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid var(--border-color);
  color: var(--white);
  border-radius: 50px;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
}

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

.hero-socials {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--white-muted);
  transition: var(--transition);
}

.social-pill:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-2px);
}

/* ========== SECTION COMMON ========== */
section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== GLASS CARD ========== */
.glass-card {
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--yellow-dim);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* ========== ABOUT ========== */
.about-grid {
  max-width: 800px;
  margin: 0 auto;
}

.about-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

@media (min-width: 640px) {
  .about-card {
    flex-direction: row;
    gap: 40px;
  }
}

.about-avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  animation: pulseRing 2s infinite alternate;
}

@keyframes pulseRing {
  to {
    opacity: 0.3;
    transform: scale(1.05);
  }
}

.avatar-inner {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--yellow);
}

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

.about-info {
  text-align: center;
}

@media (min-width: 640px) {
  .about-info {
    text-align: left;
  }
}

.about-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-role {
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.about-bio {
  color: var(--white-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.8;
}

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

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

@media (min-width: 640px) {
  .about-tags {
    justify-content: flex-start;
  }
}

.tag {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--white-muted);
  transition: var(--transition);
}

.tag:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ========== EXPERIENCE / TIMELINE ========== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 24px;
  width: 12px;
  height: 12px;
  background: var(--border-color);
  border-radius: 50%;
  z-index: 1;
}

.timeline-dot-active {
  background: var(--yellow);
  box-shadow: 0 0 12px var(--yellow-glow);
}

.timeline-card {
  padding: 28px;
}

.timeline-card-current {
  border-color: var(--yellow-dim);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.exp-company {
  font-size: 0.85rem;
  color: var(--yellow);
  font-weight: 600;
}

.exp-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 4px;
}

.exp-period {
  font-size: 0.8rem;
  color: var(--white-dim);
  display: block;
  margin-top: 4px;
}

.exp-badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.exp-badge-current {
  background: var(--yellow);
  color: var(--black);
}

.exp-desc {
  font-size: 0.95rem;
  color: var(--white-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.exp-desc strong {
  color: var(--white);
}

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

.exp-tags span {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--white-dim);
}

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-category {
  padding: 28px;
}

.skill-category-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.skill-pill {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--white-muted);
  transition: var(--transition);
}

.skill-pill:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
}

/* ========== CERTIFICATIONS ========== */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .cert-card {
    flex-direction: row;
    align-items: center;
  }
}

.cert-image {
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.cert-image img {
  width: 100%;
  max-width: 200px;
  border-radius: var(--radius);
}

.cert-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cert-issuer {
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.cert-desc {
  color: var(--white-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========== PORTFOLIO ========== */
.portfolio-filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white-muted);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-card {
  padding: 24px;
  transition: var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: var(--yellow-dim);
}

.portfolio-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--black-light);
}

.portfolio-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.portfolio-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-info p {
  color: var(--white-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.7;
}

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

.portfolio-tags span {
  padding: 3px 10px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.7rem;
  color: var(--white-dim);
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-info,
.contact-form {
  padding: 32px;
}

.contact-info h3,
.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-info > p {
  color: var(--white-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white-muted);
  font-size: 0.95rem;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--yellow);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--white-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--black);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========== FOOTER ========== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

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

.footer-text {
  color: var(--white-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--white-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--yellow);
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal-word {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-fade {
  opacity: 0;
  transform: translateY(20px);
}

.reveal-word.revealed,
.reveal-fade.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ========== ORBS (Background) ========== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--yellow);
  top: -100px;
  right: -100px;
  animation: float1 8s ease-in-out infinite;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #a78bfa;
  bottom: -50px;
  left: -50px;
  animation: float2 10s ease-in-out infinite;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: #f472b6;
  top: 50%;
  left: 50%;
  animation: float3 12s ease-in-out infinite;
}

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

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

@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -40%); }
}

/* ========== RESPONSIVE (Desktop) ========== */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    position: static;
    width: auto;
    height: auto;
    background: none;
    flex-direction: row;
    gap: 32px;
    border: none;
    z-index: auto;
  }

  .nav-cta {
    display: inline-flex;
  }

  .hamburger {
    display: none;
  }
}
