:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header / Hero */
header {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at bottom left, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

header > * {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header h2 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

header a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

header a:hover {
  color: var(--accent);
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

nav ul li a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-base);
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

/* Main Content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Sections */
section {
  background: var(--bg-card);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  animation-delay: calc(var(--delay, 0) * 100ms);
}

section:nth-child(1) { --delay: 1; }
section:nth-child(2) { --delay: 2; }
section:nth-child(3) { --delay: 3; }
section:nth-child(4) { --delay: 4; }
section:nth-child(5) { --delay: 5; }
section:nth-child(6) { --delay: 6; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Links in main content */
main a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

main a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Experience / Timeline */
.job {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--border);
}

.job::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.job h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.job > p:first-of-type {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.job ul {
  list-style: none;
  padding: 0;
}

.job ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.job ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.job ul li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Nested lists in job */
.job ul ul {
  margin-top: 0.5rem;
  margin-left: 0;
}

.job ul ul li {
  font-size: 0.95rem;
}

.job ul ul li::before {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
}

/* Skills Section */
#skills ul,
.skills-list {
  list-style: none;
  padding: 0;
}

#skills ul li,
.skills-list li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

#skills ul li strong,
.skills-list li strong {
  display: inline-block;
  color: var(--text-primary);
  font-weight: 600;
  min-width: 180px;
}

/* Skill Tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
  transform: translateY(-1px);
}

/* Buttons */
button,
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

button:hover,
.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* GitHub Sections */
#github,
#github-stats,
#github-link {
  background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.03));
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

#github-stats img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

/* Certifications */
#certifications {
  text-align: center;
}

#certButton {
  margin-bottom: 1rem;
}

.certifications-content {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.certifications-content.visible {
  display: block;
  animation: fadeInUp 0.3s ease forwards;
}

.certification {
  margin: 1.5rem 0;
}

.certification img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.certification p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Education */
#education ul {
  list-style: none;
  padding: 0;
}

#education ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

#education ul li:last-child {
  border-bottom: none;
}

/* Projects */
.project-list {
  display: grid;
  gap: 1.5rem;
}

.project {
  padding: 1.5rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.project:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.project h3 a:hover {
  color: var(--primary);
}

.project p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

footer p {
  font-size: 0.9rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 2rem 1rem;
  }
  
  header h1 {
    font-size: 1.75rem;
  }
  
  header h2 {
    font-size: 1rem;
  }
  
  nav ul {
    gap: 0.4rem;
  }
  
  nav ul li a {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
  }
  
  main {
    padding: 1rem;
  }
  
  section {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .job {
    padding-left: 1rem;
  }
  
  #skills ul li strong {
    display: block;
    min-width: auto;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  section {
    padding: 1.25rem;
  }
  
  .job h3 {
    font-size: 1.1rem;
  }
  
  button, .btn {
    width: 100%;
    text-align: center;
  }
}

/* Print Styles */
@media print {
  header {
    background: #333;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .certifications-content {
    display: block !important;
  }
  
  #github-stats,
  nav {
    display: none;
  }
}
