/* ==========================================================================
   SUPREME PREMIUM PORTFOLIO - RESET & BASE
   ========================================================================== */

:root {
  /* Supreme Color Palette */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1628;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-gradient: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
  
  --accent-primary: #39ff88;
  --accent-secondary: #5a8cff;
  --accent-glow: rgba(57, 255, 136, 0.4);
  
  --text-primary: #ffffff;
  --text-secondary: #b9c3d6;
  --text-muted: #8792a8;
  
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-primary: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(57, 255, 136, 0.3);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-glass: rgba(0, 0, 0, 0.03);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-glass: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   LOADING SCREEN - SUPREME ANIMATION
   ========================================================================== */

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  transform: translateY(30px);
  opacity: 0;
  animation: loaderSlideIn 0.8s 0.2s ease forwards;
}

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

.android-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.android-logo svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px var(--accent-primary));
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: var(--border-glass);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  width: 0;
  border-radius: 2px;
  animation: progressFill 2s 0.5s ease forwards;
}

@keyframes progressFill {
  to { width: 100%; }
}

/* ==========================================================================
   PARTICLE BACKGROUND
   ========================================================================== */

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

/* ==========================================================================
   NAVBAR - FLOATING GLASS EFFECT
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 5%;
  backdrop-filter: blur(25px);
  background: rgba(10, 14, 26, 0.95);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  padding: 1rem 5%;
  backdrop-filter: blur(40px);
  background: rgba(10, 14, 26, 0.98);
  box-shadow: var(--shadow-primary);
}

.nav-brand {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  gap: 0.2rem;
}

.logo {
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.logo .accent {
  color: var(--accent-primary);
  text-shadow: 0 0 20px var(--accent-glow);
}

.role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

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

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle,
.menu-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--accent-primary);
  color: #0a0e1a;
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: 0.3s;
  position: relative;
}

.menu-toggle span + span {
  margin-top: 4px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -5px);
}

/* ==========================================================================
   HERO SECTION - SUPREME 3D PHONE
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 8rem;
  padding: 12rem 5% 6rem;
  position: relative;
}

.hero-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-badge span {
  background: var(--bg-glass);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.reveal-text {
  opacity: 0;
  transform: translateY(40px);
}

.hero-desc {
  font-size: 1.3rem;
  max-width: 600px;
  margin-bottom: 4rem;
  color: var(--text-secondary);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-lg {
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #0a0e1a;
  box-shadow: 0 10px 30px rgba(57, 255, 136, 0.4);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(57, 255, 136, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-glass);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* 3D Phone Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-container {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.phone-frame {
  width: 320px;
  height: 640px;
  background: linear-gradient(145deg, #1a1f3a, #0f1628);
  border-radius: 48px;
  padding: 20px;
  position: relative;
  box-shadow: 
    0 35px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #0d1320;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5);
}

.app-header {
  height: 60px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 20px 20px 0 0;
  margin: 0 -20px 24px;
}

.app-content {
  padding: 0 24px 80px;
}

.app-card {
  height: 140px;
  background: linear-gradient(135deg, rgba(57, 255, 136, 0.2), rgba(90, 140, 255, 0.15));
  border-radius: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.app-card.active {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, rgba(57, 255, 136, 0.4), rgba(90, 140, 255, 0.3));
}

.phone-nav {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  height: 50px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.phone-nav::before {
  content: '';
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.tech-stack {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: techStackFade 0.8s 1s ease forwards;
}

@keyframes techStackFade {
  to { opacity: 1; transform: translateX(-50%) translateY(-10px); }
}

.tech-icon {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 12px rgba(57, 255, 136, 0.4));
  transition: transform 0.3s ease;
}

.tech-icon:hover {
  transform: scale(1.2) rotate(10deg);
}

/* ==========================================================================
   SECTIONS - SUPREME LAYOUT
   ========================================================================== */

.section {
  padding: 120px 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-badge {
  display: inline-block;
  background: var(--bg-glass);
  color: var(--accent-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-glass);
}

.section-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-bio p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.about-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.info-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
}

.info-card h3 {
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.info-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.info-item span:first-child {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Skills Section */
.skills {
  background: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 3rem;
}

.skill-category {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
}

.skill-category h3 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-bar span {
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-progress {
  height: 8px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  width: 0;
  transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(57, 255, 136, 0.4);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 3rem;
}

.project-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
  border-color: rgba(57, 255, 136, 0.3);
  box-shadow: var(--shadow-primary), var(--shadow-glow);
}

.project-header {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(57, 255, 136, 0.9);
  color: #0a0e1a;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  z-index: 2;
}

.project-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-header img {
  transform: scale(1.1);
}

.project-content {
  padding: 2.5rem;
}

.project-content h3 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.project-content ul {
  list-style: none;
  margin-bottom: 2rem;
}

.project-content li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.project-content li::before {
  content: '▸';
  color: var(--accent-primary);
  position: absolute;
  left: 0;
}

.project-footer {
  padding: 0 2.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-tech {
  display: flex;
  gap: 0.75rem;
}

.project-tech span {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Experience Timeline */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateX(-50px);
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px var(--accent-glow);
  z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.timeline-content {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2rem;
  width: 45%;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-primary);
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-date {
  display: block;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  border-color: var(--accent-primary);
  transform: translateX(8px);
}

.contact-item a {
  color: var(--text-primary);
  font-weight: 600;
}

.contact-form {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 3rem;
  backdrop-filter: blur(20px);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.2rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-glass);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent-primary);
  color: #0a0e1a;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  font-size: 1.2rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 10px 30px rgba(57, 255, 136, 0.5);
}

/* ==========================================================================
   RESPONSIVE DESIGN - SUPREME MOBILE
   ========================================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
  }

  .hero-visual {
    order: -1;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    flex-direction: column !important;
    margin-left: 60px;
  }

  .timeline-dot {
    left: 20px !important;
  }

  .timeline-content {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 5%;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    border-top: 1px solid var(--border-glass);
  }

  .nav-links.active {
    display: flex;
  }

  .hero {
    padding: 10rem 5% 4rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-stats {
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 6%;
  }

  .hero-cta,
  .about-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-lg {
    padding: 1.25rem;
    text-align: center;
  }

  .phone-frame {
    width: 280px;
    height: 560px;
  }
}

/* ==========================================================================
   ANIMATION UTILITIES
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(60px);
}

[data-animate="slide-up"] {
  transform: translateY(40px) !important;
}

.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll reveal stagger */
[data-stagger] {
  transition-delay: calc(var(--stagger-index) * 0.1s);
}
