/* ===========================
   ROOT & RESET
=========================== */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #16161f;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8f0;
  --text-muted: #6b6b80;
  --accent: #7c6bff;
  --accent2: #ff6b9d;
  --accent3: #6bffcb;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent2));
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 16px;
  --nav-h: 70px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
  line-height: 1.6;
}

/* NOISE */
.noise {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  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");
  opacity: 0.35;
}

/* ===========================
   NAVBAR
=========================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}

.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem;
  color: var(--text);
}

.nav-links {
  display: flex; gap: 8px; list-style: none; align-items: center;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-donate {
  background: rgba(124, 107, 255, 0.15);
  color: var(--accent) !important;
  border: 1px solid rgba(124, 107, 255, 0.3);
}

.nav-donate:hover {
  background: rgba(124, 107, 255, 0.25) !important;
  color: var(--accent) !important;
}

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.burger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 999;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px;
}

.mobile-menu.open { display: block; }

.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.mob-link {
  display: block; padding: 12px 16px;
  color: var(--text-muted); text-decoration: none;
  border-radius: 8px; transition: all 0.2s;
}

.mob-link:hover { background: var(--bg3); color: var(--text); }

.mob-donate {
  color: var(--accent) !important;
  background: rgba(124, 107, 255, 0.1);
}

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: var(--nav-h) 40px 60px;
  position: relative; overflow: hidden;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,107,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,107,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero::before {
  content: '';
  position: absolute; top: 10%; left: 5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,107,255,0.12), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute; bottom: 10%; right: 5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,107,157,0.08), transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1; max-width: 600px; position: relative; z-index: 1;
  animation: fadeUp 0.8s ease both;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(107,255,203,0.25);
  background: rgba(107,255,203,0.05);
  color: var(--accent3); font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-bottom: 28px;
}

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent3);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-name { display: block; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted); font-size: 1.05rem;
  margin-bottom: 36px; line-height: 1.7;
}

.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  padding: 13px 28px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.25s; display: inline-block;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,107,255,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,107,255,0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg3);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* TERMINAL */
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }

.t-title {
  margin-left: auto; margin-right: auto;
  font-size: 0.75rem; color: var(--text-muted);
}

.terminal-body {
  padding: 14px 18px;
  font-size: 0.85rem;
  min-height: 48px;
}

.t-prompt { color: var(--accent3); margin-right: 8px; }
.t-cmd { color: var(--text); }
.cursor { color: var(--accent); animation: blink 1s infinite; }

/* HERO VISUAL */
.hero-visual {
  flex: 0 0 auto; margin-left: 60px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  animation: fadeUp 0.8s 0.2s ease both;
}

.avatar-wrap {
  position: relative; width: 260px; height: 260px;
}

.avatar-img {
  width: 200px; height: 200px;
  border-radius: 50%; object-fit: cover;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid var(--bg2);
  z-index: 2;
}

.avatar-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
  background: var(--gradient) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: spin 8s linear infinite;
}

.ring2 {
  inset: 15px;
  border: 1px solid rgba(255,107,157,0.3);
  animation: spin 12s linear infinite reverse;
}

/* ===========================
   SECTIONS COMMON
=========================== */
.section { padding: 100px 0; }

.container {
  max-width: 1100px; margin: 0 auto;
  padding: 0 40px;
}

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

.section-tag {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--accent); display: block; margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.5px;
}

.section-sub {
  color: var(--text-muted); margin-top: 12px; font-size: 1rem;
}

/* ===========================
   ABOUT
=========================== */
.about { background: var(--bg2); }

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}

.about-text p {
  color: var(--text-muted); margin-bottom: 20px;
  font-size: 1.05rem; line-height: 1.8;
}

.about-stats {
  display: flex; gap: 32px; margin-top: 32px;
}

.stat { text-align: center; }
.stat-num {
  display: block; font-size: 2.2rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; }

.about-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

.code-block {
  padding: 28px;
  font-family: var(--font-mono); font-size: 0.9rem;
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.8;
}

.cb-key { color: var(--accent2); }
.cb-var { color: var(--accent); }
.cb-prop { color: var(--accent3); }
.cb-str { color: #a8ff8b; }
.cb-bool { color: #ff9944; }

/* ===========================
   SKILLS
=========================== */
.skills-category {
  margin-bottom: 50px;
}

.skills-category-title {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-muted); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}

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

.skills-grid {
  display: flex; flex-wrap: wrap; gap: 14px;
}

.skill-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  transition: all 0.25s; cursor: default;
}

