@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

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

:root {
  --bg: #050505;
  --surface: rgba(18, 18, 18, 0.65);
  --surface-border: rgba(255, 255, 255, 0.1);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --orb-color-1: rgba(99, 102, 241, 0.2);
  --orb-color-2: rgba(168, 85, 247, 0.2);
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-border: rgba(255, 255, 255, 0.8);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --orb-color-1: rgba(99, 102, 241, 0.3);
  --orb-color-2: rgba(168, 85, 247, 0.3);
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  position: relative;
  background: transparent;
  transition: color 0.3s ease;
}

/* Flat Background */
.bg-orbs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background-color: var(--bg);
  transition: background-color 0.5s ease;
}

.orb { display: none; }

.card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Card Banner */
.card-banner {
  height: 180px;
  width: 100%;
  background-image: linear-gradient(to bottom, rgba(5,5,5,0.2), rgba(5,5,5,0.9)), url('banner.png');
  background-size: 160%;
  background-position: center center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--surface-border);
  position: relative;
  /* Curved bottom edge */
  clip-path: ellipse(150% 100% at 50% 0%);
}

html[data-theme="light"] .card-banner {
  background-image: linear-gradient(to bottom, rgba(248,250,252,0.3), rgba(248,250,252,0.85)), url('banner.png');
  background-size: 160%;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Card Content Wrapper */
.card-content {
  padding: 0 2.5rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.3s ease;
  z-index: 20;
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}
.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Profile Section */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1rem;
}

.avatar-container {
  position: relative;
  margin-top: -65px;
  margin-bottom: 1rem;
  z-index: 2;
}

.avatar-container::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    #a855f7,
    #ec4899,
    #f97316,
    #eab308,
    #22c55e,
    #06b6d4,
    var(--accent)
  );
  animation: ringRotate 4s linear infinite;
  z-index: -1;
}

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

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--surface);
  background: var(--surface);
  transition: border-color 0.3s ease, background 0.3s ease;
  position: relative;
  z-index: 1;
}

.status-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border: 4px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Dynamic Greeting */
.greeting-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  opacity: 0;
  transform: translateY(-5px);
  animation: greetFadeIn 0.5s ease 1.2s forwards;
}

.greeting {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.live-clock {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Outfit', monospace;
  color: var(--accent);
  letter-spacing: 1px;
}

@keyframes greetFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Page Transition Overlay */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

.profile-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  min-height: 2.2rem;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}

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

.status-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: #10b981;
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.profile-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.location svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: 99px;
  border: 1px solid var(--surface-border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

html[data-theme="light"] .tag::after {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent);
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Bio */
.bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 2.5rem;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.bio strong {
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Sections */
nav, section {
  width: 100%;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.section-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0;
  text-transform: none;
}

/* Links */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateX(4px);
}

.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.link-item:hover .link-icon {
  background: var(--accent);
  color: white;
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.25) rotate(-12deg); }
  50% { transform: scale(0.9) rotate(8deg); }
  70% { transform: scale(1.1) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
}

html[data-theme="light"] .ripple {
  background: rgba(99, 102, 241, 0.15);
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.link-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.link-content {
  flex: 1;
}

.link-name {
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-handle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.proj-badge {
  font-size: 0.625rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 500;
}

.arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--accent);
}

.link-item:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--surface-border);
  padding-top: 1.5rem;
}

.footer strong {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 1rem 0.5rem;
  }

  .card {
    border-radius: 20px;
    max-width: 100%;
  }

  .card-banner {
    height: 140px;
  }

  .card-content {
    padding: 0 1.5rem 2rem 1.5rem;
  }
  
  .avatar-container {
    margin-top: -50px;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .profile-text h1 {
    font-size: 1.35rem;
    min-height: 1.8rem;
  }

  .location {
    font-size: 0.8rem;
  }

  .tags {
    gap: 0.4rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .bio {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .link-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .link-icon {
    width: 36px;
    height: 36px;
  }

  .link-name {
    font-size: 0.85rem;
  }

  .link-handle {
    font-size: 0.75rem;
  }

  .section-label {
    font-size: 0.7rem;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    top: 1rem;
    right: 1rem;
  }

  .status-badge {
    bottom: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-width: 3px;
  }
}

/* Custom Cursor */
@media (pointer: fine) {
  body, a, button, input, select, textarea {
    cursor: none;
  }
  
  .cursor-dot,
  .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
  }
  
  .cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
  }
  
  .cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
  }
  
  body.cursor-hover .cursor-outline {
    width: 50px;
    height: 50px;
    background-color: rgba(99, 102, 241, 0.1);
    border-color: transparent;
  }
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Theme Eclipse Transition */
.theme-eclipse {
  position: fixed;
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transform: scale(0);
  animation: eclipseExpand 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes eclipseExpand {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Stats Counter */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-plus {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--surface-border);
}

/* Easter Egg */
.easter-egg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 10000;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.3);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.easter-egg.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.easter-emoji {
  font-size: 3rem;
  animation: rocketLaunch 1s ease infinite alternate;
}

@keyframes rocketLaunch {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.easter-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  max-width: 200px;
  line-height: 1.4;
}
