﻿/* ===== CSS VARIABLES ===== */
:root {
  --gradient: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
  --gradient-2: linear-gradient(135deg, #f472b6, #a78bfa, #60a5fa);
  --transition: all 0.3s ease;
  --radius: 16px;
  --radius-sm: 10px;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-2: #0f0f1a;
  --surface: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.1);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --blob-1: rgba(167,139,250,0.15);
  --blob-2: rgba(96,165,250,0.12);
  --blob-3: rgba(52,211,153,0.1);
}

[data-theme="light"] {
  --bg: #f0f4ff;
  --bg-2: #e8eeff;
  --surface: rgba(255,255,255,0.6);
  --surface-hover: rgba(255,255,255,0.85);
  --border: rgba(0,0,0,0.08);
  --text: #0f172a;
  --text-muted: #475569;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --blob-1: rgba(167,139,250,0.25);
  --blob-2: rgba(96,165,250,0.2);
  --blob-3: rgba(52,211,153,0.18);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== BACKGROUND BLOBS ===== */
.bg-blobs {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px);
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 { width: 500px; height: 500px; background: var(--blob-1); top: -100px; left: -100px; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--blob-2); top: 40%; right: -100px; animation-delay: 3s; }
.blob-3 { width: 350px; height: 350px; background: var(--blob-3); bottom: -50px; left: 30%; animation-delay: 6s; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-30px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.glass-card:hover { background: var(--surface-hover); }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { padding: 0.7rem 2rem; box-shadow: var(--shadow); }
.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.4rem; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-bracket { opacity: 0.7; }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  position: relative; transition: var(--transition);
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient); border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.theme-toggle {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
}
.theme-toggle:hover { background: var(--surface-hover); transform: rotate(20deg); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 6rem 2rem 4rem;
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  gap: 4rem;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-family: 'Fira Code', monospace;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted); margin-bottom: 1.5rem;
  min-height: 2rem;
}
.cursor { animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-desc {
  font-size: 1rem; color: var(--text-muted);
  max-width: 500px; margin-bottom: 2rem; line-height: 1.8;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn {
  padding: 0.75rem 1.75rem; border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 20px rgba(167,139,250,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(167,139,250,0.5); }
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-hover); transform: translateY(-2px); }
.hero-socials { display: flex; gap: 1rem; }
.social-link {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-muted);
  transition: var(--transition);
}
.social-link:hover {
  background: var(--gradient); color: #fff; border-color: transparent;
  transform: translateY(-3px);
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.avatar-container {
  position: relative; width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.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;
}
.ring-2 {
  inset: 15px; animation: spin 12s linear infinite reverse;
  border-width: 1px; opacity: 0.5;
}
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.avatar-inner {
  width: 220px; height: 220px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.avatar-initials {
  font-size: 3.5rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.avatar-photo {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.floating-badge {
  position: absolute; padding: 0.4rem 0.8rem;
  font-size: 0.75rem; font-weight: 600; border-radius: 50px;
  display: flex; align-items: center; gap: 0.4rem;
  animation: floatBadge 3s ease-in-out infinite;
  white-space: nowrap;
}
.badge-1 { top: -10px; left: -30px; animation-delay: 0s; }
.badge-2 { top: -10px; right: -30px; animation-delay: 0.8s; }
.badge-3 { bottom: -10px; left: -20px; animation-delay: 1.6s; }
.badge-4 { bottom: -10px; right: -20px; animation-delay: 2.4s; }
@keyframes floatBadge {
  0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)}
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.75rem;
}
.scroll-mouse {
  width: 24px; height: 38px; border: 2px solid var(--border);
  border-radius: 12px; display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
  width: 4px; height: 8px; background: var(--gradient);
  border-radius: 2px; animation: scrollAnim 2s infinite;
}
@keyframes scrollAnim {
  0%{transform:translateY(0);opacity:1} 100%{transform:translateY(12px);opacity:0}
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 2rem; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; padding: 0.3rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; font-size: 0.8rem; color: var(--text-muted);
  font-family: 'Fira Code', monospace; margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.about-text { padding: 2.5rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.8; }
.about-text strong { color: var(--text); }
.about-stats { display: flex; gap: 2rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-num { font-size: 1.4rem; font-weight: 800; display: block; letter-spacing: -0.5px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-card {
  padding: 1.5rem; display: flex; align-items: flex-start; gap: 1rem;
}
.info-card i {
  font-size: 1.3rem; margin-top: 2px;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.info-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; }
.info-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.skill-category { padding: 2rem; }
.skill-category h3 {
  font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.skill-category h3 i {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 1rem; border-radius: 50px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 500; color: var(--text);
  transition: var(--transition); cursor: default;
}
.skill-chip:hover { background: var(--surface-hover); transform: translateY(-2px); border-color: rgba(167,139,250,0.4); }
.skill-chip i {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-size: 0.9rem;
}

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.project-card { padding: 2rem; position: relative; overflow: hidden; }
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient); opacity: 0; transition: var(--transition);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { transform: translateY(-5px); }
.project-card.featured { border-color: rgba(167,139,250,0.3); }
.featured-label {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--gradient); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.7rem;
  border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px;
}
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.project-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.project-links { display: flex; gap: 0.75rem; }
.project-links a {
  color: var(--text-muted); font-size: 1.1rem; transition: var(--transition);
}
.project-links a:hover { color: var(--text); transform: translateY(-2px); }
.project-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.project-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.2rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tags span {
  padding: 0.25rem 0.75rem; border-radius: 50px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 500; color: var(--text-muted);
}
.projects-cta { text-align: center; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-intro { color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; font-size: 1rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem;
  transition: var(--transition);
}
.contact-item:hover { transform: translateX(5px); }
.contact-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; flex-shrink: 0;
}
.contact-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.contact-value { font-size: 0.9rem; font-weight: 500; }
.contact-form { padding: 2.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 0.9rem;
  transition: var(--transition); outline: none;
  backdrop-filter: blur(10px);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: rgba(167,139,250,0.5);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 120px; }
.full-width { width: 100%; justify-content: center; }
.form-success {
  display: none; margin-top: 1rem; padding: 0.75rem 1rem;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3);
  border-radius: var(--radius-sm); color: #34d399;
  font-size: 0.875rem; text-align: center;
}
.form-success.show { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem; text-align: center;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.footer-logo {
  font-family: 'Fira Code', monospace; font-size: 1.5rem; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.75rem;
}
.footer p { color: var(--text-muted); font-size: 0.9rem; }
.footer-sub { font-size: 0.8rem; margin-top: 0.3rem; }

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--bg-2); backdrop-filter: blur(20px);
    flex-direction: column; padding: 2rem;
    gap: 1.5rem; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); opacity: 0;
    transition: var(--transition); z-index: 999;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .hamburger { display: flex; }
  .hero { flex-direction: column; text-align: center; padding-top: 7rem; gap: 3rem; }
  .hero-desc { margin: 0 auto 2rem; }
  .hero-cta { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-visual { order: -1; }
  .avatar-container { width: 260px; height: 260px; }
  .avatar-inner { width: 180px; height: 180px; }
  .scroll-indicator { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .navbar { padding: 1rem; }
  .section { padding: 4rem 1rem; }
  .about-cards { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .about-stats { gap: 1rem; }
}
