/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #6c63ff;
  --accent2: #ff6584;
  --bg: #0d0d1a;
  --bg2: #13132a;
  --bg3: #1a1a35;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --border: rgba(108,99,255,0.2);
  --card: rgba(255,255,255,0.04);
  --radius: 12px;
  --shadow: 0 8px 32px rgba(108,99,255,0.15);
  --transition: 0.3s ease;
}

/* ===== LIGHT MODE VARIABLES ===== */
body.light {
  --bg: #f5f5ff;
  --bg2: #eaeaf8;
  --bg3: #e0e0f2;
  --text: #12122a;
  --text-muted: #555577;
  --border: rgba(108,99,255,0.25);
  --card: rgba(108,99,255,0.06);
  --shadow: 0 8px 32px rgba(108,99,255,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b80ff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }
.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-full { width: 100%; text-align: center; border-radius: var(--radius); }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}
.section-title span { color: var(--accent); }
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 16px auto 0;
  border-radius: 2px;
}

section { padding: 100px 0; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
}
#navbar.scrolled {
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
body.light #navbar.scrolled {
  background: rgba(245,245,255,0.95);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-right: 8px;
}
.theme-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 1px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); transition: all var(--transition); border-radius: 2px; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.15) 0%, transparent 70%);
  padding: 0 24px;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236c63ff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { max-width: 700px; animation: fadeUp 0.8s ease both; }
.hero-greeting {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light .hero-name {
  background: linear-gradient(135deg, #12122a 40%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  min-height: 2.2rem;
}
.hero-title::after { content: '|'; animation: blink 0.7s infinite; }
.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 36px;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.about-image { display: flex; justify-content: center; }
.image-placeholder {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: rgba(255,255,255,0.3);
  box-shadow: 0 0 80px rgba(108,99,255,0.3);
  position: relative;
}
.image-placeholder::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(108,99,255,0.4);
  animation: spin 20s linear infinite;
}
.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.about-stats {
  display: flex;
  gap: 32px;
  margin: 32px 0;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ===== SKILLS ===== */
#skills { background: var(--bg); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transition: transform var(--transition);
}
.skill-card:hover { transform: translateY(-6px); border-color: rgba(108,99,255,0.5); box-shadow: var(--shadow); }
.skill-card:hover::before { transform: scaleX(1); }
.skill-card i { font-size: 2rem; color: var(--accent); margin-bottom: 16px; display: block; }
.skill-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.skill-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(108,99,255,0.5); }
.project-image { position: relative; height: 200px; overflow: hidden; }
.project-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg3), var(--accent) 150%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(108,99,255,0.4);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108,99,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-link {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  transition: background var(--transition);
}
.project-link:hover { background: rgba(255,255,255,0.35); }
.project-info { padding: 24px; }
.project-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.project-info h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.project-info p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== CONTACT ===== */
#contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 32px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-muted);
}
.contact-item i {
  width: 44px; height: 44px;
  background: rgba(108,99,255,0.1);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.social-links { display: flex; gap: 12px; margin-top: 32px; }
.social-link {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); }

/* FORM */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
footer span { color: var(--accent); font-weight: 600; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 70px 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(13,13,26,0.98);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
    padding: 16px 0;
  }
  body.light .nav-links {
    background: rgba(245,245,255,0.98);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 24px; }
  .hamburger { display: flex; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image { order: -1; }
  .image-placeholder { width: 200px; height: 200px; font-size: 4rem; }
  .about-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 220px; text-align: center; }
}
