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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #7c3aed;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== Layout ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ===== Hero / About ===== */
#about {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 1.5rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25);
}

#about h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.bio {
  max-width: 620px;
  margin: 0 auto 1.75rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== Section Shared ===== */
section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

/* ===== Skills ===== */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ===== Certification & Education & Experience ===== */
.cert-badge {
  width: 100px;
  margin-bottom: 0.8rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.timeline-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.timeline-item .institution {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-item .period {
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-item ul {
  margin-top: 0.4rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-item ul li {
  margin-bottom: 0.25rem;
}

/* ===== Projects ===== */
#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.project-card .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ===== CV Download ===== */
#cv {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border-radius: var(--radius);
  margin: 0 1.5rem;
  text-align: center;
  padding: 3.5rem 2rem;
}

#cv h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

#cv p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.75rem;
}
.cv-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  #about h1 {
    font-size: 1.8rem;
  }

  .nav-links {
    gap: 1rem;
  }

  #cv {
    margin: 0;
    border-radius: 0;
  }
}

@media print {
  nav, .contact-links, #cv, footer {
    display: none;
  }

  body {
    background: #fff;
  }
}
