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

:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --accent: #6c63ff;
  --accent-light: #ede9ff;
  --border: #e2e8f0;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --radius: 12px;
  --font: 'Inter', sans-serif;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-alt: #1a1a2e;
  --text: #f0f0ff;
  --text-muted: #94a3b8;
  --accent: #a78bfa;
  --accent-light: #2d2b55;
  --border: #2d2b55;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; transition: background var(--transition), color var(--transition); }

a { text-decoration: none; color: inherit; }

.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 64px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(15,15,26,0.9); }
.nav-brand { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--accent); }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 1rem; color: var(--text); }
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

/* ===== HERO ===== */
.hero { min-height: calc(100vh - 64px); display: flex; align-items: center; padding: 4rem 5%; }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 3rem; max-width: 1100px; margin: auto; width: 100%; }
.hero-text { flex: 1; }
.hero-greeting { color: var(--accent); font-weight: 500; font-size: 1rem; margin-bottom: 0.5rem; }
.hero-name { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; margin-bottom: 0.5rem; }
.hero-title { font-size: 1.25rem; color: var(--accent); font-weight: 500; margin-bottom: 1.25rem; }
.hero-bio { color: var(--text-muted); max-width: 500px; margin-bottom: 2rem; font-size: 1rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-socials a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; border-bottom: 1px solid transparent; transition: all var(--transition); }
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); }

.hero-avatar { flex-shrink: 0; text-align: center; }
.avatar-circle {
  width: 220px; height: 220px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; font-weight: 700; color: white;
  margin: 0 auto 1rem; overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.status-badge { display: inline-block; padding: 6px 16px; background: var(--accent-light); color: var(--accent); border-radius: 99px; font-size: 0.8rem; font-weight: 500; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 0.75rem 1.75rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all var(--transition); border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #5a52d5; transform: translateY(-1px); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-light); }
.full-width { width: 100%; text-align: center; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 5%; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1100px; margin: auto; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 3rem; font-size: 1rem; }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.skill-category { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--card-shadow); }
.skill-category h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 1rem; font-weight: 600; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { background: var(--accent-light); color: var(--accent); padding: 4px 12px; border-radius: 99px; font-size: 0.8rem; font-weight: 500; }

/* ===== PROJECTS GRID ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(108,99,255,0.15); border-color: var(--accent); }
.project-icon { font-size: 2rem; }
.project-card h3 { font-size: 1.05rem; font-weight: 600; }
.project-card p { color: var(--text-muted); font-size: 0.88rem; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tags span { background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-muted); padding: 2px 10px; border-radius: 99px; font-size: 0.75rem; }
.project-link { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-top: 0.25rem; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon { font-size: 1.5rem; }
.contact-item strong { display: block; font-size: 0.9rem; font-weight: 600; }
.contact-item p { color: var(--text-muted); font-size: 0.88rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); text-align: center; padding: 2rem; }
.footer p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.5rem; }
.footer a { color: var(--accent); }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-content { flex-direction: column-reverse; text-align: center; }
  .hero-bio { margin: 0 auto 2rem; }
  .hero-buttons, .hero-socials { justify-content: center; }
  .avatar-circle { width: 160px; height: 160px; font-size: 2.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 5%; }
}