/* ════════════════════════════════════════════════════════════
   Selfolyx — p.css (Portfolio public page)
   Dark MEA style, layout netral untuk semua profesi
   ════════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #0A0A0A;
  --surface:   #161616;
  --surface-2: rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.07);
  --text-1:    #FAFAFA;
  --text-2:    #A1A1A1;
  --text-3:    #6B6B6B;
  --accent:    #3B82F6;
  --accent-2:  #2563EB;
  --radius:    12px;
  --max:       900px;
  --p-font-heading: 'Bebas Neue', sans-serif;
  --p-font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--p-font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Loading & 404 ───────────────────────────────────────── */
#p-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 100;
}

.p-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(59,130,246,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pSpin 0.7s linear infinite;
}

@keyframes pSpin { to { transform: rotate(360deg); } }

#p-not-found {
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; text-align: center;
  color: var(--text-3); padding: 24px;
}

#p-not-found h1 {
  font-family: var(--p-font-heading);
  font-size: 6rem; color: var(--surface-2);
  line-height: 1; margin-bottom: 12px;
}

/* ── Nav ─────────────────────────────────────────────────── */
.p-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(11,17,30,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}

.p-nav-brand {
  font-family: var(--p-font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text-1);
}

.p-nav-links {
  display: flex; gap: 24px;
  list-style: none;
}

.p-nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

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

/* ── Sections wrapper ────────────────────────────────────── */
#p-root { padding-top: 56px; }

.p-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
}

.p-section-title {
  font-family: var(--p-font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 12px;
}

.p-section-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── Hero ────────────────────────────────────────────────── */
.p-hero {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
  gap: 60px;
}

.p-hero-text { flex: 1; min-width: 0; }

.p-hero-greeting {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.p-hero-name {
  font-family: var(--p-font-heading);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-1);
  margin-bottom: 16px;
}

.p-hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 480px;
}

.p-hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.15s;
}

.p-hero-cta:hover { opacity: 0.85; }

.p-hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.p-hero-photo {
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(59,130,246,0.2);
  display: block;
}

.p-hero-photo-placeholder {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--p-font-heading);
  font-size: 4rem;
  color: var(--text-3);
}

/* Glow ring di belakang foto */
.p-hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── About ───────────────────────────────────────────────── */
.p-about-text {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 680px;
}

/* ── Skills ──────────────────────────────────────────────── */
.p-skills {
  display: flex; flex-wrap: wrap; gap: 10px;
}

.p-skill-tag {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.p-skill-tag:hover {
  border-color: rgba(59,130,246,0.3);
  color: var(--accent);
}

/* ── Projects ────────────────────────────────────────────── */
.p-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.p-project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.p-project-card:hover {
  border-color: rgba(59,130,246,0.2);
  transform: translateY(-2px);
}

.p-project-card.featured {
  grid-column: span 2;
}

.p-project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}

.p-project-thumb-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 2rem;
}

.p-project-yt {
  width: 100%; aspect-ratio: 16/9;
  border: none; display: block;
}

.p-project-body {
  padding: 16px;
}

.p-project-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; flex-wrap: wrap;
}

.p-project-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.p-project-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  color: var(--accent);
}

.p-project-year {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-left: auto;
}

.p-project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1.3;
}

.p-project-desc {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Contact ─────────────────────────────────────────────── */
.p-contact-grid {
  display: flex; flex-wrap: wrap; gap: 12px;
}

.p-contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.p-contact-link:hover {
  border-color: rgba(59,130,246,0.3);
  color: var(--accent);
}

/* ── Footer watermark ────────────────────────────────────── */
.p-footer {
  position: fixed;
  bottom: 14px; right: 18px;
  font-size: 0.68rem;
  color: rgba(74,90,109,0.6);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 50;
}

.p-footer strong { color: rgba(100,120,140,0.7); }
.p-footer span   { color: rgba(41,182,246,0.5); }
.p-footer a      { color: inherit; text-decoration: none; pointer-events: all; }

/* ── Shimmer top border ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(59,130,246,0.3), transparent);
  z-index: 100;
  pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .p-hero { flex-direction: column-reverse; gap: 32px; padding: 40px 20px; min-height: auto; }
  .p-hero-photo, .p-hero-photo-placeholder { width: 140px; height: 140px; }
  .p-project-card.featured { grid-column: span 1; }
  .p-nav-links { display: none; }
  .p-section { padding: 60px 20px; }
}