.skill-item:hover {
  border-color: rgba(124,107,255,0.4);
  background: rgba(124,107,255,0.08);
  transform: translateY(-3px);
}

.skill-item img {
  width: 24px; height: 24px; object-fit: contain;
}

/* ===========================
   PROJECTS
=========================== */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: all 0.3s; display: block;
}

.project-card:hover {
  border-color: rgba(124,107,255,0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.project-header {
  padding: 28px 28px 20px;
  display: flex; align-items: flex-start; gap: 16px;
}

.project-logo {
  width: 56px; height: 56px; border-radius: 12px;
  object-fit: cover; background: var(--bg3);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.project-logo-placeholder {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}

.project-header-text { flex: 1; }

.project-name {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 4px;
}

.project-tag {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); 
  background: rgba(124,107,255,0.1);
  border: 1px solid rgba(124,107,255,0.2);
  padding: 3px 8px; border-radius: 6px;
  display: inline-block;
}

.project-desc {
  padding: 0 28px 28px;
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.6;
}

.project-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.project-arrow {
  font-size: 1.1rem; color: var(--accent);
  transition: transform 0.2s;
}

.project-card:hover .project-arrow { transform: translateX(4px); }

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 30px 0;
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}

.footer-copy {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex; gap: 20px;
}

.footer-link {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--text); }

/* ===========================
   MUSIC PLAYER
=========================== */
.music-player {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  background: rgba(17,17,24,0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}

.music-player:hover { transform: translateY(-2px); }

.vinyl-wrap {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}

.vinyl-img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
  transition: none;
}

.vinyl-wrap.playing .vinyl-img {
  animation: vinylSpin 3s linear infinite;
}

.music-info {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 100px;
}

.music-title {
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 120px;
}

.music-artist {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-mono);
}

.music-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient); border: none;
  cursor: pointer; color: #fff; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.music-btn:hover { transform: scale(1.1); }

/* ===========================
   DONATE PAGE
=========================== */
.donate-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--nav-h) 40px 60px;
  position: relative;
}

.donate-page::before {
  content: '';
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,188,46,0.08), transparent 70%);
  pointer-events: none;
}

.donate-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px 50px;
  max-width: 560px; width: 100%;
  text-align: center;
  position: relative; z-index: 1;
}

.donate-emoji { font-size: 4rem; margin-bottom: 20px; display: block; }

.donate-card h1 {
  font-size: 2.2rem; font-weight: 800;
  margin-bottom: 16px; letter-spacing: -0.5px;
}

.donate-card p {
  color: var(--text-muted); line-height: 1.7;
  margin-bottom: 36px;
}

.donate-amounts {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 36px;
}

.amount-btn {
  padding: 10px 22px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; font-size: 1rem;
  font-family: var(--font-display); font-weight: 600;
  transition: all 0.2s;
}

.amount-btn:hover, .amount-btn.selected {
  background: rgba(255,188,46,0.15);
  border-color: rgba(255,188,46,0.5);
  color: #febc2e;
  transform: translateY(-2px);
}

.btn-coffee {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: 12px;
  background: linear-gradient(135deg, #febc2e, #ff9500);
  color: #1a1200; font-weight: 700; font-size: 1.1rem;
  text-decoration: none; border: none; cursor: pointer;
  font-family: var(--font-display);
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(254,188,46,0.3);
  width: 100%;
  justify-content: center;
}

.btn-coffee:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(254,188,46,0.5);
}

.donate-alternatives {
  margin-top: 28px; padding-top: 28px;
  border-top: 1px solid var(--border);
}

.donate-alternatives p {
  font-size: 0.85rem; margin-bottom: 12px;
  color: var(--text-muted);
}

.donate-alt-btns {
  display: flex; gap: 10px; justify-content: center;
}

.btn-alt {
  padding: 10px 20px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
  text-decoration: none; transition: all 0.2s;
  font-family: var(--font-display);
}

.btn-alt:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,255,203,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(107,255,203,0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; gap: 40px; padding-top: calc(var(--nav-h) + 40px); }
  .hero-visual { margin-left: 0; }
  .hero-btns { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .container { padding: 0 20px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .donate-card { padding: 40px 24px; }
  .music-player { bottom: 16px; right: 16px; }
  .music-info { display: none; }
}
