:root {
  --primary: #2563eb;
  --dark: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --success: #10b981;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: #fff;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 1rem 0;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.navbar.visible {
  transform: translateY(0);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
  background: var(--primary);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 10%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.badge {
  display: inline-block;
  background: var(--dark);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.highlight {
  color: var(--primary);
  position: relative;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.stats-bar {
  display: flex;
  gap: 3rem;
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  animation: fadeInUp 0.6s ease 0.3s both;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-block;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  background: #1d4ed8;
}

.btn.ghost {
  border: 2px solid var(--dark);
  color: var(--dark);
  background: transparent;
}

.btn.ghost:hover {
  background: var(--dark);
  color: white;
  transform: translateY(-2px);
}

/* Hero Image */
.hero-image-section {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.image-frame {
  position: relative;
  width: 400px;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: rotate(2deg);
  transition: var(--transition);
  background: white;
  padding: 12px;
}

.image-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.image-badge {
  position: absolute;
  bottom: 30px;
  left: -20px;
  background: var(--dark);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transform: rotate(-3deg);
  transition: var(--transition);
}

.image-frame:hover .image-badge {
  transform: rotate(0deg) translateX(10px);
}

/* Sections */
.section {
  padding: 6rem 10%;
  max-width: 1200px;
  margin: 0 auto;
}

.section.dark {
  background: var(--dark);
  color: white;
  max-width: 100%;
  padding: 6rem 10%;
}

.section-header {
  margin-bottom: 3rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-label {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
}

.section.dark .lead {
  color: #94a3b8;
}

/* Experience Grid */
.experience-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.job {
  border-left: 3px solid var(--primary);
  padding-left: 2rem;
  position: relative;
  margin-bottom: 2.5rem;
  background: white;
  padding: 2rem 2rem 2rem 3rem;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: var(--transition);
  opacity: 0;
  transform: translateX(-20px);
}

.job.revealed {
  opacity: 1;
  transform: translateX(0);
}

.job:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.job::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 2.5rem;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--primary);
  transition: var(--transition);
}

.job:hover::before {
  transform: scale(1.2);
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.job-date {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 4px;
}

.job-company {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: block;
}

.job ul {
  list-style: none;
  color: #475569;
}

.job li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.job li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.metric {
  color: var(--success);
  font-weight: 700;
}

/* Project Section */
.project {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
  border: 1px solid #e2e8f0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.project.revealed {
  opacity: 1;
  transform: translateY(0);
}

.project-tag {
  display: inline-block;
  background: #dbeafe;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.project-description {
  margin-bottom: 1.5rem; 
  color: #475569; 
  line-height: 1.7;
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
}

.highlight-card strong {
  color: var(--dark);
  display: block;
  margin-bottom: 0.5rem;
}

.highlight-card span {
  color: #64748b;
  font-size: 0.9rem;
}

.tech-stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tech-tag {
  background: var(--dark);
  color: white;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: monospace;
  transition: var(--transition);
}

.tech-tag:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* Contact Section */
.contact-links {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-link {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.2rem;
}

.location-text {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #94a3b8;
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    order: 2;
  }
  
  .hero-image-section {
    order: 1;
  }
  
  .image-frame {
    width: 280px;
    height: 280px;
    transform: rotate(0deg);
  }
  
  .image-badge {
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    bottom: -15px;
  }
  
  .stats-bar {
    justify-content: center;
    gap: 2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 2rem 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

@media (max-width: 768px) {
  .hero, .section {
    padding: 3rem 5%;
  }
  
  .stats-bar {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  .job-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .job {
    padding: 1.5rem 1.5rem 1.5rem 2rem;
  }
  
  .project {
    padding: 2rem 1.5rem;
  }
  
  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }
}