/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0a;
  --accent: #ffffff;
  --accent-glow: rgba(255,255,255,0.15);
  --text: #e8e8e8;
  --text-secondary: #666;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --font-display: 'Montserrat', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }

/* ===================== NAV PILL ===================== */
#nav-pill {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.16,1,0.3,1), opacity 1.2s ease;
}
#nav-pill.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--text-secondary);
  transition: color 0.3s ease, background 0.3s ease, filter 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-btn.active {
  color: #fff;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}
.nav-btn svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ===================== SECTIONS ===================== */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  position: relative;
}
.section-inner { width: 100%; max-width: 680px; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* ===================== HERO ===================== */
#hero { gap: 0; }
.hero-inner {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.hero-profile-wrap {
  margin-bottom: 16px;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(16px);
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
}
.hero-profile-wrap.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.hero-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #aaa, #fff, #888, #fff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease infinite;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(16px);
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
  margin-bottom: 18px;
}
.hero-name.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Presence pill */
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 1.2s ease 0.45s, filter 1.2s ease 0.45s, transform 1.2s ease 0.45s;
  margin-bottom: 16px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence-pill.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.presence-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #444;
  flex-shrink: 0;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.presence-dot.online  { background: #3ba55c; box-shadow: 0 0 5px #3ba55c; }
.presence-dot.idle    { background: #faa61a; box-shadow: 0 0 5px #faa61a; }
.presence-dot.dnd     { background: #ed4245; box-shadow: 0 0 5px #ed4245; }
.presence-dot.offline { background: #444; }

/* Now Playing */
.now-playing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  text-align: left;
  width: 100%;
  max-width: 360px;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 1.2s ease 0.7s, filter 1.2s ease 0.7s, transform 1.2s ease 0.7s;
}
.now-playing-card.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.now-playing-art {
  width: 44px; height: 44px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a1a;
}
.now-playing-info { flex: 1; min-width: 0; }
.now-playing-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 2px; }
.now-playing-track { font-size: 0.82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-artist { font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; flex-shrink: 0; }
.now-playing-eq span { display: block; width: 3px; background: #fff; border-radius: 2px; animation: eq 0.8s ease infinite alternate; }
.now-playing-eq span:nth-child(1) { animation-delay: 0s; height: 60%; }
.now-playing-eq span:nth-child(2) { animation-delay: 0.15s; height: 100%; }
.now-playing-eq span:nth-child(3) { animation-delay: 0.3s; height: 40%; }
@keyframes eq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
.now-playing-eq.paused span { animation: none; height: 4px; opacity: 0.3; }

/* ===================== PROJECTS ===================== */
.projects-list { display: flex; flex-direction: column; gap: 8px; }
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  gap: 12px;
}
.project-row:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  transform: translateX(4px);
}
.project-row-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.project-row-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.project-row-desc { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge-live { background: rgba(255,255,255,0.08); color: #ccc; border: 1px solid rgba(255,255,255,0.15); }
.badge-dev  { background: rgba(102,102,102,0.1); color: #555; border: 1px solid rgba(102,102,102,0.15); }
.project-row-arrow { color: var(--text-secondary); flex-shrink: 0; transition: transform 0.3s ease, color 0.3s ease; }
.project-row:hover .project-row-arrow { transform: translateX(3px); color: var(--text); }

/* ===================== MODAL ===================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  width: 100%; max-width: 580px;
  background: #111;
  border: 1px solid var(--glass-border);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 36px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 0.8rem;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.modal-handle { width: 32px; height: 3px; background: #2a2a2a; border-radius: 2px; margin: 0 auto 20px; }
.modal-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.modal-desc { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 18px; line-height: 1.6; }
.modal-links { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; color: var(--text); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.modal-link:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); transform: translateY(-1px); }
.modal-current { font-size: 0.82rem; color: var(--text-secondary); font-style: italic; }

/* ===================== CATS ===================== */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.cat-item {
  position: relative; border-radius: 14px; overflow: hidden;
  cursor: pointer; aspect-ratio: 1; background: #111;
  border: 1px solid var(--glass-border);
  transform: scale(0.95); opacity: 0; filter: blur(6px);
  transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease, box-shadow 0.3s ease;
}
.cat-item.visible { transform: scale(1); opacity: 1; filter: blur(0); }
.cat-item:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.5); transform: scale(1.02) !important; }
.cat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.cat-item:hover img { transform: scale(1.06); }
.cat-name-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.75rem; color: var(--text);
  opacity: 0; transition: opacity 0.3s ease;
}
.cat-item:hover .cat-name-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(16px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 14px; object-fit: contain; transform: scale(0.92); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border);
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); font-size: 1.1rem;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.14); }
.lightbox-name { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 0.82rem; color: var(--text-secondary); }

/* ===================== CLOCK ===================== */
#clock { background: var(--bg); }
.big-clock {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1;
}
.clock-ms { color: var(--text-secondary); font-size: 0.5em; }
.clock-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.2em; text-align: center; margin-top: 14px; }

/* ===================== SOCIALS ===================== */
.socials-list { display: flex; flex-direction: column; gap: 8px; }
.social-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateX(-14px);
  filter: blur(4px);
  gap: 10px;
}
.social-card.visible { opacity: 1; transform: translateX(0); filter: blur(0); }
.social-card:hover {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.social-card-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.social-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.social-icon svg { width: 15px; height: 15px; stroke: var(--text-secondary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social-info { min-width: 0; }
.social-platform { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.social-sub {
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px;
}
.social-sub-text {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.social-handle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0; transform: translateY(22px); filter: blur(8px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ===================== FOOTER ===================== */
footer { text-align: center; padding: 36px 20px; font-size: 0.72rem; color: #2a2a2a; font-family: var(--font-mono); }

/* ===================== MOBILE ===================== */
@media (max-width: 600px) {
  section { padding: 70px 14px; }
  .hero-avatar { width: 72px; height: 72px; }
  .hero-name { font-size: clamp(2rem, 12vw, 3.5rem); }
  .now-playing-card { max-width: 100%; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .modal { padding: 20px 16px 28px; border-radius: 16px 16px 0 0; }
  .big-clock { font-size: clamp(1.6rem, 9vw, 2.8rem); }
  .social-sub-text { max-width: 130px; }
  .social-handle { font-size: 0.68rem; }
  .project-row { padding: 12px 13px; }
  .project-row-desc { display: none; }
  #nav-pill { padding: 6px 10px; gap: 0; }
  .nav-btn { padding: 6px 8px; }
}
/* ===================== SCROLL HINT ===================== */
#hero { position: relative; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  filter: blur(6px);
  transition: opacity 1s ease, filter 1s ease;
  pointer-events: none;
}
.scroll-hint.visible { opacity: 1; filter: blur(0); }
.scroll-hint.hidden {
  opacity: 0 !important;
  filter: blur(6px) !important;
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.scroll-hint svg {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
  animation: bounce-soft 2.4s ease-in-out infinite;
}
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
