:root {
  --bg: #0a0e17;
  --card: #151d2e;
  --text: #f0f4fc;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6ea8fe;
  --accent-secondary: #a78bfa;
  --gradient-1: linear-gradient(135deg, #6ea8fe 0%, #a78bfa 100%);
  --gradient-2: linear-gradient(135deg, rgba(110, 168, 254, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
}

:root.light {
  --bg: #fafbfc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --accent: #3b82f6;
  --accent-secondary: #8b5cf6;
  --gradient-1: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.12);
}

* { 
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background decoration */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(ellipse at top, rgba(110, 168, 254, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { 
  color: var(--accent); 
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover { 
  color: var(--accent-secondary);
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 20px 24px;
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  padding: 10px 14px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 2px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.logo:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(110, 168, 254, 0.2);
}

.nav { 
  display: flex; 
  gap: 8px; 
}

.nav a { 
  color: var(--muted); 
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav a:hover { 
  color: var(--text);
  background: var(--gradient-2);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  padding-top: 60px;
  padding-bottom: 80px;
  align-items: start;
}

h1 { 
  font-size: 56px; 
  margin: 0 0 16px; 
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subtitle { 
  color: var(--muted); 
  margin: 0 0 24px; 
  font-size: 20px;
  line-height: 1.5;
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

.meta { 
  color: var(--muted); 
  margin-top: 20px;
  font-size: 15px;
  animation: fadeInUp 0.6s ease 0.3s backwards;
}

.section { 
  padding-top: 40px; 
  padding-bottom: 40px;
}

.section h2 { 
  margin: 0 0 24px; 
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 12px;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.card h3 { 
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.card ul { 
  margin: 12px 0 0; 
  padding-left: 20px; 
  color: var(--muted);
  line-height: 1.8;
}

.card ul li {
  margin-bottom: 6px;
}

.card p { 
  margin: 0; 
  color: var(--muted);
  line-height: 1.6;
}

.links { 
  display: flex; 
  gap: 12px; 
  margin-top: 16px;
  flex-wrap: wrap;
}

.links a {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--gradient-2);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.links a:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(110, 168, 254, 0.2);
  transform: translateY(-1px);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--gradient-1);
  color: white;
  border: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(110, 168, 254, 0.35);
  color: white;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.cta { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding-top: 24px;
  padding-bottom: 32px;
  text-align: center;
  margin-top: 40px;
}

/* Smooth scroll offset for anchor links */
section {
  scroll-margin-top: 80px;
}

@media (max-width: 860px) {
  .hero { 
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 60px;
  }
  h1 { font-size: 42px; }
  .subtitle { font-size: 18px; }
  .grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .container { padding: 20px; }
  .section h2 { font-size: 28px; }
  .cert-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Timeline Styles */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s ease;
}

.timeline-item:hover {
  border-left-color: var(--accent);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--gradient-1);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.company {
  color: var(--accent);
  font-weight: 600;
}

.duration {
  color: var(--muted);
  font-size: 14px;
  margin-left: auto;
}

.timeline-details {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.timeline-details li {
  margin-bottom: 8px;
}

/* Certifications Grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: var(--shadow-lg);
}

.cert-card:hover::before {
  opacity: 1;
}

.cert-card > * {
  position: relative;
  z-index: 1;
}

.cert-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  background: var(--gradient-1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.cert-icon svg {
  width: 24px;
  height: 24px;
}

.cert-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.cert-date {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.project-header h3 {
  margin: 0;
  flex: 1;
}

.project-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--gradient-2);
  color: var(--accent);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.project-card .links {
  margin-top: auto;
  padding-top: 16px;
}

.project-card .links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--gradient-2);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.project-card .links a svg {
  flex-shrink: 0;
}

.project-card .links a:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(110, 168, 254, 0.2);
  transform: translateY(-1px);
}

/* Contact Section */
.contact-intro {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.contact-link svg {
  flex-shrink: 0;
  color: var(--accent);
}

.contact-link:hover {
  transform: translateX(4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  background: var(--gradient-2);
}

#contact h2 {
  text-align: center;
}