/* ============================================
   MEG PROJECT — MANGA BRUTALIST PROFILE CSS
   style.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=IBM+Plex+Mono:wght@400;700&family=Noto+Sans:wght@400;700&display=swap');

/* ===== ROOT VARIABLES ===== */
:root {
  --bg:       #f2f0ec;
  --bg2:      #e8e5de;
  --surface:  #faf9f6;
  --border:   #2a2825;
  --text:     #1e1c1a;
  --muted:    #6b6560;
  --shadow:   3px 3px 0px #2a2825;
  --shadow-lg:5px 5px 0px #2a2825;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    'Noto Sans', sans-serif;
}

[data-theme="dark"] {
  --bg:      #0d1117;
  --bg2:     #161b22;
  --surface: #161b22;
  --border:  #30363d;
  --text:    #e6edf3;
  --muted:   #8b949e;
  --shadow:  3px 3px 0px #30363d;
  --shadow-lg:5px 5px 0px #30363d;
}

/* ===== RESET ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ===== GRID CANVAS BACKGROUND ===== */
#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== NOISE TEXTURE ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== FALLING MUSIC NOTES ===== */
#music-notes-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.music-note-fall {
  position: absolute;
  top: -30px;
  color: var(--text);
  pointer-events: none;
  user-select: none;
  animation: noteFall linear forwards;
}

@keyframes noteFall {
  0%   { top: -30px; transform: translateX(0) rotate(-8deg); }
  35%  { transform: translateX(10px) rotate(6deg); }
  65%  { transform: translateX(-7px) rotate(-4deg); }
  100% { top: 105vh; transform: translateX(4px) rotate(10deg); opacity: 0; }
}

/* ===== FAB MENU ===== */
.fab-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Sub buttons — tersembunyi by default */
.fab-sub {
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Saat FAB open, sub buttons muncul */
.fab-wrap.open .fab-sub {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Delay biar muncul satu-satu dari bawah ke atas */
.fab-wrap.open #fab-sub-theme  { transition-delay: 0s; }
.fab-wrap.open #fab-sub-music  { transition-delay: 0.06s; }

/* Tombol sub (music & theme) */
.fab-btn {
  width: 38px;
  height: 38px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.15s;
  padding: 0;
  font-family: inherit;
}

.fab-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  background: var(--text);
  color: var(--bg);
}

.fab-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Tombol utama FAB */
.fab-main {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.15s;
  padding: 0;
  font-family: inherit;
}

.fab-main:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
}

.fab-main:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Rotasi icon saat open */
.fab-wrap.open .fab-main {
  background: var(--bg);
  color: var(--text);
}

/* Music playing state */
.bar-icon {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}

#music-btn.playing #music-icon { display: none; }
#music-btn.playing .bar-icon   { display: flex; }

.bar {
  width: 3px;
  border-radius: 1px;
  background: currentColor;
  animation: barBeat 0.55s ease-in-out infinite alternate;
}
.bar:nth-child(1) { height: 5px;  animation-delay: 0s; }
.bar:nth-child(2) { height: 10px; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 7px;  animation-delay: 0.2s; }
.bar:nth-child(4) { height: 12px; animation-delay: 0.05s; }
@keyframes barBeat { to { height: 3px; } }

/* ===== HERO BANNER ===== */
.hero {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-bottom: 2px solid var(--border);
  background: var(--bg2);
  z-index: 3;
}

.hero video,
.hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--bg) 100%);
  z-index: 2;
}

/* ===== CONTAINER ===== */
.container {
  position: relative;
  z-index: 10;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ===== AVATAR ===== */
.avatar-wrap {
  position: relative;
  margin: -54px auto 0;
  width: 110px;
  height: 110px;
}

.avatar-frame {
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  overflow: hidden;
  z-index: 2;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%);
  display: block;
}

.avatar-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  opacity: 0.5;
  animation: spinRing 14s linear infinite;
  z-index: 1;
}

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

/* ===== NAME BLOCK ===== */
.name-block {
  text-align: center;
  margin-top: 14px;
}

.name-block h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 900;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 0.95;
}

.name-block .subtitle {
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ===== SOCIAL BUTTONS ===== */
.socials {
  display: grid;
  grid-template-columns: repeat(4, auto); /* ukuran fix biar ga loncat */
  justify-content: center; /* tengahin */
  gap: 7px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: all 0.15s;
  cursor: pointer;
}

.social-btn:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow-lg);
  background: var(--text);
  color: var(--bg);
}

.social-btn:active {
  transform: translate(2px,2px);
  box-shadow: none;
}

/* ===== SECTION DIVIDER ===== */
.section-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 18px;
}

.section-sep span {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0, var(--border) 4px,
    transparent 4px, transparent 9px
  );
  opacity: 0.45;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 18px;
  margin-bottom: 10px;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.15s, background 0.3s, color 0.3s;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== CARD TITLE ===== */
.card-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  opacity: 0.85;
}

.card-title i { font-size: 12px; opacity: 0.6; }

/* ===== ABOUT TEXT ===== */
.about-text {
  font-size: 0.83rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ===== TAGS ===== */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text);
  background: var(--bg);
  transition: all 0.12s;
  white-space: nowrap;
  opacity: 0.85;
}

.tag:hover {
  background: var(--text);
  color: var(--bg);
  opacity: 1;
  transform: translate(-1px,-1px);
}

.tag i { font-size: 10px; flex-shrink: 0; }

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg);
  transition: all 0.12s;
  opacity: 0.85;
}

.skill-tag:hover {
  background: var(--text);
  color: var(--bg);
  opacity: 1;
  transform: translate(-1px,-1px);
}

.skill-tag i { font-size: 13px; }

.id-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  background: var(--bg2);
  transition: all 0.12s;
  opacity: 0.85;
}

.id-badge:hover {
  background: var(--text);
  color: var(--bg);
  opacity: 1;
  transform: translate(-1px,-1px);
}

.id-badge i { font-size: 10px; opacity: 0.5; }

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px 16px 32px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  opacity: 0.55;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
  .name-block h1 { font-size: 2rem; }
  .hero { height: 200px; }
  .container { padding: 0 12px 60px; }
}